immutable 4.0.0-rc.12 → 4.0.0-rc.14

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