Snapshot

View source

Describes the snapshot representation associated with a live type.

This is a type-only interface. Concrete implementations live on the live constructor and are registered with the live type’s reflection entry. The values are passed explicitly because both conversion methods are static.

Constructor


constructor()

Methods


statictoSnapshot<TLive, TSnapshot>(_live: TLive, _world: World): TSnapshot

View source

Creates a snapshot value from a live value.

Type Parameters

TLive

TSnapshot

Parameters

NameDescriptionDefault
_live——
_world——

Throws

Always; the interface has no implementation.

staticfromSnapshot<TLive, TSnapshot>(_snapshot: TSnapshot, _world: World, ..._context: unknown[]): TLive

View source

Restores a live value from a snapshot value.

Type Parameters

TLive

TSnapshot

Parameters

NameDescriptionDefault
_snapshot——
_world——
..._context——

Throws

Always; the interface has no implementation.