Skip to content

Commit 8ff8123

Browse files
committed
fix typo
1 parent 25de921 commit 8ff8123

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@moicky/dynamodb",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"description": "Contains a collection of convenience functions for working with AWS DynamoDB",

src/transactions/types.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ export type NestedTypedParams<
6262

6363
type Prev = [never, 0, 1, 2, 3];
6464

65-
type PathEntry = { path: string; type: any };
66-
6765
type DeepNumberPathEntries<
6866
T,
6967
Prefix extends string = "",
@@ -86,8 +84,9 @@ type DeepNumberPathEntries<
8684
}[keyof T & string];
8785

8886
export type StrictDeepNumberUpdates<T> = {
89-
[Entry in DeepNumberPathEntries<T> &
90-
PathEntry as Entry["path"]]?: Entry["type"];
87+
[E in DeepNumberPathEntries<T> as E extends { path: string }
88+
? E["path"]
89+
: never]?: E extends { type: infer V } ? V : never;
9190
};
9291

9392
type DeepSetPathEntries<T, Prefix extends string = "", D extends number = 3> = [
@@ -107,7 +106,7 @@ type DeepSetPathEntries<T, Prefix extends string = "", D extends number = 3> = [
107106
}[keyof T & string];
108107

109108
export type DeepSetUpdates<T> = {
110-
[Entry in DeepSetPathEntries<T> & PathEntry as Entry["path"]]?:
111-
| Entry["type"][]
112-
| Set<Entry["type"]>;
109+
[E in DeepSetPathEntries<T> as E extends { path: string }
110+
? E["path"]
111+
: never]?: E extends { type: infer V } ? V[] | Set<V> : never;
113112
};

0 commit comments

Comments
 (0)