Module: game/persistence
Type aliases
Persistent
Ƭ Persistent<T
>: Object
Type parameters
Name | Type |
---|---|
T | extends State = State |
Type declaration
Name | Type |
---|---|
[DefaultValue] | T |
[PersistentState] | Ref <T > |
Defined in
profectus/src/game/persistence.ts:23
PersistentRef
Ƭ PersistentRef<T
>: Ref
<T
> & Persistent
<T
>
Type parameters
Name | Type |
---|---|
T | extends State = State |
Defined in
profectus/src/game/persistence.ts:27
State
Ƭ State: string
| number
| boolean
| DecimalSource
| { [key: string]
: State
; } | { [key: number]
: State
; }
Defined in
profectus/src/game/persistence.ts:15
Variables
DefaultValue
• Const
DefaultValue: typeof DefaultValue
Defined in
profectus/src/game/persistence.ts:9
PersistentState
• Const
PersistentState: typeof PersistentState
Defined in
profectus/src/game/persistence.ts:8
Functions
makePersistent
▸ makePersistent<T
>(obj
, defaultValue
): asserts obj
is Persistent
<T
>
Type parameters
Name | Type |
---|---|
T | extends State |
Parameters
Name | Type |
---|---|
obj | unknown |
defaultValue | T |
Returns
asserts obj
is Persistent
<T
>
Defined in
profectus/src/game/persistence.ts:39
persistent
▸ persistent<T
>(defaultValue
): PersistentRef
<T
>
Type parameters
Name | Type |
---|---|
T | extends State |
Parameters
Name | Type |
---|---|
defaultValue | T | Ref <T > |