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:32

Methods

_propsFromSnapshot()

protected _propsFromSnapshot(propsJson): Props

Parameters

propsJson: Record<string, unknown>

Returns

Props

Source

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


_propsToSnapshot()

protected _propsToSnapshot(model): object

Parameters

model: DraftModel

Returns

object

Source

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


fromSnapshot()

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

Parameters

__namedParameters: FromSnapshotPayload

Returns

SnapshotReturn<Props> | Promise<SnapshotReturn<Props>>

Source

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


toSnapshot()

toSnapshot(__namedParameters): BlockSnapshotLeaf | Promise<BlockSnapshotLeaf>

Parameters

__namedParameters: ToSnapshotPayload<Props>

Returns

BlockSnapshotLeaf | Promise<BlockSnapshotLeaf>

Source

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