@@ -1192,6 +1192,33 @@ declare module Immutable {
1192
1192
*/
1193
1193
function of < T > ( ...values : T [ ] ) : Seq . Indexed < T > ;
1194
1194
1195
+
1196
+ /**
1197
+ * `Seq` which represents key-value pairs.
1198
+ */
1199
+ export module Keyed { }
1200
+
1201
+ /**
1202
+ * Always returns a Seq.Keyed, if input is not keyed, expects an
1203
+ * iterable of [K, V] tuples.
1204
+ */
1205
+ export function Keyed < K , V > ( ) : Seq . Keyed < K , V > ;
1206
+ export function Keyed < K , V > ( seq : KeyedIterable < K , V > ) : Seq . Keyed < K , V > ;
1207
+ export function Keyed < K , V > ( seq : Iterable < any , /*[K,V]*/ any > ) : Seq . Keyed < K , V > ;
1208
+ export function Keyed < K , V > ( array : Array < /*[K,V]*/ any > ) : Seq . Keyed < K , V > ;
1209
+ export function Keyed < V > ( obj : { [ key : string ] : V } ) : Seq . Keyed < string , V > ;
1210
+ export function Keyed < K , V > ( iterator : Iterator < /*[K,V]*/ any > ) : Seq . Keyed < K , V > ;
1211
+ export function Keyed < K , V > ( iterable : /*Iterable<[K,V]>*/ Object ) : Seq . Keyed < K , V > ;
1212
+
1213
+ export interface Keyed < K , V > extends Seq < K , V > , KeyedIterable < K , V > {
1214
+
1215
+ /**
1216
+ * Returns itself
1217
+ */
1218
+ toSeq ( ) : /*this*/ Seq . Keyed < K , V >
1219
+ }
1220
+
1221
+
1195
1222
/**
1196
1223
* `Seq` which represents an ordered indexed list of values.
1197
1224
*/
@@ -1269,14 +1296,14 @@ declare module Immutable {
1269
1296
* * If an Array-like, an `Seq.Indexed`.
1270
1297
* * If an Object with an Iterator, an `Seq.Indexed`.
1271
1298
* * If an Iterator, an `Seq.Indexed`.
1272
- * * If an Object, a `KeyedSeq `.
1299
+ * * If an Object, a `Seq.Keyed `.
1273
1300
*
1274
1301
*/
1275
1302
export function Seq < K , V > ( ) : Seq < K , V > ;
1276
1303
export function Seq < K , V > ( seq : Seq < K , V > ) : Seq < K , V > ;
1277
1304
export function Seq < K , V > ( iterable : Iterable < K , V > ) : Seq < K , V > ;
1278
1305
export function Seq < T > ( array : Array < T > ) : Seq . Indexed < T > ;
1279
- export function Seq < V > ( obj : { [ key : string ] : V } ) : KeyedSeq < string , V > ;
1306
+ export function Seq < V > ( obj : { [ key : string ] : V } ) : Seq . Keyed < string , V > ;
1280
1307
export function Seq < T > ( iterator : Iterator < T > ) : Seq . Indexed < T > ;
1281
1308
export function Seq < T > ( iterable : /*ES6Iterable<T>*/ Object ) : Seq . Indexed < T > ;
1282
1309
@@ -1320,32 +1347,6 @@ declare module Immutable {
1320
1347
cacheResult ( ) : /*this*/ Seq < K , V > ;
1321
1348
}
1322
1349
1323
-
1324
- /**
1325
- * `Seq` which represents key-value pairs.
1326
- */
1327
- export module KeyedSeq { }
1328
-
1329
- /**
1330
- * Always returns a KeyedSeq, if input is not keyed, expects an
1331
- * iterable of [K, V] tuples.
1332
- */
1333
- export function KeyedSeq < K , V > ( ) : KeyedSeq < K , V > ;
1334
- export function KeyedSeq < K , V > ( seq : KeyedIterable < K , V > ) : KeyedSeq < K , V > ;
1335
- export function KeyedSeq < K , V > ( seq : Iterable < any , /*[K,V]*/ any > ) : KeyedSeq < K , V > ;
1336
- export function KeyedSeq < K , V > ( array : Array < /*[K,V]*/ any > ) : KeyedSeq < K , V > ;
1337
- export function KeyedSeq < V > ( obj : { [ key : string ] : V } ) : KeyedSeq < string , V > ;
1338
- export function KeyedSeq < K , V > ( iterator : Iterator < /*[K,V]*/ any > ) : KeyedSeq < K , V > ;
1339
- export function KeyedSeq < K , V > ( iterable : /*Iterable<[K,V]>*/ Object ) : KeyedSeq < K , V > ;
1340
-
1341
- export interface KeyedSeq < K , V > extends Seq < K , V > , KeyedIterable < K , V > {
1342
-
1343
- /**
1344
- * Returns itself
1345
- */
1346
- toSeq ( ) : /*this*/ KeyedSeq < K , V >
1347
- }
1348
-
1349
1350
/**
1350
1351
* The `Iterable` is a set of (key, value) entries which can be iterated, and
1351
1352
* is the base class for all collections in `immutable`, allowing them to
@@ -1579,7 +1580,7 @@ declare module Immutable {
1579
1580
toSeq ( ) : Seq < K , V > ;
1580
1581
1581
1582
/**
1582
- * Returns a KeyedSeq from this Iterable where indices are treated as keys.
1583
+ * Returns a Seq.Keyed from this Iterable where indices are treated as keys.
1583
1584
*
1584
1585
* This is useful if you want to operate on an
1585
1586
* IndexedIterable and preserve the [index, value] pairs.
@@ -1595,7 +1596,7 @@ declare module Immutable {
1595
1596
* keyedSeq.filter(v => v === 'B').toString() // Seq { 1: 'B' }
1596
1597
*
1597
1598
*/
1598
- toKeyedSeq ( ) : KeyedSeq < K , V > ;
1599
+ toKeyedSeq ( ) : Seq . Keyed < K , V > ;
1599
1600
1600
1601
/**
1601
1602
* Returns an Seq.Indexed of the values of this Iterable, discarding keys.
@@ -1731,7 +1732,7 @@ declare module Immutable {
1731
1732
groupBy < G > (
1732
1733
grouper : ( value ?: V , key ?: K , iter ?: /*this*/ Iterable < K , V > ) => G ,
1733
1734
context ?: any
1734
- ) : /*Map*/ KeyedSeq < G , /*this*/ Iterable < K , V > > ;
1735
+ ) : /*Map*/ Seq . Keyed < G , /*this*/ Iterable < K , V > > ;
1735
1736
1736
1737
1737
1738
// Side effects
@@ -1979,7 +1980,7 @@ declare module Immutable {
1979
1980
) : number ;
1980
1981
1981
1982
/**
1982
- * Returns a `KeyedSeq ` of counts, grouped by the return value of
1983
+ * Returns a `Seq.Keyed ` of counts, grouped by the return value of
1983
1984
* the `grouper` function.
1984
1985
*
1985
1986
* Note: This is not a lazy operation.
@@ -2144,10 +2145,10 @@ declare module Immutable {
2144
2145
export interface KeyedIterable < K , V > extends Iterable < K , V > {
2145
2146
2146
2147
/**
2147
- * Returns KeyedSeq .
2148
+ * Returns Seq.Keyed .
2148
2149
* @override
2149
2150
*/
2150
- toSeq ( ) : KeyedSeq < K , V > ;
2151
+ toSeq ( ) : Seq . Keyed < K , V > ;
2151
2152
2152
2153
2153
2154
// Sequence functions
@@ -2277,9 +2278,9 @@ declare module Immutable {
2277
2278
2278
2279
/**
2279
2280
* If this is an iterable of [key, value] entry tuples, it will return a
2280
- * KeyedSeq of those entries.
2281
+ * Seq.Keyed of those entries.
2281
2282
*/
2282
- fromEntrySeq ( ) : KeyedSeq < any , any > ;
2283
+ fromEntrySeq ( ) : Seq . Keyed < any , any > ;
2283
2284
2284
2285
2285
2286
// Combination
@@ -2459,10 +2460,10 @@ declare module Immutable {
2459
2460
export interface KeyedCollection < K , V > extends Collection < K , V > , KeyedIterable < K , V > {
2460
2461
2461
2462
/**
2462
- * Returns KeyedSeq .
2463
+ * Returns Seq.Keyed .
2463
2464
* @override
2464
2465
*/
2465
- toSeq ( ) : KeyedSeq < K , V > ;
2466
+ toSeq ( ) : Seq . Keyed < K , V > ;
2466
2467
}
2467
2468
2468
2469
0 commit comments