Skip to content

API > @blocksuite/store > BaseBlockTransformer

Class: BaseBlockTransformer<Props> ​

Constructors ​

constructor ​

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

Type parameters ​

ParameterDefault
Props extends objectobject

Returns ​

BaseBlockTransformer< Props >

Properties ​

_internal ​

protected _internal: InternalPrimitives = internalPrimitives

Defined In ​

packages/store/src/transformer/base.ts:27

Methods ​

_propsFromSnapshot ​

protected _propsFromSnapshot(propsJson): Props

Parameters ​

ParameterType
propsJsonRecord< string, unknown >

Returns ​

Props

Defined In ​

packages/store/src/transformer/base.ts:29


_propsToSnapshot ​

protected _propsToSnapshot(model): object

Parameters ​

ParameterType
modelBaseBlockModel< object >

Returns ​

object

Defined In ​

packages/store/src/transformer/base.ts:37


fromSnapshot ​

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

Parameters ​

ParameterType
__namedParametersFromSnapshotPayload

Returns ​

Promise< SnapshotReturn< Props > >

Defined In ​

packages/store/src/transformer/base.ts:46


toSnapshot ​

toSnapshot(__namedParameters): Promise< BlockSnapshotLeaf >

Parameters ​

ParameterType
__namedParametersToSnapshotPayload< Props >

Returns ​

Promise< BlockSnapshotLeaf >

Defined In ​

packages/store/src/transformer/base.ts:60