29
29
*/
30
30
type ESIterable<T> = $Iterable<T,void,void>;
31
31
32
- declare class _Iterable<K, V, KI, II, SI> {
32
+ declare class _Iterable<K, + V, KI, II, SI> {
33
33
static Keyed: KI;
34
34
static Indexed: II;
35
35
static Set: SI;
@@ -184,9 +184,9 @@ declare class _Iterable<K, V, KI, II, SI> {
184
184
isSuperset(iter: ESIterable<V>): boolean;
185
185
}
186
186
187
- declare class Iterable<K, V> extends _Iterable<K, V, typeof KeyedIterable, typeof IndexedIterable, typeof SetIterable> {}
187
+ declare class Iterable<K, + V> extends _Iterable<K, V, typeof KeyedIterable, typeof IndexedIterable, typeof SetIterable> {}
188
188
189
- declare class KeyedIterable<K,V> extends Iterable<K,V> {
189
+ declare class KeyedItera
10000
ble<K, + V> extends Iterable<K,V> {
190
190
static <K,V>(iter?: ESIterable<[K,V]>): KeyedIterable<K,V>;
191
191
static <K,V>(obj?: { [key: K]: V }): KeyedIterable<K,V>;
192
192
@@ -222,7 +222,7 @@ declare class KeyedIterable<K,V> extends Iterable<K,V> {
222
222
223
223
Iterable.Keyed = KeyedIterable
224
224
225
- declare class IndexedIterable<T> extends Iterable<number,T> {
225
+ declare class IndexedIterable<+ T> extends Iterable<number,T> {
226
226
static <T>(iter?: ESIterable<T>): IndexedIterable<T>;
227
227
228
228
@@iterator(): Iterator<T>;
@@ -330,7 +330,7 @@ declare class IndexedIterable<T> extends Iterable<number,T> {
330
330
flatten(shallow?: boolean): /*this*/IndexedIterable<any>;
331
331
}
332
332
333
- declare class SetIterable<T> extends Iterable<T,T> {
333
+ declare class SetIterable<+ T> extends Iterable<T,T> {
334
334
static <T>(iter?: ESIterable<T>): SetIterable<T>;
335
335
336
336
@@iterator(): Iterator<T>;
@@ -356,23 +356,23 @@ declare class SetIterable<T> extends Iterable<T,T> {
356
356
flatten(shallow?: boolean): /*this*/SetIterable<any>;
357
357
}
358
358
359
- declare class Collection<K,V> extends _Iterable<K,V, typeof KeyedCollection, typeof IndexedCollection, typeof SetCollection> {
359
+ declare class Collection<K, + V> extends _Iterable<K,V, typeof KeyedCollection, typeof IndexedCollection, typeof SetCollection> {
360
360
size: number;
361
361
}
362
362
363
- declare class KeyedCollection<K,V> extends Collection<K,V> mixins KeyedIterable<K,V> {
363
+ declare class KeyedCollection<K, + V> extends Collection<K,V> mixins KeyedIterable<K,V> {
364
364
toSeq(): KeyedSeq<K,V>;
365
365
}
366
366
367
- declare class IndexedCollection<T> extends Collection<number,T> mixins IndexedIterable<T> {
367
+ declare class IndexedCollection<+ T> extends Collection<number,T> mixins IndexedIterable<T> {
368
368
toSeq(): IndexedSeq<T>;
369
369
}
370
370
371
- declare class SetCollection<T> extends Collection<T,T> mixins SetIterable<T> {
371
+ declare class SetCollection<+ T> extends Collection<T,T> mixins SetIterable<T> {
372
372
toSeq(): SetSeq<T>;
373
373
}
374
374
375
- declare class Seq<K,V> extends _Iterable<K,V, typeof KeyedSeq, typeof IndexedSeq, typeof SetSeq> {
375
+ declare class Seq<K, + V> extends _Iterable<K,V, typeof KeyedSeq, typeof IndexedSeq, typeof SetSeq> {
376
376
static <K,V>(iter: KeyedSeq<K,V>): KeyedSeq<K,V>;
377
377
static <T> (iter: SetSeq<T>): SetSeq<K,V>;
378
378
static <T> (iter?: ESIterable<T>): IndexedSeq<T>;
@@ -386,22 +386,22 @@ declare class Seq<K,V> extends _Iterable<K,V, typeof KeyedSeq, typeof IndexedSeq
386
386
toSeq(): this;
387
387
}
388
388
389
- declare class KeyedSeq<K,V> extends Seq<K,V> mixins KeyedIterable<K,V> {
389
+ declare class KeyedSeq<K, + V> extends Seq<K,V> mixins KeyedIterable<K,V> {
390
390
static <K,V>(iter?: ESIterable<[K,V]>): KeyedSeq<K,V>;
391
391
static <K,V>(iter?: { [key: K]: V }): KeyedSeq<K,V>;
392
392
}
393
393
394
- declare class IndexedSeq<T> extends Seq<number,T> mixins IndexedIterable<T> {
394
+ declare class IndexedSeq<+ T> extends Seq<number,T> mixins IndexedIterable<T> {
395
395
static <T>(iter?: ESIterable<T>): IndexedSeq<T>;
396
396
static of<T>(...values: T[]): IndexedSeq<T>;
397
397
}
398
398
399
- declare class SetSeq<T> extends Seq<T,T> mixins SetIterable<T> {
399
+ declare class SetSeq<+ T> extends Seq<T,T> mixins SetIterable<T> {
400
400
static <T>(iter?: ESIterable<T>): IndexedSeq<T>;
401
401
static of<T>(...values: T[]): SetSeq<T>;
402
402
}
403
403
404
- declare class List<T> extends IndexedCollection<T> {
404
+ declare class List<+ T> extends IndexedCollection<T> {
405
405
static (iterable?: ESIterable<T>): List<T>;
406
406
407
407
static isList(maybeList: any): boolean;
@@ -465,7 +465,7 @@ declare class List<T> extends IndexedCollection<T> {
465
465
flatten(shallow?: boolean): /*this*/List<any>;
466
466
}
467
467
468
- declare class Map<K,V> extends KeyedCollection<K,V> {
468
+ declare class Map<K, + V> extends KeyedCollection<K,V> {
469
469
static <K, V>(obj?: {[key: K]: V}): Map<K, V>;
470
470
static <K, V>(iterable: ESIterable<[K,V]>): Map<K, V>;
471
471
@@ -550,7 +550,7 @@ declare class Map<K,V> extends KeyedCollection<K,V> {
550
550
flatten(shallow?: boolean): /*this*/Map<any,any>;
551
551
}
552
552
553
- declare class OrderedMap<K,V> extends KeyedCollection<K,V> {
553
+ declare class OrderedMap<K, + V> extends KeyedCollection<K,V> {
554
554
static <K, V>(obj?: {[key: K]: V}): OrderedMap<K, V>;
555
555
static <K, V>(iterable: ESIterable<[K,V]>): OrderedMap<K, V>;
556
556
static isOrderedMap(maybeOrderedMap: any): bool;
@@ -631,7 +631,7 @@ declare class OrderedMap<K,V> extends KeyedCollection<K,V> {
631
631
flatten(shallow?: boolean): /*this*/OrderedMap<any,any>
632
632
}
633
633
634
- declare class Set<T> extends SetCollection<T> {
634
+ declare class Set<+ T> extends SetCollection<T> {
635
635
static <T>(iterable: ESIterable<T>): Set<T>;
636
636
static isSet(maybeSet: any): boolean;
637
637
static of<T>(...values: T[]): Set<T>;
@@ -668,7 +668,7 @@ declare class Set<T> extends SetCollection<T> {
668
668
}
669
669
670
670
// Overrides except for `isOrderedSet` are for specialized return types
671
- declare class OrderedSet<T> extends Set<T> {
671
+ declare class OrderedSet<+ T> extends Set<T> {
672
672
static <T>(iterable: ESIterable<T>): OrderedSet<T>;
673
673
static of<T>(...values: T[]): OrderedSet<T>;
674
674
static fromKeys<T>(iter: ESIterable<[T,any]>): OrderedSet<T>;
@@ -696,7 +696,7 @@ declare class OrderedSet<T> extends Set<T> {
696
696
flatten(shallow?: boolean): /*this*/OrderedSet<any>;
697
697
}
698
698
699
- declare class Stack<T> extends IndexedCollection<T> {
699
+ declare class Stack<+ T> extends IndexedCollection<T> {
700
700
static <T>(iterable?: ESIterable<T>): Stack<T>;
701
701
702
702
static isStack(maybeStack: any): boolean;
0 commit comments