Module: game/persistence

Type aliases

Persistent

Ƭ Persistent<T>: Object

Type parameters

NameType
Textends State = State

Type declaration

NameType
[DefaultValue]T
[PersistentState]Ref<T>

Defined in

profectus/src/game/persistence.ts:23


PersistentRef

Ƭ PersistentRef<T>: Ref<T> & Persistent<T>

Type parameters

NameType
Textends 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

NameType
Textends State

Parameters

NameType
objunknown
defaultValueT

Returns

asserts obj is Persistent<T>

Defined in

profectus/src/game/persistence.ts:39


persistent

persistent<T>(defaultValue): PersistentRef<T>

Type parameters

NameType
Textends State

Parameters

NameType
defaultValueT | Ref<T>

Returns

PersistentRef<T>

Defined in

profectus/src/game/persistence.ts:29