We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isNothing()
1 parent 34fd86d commit 0ff3e76Copy full SHA for 0ff3e76
src/immer.ts
@@ -3,7 +3,8 @@ import {
3
IProduceWithPatches,
4
Immer,
5
Draft,
6
- Immutable
+ Immutable,
7
+ NOTHING as nothing
8
} from "./internal"
9
10
export {
@@ -17,13 +18,14 @@ export {
17
18
current,
19
isDraft,
20
isDraftable,
- NOTHING as nothing,
21
DRAFTABLE as immerable,
22
freeze,
23
Objectish,
24
StrictMode
25
26
27
+export {nothing}
28
+
29
const immer = new Immer()
30
31
/**
@@ -124,3 +126,7 @@ export {Immer}
124
126
export {enablePatches} from "./plugins/patches"
125
127
export {enableMapSet} from "./plugins/mapset"
128
export {enableArrayMethods} from "./plugins/arrayMethods"
129
130
+export function isNothing(value: unknown): value is typeof nothing {
131
+ return value === nothing
132
+}
0 commit comments