Skip to content

Commit e116b4c

Browse files
authored
fix(util-dynamodb): perform global interface check in NativeAttributeBinary union (#6261)
1 parent 630d429 commit e116b4c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: packages/util-dynamodb/src/models.ts

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type { Exact } from "@smithy/types";
2-
31
/**
42
* A interface recognizable as a numeric value that stores the underlying number
53
* as a string.
@@ -44,19 +42,17 @@ declare global {
4442
interface File {}
4543
}
4644

47-
type Unavailable = never;
48-
type BlobDefined = Exact<Blob, {}> extends true ? false : true;
49-
type BlobOptionalType = BlobDefined extends true ? Blob : Unavailable;
45+
type IfDefined<T> = {} extends T ? never : T;
5046

5147
/**
5248
* @public
5349
*/
5450
export type NativeAttributeBinary =
5551
| ArrayBuffer
56-
| BlobOptionalType
57-
| Buffer
52+
| IfDefined<Blob>
53+
| IfDefined<Buffer>
5854
| DataView
59-
| File
55+
| IfDefined<File>
6056
| Int8Array
6157
| Uint8Array
6258
| Uint8ClampedArray

0 commit comments

Comments
 (0)