8000 add "& T" to some places where it's missing in RecordInstance (#1464) · CrazyPython/immutable-js@4ca6e19 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ca6e19

Browse files
jedwards1211leebyron
authored andcommitted
add "& T" to some places where it's missing in RecordInstance (immutable-js#1464)
Not sure why it was missing from `updateIn<U>` or `withMutations` arguments
1 parent b714a8b commit 4ca6e19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

type-definitions/immutable.js.flow

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,8 +1456,8 @@ declare class RecordInstance<T: Object> {
14561456
removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>>(keyPath: [K, K2, K3, K4]): this & T;
14571457
removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5]): this & T;
14581458

1459-
updateIn<U>(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U;
1460-
updateIn<U>(keyPath: [], updater: (value: this) => U): U;
1459+
updateIn<U>(keyPath: [], notSetValue: mixed, updater: (value: this & T) => U): U;
1460+
updateIn<U>(keyPath: [], updater: (value: this & T) => U): U;
14611461
updateIn<NSV, K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], notSetValue: NSV, updater: (value: $ValOf<T, K>) => S): this & T;
14621462
updateIn<K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], updater: (value: $ValOf<T, K>) => S): this & T;
14631463
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(keyPath: [K, K2], notSetValue: NSV, updater: (value: $ValOf<$ValOf<T, K>, K2> | NSV) => S): this & T;
@@ -1478,7 +1478,7 @@ declare class RecordInstance<T: Object> {
14781478
toJSON(): T;
14791479
toObject(): T;
14801480

1481-
withMutations(mutator: (mutable: this) => mixed): this & T;
1481+
withMutations(mutator: (mutable: this & T) => mixed): this & T;
14821482
asMutable(): this & T;
14831483
wasAltered(): boolean;
14841484
asImmutable(): this & T;

0 commit comments

Comments
 (0)
0