Skip to content

BlockSuite API Documentation / @blocksuite/store / BaseAdapter

Class: abstract BaseAdapter<AdapterTarget>

Extended by

Type parameters

AdapterTarget = unknown

Constructors

new BaseAdapter(undefined)

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

Returns

BaseAdapter<AdapterTarget>

Properties

configs

protected configs: Map<string, unknown>

Source

packages/framework/store/src/adapter/base.ts:49

Methods

applyConfigs()

applyConfigs(configs): void

Parameters

configs: Map<string, unknown>

Returns

void

Source

packages/framework/store/src/adapter/base.ts:76


fromBlockSnapshot()

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

Parameters

payload: FromBlockSnapshotPayload

Returns

FromBlockSnapshotResult<AdapterTarget> | Promise<FromBlockSnapshotResult<AdapterTarget>>

Source

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


fromDocSnapshot()

abstract fromDocSnapshot(payload): FromDocSnapshotResult<AdapterTarget> | Promise<FromDocSnapshotResult<AdapterTarget>>

Parameters

payload: FromDocSnapshotPayload

Returns

FromDocSnapshotResult<AdapterTarget> | Promise<FromDocSnapshotResult<AdapterTarget>>

Source

packages/framework/store/src/adapter/base.ts:51


fromSliceSnapshot()

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

Parameters

payload: FromSliceSnapshotPayload

Returns

FromSliceSnapshotResult<AdapterTarget> | Promise<FromSliceSnapshotResult<AdapterTarget>>

Source

packages/framework/store/src/adapter/base.ts:61


toBlockSnapshot()

abstract toBlockSnapshot(payload): BlockSnapshot | Promise<BlockSnapshot>

Parameters

payload: ToBlockSnapshotPayload<AdapterTarget>

Returns

BlockSnapshot | Promise<BlockSnapshot>

Source

packages/framework/store/src/adapter/base.ts:69


toDocSnapshot()

abstract toDocSnapshot(payload): DocSnapshot | Promise<DocSnapshot>

Parameters

payload: ToDocSnapshotPayload<AdapterTarget>

Returns

DocSnapshot | Promise<DocSnapshot>

Source

packages/framework/store/src/adapter/base.ts:66


toSliceSnapshot()

abstract toSliceSnapshot(payload): null | SliceSnapshot | Promise<null | SliceSnapshot>

Parameters

payload: ToSliceSnapshotPayload<AdapterTarget>

Returns

null | SliceSnapshot | Promise<null | SliceSnapshot>

Source

packages/framework/store/src/adapter/base.ts:72


Generated using TypeDoc and typedoc-plugin-markdown.