Skip to content

API > @blocksuite/store > BaseAdapter

Class: BaseAdapter<AdapterTarget> ​

Extended By ​

Constructors ​

constructor ​

new BaseAdapter<AdapterTarget>(): BaseAdapter< AdapterTarget >

Type parameters ​

ParameterDefault
AdapterTargetunknown

Returns ​

BaseAdapter< AdapterTarget >

Methods ​

fromBlockSnapshot ​

abstract fromBlockSnapshot(payload): Promise< FromBlockSnapshotResult< AdapterTarget > >

Parameters ​

ParameterType
payloadFromBlockSnapshotPayload

Returns ​

Promise< FromBlockSnapshotResult< AdapterTarget > >

Defined In ​

packages/store/src/adapter/base.ts:50


fromPageSnapshot ​

abstract fromPageSnapshot(payload): Promise< FromPageSnapshotResult< AdapterTarget > >

Parameters ​

ParameterType
payloadFromPageSnapshotPayload

Returns ​

Promise< FromPageSnapshotResult< AdapterTarget > >

Defined In ​

packages/store/src/adapter/base.ts:47


fromSliceSnapshot ​

abstract fromSliceSnapshot(payload): Promise< FromSliceSnapshotResult< AdapterTarget > >

Parameters ​

ParameterType
payloadFromSliceSnapshotPayload

Returns ​

Promise< FromSliceSnapshotResult< AdapterTarget > >

Defined In ​

packages/store/src/adapter/base.ts:53


toBlockSnapshot ​

abstract toBlockSnapshot(payload): Promise< BlockSnapshot >

Parameters ​

ParameterType
payloadToBlockSnapshotPayload< AdapterTarget >

Returns ​

Promise< BlockSnapshot >

Defined In ​

packages/store/src/adapter/base.ts:59


toPageSnapshot ​

abstract toPageSnapshot(payload): Promise< PageSnapshot >

Parameters ​

ParameterType
payloadToPageSnapshotPayload< AdapterTarget >

Returns ​

Promise< PageSnapshot >

Defined In ​

packages/store/src/adapter/base.ts:56


toSliceSnapshot ​

abstract toSliceSnapshot(payload): Promise< SliceSnapshot >

Parameters ​

ParameterType
payloadToSliceSnapshotPayload< AdapterTarget >

Returns ​

Promise< SliceSnapshot >

Defined In ​

packages/store/src/adapter/base.ts:62