immutable 4.0.0-rc.10 → 4.0.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,3 @@
1
- /**
2
- * Copyright (c) 2014-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
1
  /**
9
2
  * This file provides type definitions for use with the Flow type checker.
10
3
  *
@@ -30,28 +23,40 @@
30
23
 
31
24
  // Helper type that represents plain objects allowed as arguments to
32
25
  // some constructors and functions.
33
- type PlainObjInput<K, V> = {+[key: K]: V, __proto__: null};
26
+ type PlainObjInput<K, V> = { +[key: K]: V, __proto__: null };
27
+
28
+ type K<T> = $Keys<T>;
34
29
 
35
30
  // Helper types to extract the "keys" and "values" use by the *In() methods.
36
31
  type $KeyOf<C> = $Call<
37
- & (<K>(?_Collection<K, mixed>) => K)
38
- & (<T>(?$ReadOnlyArray<T>) => number)
39
- & (<T>(?RecordInstance<T> | T) => $Keys<T>),
32
+ (<K>(?_Collection<K, mixed>) => K) &
33
+ (<T>(?$ReadOnlyArray<T>) => number) &
34
+ (<T>(?RecordInstance<T> | T) => $Keys<T>) &
35
+ (<T: Object>(T) => $Keys<T>),
40
36
  C
41
37
  >;
42
38
 
43
39
  type $ValOf<C, K = $KeyOf<C>> = $Call<
44
- & (<V>(?_Collection<any, V>) => V)
45
- & (<T>(?$ReadOnlyArray<T>) => T)
46
- & (<T, K: $Keys<T>>(?RecordInstance<T> | T, K) => $ElementType<T, K>)
47
- & (<V>(?{[any]: V}) => V),
40
+ (<V>(?_Collection<any, V>) => V) &
41
+ (<T>(?$ReadOnlyArray<T>) => T) &
42
+ (<T, K: $Keys<T>>(?RecordInstance<T> | T, K) => $ElementType<T, K>) &
43
+ (<T: Object>(T) => $Values<T>),
48
44
  C,
49
45
  K
50
46
  >;
51
47
 
52
48
  type $IterableOf<C> = $Call<
53
- & (<V: Array<any> | IndexedCollection<any> | SetCollection<any>>(V) => Iterable<$ValOf<V>>)
54
- & (<V: KeyedCollection<any, any> | RecordInstance<any> | PlainObjInput<any, any>>(V) => Iterable<[$KeyOf<V>, $ValOf<V>]>),
49
+ (<V: Array<any> | IndexedCollection<any> | SetCollection<any>>(
50
+ V
51
+ ) => Iterable<$ValOf<V>>) &
52
+ (<
53
+ V:
54
+ | KeyedCollection<any, any>
55
+ | RecordInstance<any>
56
+ | PlainObjInput<any, any>
57
+ >(
58
+ V
59
+ ) => Iterable<[$KeyOf<V>, $ValOf<V>]>),
55
60
  C
56
61
  >;
57
62
 
@@ -70,16 +75,39 @@ declare class _Collection<K, +V> implements ValueObject {
70
75
 
71
76
  getIn(keyPath: [], notSetValue?: mixed): this;
72
77
  getIn<NSV>(keyPath: [K], notSetValue: NSV): V | NSV;
73
- getIn<NSV, K2: $KeyOf<V>>(keyPath: [K, K2], notSetValue: NSV): $ValOf<V, K2> | NSV;
74
- getIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(keyPath: [K, K2, K3], notSetValue: NSV): $ValOf<$ValOf<V, K2>, K3> | NSV;
75
- getIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>>(keyPath: [K, K2, K3, K4], notSetValue: NSV): $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4> | NSV;
76
- getIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5> | NSV;
78
+ getIn<NSV, K2: $KeyOf<V>>(
79
+ keyPath: [K, K2],
80
+ notSetValue: NSV
81
+ ): $ValOf<V, K2> | NSV;
82
+ getIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(
83
+ keyPath: [K, K2, K3],
84
+ notSetValue: NSV
85
+ ): $ValOf<$ValOf<V, K2>, K3> | NSV;
86
+ getIn<
87
+ NSV,
88
+ K2: $KeyOf<V>,
89
+ K3: $KeyOf<$ValOf<V, K2>>,
90
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>
91
+ >(
92
+ keyPath: [K, K2, K3, K4],
93
+ notSetValue: NSV
94
+ ): $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4> | NSV;
95
+ getIn<
96
+ NSV,
97
+ K2: $KeyOf<V>,
98
+ K3: $KeyOf<$ValOf<V, K2>>,
99
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
100
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>
101
+ >(
102
+ keyPath: [K, K2, K3, K4, K5],
103
+ notSetValue: NSV
104
+ ): $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5> | NSV;
77
105
 
78
106
  update<U>(updater: (value: this) => U): U;
79
107
 
80
108
  toJS(): Array<any> | { [key: string]: mixed };
81
109
  toJSON(): Array<V> | { [key: string]: V };
82
- toArray(): Array<V> | Array<[K,V]>;
110
+ toArray(): Array<V> | Array<[K, V]>;
83
111
  toObject(): { [key: string]: V };
84
112
  toMap(): Map<K, V>;
85
113
  toOrderedMap(): OrderedMap<K, V>;
@@ -123,12 +151,24 @@ declare class _Collection<K, +V> implements ValueObject {
123
151
  butLast(): this;
124
152
  skip(amount: number): this;
125
153
  skipLast(amount: number): this;
126
- skipWhile(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): this;
127
- skipUntil(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): this;
154
+ skipWhile(
155
+ predicate: (value: V, key: K, iter: this) => mixed,
156
+ context?: mixed
157
+ ): this;
158
+ skipUntil(
159
+ predicate: (value: V, key: K, iter: this) => mixed,
160
+ context?: mixed
161
+ ): this;
128
162
  take(amount: number): this;
129
163
  takeLast(amount: number): this;
130
- takeWhile(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): this;
131
- takeUntil(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): this;
164
+ takeWhile(
165
+ predicate: (value: V, key: K, iter: this) => mixed,
166
+ context?: mixed
167
+ ): this;
168
+ takeUntil(
169
+ predicate: (value: V, key: K, iter: this) => mixed,
170
+ context?: mixed
171
+ ): this;
132
172
 
133
173
  filterNot(
134
174
  predicate: (value: V, key: K, iter: this) => mixed,
@@ -138,27 +178,37 @@ declare class _Collection<K, +V> implements ValueObject {
138
178
  reduce<R>(
139
179
  reducer: (reduction: R, value: V, key: K, iter: this) => R,
140
180
  initialReduction: R,
141
- context?: mixed,
142
- ): R;
143
- reduce<R>(
144
- reducer: (reduction: V | R, value: V, key: K, iter: this) => R
181
+ context?: mixed
145
182
  ): R;
183
+ reduce<R>(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R;
146
184
 
147
185
  reduceRight<R>(
148
186
  reducer: (reduction: R, value: V, key: K, iter: this) => R,
149
187
  initialReduction: R,
150
- context?: mixed,
188
+ context?: mixed
151
189
  ): R;
152
190
  reduceRight<R>(
153
191
  reducer: (reduction: V | R, value: V, key: K, iter: this) => R
154
192
  ): R;
155
193
 
156
- every(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): boolean;
157
- some(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): boolean;
194
+ every(
195
+ predicate: (value: V, key: K, iter: this) => mixed,
196
+ context?: mixed
197
+ ): boolean;
198
+ some(
199
+ predicate: (value: V, key: K, iter: this) => mixed,
200
+ context?: mixed
201
+ ): boolean;
158
202
  join(separator?: string): string;
159
203
  isEmpty(): boolean;
160
- count(predicate?: (value: V, key: K, iter: this) => mixed, context?: mixed): number;
161
- countBy<G>(grouper: (value: V, key: K, iter: this) => G, context?: mixed): Map<G, number>;
204
+ count(
205
+ predicate?: (value: V, key: K, iter: this) => mixed,
206
+ context?: mixed
207
+ ): number;
208
+ countBy<G>(
209
+ grouper: (value: V, key: K, iter: this) => G,
210
+ context?: mixed
211
+ ): Map<G, number>;
162
212
 
163
213
  find<NSV>(
164
214
  predicate: (value: V, key: K, iter: this) => mixed,
@@ -172,10 +222,18 @@ declare class _Collection<K, +V> implements ValueObject {
172
222
  ): V | NSV;
173
223
 
174
224
  findEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void;
175
- findLastEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void;
225
+ findLastEntry(
226
+ predicate: (value: V, key: K, iter: this) => mixed
227
+ ): [K, V] | void;
176
228
 
177
- findKey(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): K | void;
178
- findLastKey(predicate: (value: V, key: K, iter: this) => mixed, context?: mixed): K | void;
229
+ findKey(
230
+ predicate: (value: V, key: K, iter: this) => mixed,
231
+ context?: mixed
232
+ ): K | void;
233
+ findLastKey(
234
+ predicate: (value: V, key: K, iter: this) => mixed,
235
+ context?: mixed
236
+ ): K | void;
179
237
 
180
238
  keyOf(searchValue: V): K | void;
181
239
  lastKeyOf(searchValue: V): K | void;
@@ -195,29 +253,45 @@ declare class _Collection<K, +V> implements ValueObject {
195
253
  isSuperset(iter: Iterable<V>): boolean;
196
254
  }
197
255
 
198
- declare function isImmutable(maybeImmutable: mixed): boolean %checks(maybeImmutable instanceof Collection);
199
- declare function isCollection(maybeCollection: mixed): boolean %checks(maybeCollection instanceof Collection);
200
- declare function isKeyed(maybeKeyed: mixed): boolean %checks(maybeKeyed instanceof KeyedCollection);
201
- declare function isIndexed(maybeIndexed: mixed): boolean %checks(maybeIndexed instanceof IndexedCollection);
202
- declare function isAssociative(maybeAssociative: mixed): boolean %checks(
203
- maybeAssociative instanceof KeyedCollection ||
204
- maybeAssociative instanceof IndexedCollection
205
- );
206
- declare function isOrdered(maybeOrdered: mixed): boolean %checks(
207
- maybeOrdered instanceof IndexedCollection ||
256
+ declare function isImmutable(
257
+ maybeImmutable: mixed
258
+ ): boolean %checks(maybeImmutable instanceof Collection);
259
+ declare function isCollection(
260
+ maybeCollection: mixed
261
+ ): boolean %checks(maybeCollection instanceof Collection);
262
+ declare function isKeyed(
263
+ maybeKeyed: mixed
264
+ ): boolean %checks(maybeKeyed instanceof KeyedCollection);
265
+ declare function isIndexed(
266
+ maybeIndexed: mixed
267
+ ): boolean %checks(maybeIndexed instanceof IndexedCollection);
268
+ declare function isAssociative(
269
+ maybeAssociative: mixed
270
+ ): boolean %checks(maybeAssociative instanceof KeyedCollection ||
271
+ maybeAssociative instanceof IndexedCollection);
272
+ declare function isOrdered(
273
+ maybeOrdered: mixed
274
+ ): boolean %checks(maybeOrdered instanceof IndexedCollection ||
208
275
  maybeOrdered instanceof OrderedMap ||
209
- maybeOrdered instanceof OrderedSet
210
- );
276
+ maybeOrdered instanceof OrderedSet);
211
277
  declare function isValueObject(maybeValue: mixed): boolean;
212
278
 
213
279
  declare function isSeq(maybeSeq: any): boolean %checks(maybeSeq instanceof Seq);
214
- declare function isList(maybeList: any): boolean %checks(maybeList instanceof List);
280
+ declare function isList(maybeList: any): boolean %checks(maybeList instanceof
281
+ List);
215
282
  declare function isMap(maybeMap: any): boolean %checks(maybeMap instanceof Map);
216
- declare function isOrderedMap(maybeOrderedMap: any): boolean %checks(maybeOrderedMap instanceof OrderedMap);
217
- declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof Stack);
283
+ declare function isOrderedMap(
284
+ maybeOrderedMap: any
285
+ ): boolean %checks(maybeOrderedMap instanceof OrderedMap);
286
+ declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof
287
+ Stack);
218
288
  declare function isSet(maybeSet: any): boolean %checks(maybeSet instanceof Set);
219
- declare function isOrderedSet(maybeOrderedSet: any): boolean %checks(maybeOrderedSet instanceof OrderedSet);
220
- declare function isRecord(maybeRecord: any): boolean %checks(maybeRecord instanceof Record);
289
+ declare function isOrderedSet(
290
+ maybeOrderedSet: any
291
+ ): boolean %checks(maybeOrderedSet instanceof OrderedSet);
292
+ declare function isRecord(
293
+ maybeRecord: any
294
+ ): boolean %checks(maybeRecord instanceof Record);
221
295
 
222
296
  declare interface ValueObject {
223
297
  equals(other: mixed): boolean;
@@ -237,7 +311,9 @@ declare class Collection<K, +V> extends _Collection<K, V> {
237
311
  }
238
312
 
239
313
  declare class KeyedCollection<K, +V> extends Collection<K, V> {
240
- static <K, V>(values?: Iterable<[K, V]> | PlainObjInput<K, V>): KeyedCollection<K, V>;
314
+ static <K, V>(
315
+ values?: Iterable<[K, V]> | PlainObjInput<K, V>
316
+ ): KeyedCollection<K, V>;
241
317
 
242
318
  toJS(): { [key: string]: mixed };
243
319
  toJSON(): { [key: string]: V };
@@ -246,7 +322,9 @@ declare class KeyedCollection<K, +V> extends Collection<K, V> {
246
322
  toSeq(): KeyedSeq<K, V>;
247
323
  flip(): KeyedCollection<V, K>;
248
324
 
249
- concat<KC, VC>(...iters: Array<Iterable<[KC, VC]> | PlainObjInput<KC, VC>>): KeyedCollection<K | KC, V | VC>;
325
+ concat<KC, VC>(
326
+ ...iters: Array<Iterable<[KC, VC]> | PlainObjInput<KC, VC>>
327
+ ): KeyedCollection<K | KC, V | VC>;
250
328
 
251
329
  filter(predicate: typeof Boolean): KeyedCollection<K, $NonMaybeType<V>>;
252
330
  filter(
@@ -278,7 +356,7 @@ declare class KeyedCollection<K, +V> extends Collection<K, V> {
278
356
  flatten(shallow?: boolean): KeyedCollection<any, any>;
279
357
  }
280
358
 
281
- Collection.Keyed = KeyedCollection
359
+ Collection.Keyed = KeyedCollection;
282
360
 
283
361
  declare class IndexedCollection<+T> extends Collection<number, T> {
284
362
  static <T>(iter?: Iterable<T>): IndexedCollection<T>;
@@ -291,16 +369,9 @@ declare class IndexedCollection<+T> extends Collection<number, T> {
291
369
  fromEntrySeq<K, V>(): KeyedSeq<K, V>;
292
370
  interpose(separator: T): this;
293
371
  interleave(...collections: Iterable<T>[]): this;
294
- splice(
295
- index: number,
296
- removeNum: number,
297
- ...values: T[]
298
- ): this;
372
+ splice(index: number, removeNum: number, ...values: T[]): this;
299
373
 
300
- zip<A>(
301
- a: Iterable<A>,
302
- ..._: []
303
- ): IndexedCollection<[T, A]>;
374
+ zip<A>(a: Iterable<A>, ..._: []): IndexedCollection<[T, A]>;
304
375
  zip<A, B>(
305
376
  a: Iterable<A>,
306
377
  b: Iterable<B>,
@@ -328,28 +399,25 @@ declare class IndexedCollection<+T> extends Collection<number, T> {
328
399
  ..._: []
329
400
  ): IndexedCollection<[T, A, B, C, D, E]>;
330
401
 
331
- zipAll<A>(
332
- a: Iterable<A>,
333
- ..._: []
334
- ): IndexedCollection<[T|void, A|void]>;
402
+ zipAll<A>(a: Iterable<A>, ..._: []): IndexedCollection<[T | void, A | void]>;
335
403
  zipAll<A, B>(
336
404
  a: Iterable<A>,
337
405
  b: Iterable<B>,
338
406
  ..._: []
339
- ): IndexedCollection<[T|void, A|void, B|void]>;
407
+ ): IndexedCollection<[T | void, A | void, B | void]>;
340
408
  zipAll<A, B, C>(
341
409
  a: Iterable<A>,
342
410
  b: Iterable<B>,
343
411
  c: Iterable<C>,
344
412
  ..._: []
345
- ): IndexedCollection<[T|void, A|void, B|void, C|void]>;
413
+ ): IndexedCollection<[T | void, A | void, B | void, C | void]>;
346
414
  zipAll<A, B, C, D>(
347
415
  a: Iterable<A>,
348
416
  b: Iterable<B>,
349
417
  c: Iterable<C>,
350
418
  d: Iterable<D>,
351
419
  ..._: []
352
- ): IndexedCollection<[T|void, A|void, B|void, C|void, D|void]>;
420
+ ): IndexedCollection<[T | void, A | void, B | void, C | void, D | void]>;
353
421
  zipAll<A, B, C, D, E>(
354
422
  a: Iterable<A>,
355
423
  b: Iterable<B>,
@@ -357,7 +425,9 @@ declare class IndexedCollection<+T> extends Collection<number, T> {
357
425
  d: Iterable<D>,
358
426
  e: Iterable<E>,
359
427
  ..._: []
360
- ): IndexedCollection<[T|void, A|void, B|void, C|void, D|void, E|void]>;
428
+ ): IndexedCollection<
429
+ [T | void, A | void, B | void, C | void, D | void, E | void]
430
+ >;
361
431
 
362
432
  zipWith<A, R>(
363
433
  zipper: (value: T, a: A) => R,
@@ -463,7 +533,8 @@ declare class SetCollection<+T> extends Collection<T, T> {
463
533
  flatten(shallow?: boolean): SetCollection<any>;
464
534
  }
465
535
 
466
- declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof Seq);
536
+ declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof
537
+ Seq);
467
538
  declare class Seq<K, +V> extends _Collection<K, V> {
468
539
  static Keyed: typeof KeyedSeq;
469
540
  static Indexed: typeof IndexedSeq;
@@ -482,12 +553,16 @@ declare class Seq<K, +V> extends _Collection<K, V> {
482
553
  }
483
554
 
484
555
  declare class KeyedSeq<K, +V> extends Seq<K, V> mixins KeyedCollection<K, V> {
485
- static <K, V>(values?: Iterable<[K, V]> | PlainObjInput<K, V>): KeyedSeq<K, V>;
556
+ static <K, V>(
557
+ values?: Iterable<[K, V]> | PlainObjInput<K, V>
558
+ ): KeyedSeq<K, V>;
486
559
 
487
560
  // Override specialized return types
488
561
  flip(): KeyedSeq<V, K>;
489
562
 
490
- concat<KC, VC>(...iters: Array<Iterable<[KC, VC]> | PlainObjInput<KC, VC>>): KeyedSeq<K | KC, V | VC>;
563
+ concat<KC, VC>(
564
+ ...iters: Array<Iterable<[KC, VC]> | PlainObjInput<KC, VC>>
565
+ ): KeyedSeq<K | KC, V | VC>;
491
566
 
492
567
  filter(predicate: typeof Boolean): KeyedSeq<K, $NonMaybeType<V>>;
493
568
  filter(
@@ -519,7 +594,10 @@ declare class KeyedSeq<K, +V> extends Seq<K, V> mixins KeyedCollection<K, V> {
519
594
  flatten(shallow?: boolean): KeyedSeq<any, any>;
520
595
  }
521
596
 
522
- declare class IndexedSeq<+T> extends Seq<number, T> mixins IndexedCollection<T> {
597
+ declare class IndexedSeq<+T>
598
+ extends Seq<number, T>
599
+ mixins IndexedCollection<T>
600
+ {
523
601
  static <T>(values?: Iterable<T>): IndexedSeq<T>;
524
602
 
525
603
  static of<T>(...values: T[]): IndexedSeq<T>;
@@ -547,15 +625,8 @@ declare class IndexedSeq<+T> extends Seq<number, T> mixins IndexedCollection<T>
547
625
  flatten(depth?: number): IndexedSeq<any>;
548
626
  flatten(shallow?: boolean): IndexedSeq<any>;
549
627
 
550
- zip<A>(
551
- a: Iterable<A>,
552
- ..._: []
553
- ): IndexedSeq<[T, A]>;
554
- zip<A, B>(
555
- a: Iterable<A>,
556
- b: Iterable<B>,
557
- ..._: []
558
- ): IndexedSeq<[T, A, B]>;
628
+ zip<A>(a: Iterable<A>, ..._: []): IndexedSeq<[T, A]>;
629
+ zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): IndexedSeq<[T, A, B]>;
559
630
  zip<A, B, C>(
560
631
  a: Iterable<A>,
561
632
  b: Iterable<B>,
@@ -578,28 +649,25 @@ declare class IndexedSeq<+T> extends Seq<number, T> mixins IndexedCollection<T>
578
649
  ..._: []
579
650
  ): IndexedSeq<[T, A, B, C, D, E]>;
580
651
 
581
- zipAll<A>(
582
- a: Iterable<A>,
583
- ..._: []
584
- ): IndexedSeq<[T|void, A|void]>;
652
+ zipAll<A>(a: Iterable<A>, ..._: []): IndexedSeq<[T | void, A | void]>;
585
653
  zipAll<A, B>(
586
654
  a: Iterable<A>,
587
655
  b: Iterable<B>,
588
656
  ..._: []
589
- ): IndexedSeq<[T|void, A|void, B|void]>;
657
+ ): IndexedSeq<[T | void, A | void, B | void]>;
590
658
  zipAll<A, B, C>(
591
659
  a: Iterable<A>,
592
660
  b: Iterable<B>,
593
661
  c: Iterable<C>,
594
662
  ..._: []
595
- ): IndexedSeq<[T|void, A|void, B|void, C|void]>;
663
+ ): IndexedSeq<[T | void, A | void, B | void, C | void]>;
596
664
  zipAll<A, B, C, D>(
597
665
  a: Iterable<A>,
598
666
  b: Iterable<B>,
599
667
  c: Iterable<C>,
600
668
  d: Iterable<D>,
601
669
  ..._: []
602
- ): IndexedSeq<[T|void, A|void, B|void, C|void, D|void]>;
670
+ ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void]>;
603
671
  zipAll<A, B, C, D, E>(
604
672
  a: Iterable<A>,
605
673
  b: Iterable<B>,
@@ -607,7 +675,7 @@ declare class IndexedSeq<+T> extends Seq<number, T> mixins IndexedCollection<T>
607
675
  d: Iterable<D>,
608
676
  e: Iterable<E>,
609
677
  ..._: []
610
- ): IndexedSeq<[T|void, A|void, B|void, C|void, D|void, E|void]>;
678
+ ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void, E | void]>;
611
679
 
612
680
  zipWith<A, R>(
613
681
  zipper: (value: T, a: A) => R,
@@ -679,40 +747,157 @@ declare class UpdatableInCollection<K, +V> {
679
747
  setIn<S>(keyPath: [], value: S): S;
680
748
  setIn(keyPath: [K], value: V): this;
681
749
  setIn<K2: $KeyOf<V>, S: $ValOf<V, K2>>(keyPath: [K, K2], value: S): this;
682
- setIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, S: $ValOf<$ValOf<V, K2>, K3>>(keyPath: [K, K2, K3], value: S): this;
683
- setIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], value: S): this;
684
- setIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], value: S): this;
750
+ setIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, S: $ValOf<$ValOf<V, K2>, K3>>(
751
+ keyPath: [K, K2, K3],
752
+ value: S
753
+ ): this;
754
+ setIn<
755
+ K2: $KeyOf<V>,
756
+ K3: $KeyOf<$ValOf<V, K2>>,
757
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
758
+ S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>
759
+ >(
760
+ keyPath: [K, K2, K3, K4],
761
+ value: S
762
+ ): this;
763
+ setIn<
764
+ K2: $KeyOf<V>,
765
+ K3: $KeyOf<$ValOf<V, K2>>,
766
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
767
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>,
768
+ S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>
769
+ >(
770
+ keyPath: [K, K2, K3, K4, K5],
771
+ value: S
772
+ ): this;
685
773
 
686
774
  deleteIn(keyPath: []): void;
687
775
  deleteIn(keyPath: [K]): this;
688
776
  deleteIn<K2: $KeyOf<V>>(keyPath: [K, K2]): this;
689
- deleteIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(keyPath: [K, K2, K3]): this;
690
- deleteIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>>(keyPath: [K, K2, K3, K4]): this;
691
- deleteIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5]): this;
777
+ deleteIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(
778
+ keyPath: [K, K2, K3]
779
+ ): this;
780
+ deleteIn<
781
+ K2: $KeyOf<V>,
782
+ K3: $KeyOf<$ValOf<V, K2>>,
783
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>
784
+ >(
785
+ keyPath: [K, K2, K3, K4]
786
+ ): this;
787
+ deleteIn<
788
+ K2: $KeyOf<V>,
789
+ K3: $KeyOf<$ValOf<V, K2>>,
790
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
791
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>
792
+ >(
793
+ keyPath: [K, K2, K3, K4, K5]
794
+ ): this;
692
795
 
693
796
  removeIn(keyPath: []): void;
694
797
  removeIn(keyPath: [K]): this;
695
798
  removeIn<K2: $KeyOf<V>>(keyPath: [K, K2]): this;
696
- removeIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(keyPath: [K, K2, K3]): this;
697
- removeIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>>(keyPath: [K, K2, K3, K4]): this;
698
- removeIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5]): this;
799
+ removeIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>>(
800
+ keyPath: [K, K2, K3]
801
+ ): this;
802
+ removeIn<
803
+ K2: $KeyOf<V>,
804
+ K3: $KeyOf<$ValOf<V, K2>>,
805
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>
806
+ >(
807
+ keyPath: [K, K2, K3, K4]
808
+ ): this;
809
+ removeIn<
810
+ K2: $KeyOf<V>,
811
+ K3: $KeyOf<$ValOf<V, K2>>,
812
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
813
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>
814
+ >(
815
+ keyPath: [K, K2, K3, K4, K5]
816
+ ): this;
699
817
 
700
818
  updateIn<U>(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U;
701
819
  updateIn<U>(keyPath: [], updater: (value: this) => U): U;
702
820
  updateIn<NSV>(keyPath: [K], notSetValue: NSV, updater: (value: V) => V): this;
703
821
  updateIn(keyPath: [K], updater: (value: V) => V): this;
704
- updateIn<NSV, K2: $KeyOf<V>, S: $ValOf<V, K2>>(keyPath: [K, K2], notSetValue: NSV, updater: (value: $ValOf<V, K2> | NSV) => S): this;
705
- updateIn<K2: $KeyOf<V>, S: $ValOf<V, K2>>(keyPath: [K, K2], updater: (value: $ValOf<V, K2>) => S): this;
706
- updateIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, S: $ValOf<$ValOf<V, K2>, K3>>(keyPath: [K, K2, K3], notSetValue: NSV, updater: (value: $ValOf<$ValOf<V, K2>, K3> | NSV) => S): this;
707
- updateIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, S: $ValOf<$ValOf<V, K2>, K3>>(keyPath: [K, K2, K3], updater: (value: $ValOf<$ValOf<V, K2>, K3>) => S): this;
708
- updateIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4> | NSV) => S): this;
709
- updateIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], updater: (value: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>) => S): this;
710
- updateIn<NSV, K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5> | NSV) => S): this;
711
- updateIn<K2: $KeyOf<V>, K3: $KeyOf<$ValOf<V, K2>>, K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>) => S): this;
822
+ updateIn<NSV, K2: $KeyOf<V>, S: $ValOf<V, K2>>(
823
+ keyPath: [K, K2],
824
+ notSetValue: NSV,
825
+ updater: (value: $ValOf<V, K2> | NSV) => S
826
+ ): this;
827
+ updateIn<K2: $KeyOf<V>, S: $ValOf<V, K2>>(
828
+ keyPath: [K, K2],
829
+ updater: (value: $ValOf<V, K2>) => S
830
+ ): this;
831
+ updateIn<
832
+ NSV,
833
+ K2: $KeyOf<V>,
834
+ K3: $KeyOf<$ValOf<V, K2>>,
835
+ S: $ValOf<$ValOf<V, K2>, K3>
836
+ >(
837
+ keyPath: [K, K2, K3],
838
+ notSetValue: NSV,
839
+ updater: (value: $ValOf<$ValOf<V, K2>, K3> | NSV) => S
840
+ ): this;
841
+ updateIn<
842
+ K2: $KeyOf<V>,
843
+ K3: $KeyOf<$ValOf<V, K2>>,
844
+ S: $ValOf<$ValOf<V, K2>, K3>
845
+ >(
846
+ keyPath: [K, K2, K3],
847
+ updater: (value: $ValOf<$ValOf<V, K2>, K3>) => S
848
+ ): this;
849
+ updateIn<
850
+ NSV,
851
+ K2: $KeyOf<V>,
852
+ K3: $KeyOf<$ValOf<V, K2>>,
853
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
854
+ S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>
855
+ >(
856
+ keyPath: [K, K2, K3, K4],
857
+ notSetValue: NSV,
858
+ updater: (value: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4> | NSV) => S
859
+ ): this;
860
+ updateIn<
861
+ K2: $KeyOf<V>,
862
+ K3: $KeyOf<$ValOf<V, K2>>,
863
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
864
+ S: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>
865
+ >(
866
+ keyPath: [K, K2, K3, K4],
867
+ updater: (value: $ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>) => S
868
+ ): this;
869
+ updateIn<
870
+ NSV,
871
+ K2: $KeyOf<V>,
872
+ K3: $KeyOf<$ValOf<V, K2>>,
873
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
874
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>,
875
+ S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>
876
+ >(
877
+ keyPath: [K, K2, K3, K4, K5],
878
+ notSetValue: NSV,
879
+ updater: (
880
+ value: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5> | NSV
881
+ ) => S
882
+ ): this;
883
+ updateIn<
884
+ K2: $KeyOf<V>,
885
+ K3: $KeyOf<$ValOf<V, K2>>,
886
+ K4: $KeyOf<$ValOf<$ValOf<V, K2>, K3>>,
887
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>>,
888
+ S: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>
889
+ >(
890
+ keyPath: [K, K2, K3, K4, K5],
891
+ updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<V, K2>, K3>, K4>, K5>) => S
892
+ ): this;
712
893
  }
713
894
 
714
- declare function isList(maybeList: mixed): boolean %checks(maybeList instanceof List);
715
- declare class List<+T> extends IndexedCollection<T> mixins UpdatableInCollection<number, T> {
895
+ declare function isList(maybeList: mixed): boolean %checks(maybeList instanceof
896
+ List);
897
+ declare class List<+T>
898
+ extends IndexedCollection<T>
899
+ mixins UpdatableInCollection<number, T>
900
+ {
716
901
  static (collection?: Iterable<T>): List<T>;
717
902
 
718
903
  static of<T>(...values: T[]): List<T>;
@@ -733,14 +918,21 @@ declare class List<+T> extends IndexedCollection<T> mixins UpdatableInCollection
733
918
 
734
919
  update<U>(updater: (value: this) => U): U;
735
920
  update<U>(index: number, updater: (value: T) => U): List<T | U>;
736
- update<U>(index: number, notSetValue: U, updater: (value: T) => U): List<T | U>;
921
+ update<U>(
922
+ index: number,
923
+ notSetValue: U,
924
+ updater: (value: T) => U
925
+ ): List<T | U>;
737
926
 
738
927
  merge<U>(...collections: Iterable<U>[]): List<T | U>;
739
928
 
740
929
  setSize(size: number): this;
741
930
 
742
931
  mergeIn(keyPath: Iterable<mixed>, ...collections: Iterable<mixed>[]): this;
743
- mergeDeepIn(keyPath: Iterable<mixed>, ...collections: Iterable<mixed>[]): this;
932
+ mergeDeepIn(
933
+ keyPath: Iterable<mixed>,
934
+ ...collections: Iterable<mixed>[]
935
+ ): this;
744
936
 
745
937
  withMutations(mutator: (mutable: this) => mixed): this;
746
938
  asMutable(): this;
@@ -770,15 +962,8 @@ declare class List<+T> extends IndexedCollection<T> mixins UpdatableInCollection
770
962
  flatten(depth?: number): List<any>;
771
963
  flatten(shallow?: boolean): List<any>;
772
964
 
773
- zip<A>(
774
- a: Iterable<A>,
775
- ..._: []
776
- ): List<[T, A]>;
777
- zip<A, B>(
778
- a: Iterable<A>,
779
- b: Iterable<B>,
780
- ..._: []
781
- ): List<[T, A, B]>;
965
+ zip<A>(a: Iterable<A>, ..._: []): List<[T, A]>;
966
+ zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): List<[T, A, B]>;
782
967
  zip<A, B, C>(
783
968
  a: Iterable<A>,
784
969
  b: Iterable<B>,
@@ -801,28 +986,25 @@ declare class List<+T> extends IndexedCollection<T> mixins UpdatableInCollection
801
986
  ..._: []
802
987
  ): List<[T, A, B, C, D, E]>;
803
988
 
804
- zipAll<A>(
805
- a: Iterable<A>,
806
- ..._: []
807
- ): List<[T|void, A|void]>;
989
+ zipAll<A>(a: Iterable<A>, ..._: []): List<[T | void, A | void]>;
808
990
  zipAll<A, B>(
809
991
  a: Iterable<A>,
810
992
  b: Iterable<B>,
811
993
  ..._: []
812
- ): List<[T|void, A|void, B|void]>;
994
+ ): List<[T | void, A | void, B | void]>;
813
995
  zipAll<A, B, C>(
814
996
  a: Iterable<A>,
815
997
  b: Iterable<B>,
816
998
  c: Iterable<C>,
817
999
  ..._: []
818
- ): List<[T|void, A|void, B|void, C|void]>;
1000
+ ): List<[T | void, A | void, B | void, C | void]>;
819
1001
  zipAll<A, B, C, D>(
820
1002
  a: Iterable<A>,
821
1003
  b: Iterable<B>,
822
1004
  c: Iterable<C>,
823
1005
  d: Iterable<D>,
824
1006
  ..._: []
825
- ): List<[T|void, A|void, B|void, C|void, D|void]>;
1007
+ ): List<[T | void, A | void, B | void, C | void, D | void]>;
826
1008
  zipAll<A, B, C, D, E>(
827
1009
  a: Iterable<A>,
828
1010
  b: Iterable<B>,
@@ -830,7 +1012,7 @@ declare class List<+T> extends IndexedCollection<T> mixins UpdatableInCollection
830
1012
  d: Iterable<D>,
831
1013
  e: Iterable<E>,
832
1014
  ..._: []
833
- ): List<[T|void, A|void, B|void, C|void, D|void, E|void]>;
1015
+ ): List<[T | void, A | void, B | void, C | void, D | void, E | void]>;
834
1016
 
835
1017
  zipWith<A, R>(
836
1018
  zipper: (value: T, a: A) => R,
@@ -869,8 +1051,12 @@ declare class List<+T> extends IndexedCollection<T> mixins UpdatableInCollection
869
1051
  ): List<R>;
870
1052
  }
871
1053
 
872
- declare function isMap(maybeMap: mixed): boolean %checks(maybeMap instanceof Map);
873
- declare class Map<K, +V> extends KeyedCollection<K, V> mixins UpdatableInCollection<K, V> {
1054
+ declare function isMap(maybeMap: mixed): boolean %checks(maybeMap instanceof
1055
+ Map);
1056
+ declare class Map<K, +V>
1057
+ extends KeyedCollection<K, V>
1058
+ mixins UpdatableInCollection<K, V>
1059
+ {
874
1060
  static <K, V>(values?: Iterable<[K, V]> | PlainObjInput<K, V>): Map<K, V>;
875
1061
 
876
1062
  static isMap: typeof isMap;
@@ -887,7 +1073,11 @@ declare class Map<K, +V> extends KeyedCollection<K, V> mixins UpdatableInCollect
887
1073
 
888
1074
  update<U>(updater: (value: this) => U): U;
889
1075
  update<V_>(key: K, updater: (value: V) => V_): Map<K, V | V_>;
890
- update<V_>(key: K, notSetValue: V_, updater: (value: V) => V_): Map<K, V | V_>;
1076
+ update<V_>(
1077
+ key: K,
1078
+ notSetValue: V_,
1079
+ updater: (value: V) => V_
1080
+ ): Map<K, V | V_>;
891
1081
 
892
1082
  merge<K_, V_>(
893
1083
  ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
@@ -958,9 +1148,16 @@ declare class Map<K, +V> extends KeyedCollection<K, V> mixins UpdatableInCollect
958
1148
  flatten(shallow?: boolean): Map<any, any>;
959
1149
  }
960
1150
 
961
- declare function isOrderedMap(maybeOrderedMap: mixed): boolean %checks(maybeOrderedMap instanceof OrderedMap);
962
- declare class OrderedMap<K, +V> extends Map<K, V> mixins UpdatableInCollection<K, V> {
963
- static <K, V>(values?: Iterable<[K, V]> | PlainObjInput<K, V>): OrderedMap<K, V>;
1151
+ declare function isOrderedMap(
1152
+ maybeOrderedMap: mixed
1153
+ ): boolean %checks(maybeOrderedMap instanceof OrderedMap);
1154
+ declare class OrderedMap<K, +V>
1155
+ extends Map<K, V>
1156
+ mixins UpdatableInCollection<K, V>
1157
+ {
1158
+ static <K, V>(
1159
+ values?: Iterable<[K, V]> | PlainObjInput<K, V>
1160
+ ): OrderedMap<K, V>;
964
1161
 
965
1162
  static isOrderedMap: typeof isOrderedMap;
966
1163
 
@@ -973,7 +1170,11 @@ declare class OrderedMap<K, +V> extends Map<K, V> mixins UpdatableInCollection<K
973
1170
 
974
1171
  update<U>(updater: (value: this) => U): U;
975
1172
  update<V_>(key: K, updater: (value: V) => V_): OrderedMap<K, V | V_>;
976
- update<V_>(key: K, notSetValue: V_, updater: (value: V) => V_): OrderedMap<K, V | V_>;
1173
+ update<V_>(
1174
+ key: K,
1175
+ notSetValue: V_,
1176
+ updater: (value: V) => V_
1177
+ ): OrderedMap<K, V | V_>;
977
1178
 
978
1179
  merge<K_, V_>(
979
1180
  ...collections: (Iterable<[K_, V_]> | PlainObjInput<K_, V_>)[]
@@ -1044,12 +1245,15 @@ declare class OrderedMap<K, +V> extends Map<K, V> mixins UpdatableInCollection<K
1044
1245
  flatten(shallow?: boolean): OrderedMap<any, any>;
1045
1246
  }
1046
1247
 
1047
- declare function isSet(maybeSet: mixed): boolean %checks(maybeSet instanceof Set);
1248
+ declare function isSet(maybeSet: mixed): boolean %checks(maybeSet instanceof
1249
+ Set);
1048
1250
  declare class Set<+T> extends SetCollection<T> {
1049
1251
  static <T>(values?: Iterable<T>): Set<T>;
1050
1252
 
1051
1253
  static of<T>(...values: T[]): Set<T>;
1052
- static fromKeys<T>(values: Iterable<[T, mixed]> | PlainObjInput<T, mixed>): Set<T>;
1254
+ static fromKeys<T>(
1255
+ values: Iterable<[T, mixed]> | PlainObjInput<T, mixed>
1256
+ ): Set<T>;
1053
1257
 
1054
1258
  static intersect(sets: Iterable<Iterable<T>>): Set<T>;
1055
1259
  static union(sets: Iterable<Iterable<T>>): Set<T>;
@@ -1096,12 +1300,16 @@ declare class Set<+T> extends SetCollection<T> {
1096
1300
  }
1097
1301
 
1098
1302
  // Overrides except for `isOrderedSet` are for specialized return types
1099
- declare function isOrderedSet(maybeOrderedSet: mixed): boolean %checks(maybeOrderedSet instanceof OrderedSet);
1303
+ declare function isOrderedSet(
1304
+ maybeOrderedSet: mixed
1305
+ ): boolean %checks(maybeOrderedSet instanceof OrderedSet);
1100
1306
  declare class OrderedSet<+T> extends Set<T> {
1101
1307
  static <T>(values?: Iterable<T>): OrderedSet<T>;
1102
1308
 
1103
1309
  static of<T>(...values: T[]): OrderedSet<T>;
1104
- static fromKeys<T>(values: Iterable<[T, mixed]> | PlainObjInput<T, mixed>): OrderedSet<T>;
1310
+ static fromKeys<T>(
1311
+ values: Iterable<[T, mixed]> | PlainObjInput<T, mixed>
1312
+ ): OrderedSet<T>;
1105
1313
 
1106
1314
  static isOrderedSet: typeof isOrderedSet;
1107
1315
 
@@ -1132,15 +1340,8 @@ declare class OrderedSet<+T> extends Set<T> {
1132
1340
  flatten(depth?: number): OrderedSet<any>;
1133
1341
  flatten(shallow?: boolean): OrderedSet<any>;
1134
1342
 
1135
- zip<A>(
1136
- a: Iterable<A>,
1137
- ..._: []
1138
- ): OrderedSet<[T, A]>;
1139
- zip<A, B>(
1140
- a: Iterable<A>,
1141
- b: Iterable<B>,
1142
- ..._: []
1143
- ): OrderedSet<[T, A, B]>;
1343
+ zip<A>(a: Iterable<A>, ..._: []): OrderedSet<[T, A]>;
1344
+ zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): OrderedSet<[T, A, B]>;
1144
1345
  zip<A, B, C>(
1145
1346
  a: Iterable<A>,
1146
1347
  b: Iterable<B>,
@@ -1163,28 +1364,25 @@ declare class OrderedSet<+T> extends Set<T> {
1163
1364
  ..._: []
1164
1365
  ): OrderedSet<[T, A, B, C, D, E]>;
1165
1366
 
1166
- zipAll<A>(
1167
- a: Iterable<A>,
1168
- ..._: []
1169
- ): OrderedSet<[T|void, A|void]>;
1367
+ zipAll<A>(a: Iterable<A>, ..._: []): OrderedSet<[T | void, A | void]>;
1170
1368
  zipAll<A, B>(
1171
1369
  a: Iterable<A>,
1172
1370
  b: Iterable<B>,
1173
1371
  ..._: []
1174
- ): OrderedSet<[T|void, A|void, B|void]>;
1372
+ ): OrderedSet<[T | void, A | void, B | void]>;
1175
1373
  zipAll<A, B, C>(
1176
1374
  a: Iterable<A>,
1177
1375
  b: Iterable<B>,
1178
1376
  c: Iterable<C>,
1179
1377
  ..._: []
1180
- ): OrderedSet<[T|void, A|void, B|void, C|void]>;
1378
+ ): OrderedSet<[T | void, A | void, B | void, C | void]>;
1181
1379
  zipAll<A, B, C, D>(
1182
1380
  a: Iterable<A>,
1183
1381
  b: Iterable<B>,
1184
1382
  c: Iterable<C>,
1185
1383
  d: Iterable<D>,
1186
1384
  ..._: []
1187
- ): OrderedSet<[T|void, A|void, B|void, C|void, D|void]>;
1385
+ ): OrderedSet<[T | void, A | void, B | void, C | void, D | void]>;
1188
1386
  zipAll<A, B, C, D, E>(
1189
1387
  a: Iterable<A>,
1190
1388
  b: Iterable<B>,
@@ -1192,7 +1390,7 @@ declare class OrderedSet<+T> extends Set<T> {
1192
1390
  d: Iterable<D>,
1193
1391
  e: Iterable<E>,
1194
1392
  ..._: []
1195
- ): OrderedSet<[T|void, A|void, B|void, C|void, D|void, E|void]>;
1393
+ ): OrderedSet<[T | void, A | void, B | void, C | void, D | void, E | void]>;
1196
1394
 
1197
1395
  zipWith<A, R>(
1198
1396
  zipper: (value: T, a: A) => R,
@@ -1231,7 +1429,9 @@ declare class OrderedSet<+T> extends Set<T> {
1231
1429
  ): OrderedSet<R>;
1232
1430
  }
1233
1431
 
1234
- declare function isStack(maybeStack: mixed): boolean %checks(maybeStack instanceof Stack);
1432
+ declare function isStack(
1433
+ maybeStack: mixed
1434
+ ): boolean %checks(maybeStack instanceof Stack);
1235
1435
  declare class Stack<+T> extends IndexedCollection<T> {
1236
1436
  static <T>(collection?: Iterable<T>): Stack<T>;
1237
1437
 
@@ -1279,15 +1479,8 @@ declare class Stack<+T> extends IndexedCollection<T> {
1279
1479
  flatten(depth?: number): Stack<any>;
1280
1480
  flatten(shallow?: boolean): Stack<any>;
1281
1481
 
1282
- zip<A>(
1283
- a: Iterable<A>,
1284
- ..._: []
1285
- ): Stack<[T, A]>;
1286
- zip<A, B>(
1287
- a: Iterable<A>,
1288
- b: Iterable<B>,
1289
- ..._: []
1290
- ): Stack<[T, A, B]>;
1482
+ zip<A>(a: Iterable<A>, ..._: []): Stack<[T, A]>;
1483
+ zip<A, B>(a: Iterable<A>, b: Iterable<B>, ..._: []): Stack<[T, A, B]>;
1291
1484
  zip<A, B, C>(
1292
1485
  a: Iterable<A>,
1293
1486
  b: Iterable<B>,
@@ -1310,28 +1503,25 @@ declare class Stack<+T> extends IndexedCollection<T> {
1310
1503
  ..._: []
1311
1504
  ): Stack<[T, A, B, C, D, E]>;
1312
1505
 
1313
- zipAll<A>(
1314
- a: Iterable<A>,
1315
- ..._: []
1316
- ): Stack<[T|void, A|void]>;
1506
+ zipAll<A>(a: Iterable<A>, ..._: []): Stack<[T | void, A | void]>;
1317
1507
  zipAll<A, B>(
1318
1508
  a: Iterable<A>,
1319
1509
  b: Iterable<B>,
1320
1510
  ..._: []
1321
- ): Stack<[T|void, A|void, B|void]>;
1511
+ ): Stack<[T | void, A | void, B | void]>;
1322
1512
  zipAll<A, B, C>(
1323
1513
  a: Iterable<A>,
1324
1514
  b: Iterable<B>,
1325
1515
  c: Iterable<C>,
1326
1516
  ..._: []
1327
- ): Stack<[T|void, A|void, B|void, C|void]>;
1517
+ ): Stack<[T | void, A | void, B | void, C | void]>;
1328
1518
  zipAll<A, B, C, D>(
1329
1519
  a: Iterable<A>,
1330
1520
  b: Iterable<B>,
1331
1521
  c: Iterable<C>,
1332
1522
  d: Iterable<D>,
1333
1523
  ..._: []
1334
- ): Stack<[T|void, A|void, B|void, C|void, D|void]>;
1524
+ ): Stack<[T | void, A | void, B | void, C | void, D | void]>;
1335
1525
  zipAll<A, B, C, D, E>(
1336
1526
  a: Iterable<A>,
1337
1527
  b: Iterable<B>,
@@ -1339,7 +1529,7 @@ declare class Stack<+T> extends IndexedCollection<T> {
1339
1529
  d: Iterable<D>,
1340
1530
  e: Iterable<E>,
1341
1531
  ..._: []
1342
- ): Stack<[T|void, A|void, B|void, C|void, D|void, E|void]>;
1532
+ ): Stack<[T | void, A | void, B | void, C | void, D | void, E | void]>;
1343
1533
 
1344
1534
  zipWith<A, R>(
1345
1535
  zipper: (value: T, a: A) => R,
@@ -1378,7 +1568,11 @@ declare class Stack<+T> extends IndexedCollection<T> {
1378
1568
  ): Stack<R>;
1379
1569
  }
1380
1570
 
1381
- declare function Range(start?: number, end?: number, step?: number): IndexedSeq<number>;
1571
+ declare function Range(
1572
+ start?: number,
1573
+ end?: number,
1574
+ step?: number
1575
+ ): IndexedSeq<number>;
1382
1576
  declare function Repeat<T>(value: T, times?: number): IndexedSeq<T>;
1383
1577
 
1384
1578
  // The type of a Record factory function.
@@ -1391,21 +1585,26 @@ type RecordOf<Values: Object> = RecordInstance<Values> & $ReadOnly<Values>;
1391
1585
  type _RecordValues<T, R: RecordInstance<T> | T> = R;
1392
1586
  type RecordValues<R> = _RecordValues<*, R>;
1393
1587
 
1394
- declare function isRecord(maybeRecord: any): boolean %checks(maybeRecord instanceof RecordInstance);
1588
+ declare function isRecord(
1589
+ maybeRecord: any
1590
+ ): boolean %checks(maybeRecord instanceof RecordInstance);
1395
1591
  declare class Record {
1396
1592
  static <Values: Object>(spec: Values, name?: string): typeof RecordInstance;
1397
- constructor<Values: Object>(spec: Values, name?: string): typeof RecordInstance;
1593
+ constructor<Values: Object>(
1594
+ spec: Values,
1595
+ name?: string
1596
+ ): typeof RecordInstance;
1398
1597
 
1399
1598
  static isRecord: typeof isRecord;
1400
1599
 
1401
1600
  static getDescriptiveName(record: RecordInstance<any>): string;
1402
1601
  }
1403
1602
 
1404
- declare class RecordInstance<T: Object> {
1603
+ declare class RecordInstance<T: Object = Object> {
1405
1604
  static (values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): RecordOf<T>;
1406
1605
  // Note: a constructor can only create an instance of RecordInstance<T>,
1407
1606
  // it's encouraged to not use `new` when creating Records.
1408
- constructor (values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): void;
1607
+ constructor(values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): void;
1409
1608
 
1410
1609
  size: number;
1411
1610
 
@@ -1418,18 +1617,55 @@ declare class RecordInstance<T: Object> {
1418
1617
 
1419
1618
  getIn(keyPath: [], notSetValue?: mixed): this & $ReadOnly<T>;
1420
1619
  getIn<K: $Keys<T>>(keyPath: [K], notSetValue?: mixed): $ElementType<T, K>;
1421
- getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(keyPath: [K, K2], notSetValue: NSV): $ValOf<$ValOf<T, K>, K2> | NSV;
1422
- getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>>(keyPath: [K, K2, K3], notSetValue: NSV): $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV;
1423
- getIn<NSV, 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], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV;
1424
- getIn<NSV, 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], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV;
1620
+ getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(
1621
+ keyPath: [K, K2],
1622
+ notSetValue: NSV
1623
+ ): $ValOf<$ValOf<T, K>, K2> | NSV;
1624
+ getIn<
1625
+ NSV,
1626
+ K: $Keys<T>,
1627
+ K2: $KeyOf<$ValOf<T, K>>,
1628
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>
1629
+ >(
1630
+ keyPath: [K, K2, K3],
1631
+ notSetValue: NSV
1632
+ ): $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV;
1633
+ getIn<
1634
+ NSV,
1635
+ K: $Keys<T>,
1636
+ K2: $KeyOf<$ValOf<T, K>>,
1637
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1638
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>
1639
+ >(
1640
+ keyPath: [K, K2, K3, K4],
1641
+ notSetValue: NSV
1642
+ ): $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV;
1643
+ getIn<
1644
+ NSV,
1645
+ K: $Keys<T>,
1646
+ K2: $KeyOf<$ValOf<T, K>>,
1647
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1648
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1649
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>
1650
+ >(
1651
+ keyPath: [K, K2, K3, K4, K5],
1652
+ notSetValue: NSV
1653
+ ): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV;
1425
1654
 
1426
1655
  equals(other: any): boolean;
1427
1656
  hashCode(): number;
1428
1657
 
1429
1658
  set<K: $Keys<T>>(key: K, value: $ElementType<T, K>): this & $ReadOnly<T>;
1430
- update<K: $Keys<T>>(key: K, updater: (value: $ElementType<T, K>) => $ElementType<T, K>): this & $ReadOnly<T>;
1431
- merge(...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>): this & $ReadOnly<T>;
1432
- mergeDeep(...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>): this & $ReadOnly<T>;
1659
+ update<K: $Keys<T>>(
1660
+ key: K,
1661
+ updater: (value: $ElementType<T, K>) => $ElementType<T, K>
1662
+ ): this & $ReadOnly<T>;
1663
+ merge(
1664
+ ...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
1665
+ ): this & $ReadOnly<T>;
1666
+ mergeDeep(
1667
+ ...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
1668
+ ): this & $ReadOnly<T>;
1433
1669
 
1434
1670
  mergeWith(
1435
1671
  merger: (oldVal: $ValOf<T>, newVal: $ValOf<T>, key: $Keys<T>) => $ValOf<T>,
@@ -1445,41 +1681,215 @@ declare class RecordInstance<T: Object> {
1445
1681
  clear(): this & $ReadOnly<T>;
1446
1682
 
1447
1683
  setIn<S>(keyPath: [], value: S): S;
1448
- setIn<K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], value: S): this & $ReadOnly<T>;
1449
- setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(keyPath: [K, K2], value: S): this & $ReadOnly<T>;
1450
- setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>(keyPath: [K, K2, K3], value: S): this & $ReadOnly<T>;
1451
- setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], value: S): this & $ReadOnly<T>;
1452
- setIn<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>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], value: S): this & $ReadOnly<T>;
1684
+ setIn<K: $Keys<T>, S: $ValOf<T, K>>(
1685
+ keyPath: [K],
1686
+ value: S
1687
+ ): this & $ReadOnly<T>;
1688
+ setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(
1689
+ keyPath: [K, K2],
1690
+ value: S
1691
+ ): this & $ReadOnly<T>;
1692
+ setIn<
1693
+ K: $Keys<T>,
1694
+ K2: $KeyOf<$ValOf<T, K>>,
1695
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1696
+ S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>
1697
+ >(
1698
+ keyPath: [K, K2, K3],
1699
+ value: S
1700
+ ): this & $ReadOnly<T>;
1701
+ setIn<
1702
+ K: $Keys<T>,
1703
+ K2: $KeyOf<$ValOf<T, K>>,
1704
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1705
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1706
+ S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>
1707
+ >(
1708
+ keyPath: [K, K2, K3, K4],
1709
+ value: S
1710
+ ): this & $ReadOnly<T>;
1711
+ setIn<
1712
+ K: $Keys<T>,
1713
+ K2: $KeyOf<$ValOf<T, K>>,
1714
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1715
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1716
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>,
1717
+ S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
1718
+ >(
1719
+ keyPath: [K, K2, K3, K4, K5],
1720
+ value: S
1721
+ ): this & $ReadOnly<T>;
1453
1722
 
1454
1723
  deleteIn(keyPath: []): void;
1455
1724
  deleteIn<K: $Keys<T>>(keyPath: [K]): this & $ReadOnly<T>;
1456
- deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(keyPath: [K, K2]): this & $ReadOnly<T>;
1457
- deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>>(keyPath: [K, K2, K3]): this & $ReadOnly<T>;
1458
- deleteIn<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 & $ReadOnly<T>;
1459
- deleteIn<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 & $ReadOnly<T>;
1725
+ deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(
1726
+ keyPath: [K, K2]
1727
+ ): this & $ReadOnly<T>;
1728
+ deleteIn<
1729
+ K: $Keys<T>,
1730
+ K2: $KeyOf<$ValOf<T, K>>,
1731
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>
1732
+ >(
1733
+ keyPath: [K, K2, K3]
1734
+ ): this & $ReadOnly<T>;
1735
+ deleteIn<
1736
+ K: $Keys<T>,
1737
+ K2: $KeyOf<$ValOf<T, K>>,
1738
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1739
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>
1740
+ >(
1741
+ keyPath: [K, K2, K3, K4]
1742
+ ): this & $ReadOnly<T>;
1743
+ deleteIn<
1744
+ K: $Keys<T>,
1745
+ K2: $KeyOf<$ValOf<T, K>>,
1746
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1747
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1748
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>
1749
+ >(
1750
+ keyPath: [K, K2, K3, K4, K5]
1751
+ ): this & $ReadOnly<T>;
1460
1752
 
1461
1753
  removeIn(keyPath: []): void;
1462
1754
  removeIn<K: $Keys<T>>(keyPath: [K]): this & $ReadOnly<T>;
1463
- removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(keyPath: [K, K2]): this & $ReadOnly<T>;
1464
- removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>>(keyPath: [K, K2, K3]): this & $ReadOnly<T>;
1465
- 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 & $ReadOnly<T>;
1466
- 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 & $ReadOnly<T>;
1755
+ removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(
1756
+ keyPath: [K, K2]
1757
+ ): this & $ReadOnly<T>;
1758
+ removeIn<
1759
+ K: $Keys<T>,
1760
+ K2: $KeyOf<$ValOf<T, K>>,
1761
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>
1762
+ >(
1763
+ keyPath: [K, K2, K3]
1764
+ ): this & $ReadOnly<T>;
1765
+ removeIn<
1766
+ K: $Keys<T>,
1767
+ K2: $KeyOf<$ValOf<T, K>>,
1768
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1769
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>
1770
+ >(
1771
+ keyPath: [K, K2, K3, K4]
1772
+ ): this & $ReadOnly<T>;
1773
+ removeIn<
1774
+ K: $Keys<T>,
1775
+ K2: $KeyOf<$ValOf<T, K>>,
1776
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1777
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1778
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>
1779
+ >(
1780
+ keyPath: [K, K2, K3, K4, K5]
1781
+ ): this & $ReadOnly<T>;
1467
1782
 
1468
- updateIn<U>(keyPath: [], notSetValue: mixed, updater: (value: this & T) => U): U;
1783
+ updateIn<U>(
1784
+ keyPath: [],
1785
+ notSetValue: mixed,
1786
+ updater: (value: this & T) => U
1787
+ ): U;
1469
1788
  updateIn<U>(keyPath: [], updater: (value: this & T) => U): U;
1470
- updateIn<NSV, K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], notSetValue: NSV, updater: (value: $ValOf<T, K>) => S): this & $ReadOnly<T>;
1471
- updateIn<K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], updater: (value: $ValOf<T, K>) => S): this & $ReadOnly<T>;
1472
- 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 & $ReadOnly<T>;
1473
- updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(keyPath: [K, K2], updater: (value: $ValOf<$ValOf<T, K>, K2>) => S): this & $ReadOnly<T>;
1474
- updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>(keyPath: [K, K2, K3], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV) => S): this & $ReadOnly<T>;
1475
- updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>(keyPath: [K, K2, K3], updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>) => S): this & $ReadOnly<T>;
1476
- updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV) => S): this & $ReadOnly<T>;
1477
- updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>) => S): this & $ReadOnly<T>;
1478
- updateIn<NSV, 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>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV) => S): this & $ReadOnly<T>;
1479
- updateIn<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>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>) => S): this & $ReadOnly<T>;
1480
-
1481
- mergeIn(keyPath: Iterable<mixed>, ...collections: Array<any>): this & $ReadOnly<T>;
1482
- mergeDeepIn(keyPath: Iterable<mixed>, ...collections: Array<any>): this & $ReadOnly<T>;
1789
+ updateIn<NSV, K: $Keys<T>, S: $ValOf<T, K>>(
1790
+ keyPath: [K],
1791
+ notSetValue: NSV,
1792
+ updater: (value: $ValOf<T, K>) => S
1793
+ ): this & $ReadOnly<T>;
1794
+ updateIn<K: $Keys<T>, S: $ValOf<T, K>>(
1795
+ keyPath: [K],
1796
+ updater: (value: $ValOf<T, K>) => S
1797
+ ): this & $ReadOnly<T>;
1798
+ updateIn<
1799
+ NSV,
1800
+ K: $Keys<T>,
1801
+ K2: $KeyOf<$ValOf<T, K>>,
1802
+ S: $ValOf<$ValOf<T, K>, K2>
1803
+ >(
1804
+ keyPath: [K, K2],
1805
+ notSetValue: NSV,
1806
+ updater: (value: $ValOf<$ValOf<T, K>, K2> | NSV) => S
1807
+ ): this & $ReadOnly<T>;
1808
+ updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(
1809
+ keyPath: [K, K2],
1810
+ updater: (value: $ValOf<$ValOf<T, K>, K2>) => S
1811
+ ): this & $ReadOnly<T>;
1812
+ updateIn<
1813
+ NSV,
1814
+ K: $Keys<T>,
1815
+ K2: $KeyOf<$ValOf<T, K>>,
1816
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1817
+ S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>
1818
+ >(
1819
+ keyPath: [K, K2, K3],
1820
+ notSetValue: NSV,
1821
+ updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV) => S
1822
+ ): this & $ReadOnly<T>;
1823
+ updateIn<
1824
+ K: $Keys<T>,
1825
+ K2: $KeyOf<$ValOf<T, K>>,
1826
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1827
+ S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>
1828
+ >(
1829
+ keyPath: [K, K2, K3],
1830
+ updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>) => S
1831
+ ): this & $ReadOnly<T>;
1832
+ updateIn<
1833
+ NSV,
1834
+ K: $Keys<T>,
1835
+ K2: $KeyOf<$ValOf<T, K>>,
1836
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1837
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1838
+ S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>
1839
+ >(
1840
+ keyPath: [K, K2, K3, K4],
1841
+ notSetValue: NSV,
1842
+ updater: (
1843
+ value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV
1844
+ ) => S
1845
+ ): this & $ReadOnly<T>;
1846
+ updateIn<
1847
+ K: $Keys<T>,
1848
+ K2: $KeyOf<$ValOf<T, K>>,
1849
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1850
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1851
+ S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>
1852
+ >(
1853
+ keyPath: [K, K2, K3, K4],
1854
+ updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>) => S
1855
+ ): this & $ReadOnly<T>;
1856
+ updateIn<
1857
+ NSV,
1858
+ K: $Keys<T>,
1859
+ K2: $KeyOf<$ValOf<T, K>>,
1860
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1861
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1862
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>,
1863
+ S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
1864
+ >(
1865
+ keyPath: [K, K2, K3, K4, K5],
1866
+ notSetValue: NSV,
1867
+ updater: (
1868
+ value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV
1869
+ ) => S
1870
+ ): this & $ReadOnly<T>;
1871
+ updateIn<
1872
+ K: $Keys<T>,
1873
+ K2: $KeyOf<$ValOf<T, K>>,
1874
+ K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>,
1875
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>,
1876
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>,
1877
+ S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
1878
+ >(
1879
+ keyPath: [K, K2, K3, K4, K5],
1880
+ updater: (
1881
+ value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>
1882
+ ) => S
1883
+ ): this & $ReadOnly<T>;
1884
+
1885
+ mergeIn(
1886
+ keyPath: Iterable<mixed>,
1887
+ ...collections: Array<any>
1888
+ ): this & $ReadOnly<T>;
1889
+ mergeDeepIn(
1890
+ keyPath: Iterable<mixed>,
1891
+ ...collections: Array<any>
1892
+ ): this & $ReadOnly<T>;
1483
1893
 
1484
1894
  toSeq(): KeyedSeq<$Keys<T>, any>;
1485
1895
 
@@ -1502,79 +1912,346 @@ declare function fromJS(
1502
1912
  sequence: KeyedCollection<string, mixed> | IndexedCollection<mixed>,
1503
1913
  path?: Array<string | number>
1504
1914
  ) => mixed
1505
- ): mixed;
1915
+ ): Collection<mixed, mixed>;
1506
1916
 
1507
1917
  declare function is(first: mixed, second: mixed): boolean;
1508
1918
  declare function hash(value: mixed): number;
1509
1919
 
1510
- declare function get<C: Object, K: $Keys<C>>(collection: C, key: K, notSetValue: mixed): $ValOf<C, K>;
1511
- declare function get<C, K: $KeyOf<C>, NSV>(collection: C, key: K, notSetValue: NSV): $ValOf<C, K> | NSV;
1920
+ declare function get<C: Object, K: $Keys<C>>(
1921
+ collection: C,
1922
+ key: K,
1923
+ notSetValue: mixed
1924
+ ): $ValOf<C, K>;
1925
+ declare function get<C, K: $KeyOf<C>, NSV>(
1926
+ collection: C,
1927
+ key: K,
1928
+ notSetValue: NSV
1929
+ ): $ValOf<C, K> | NSV;
1512
1930
 
1513
1931
  declare function has(collection: Object, key: mixed): boolean;
1514
1932
  declare function remove<C>(collection: C, key: $KeyOf<C>): C;
1515
- declare function set<C, K: $KeyOf<C>, V: $ValOf<C, K>>(collection: C, key: K, value: V): C;
1516
- declare function update<C, K: $KeyOf<C>, V: $ValOf<C, K>, NSV>(collection: C, key: K, notSetValue: NSV, updater: ($ValOf<C, K> | NSV) => V): C;
1517
- declare function update<C, K: $KeyOf<C>, V: $ValOf<C, K>>(collection: C, key: K, updater: ($ValOf<C, K>) => V): C;
1933
+ declare function set<C, K: $KeyOf<C>, V: $ValOf<C, K>>(
1934
+ collection: C,
1935
+ key: K,
1936
+ value: V
1937
+ ): C;
1938
+ declare function update<C, K: $KeyOf<C>, V: $ValOf<C, K>, NSV>(
1939
+ collection: C,
1940
+ key: K,
1941
+ notSetValue: NSV,
1942
+ updater: ($ValOf<C, K> | NSV) => V
1943
+ ): C;
1944
+ declare function update<C, K: $KeyOf<C>, V: $ValOf<C, K>>(
1945
+ collection: C,
1946
+ key: K,
1947
+ updater: ($ValOf<C, K>) => V
1948
+ ): C;
1518
1949
 
1519
1950
  declare function getIn<C>(collection: C, keyPath: [], notSetValue?: mixed): C;
1520
- declare function getIn<C, K: $KeyOf<C>, NSV>(collection: C, keyPath: [K], notSetValue: NSV): $ValOf<C, K> | NSV;
1521
- declare function getIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, NSV>(collection: C, keyPath: [K, K2], notSetValue: NSV): $ValOf<$ValOf<C, K>, K2> | NSV;
1522
- declare function getIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, NSV>(collection: C, keyPath: [K, K2, K3], notSetValue: NSV): $ValOf<$ValOf<$ValOf<C, K>, K2>, K3> | NSV;
1523
- declare function getIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, NSV>(collection: C, keyPath: [K, K2, K3, K4], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4> | NSV;
1524
- declare function getIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>, NSV>(collection: C, keyPath: [K, K2, K3, K4, K5], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5> | NSV;
1951
+ declare function getIn<C, K: $KeyOf<C>, NSV>(
1952
+ collection: C,
1953
+ keyPath: [K],
1954
+ notSetValue: NSV
1955
+ ): $ValOf<C, K> | NSV;
1956
+ declare function getIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, NSV>(
1957
+ collection: C,
1958
+ keyPath: [K, K2],
1959
+ notSetValue: NSV
1960
+ ): $ValOf<$ValOf<C, K>, K2> | NSV;
1961
+ declare function getIn<
1962
+ C,
1963
+ K: $KeyOf<C>,
1964
+ K2: $KeyOf<$ValOf<C, K>>,
1965
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
1966
+ NSV
1967
+ >(
1968
+ collection: C,
1969
+ keyPath: [K, K2, K3],
1970
+ notSetValue: NSV
1971
+ ): $ValOf<$ValOf<$ValOf<C, K>, K2>, K3> | NSV;
1972
+ declare function getIn<
1973
+ C,
1974
+ K: $KeyOf<C>,
1975
+ K2: $KeyOf<$ValOf<C, K>>,
1976
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
1977
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
1978
+ NSV
1979
+ >(
1980
+ collection: C,
1981
+ keyPath: [K, K2, K3, K4],
1982
+ notSetValue: NSV
1983
+ ): $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4> | NSV;
1984
+ declare function getIn<
1985
+ C,
1986
+ K: $KeyOf<C>,
1987
+ K2: $KeyOf<$ValOf<C, K>>,
1988
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
1989
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
1990
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
1991
+ NSV
1992
+ >(
1993
+ collection: C,
1994
+ keyPath: [K, K2, K3, K4, K5],
1995
+ notSetValue: NSV
1996
+ ): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5> | NSV;
1525
1997
 
1526
1998
  declare function hasIn(collection: Object, keyPath: Iterable<mixed>): boolean;
1527
1999
 
1528
2000
  declare function removeIn<C>(collection: C, keyPath: []): void;
1529
2001
  declare function removeIn<C, K: $KeyOf<C>>(collection: C, keyPath: [K]): C;
1530
- declare function removeIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C>>>(collection: C, keyPath: [K, K2]): C;
1531
- declare function removeIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C>>, K3: $KeyOf<$ValOf<$ValOf<C>, K2>>>(collection: C, keyPath: [K, K2, K3]): C;
1532
- declare function removeIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C>>, K3: $KeyOf<$ValOf<$ValOf<C>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C>, K2>, K3>>>(collection: C, keyPath: [K, K2, K3, K4]): C;
1533
- declare function removeIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C>>, K3: $KeyOf<$ValOf<$ValOf<C>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C>, K2>, K3>, K4>>>(collection: C, keyPath: [K, K2, K3, K4, K5]): C;
2002
+ declare function removeIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C>>>(
2003
+ collection: C,
2004
+ keyPath: [K, K2]
2005
+ ): C;
2006
+ declare function removeIn<
2007
+ C,
2008
+ K: $KeyOf<C>,
2009
+ K2: $KeyOf<$ValOf<C>>,
2010
+ K3: $KeyOf<$ValOf<$ValOf<C>, K2>>
2011
+ >(
2012
+ collection: C,
2013
+ keyPath: [K, K2, K3]
2014
+ ): C;
2015
+ declare function removeIn<
2016
+ C,
2017
+ K: $KeyOf<C>,
2018
+ K2: $KeyOf<$ValOf<C>>,
2019
+ K3: $KeyOf<$ValOf<$ValOf<C>, K2>>,
2020
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C>, K2>, K3>>
2021
+ >(
2022
+ collection: C,
2023
+ keyPath: [K, K2, K3, K4]
2024
+ ): C;
2025
+ declare function removeIn<
2026
+ C,
2027
+ K: $KeyOf<C>,
2028
+ K2: $KeyOf<$ValOf<C>>,
2029
+ K3: $KeyOf<$ValOf<$ValOf<C>, K2>>,
2030
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C>, K2>, K3>>,
2031
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C>, K2>, K3>, K4>>
2032
+ >(
2033
+ collection: C,
2034
+ keyPath: [K, K2, K3, K4, K5]
2035
+ ): C;
1534
2036
 
1535
2037
  declare function setIn<S>(collection: Object, keyPath: [], value: S): S;
1536
- declare function setIn<C, K: $KeyOf<C>, S: $ValOf<C, K>>(collection: C, keyPath: [K], value: S): C;
1537
- declare function setIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, S: $ValOf<$ValOf<C, K>, K2>>(collection: C, keyPath: [K, K2], value: S): C;
1538
- declare function setIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>(collection: C, keyPath: [K, K2, K3], value: S): C;
1539
- declare function setIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>(collection: C, keyPath: [K, K2, K3, K4], value: S): C;
1540
- declare function setIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>>(collection: C, keyPath: [K, K2, K3, K4, K5], value: S): C;
1541
-
1542
- declare function updateIn<C, S>(collection: C, keyPath: [], notSetValue: mixed, updater: (value: C) => S): S;
1543
- declare function updateIn<C, S>(collection: C, keyPath: [], updater: (value: C) => S): S;
1544
- declare function updateIn<C, K: $KeyOf<C>, S: $ValOf<C, K>, NSV>(collection: C, keyPath: [K], notSetValue: NSV, updater: (value: $ValOf<C, K> | NSV) => S): C;
1545
- declare function updateIn<C, K: $KeyOf<C>, S: $ValOf<C, K>>(collection: C, keyPath: [K], updater: (value: $ValOf<C, K>) => S): C;
1546
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, S: $ValOf<$ValOf<C, K>, K2>, NSV>(collection: C, keyPath: [K, K2], notSetValue: NSV, updater: (value: $ValOf<$ValOf<C, K>, K2> | NSV) => S): C;
1547
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, S: $ValOf<$ValOf<C, K>, K2>>(collection: C, keyPath: [K, K2], updater: (value: $ValOf<$ValOf<C, K>, K2>) => S): C;
1548
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, NSV>(collection: C, keyPath: [K, K2, K3], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3> | NSV) => S): C;
1549
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>(collection: C, keyPath: [K, K2, K3], updater: (value: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>) => S): C;
1550
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, NSV>(collection: C, keyPath: [K, K2, K3, K4], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4> | NSV) => S): C;
1551
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>(collection: C, keyPath: [K, K2, K3, K4], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>) => S): C;
1552
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>, NSV>(collection: C, keyPath: [K, K2, K3, K4, K5], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5> | NSV) => S): C;
1553
- declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>>(collection: C, keyPath: [K, K2, K3, K4, K5], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>) => S): C;
2038
+ declare function setIn<C, K: $KeyOf<C>, S: $ValOf<C, K>>(
2039
+ collection: C,
2040
+ keyPath: [K],
2041
+ value: S
2042
+ ): C;
2043
+ declare function setIn<
2044
+ C,
2045
+ K: $KeyOf<C>,
2046
+ K2: $KeyOf<$ValOf<C, K>>,
2047
+ S: $ValOf<$ValOf<C, K>, K2>
2048
+ >(
2049
+ collection: C,
2050
+ keyPath: [K, K2],
2051
+ value: S
2052
+ ): C;
2053
+ declare function setIn<
2054
+ C,
2055
+ K: $KeyOf<C>,
2056
+ K2: $KeyOf<$ValOf<C, K>>,
2057
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2058
+ S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>
2059
+ >(
2060
+ collection: C,
2061
+ keyPath: [K, K2, K3],
2062
+ value: S
2063
+ ): C;
2064
+ declare function setIn<
2065
+ C,
2066
+ K: $KeyOf<C>,
2067
+ K2: $KeyOf<$ValOf<C, K>>,
2068
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2069
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
2070
+ S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>
2071
+ >(
2072
+ collection: C,
2073
+ keyPath: [K, K2, K3, K4],
2074
+ value: S
2075
+ ): C;
2076
+ declare function setIn<
2077
+ C,
2078
+ K: $KeyOf<C>,
2079
+ K2: $KeyOf<$ValOf<C, K>>,
2080
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2081
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
2082
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
2083
+ S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>
2084
+ >(
2085
+ collection: C,
2086
+ keyPath: [K, K2, K3, K4, K5],
2087
+ value: S
2088
+ ): C;
2089
+
2090
+ declare function updateIn<C, S>(
2091
+ collection: C,
2092
+ keyPath: [],
2093
+ notSetValue: mixed,
2094
+ updater: (value: C) => S
2095
+ ): S;
2096
+ declare function updateIn<C, S>(
2097
+ collection: C,
2098
+ keyPath: [],
2099
+ updater: (value: C) => S
2100
+ ): S;
2101
+ declare function updateIn<C, K: $KeyOf<C>, S: $ValOf<C, K>, NSV>(
2102
+ collection: C,
2103
+ keyPath: [K],
2104
+ notSetValue: NSV,
2105
+ updater: (value: $ValOf<C, K> | NSV) => S
2106
+ ): C;
2107
+ declare function updateIn<C, K: $KeyOf<C>, S: $ValOf<C, K>>(
2108
+ collection: C,
2109
+ keyPath: [K],
2110
+ updater: (value: $ValOf<C, K>) => S
2111
+ ): C;
2112
+ declare function updateIn<
2113
+ C,
2114
+ K: $KeyOf<C>,
2115
+ K2: $KeyOf<$ValOf<C, K>>,
2116
+ S: $ValOf<$ValOf<C, K>, K2>,
2117
+ NSV
2118
+ >(
2119
+ collection: C,
2120
+ keyPath: [K, K2],
2121
+ notSetValue: NSV,
2122
+ updater: (value: $ValOf<$ValOf<C, K>, K2> | NSV) => S
2123
+ ): C;
2124
+ declare function updateIn<
2125
+ C,
2126
+ K: $KeyOf<C>,
2127
+ K2: $KeyOf<$ValOf<C, K>>,
2128
+ S: $ValOf<$ValOf<C, K>, K2>
2129
+ >(
2130
+ collection: C,
2131
+ keyPath: [K, K2],
2132
+ updater: (value: $ValOf<$ValOf<C, K>, K2>) => S
2133
+ ): C;
2134
+ declare function updateIn<
2135
+ C,
2136
+ K: $KeyOf<C>,
2137
+ K2: $KeyOf<$ValOf<C, K>>,
2138
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2139
+ S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>,
2140
+ NSV
2141
+ >(
2142
+ collection: C,
2143
+ keyPath: [K, K2, K3],
2144
+ notSetValue: NSV,
2145
+ updater: (value: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3> | NSV) => S
2146
+ ): C;
2147
+ declare function updateIn<
2148
+ C,
2149
+ K: $KeyOf<C>,
2150
+ K2: $KeyOf<$ValOf<C, K>>,
2151
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2152
+ S: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>
2153
+ >(
2154
+ collection: C,
2155
+ keyPath: [K, K2, K3],
2156
+ updater: (value: $ValOf<$ValOf<$ValOf<C, K>, K2>, K3>) => S
2157
+ ): C;
2158
+ declare function updateIn<
2159
+ C,
2160
+ K: $KeyOf<C>,
2161
+ K2: $KeyOf<$ValOf<C, K>>,
2162
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2163
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
2164
+ S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>,
2165
+ NSV
2166
+ >(
2167
+ collection: C,
2168
+ keyPath: [K, K2, K3, K4],
2169
+ notSetValue: NSV,
2170
+ updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4> | NSV) => S
2171
+ ): C;
2172
+ declare function updateIn<
2173
+ C,
2174
+ K: $KeyOf<C>,
2175
+ K2: $KeyOf<$ValOf<C, K>>,
2176
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2177
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
2178
+ S: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>
2179
+ >(
2180
+ collection: C,
2181
+ keyPath: [K, K2, K3, K4],
2182
+ updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>) => S
2183
+ ): C;
2184
+ declare function updateIn<
2185
+ C,
2186
+ K: $KeyOf<C>,
2187
+ K2: $KeyOf<$ValOf<C, K>>,
2188
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2189
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
2190
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
2191
+ S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>,
2192
+ NSV
2193
+ >(
2194
+ collection: C,
2195
+ keyPath: [K, K2, K3, K4, K5],
2196
+ notSetValue: NSV,
2197
+ updater: (
2198
+ value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5> | NSV
2199
+ ) => S
2200
+ ): C;
2201
+ declare function updateIn<
2202
+ C,
2203
+ K: $KeyOf<C>,
2204
+ K2: $KeyOf<$ValOf<C, K>>,
2205
+ K3: $KeyOf<$ValOf<$ValOf<C, K>, K2>>,
2206
+ K4: $KeyOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>>,
2207
+ K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>>,
2208
+ S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>
2209
+ >(
2210
+ collection: C,
2211
+ keyPath: [K, K2, K3, K4, K5],
2212
+ updater: (
2213
+ value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<C, K>, K2>, K3>, K4>, K5>
2214
+ ) => S
2215
+ ): C;
1554
2216
 
1555
2217
  declare function merge<C>(
1556
2218
  collection: C,
1557
- ...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
2219
+ ...collections: Array<
2220
+ | $IterableOf<C>
2221
+ | $Shape<RecordValues<C>>
2222
+ | PlainObjInput<$KeyOf<C>, $ValOf<C>>
2223
+ >
1558
2224
  ): C;
1559
2225
  declare function mergeWith<C>(
1560
2226
  merger: (oldVal: $ValOf<C>, newVal: $ValOf<C>, key: $KeyOf<C>) => $ValOf<C>,
1561
2227
  collection: C,
1562
- ...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
2228
+ ...collections: Array<
2229
+ | $IterableOf<C>
2230
+ | $Shape<RecordValues<C>>
2231
+ | PlainObjInput<$KeyOf<C>, $ValOf<C>>
2232
+ >
1563
2233
  ): C;
1564
2234
  declare function mergeDeep<C>(
1565
2235
  collection: C,
1566
- ...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
2236
+ ...collections: Array<
2237
+ | $IterableOf<C>
2238
+ | $Shape<RecordValues<C>>
2239
+ | PlainObjInput<$KeyOf<C>, $ValOf<C>>
2240
+ >
1567
2241
  ): C;
1568
2242
  declare function mergeDeepWith<C>(
1569
2243
  merger: (oldVal: any, newVal: any, key: any) => mixed,
1570
2244
  collection: C,
1571
- ...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
2245
+ ...collections: Array<
2246
+ | $IterableOf<C>
2247
+ | $Shape<RecordValues<C>>
2248
+ | PlainObjInput<$KeyOf<C>, $ValOf<C>>
2249
+ >
1572
2250
  ): C;
1573
2251
 
1574
2252
  export {
1575
2253
  Collection,
1576
2254
  Seq,
1577
-
1578
2255
  List,
1579
2256
  Map,
1580
2257
  OrderedMap,
@@ -1584,11 +2261,9 @@ export {
1584
2261
  Record,
1585
2262
  Set,
1586
2263
  Stack,
1587
-
1588
2264
  fromJS,
1589
2265
  is,
1590
2266
  hash,
1591
-
1592
2267
  isImmutable,
1593
2268
  isCollection,
1594
2269
  isKeyed,
@@ -1597,7 +2272,6 @@ export {
1597
2272
  isOrdered,
1598
2273
  isRecord,
1599
2274
  isValueObject,
1600
-
1601
2275
  get,
1602
2276
  has,
1603
2277
  remove,
@@ -1612,7 +2286,7 @@ export {
1612
2286
  mergeWith,
1613
2287
  mergeDeep,
1614
2288
  mergeDeepWith,
1615
- }
2289
+ };
1616
2290
 
1617
2291
  export default {
1618
2292
  Collection,
@@ -1655,7 +2329,7 @@ export default {
1655
2329
  mergeWith,
1656
2330
  mergeDeep,
1657
2331
  mergeDeepWith,
1658
- }
2332
+ };
1659
2333
 
1660
2334
  export type {
1661
2335
  KeyedCollection,
@@ -1668,7 +2342,6 @@ export type {
1668
2342
  RecordOf,
1669
2343
  RecordInstance,
1670
2344
  ValueObject,
1671
-
1672
2345
  $KeyOf,
1673
2346
  $ValOf,
1674
- }
2347
+ };