import{_ as e,c as t,o as a,a as r}from"./app.54d5a277.js";const g='{"title":"Module: game/persistence","description":"","frontmatter":{},"headers":[{"level":2,"title":"Type aliases","slug":"type-aliases"},{"level":3,"title":"Persistent","slug":"persistent"},{"level":3,"title":"PersistentRef","slug":"persistentref"},{"level":3,"title":"State","slug":"state"},{"level":2,"title":"Variables","slug":"variables"},{"level":3,"title":"DefaultValue","slug":"defaultvalue"},{"level":3,"title":"PersistentState","slug":"persistentstate"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"makePersistent","slug":"makepersistent"},{"level":3,"title":"persistent","slug":"persistent-1"}],"relativePath":"api/modules/game/persistence.md"}',s={},d=r('
\u01AC Persistent<T
>: Object
Name | Type |
---|---|
T | extends State = State |
Name | Type |
---|---|
[DefaultValue] | T |
[PersistentState] | Ref <T > |
profectus/src/game/persistence.ts:23
\u01AC PersistentRef<T
>: Ref
<T
> & Persistent
<T
>
Name | Type |
---|---|
T | extends State = State |
profectus/src/game/persistence.ts:27
\u01AC State: string
| number
| boolean
| DecimalSource
| { [key: string]
: State
; } | { [key: number]
: State
; }
profectus/src/game/persistence.ts:15
\u2022 Const
DefaultValue: typeof DefaultValue
profectus/src/game/persistence.ts:9
\u2022 Const
PersistentState: typeof PersistentState
profectus/src/game/persistence.ts:8
\u25B8 makePersistent<T
>(obj
, defaultValue
): asserts obj
is Persistent
<T
>
Name | Type |
---|---|
T | extends State |
Name | Type |
---|---|
obj | unknown |
defaultValue | T |
asserts obj
is Persistent
<T
>
profectus/src/game/persistence.ts:39
\u25B8 persistent<T
>(defaultValue
): PersistentRef
<T
>
Name | Type |
---|---|
T | extends State |
Name | Type |
---|---|
defaultValue | T | Ref <T > |