File tree 3 files changed +8
-1
lines changed 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,8 @@ not altered.
302
302
All Immutable.js Collections can be converted to plain JavaScript Arrays and
303
303
Objects shallowly with ` toArray() ` and ` toObject() ` or deeply with ` toJS() ` .
304
304
All Immutable Collections also implement ` toJSON() ` allowing them to be passed
305
- to ` JSON.stringify ` directly.
305
+ to ` JSON.stringify ` directly. They also respect the custom ` toJSON() ` methods of
306
+ nested objects.
306
307
307
308
<!-- runkit:activate -->
308
309
``` js
Original file line number Diff line number Diff line change 2501
2501
2502
2502
/**
2503
2503
* Deeply converts this Record to equivalent native JavaScript Object.
2504
+ *
2505
+ * Note: This method may not be overridden. Objects with custom
2506
+ * serialization to plain JS may override toJSON() instead.
2504
2507
*/
2505
2508
toJS ( ) : { [ K in keyof TProps ] : any } ;
2506
2509
Original file line number Diff line number Diff line change @@ -2501,6 +2501,9 @@ declare module Immutable {
2501
2501
2502
2502
/**
2503
2503
* Deeply converts this Record to equivalent native JavaScript Object.
2504
+ *
2505
+ * Note: This method may not be overridden. Objects with custom
2506
+ * serialization to plain JS may override toJSON() instead.
2504
2507
*/
2505
2508
toJS ( ) : { [ K in keyof TProps ] : any } ;
2506
2509
You can’t perform that action at this time.
0 commit comments