BlockSuite API Documentation / @blocksuite/store / BaseBlockTransformer
Class: BaseBlockTransformer<Props> ​
Contents ​
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/store/src/transformer/base.ts:27
Methods ​
_propsFromSnapshot() ​
protected
_propsFromSnapshot(propsJson
):Props
Parameters ​
• propsJson: Record
<string
, unknown
>
Returns ​
Props
Source ​
packages/store/src/transformer/base.ts:29
_propsToSnapshot() ​
protected
_propsToSnapshot(model
):Object
Parameters ​
• model: BaseBlockModel
<object
>
Returns ​
Object
Source ​
packages/store/src/transformer/base.ts:37
fromSnapshot() ​
fromSnapshot(
__namedParameters
):Promise
<SnapshotReturn
<Props
>>
Parameters ​
• __namedParameters: FromSnapshotPayload
Returns ​
Promise
<SnapshotReturn
<Props
>>
Source ​
packages/store/src/transformer/base.ts:46
toSnapshot() ​
toSnapshot(
__namedParameters
):Promise
<BlockSnapshotLeaf
>
Parameters ​
• __namedParameters: ToSnapshotPayload
<Props
>
Returns ​
Promise
<BlockSnapshotLeaf
>
Source ​
packages/store/src/transformer/base.ts:60
Generated using typedoc-plugin-markdown and TypeDoc