BlockSuite API Documentation / @blocksuite/store / BaseBlockTransformer
Class: BaseBlockTransformer<Props>
Extended by
Type Parameters
• Props extends object
= object
Constructors
new BaseBlockTransformer()
new BaseBlockTransformer<
Props
>():BaseBlockTransformer
<Props
>
Returns
BaseBlockTransformer
<Props
>
Properties
_internal
protected
_internal:InternalPrimitives
=internalPrimitives
Defined in
packages/framework/store/src/transformer/base.ts:33
Methods
_propsFromSnapshot()
protected
_propsFromSnapshot(propsJson
):Props
Parameters
• propsJson: Record
<string
, unknown
>
Returns
Props
Defined in
packages/framework/store/src/transformer/base.ts:35
_propsToSnapshot()
protected
_propsToSnapshot(model
):object
Parameters
• model: DraftModel
Returns
object
Defined in
packages/framework/store/src/transformer/base.ts:43
fromSnapshot()
fromSnapshot(
__namedParameters
):SnapshotReturn
<Props
> |Promise
<SnapshotReturn
<Props
>>
Parameters
• __namedParameters: FromSnapshotPayload
Returns
SnapshotReturn
<Props
> | Promise
<SnapshotReturn
<Props
>>
Defined in
packages/framework/store/src/transformer/base.ts:52
toSnapshot()
toSnapshot(
__namedParameters
):BlockSnapshotLeaf
|Promise
<BlockSnapshotLeaf
>
Parameters
• __namedParameters: ToSnapshotPayload
<Props
>
Returns
BlockSnapshotLeaf
| Promise
<BlockSnapshotLeaf
>
Defined in
packages/framework/store/src/transformer/base.ts:69