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
):SnapshotReturn
<Props
> |Promise
<SnapshotReturn
<Props
>>
Parameters
• __namedParameters: FromSnapshotPayload
Returns
SnapshotReturn
<Props
> | Promise
<SnapshotReturn
<Props
>>
Source
packages/framework/store/src/transformer/base.ts:50
toSnapshot()
toSnapshot(
__namedParameters
):BlockSnapshotLeaf
|Promise
<BlockSnapshotLeaf
>
Parameters
• __namedParameters: ToSnapshotPayload
<Props
>
Returns
BlockSnapshotLeaf
| Promise
<BlockSnapshotLeaf
>
Source
packages/framework/store/src/transformer/base.ts:67
Generated using TypeDoc and typedoc-plugin-markdown.