Skip to content
Myr

env.ts

This file

Path

src/utils/env.ts

18 lines · 666 bytes · TypeScript

Last changed by

Merge pull request #1028 from immerjs/immer-10Michel Weststratebefore adoption2ef9a42

History of this file

Take it

The walk stopped after 200 commits: lines older than 3f9a94e point at it.

chore: let's test before publishMichel Weststratebefore adoption3f9a94e

lines 1–5why, one step back
1// Should be no imports here!
23/**4 * The sentinel value returned by producers to replace the draft with undefined.5 */

Merge pull request #1028 from immerjs/immer-10Michel Weststratebefore adoption2ef9a42

line 6why, one step back
6export const NOTHING: unique symbol = Symbol.for("immer-nothing")

chore: let's test before publishMichel Weststratebefore adoption3f9a94e

lines 7–15why, one step back
7
8/**9 * To let Immer treat your class instances as plain immutable objects10 * (albeit with a custom prototype), you must define either an instance property11 * 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 be14 * safe to mutate in a produce callback.15 */

Merge pull request #1028 from immerjs/immer-10Michel Weststratebefore adoption2ef9a42

line 16why, one step back
16export const DRAFTABLE: unique symbol = Symbol.for("immer-draftable")

chore: let's test before publishMichel Weststratebefore adoption3f9a94e

line 17why, one step back
17

Merge pull request #1028 from immerjs/immer-10Michel Weststratebefore adoption2ef9a42

line 18why, one step back
18export const DRAFT_STATE: unique symbol = Symbol.for("immer-state")