Skip to content

BlockSuite API Documentation / @blocksuite/store / BaseBlockTransformer

Class: BaseBlockTransformer<Props>

Type parameters

Props extends object = object

Constructors

new BaseBlockTransformer(undefined)

new BaseBlockTransformer<Props>(): BaseBlockTransformer<Props>

Returns

BaseBlockTransformer<Props>

Properties

_internal

protected _internal: InternalPrimitives = internalPrimitives

Source

packages/framework/store/src/transformer/base.ts:31

Methods

_propsFromSnapshot()

protected _propsFromSnapshot(propsJson): Props

Parameters

propsJson: Record<string, unknown>

Returns

Props

Source

packages/framework/store/src/transformer/base.ts:33


_propsToSnapshot()

protected _propsToSnapshot(model): Object

Parameters

model: BlockModel<object>

Returns

Object

Source

packages/framework/store/src/transformer/base.ts:41


fromSnapshot()

fromSnapshot(__namedParameters): Promise<SnapshotReturn<Props>>

Parameters

__namedParameters: FromSnapshotPayload

Returns

Promise<SnapshotReturn<Props>>

Source

packages/framework/store/src/transformer/base.ts:50


toSnapshot()

toSnapshot(__namedParameters): Promise<BlockSnapshotLeaf>

Parameters

__namedParameters: ToSnapshotPayload<Props>

Returns

Promise<BlockSnapshotLeaf>

Source

packages/framework/store/src/transformer/base.ts:65


Generated using TypeDoc and typedoc-plugin-markdown.