@@ -1280,14 +1280,18 @@ declare module Immutable {
1280
1280
* a mutable copy of this collection. Mutable copies *always* return `this`,
1281
1281
* and thus shouldn't be used for equality. Your function should never return
1282
1282
* a mutable copy of a collection, only use it internally to create a new
1283
- * collection. If possible, use `withMutations` as it provides an easier to
1284
- * use API.
1283
+ * collection.
1284
+ *
1285
+ * If possible, use `withMutations` to work with temporary mutable copies as
1286
+ * it provides an easier to use API and considers many common optimizations.
1285
1287
*
1286
1288
* Note: if the collection is already mutable, `asMutable` returns itself.
1287
1289
*
1288
1290
* Note: Not all methods can be used on a mutable collection or within
1289
1291
* `withMutations`! Read the documentation for each method to see if it
1290
1292
* is safe to use in `withMutations`.
1293
+ *
1294
+ * @see `Map#asImmutable`
1291
1295
*/
1292
1296
asMutable ( ) : this;
1293
1297
@@ -1301,8 +1305,15 @@ declare module Immutable {
1301
1305
1302
1306
/**
1303
1307
* The yin to `asMutable`'s yang. Because it applies to mutable collections,
1304
- * this operation is *mutable* and returns itself. Once performed, the mutable
1305
- * copy has become immutable and can be safely returned from a function.
1308
+ * this operation is *mutable* and may return itself (though may not
1309
+ * return itself, i.e. if the result is an empty collection). Once
1310
+ * performed, the original mutable copy must no longer be mutated since it
1311
+ * may be the immutable result.
1312
+ *
1313
+ * If possible, use `withMutations` to work with temporary mutable copies as
1314
+ * it provides an easier to use API and considers many common optimizations.
1315
+ *
1316
+ * @see `Map#asMutable`
1306
1317
*/
1307
1318
asImmutable ( ) : this;
1308
1319
0 commit comments