8000 Add flow test for #1389 by leebyron · Pull Request #1390 · immutable-js/immutable-js · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions type-definitions/tests/immutable-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ stringToNumberOrString = Map({'a': 1}).mergeDeepWith((previous, next, key) => 1,
// $ExpectError - the array [1] is not a valid argument
stringToNumber = Map({'a': 1}).mergeDeepWith((previous, next, key) => 1, [1])

// KeyedSeq can merge into Map
var stringToStringSeq: KeyedSeq<string, string> = Seq({'b': 'B'});
stringToNumberOrString = Map({'a': 1}).merge(stringToStringSeq);

// $ExpectError
stringToNumber = Map({'a': 1}).setIn([], 0)
// $ExpectError
Expand Down
0