|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
666 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | // Should be no imports here!
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * The sentinel value returned by producers to replace the draft with undefined.
|
|---|
| 5 | */
|
|---|
| 6 | export const NOTHING: unique symbol = Symbol.for("immer-nothing")
|
|---|
| 7 |
|
|---|
| 8 | /**
|
|---|
| 9 | * To let Immer treat your class instances as plain immutable objects
|
|---|
| 10 | * (albeit with a custom prototype), you must define either an instance property
|
|---|
| 11 | * or a static property on each of your custom classes.
|
|---|
| 12 | *
|
|---|
| 13 | * Otherwise, your class instance will never be drafted, which means it won't be
|
|---|
| 14 | * safe to mutate in a produce callback.
|
|---|
| 15 | */
|
|---|
| 16 | export const DRAFTABLE: unique symbol = Symbol.for("immer-draftable")
|
|---|
| 17 |
|
|---|
| 18 | export const DRAFT_STATE: unique symbol = Symbol.for("immer-state")
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.