-
Notifications
You must be signed in to change notification settings - Fork 572
/
models.ts
46 lines (43 loc) · 1.13 KB
/
models.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* A interface recognizable as a numeric value that stores the underlying number
* as a string.
*
* Intended to be a deserialization target for the DynamoDB Document Client when
* the `wrapNumbers` flag is set. This allows for numeric values that lose
* precision when converted to JavaScript's `number` type.
*/
export interface NumberValue {
readonly value: string;
}
export type NativeAttributeValue =
| NativeScalarAttributeValue
| { [key: string]: NativeAttributeValue }
| NativeAttributeValue[]
| Set<number | bigint | NumberValue | string | NativeAttributeBinary | undefined>
| InstanceType<{ new (...args: any[]): any }>; // accepts any class instance with options.convertClassInstanceToMap
export type NativeScalarAttributeValue =
| null
| undefined
| boolean
| number
| NumberValue
| bigint
| NativeAttributeBinary
| string;
export type NativeAttributeBinary =
| ArrayBuffer
| Blob
| Buffer
| DataView
| File
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array
| BigInt64Array
| BigUint64Array;