@rbxts/immut
Advanced tools
Comparing version 0.4.2-ts.0 to 0.4.2-ts.1
{ | ||
"name": "@rbxts/immut", | ||
"version": "0.4.2-ts.0", | ||
"version": "0.4.2-ts.1", | ||
"description": "A draft-based immutable data library based on Immer", | ||
@@ -5,0 +5,0 @@ "main": "src/init.lua", |
@@ -10,3 +10,3 @@ # Immut | ||
```ts | ||
import Immut, { produce } from "@rbxts/immut"; | ||
import Immut, { nothing, produce } from "@rbxts/immut"; | ||
@@ -16,3 +16,3 @@ let oldState: Array<string> | undefined; | ||
if (!draft) return []; | ||
if (draft.includes("foo")) return None; | ||
if (draft.includes("foo")) return nothing; | ||
@@ -19,0 +19,0 @@ // draft.push(), draft.insert(), draft.unshift() NOT allowed as they compile to table.insert, which is not draft-safe |
26584