Commit 31be3da
committed
Fix DynamoDBStreamChangeRecordSchema.dynamodb type
Before:
// z.infer<typeof DynamoDBStreamChangeRecordSchema>
dynamodb: {
Keys: Record<string, Record<string, any>>;
SizeBytes: number;
ApproximateCreationDateTime?: number | undefined;
NewImage?: Record<string, any> | undefined;
OldImage?: Record<string, any> | undefined;
};
After:
dynamodb: {
Keys: Record<string, Record<string, any>>;
SequenceNumber: string;
SizeBytes: number;
StreamViewType: "NEW_IMAGE" | "OLD_IMAGE" | "NEW_AND_OLD_IMAGES" | "KEYS_ONLY";
ApproximateCreationDateTime?: number | undefined;
NewImage?: Record<string, any> | undefined;
OldImage?: Record<string, any> | undefined;
} | {
Keys: Record<string, Record<string, any>>;
SizeBytes: number;
ApproximateCreationDateTime?: number | undefined;
NewImage?: Record<...> | undefined;
OldImage?: Record<...> | undefined;
};
This converts `unmarshallDynamoDBTransform` to a generic function
and specifies the expected type for both usages.1 parent ec6cf2e commit 31be3da
1 file changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | | - | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
76 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| |||
138 | 152 | | |
139 | 153 | | |
140 | 154 | | |
141 | | - | |
| 155 | + | |
142 | 156 | | |
143 | 157 | | |
144 | 158 | | |
| |||
0 commit comments