@@ -153,6 +153,9 @@ declare module Immutable {
153
153
* Create a new immutable List containing the values of the provided
154
154
* collection-like.
155
155
*
156
+ * Note: `List` is a factory function and not a class, and does not use the
157
+ * `new` keyword during construction.
158
+ *
156
159
* <!-- runkit:activate -->
157
160
* ```js
158
161
* const { List, Set } = require('immutable')
@@ -725,6 +728,9 @@ declare module Immutable {
725
728
* Created with the same key value pairs as the provided Collection.Keyed or
726
729
* JavaScript Object or expects a Collection of [K, V] tuple entries.
727
730
*
731
+ * Note: `Map` is a factory function and not a class, and does not use the
732
+ * `new` keyword during construction.
733
+ *
728
734
* <!-- runkit:activate -->
729
735
* ```js
730
736
* const { Map } = require('immutable')
@@ -1409,6 +1415,8 @@ declare module Immutable {
1409
1415
* let newOrderedMap = OrderedMap({key: "value"})
1410
1416
* let newOrderedMap = OrderedMap([["key", "value"]])
1411
1417
*
1418
+ * Note: `OrderedMap` is a factory function and not a class, and does not use
1419
+ * the `new` keyword during construction.
1412
1420
*/
1413
1421
export function OrderedMap < K , V > ( collection : Iterable < [ K , V ] > ) : OrderedMap < K , V > ;
1414
1422
export function OrderedMap < T > ( collection : Iterable < Iterable < T > > ) : OrderedMap < T , T > ;
@@ -1600,6 +1608,9 @@ declare module Immutable {
1600
1608
/**
1601
1609
* Create a new immutable Set containing the values of the provided
1602
1610
* collection-like.
1611
+ *
1612
+ * Note: `Set` is a factory function and not a class, and does not use the
1613
+ * `new` keyword during construction.
1603
1614
*/
1604
1615
export function Set ( ) : Set < any > ;
1605
1616
export function Set < T > ( ) : Set < T > ;
@@ -1781,6 +1792,9 @@ declare module Immutable {
1781
1792
/**
1782
1793
* Create a new immutable OrderedSet containing the values of the provided
1783
1794
* collection-like.
1795
+ *
1796
+ * Note: `OrderedSet` is a factory function and not a class, and does not use
1797
+ * the `new` keyword during construction.
1784
1798
*/
1785
1799
export function OrderedSet ( ) : OrderedSet < any > ;
1786
1800
export function OrderedSet < T > ( ) : OrderedSet < T > ;
@@ -1938,6 +1952,9 @@ declare module Immutable {
1938
1952
*
1939
1953
* The iteration order of the provided collection is preserved in the
1940
1954
* resulting `Stack`.
1955
+ *
1956
+ * Note: `Stack` is a factory function and not a class, and does not use the
1957
+ * `new` keyword during construction.
1941
1958
*/
1942
1959
export function Stack ( ) : Stack < any > ;
1943
1960
export function Stack < T > ( ) : Stack < T > ;
@@ -2157,6 +2174,9 @@ declare module Immutable {
2157
2174
* (exclusive), by `step`, where `start` defaults to 0, `step` to 1, and `end` to
2158
2175
* infinity. When `start` is equal to `end`, returns empty range.
2159
2176
*
2177
+ * Note: `Range` is a factory function and not a class, and does not use the
2178
+ * `new` keyword during construction.
2179
+ *
2160
2180
* ```js
2161
2181
* const { Range } = require('immutable')
2162
2182
* Range() // [ 0, 1, 2, 3, ... ]
@@ -2174,6 +2194,9 @@ declare module Immutable {
2174
2194
* Returns a Seq.Indexed of `value` repeated `times` times. When `times` is
2175
2195
* not defined, returns an infinite `Seq` of `value`.
2176
2196
*
2197
+ * Note: `Repeat` is a factory function and not a class, and does not use the
2198
+ * `new` keyword during construction.
2199
+ *
2177
2200
* ```js
2178
2201
* const { Repeat } = require('immutable')
2179
2202
* Repeat('foo') // [ 'foo', 'foo', 'foo', ... ]
@@ -2433,6 +2456,9 @@ declare module Immutable {
2433
2456
* Record Factory, which is a function that creates Record instances.
2434
2457
*
2435
2458
* See above for examples of using `Record()`.
2459
+ *
2460
+ * Note: `Record` is a factory function and not a class, and does not use the
2461
+ * `new` keyword during construction.
2436
2462
*/
2437
2463
export function Record < TProps > ( defaultValues : TProps , name ?: string ) : Record . Factory < TProps > ;
2438
2464
@@ -2659,6 +2685,9 @@ declare module Immutable {
2659
2685
/**
2660
2686
* Always returns a Seq.Keyed, if input is not keyed, expects an
2661
2687
* collection of [K, V] tuples.
2688
+ *
2689
+ * Note: `Seq.Keyed` is a conversion function and not a class, and does not
2690
+ * use the `new` keyword during construction.
2662
2691
*/
2663
2692
export function Keyed < K , V > ( collection : Iterable < [ K , V ] > ) : Seq . Keyed < K , V > ;
2664
2693
export function Keyed < V > ( obj : { [ key : string ] : V } ) : Seq . Keyed < string , V > ;
@@ -2780,6 +2809,9 @@ declare module Immutable {
2780
2809
/**
2781
2810
* Always returns Seq.Indexed, discarding associated keys and
2782
2811
* supplying incrementing indices.
2812
+ *
2813
+ * Note: `Seq.Indexed` is a conversion function and not a class, and does
2814
+ * not use the `new` keyword during construction.
2783
2815
*/
2784
2816
export function Indexed ( ) : Seq . Indexed < any > ;
2785
2817
export function Indexed < T > ( ) : Seq . Indexed < T > ;
@@ -2929,6 +2961,9 @@ declare module Immutable {
2929
2961
2930
2962
/**
2931
2963
* Always returns a Seq.Set, discarding associated indices or keys.
2964
+ *
2965
+ * Note: `Seq.Set` is a conversion function and not a class, and does not
2966
+ * use the `new` keyword during construction.
2932
2967
*/
2933
2968
export function Set ( ) : Seq . Set < any > ;
2934
2969
export function Set < T > ( ) : Seq . Set < T > ;
@@ -3024,6 +3059,9 @@ declare module Immutable {
3024
3059
* which is usually not what you want. You should turn your Iterator Object into
3025
3060
* an iterable object by defining a Symbol.iterator (or @@iterator) method which
3026
3061
* returns `this`.
3062
+ *
3063
+ * Note: `Seq` is a conversion function and not a class, and does not use the
3064
+ * `new` keyword during construction.
3027
3065
*/
3028
3066
export function Seq < S extends Seq < any , any > > ( seq : S ) : S ;
3029
3067
export function Seq < K , V > ( collection : Collection . Keyed < K , V > ) : Seq . Keyed < K , V > ;
@@ -3200,6 +3238,9 @@ declare module Immutable {
3200
3238
*
3201
3239
* Similar to `Collection()`, however it expects collection-likes of [K, V]
3202
3240
* tuples if not constructed from a Collection.Keyed or JS Object.
3241
+ *
3242
+ * Note: `Collection.Keyed` is a conversion function and not a class, and
3243
+ * does not use the `new` keyword during construction.
3203
3244
*/
3204
3245
export function Keyed < K , V > ( collection : Iterable < [ K , V ] > ) : Collection . Keyed < K , V > ;
3205
3246
export function Keyed < V > ( obj : { [ key : string ] : V } ) : Collection . Keyed < string , V > ;
@@ -3358,6 +3399,9 @@ declare module Immutable {
3358
3399
3359
3400
/**
3360
3401
* Creates a new Collection.Indexed.
3402
+ *
3403
+ * Note: `Collection.Indexed` is a conversion function and not a class, and
3404
+ * does not use the `new` keyword during construction.
3361
3405
*/
3362
3406
export function Indexed < T > ( collection : Iterable < T > ) : Collection . Indexed < T > ;
3363
3407
@@ -3648,6 +3692,9 @@ declare module Immutable {
3648
3692
3649
3693
/**
3650
3694
* Similar to `Collection()`, but always returns a Collection.Set.
3695
+ *
3696
+ * Note: `Collection.Set` is a factory function and not a class, and does
3697
+ * not use the `new` keyword during construction.
3651
3698
*/
3652
3699
export function Set < T > ( collection : Iterable < T > ) : Collection . Set < T > ;
3653
3700
@@ -3746,6 +3793,9 @@ declare module Immutable {
3746
3793
* which is usually not what you want. You should turn your Iterator Object into
3747
3794
* an iterable object by defining a Symbol.iterator (or @@iterator) method which
3748
3795
* returns `this`.
3796
+ *
3797
+ * Note: `Collection` is a conversion function and not a class, and does not
3798
+ * use the `new` keyword during construction.
3749
3799
*/
3750
3800
export function Collection < I extends Collection < any , any > > ( collection : I ) : I ;
3751
3801
export function Collection < T > ( collection : Iterable < T > ) : Collection . Indexed < T > ;
0 commit comments