File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1429,6 +1429,27 @@ declare module Immutable {
1429
1429
*/
1430
1430
readonly size : number ;
1431
1431
1432
+ /**
1433
+ * Returns a new OrderedMap also containing the new key, value pair. If an equivalent
1434
+ * key already exists in this OrderedMap, it will be replaced while maintaining the
1435
+ * existing order.
1436
+ *
1437
+ * <!-- runkit:activate -->
1438
+ * ```js
1439
+ * const { OrderedMapMap } = require('immutable')
1440
+ * const originalMap = Immutable.OrderedMap({a:1, b:1, c:1})
1441
+ * const updatedMap = originalMap.set('b', 2)
1442
+ *
1443
+ * originalMap
1444
+ * // OrderedMap {a: 1, b: 1, c: 1}
1445
+ * updatedMap
1446
+ * // OrderedMap {a: 1, b: 2, c: 1}
1447
+ * ```
1448
+ *
1449
+ * Note: `set` can be used in `withMutations`.
1450
+ */
1451
+ set ( key : K , value : V ) : this;
1452
+
1432
1453
/**
1433
1454
* Returns a new OrderedMap resulting from merging the provided Collections
1434
1455
* (or JS objects) into this OrderedMap. In other words, this takes each
You can’t perform that action at this time.
0 commit comments