BlockSuite API Documentation / @blocksuite/store / BaseBlockTransformer
Class: BaseBlockTransformer<Props>
Extended by
AttachmentBlockTransformer
ImageBlockTransformer
SurfaceBlockTransformer
SurfaceBlockTransformer
AttachmentBlockTransformer
ImageBlockTransformer
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
Returns
object
Defined in
packages/framework/store/src/transformer/base.ts:43
fromSnapshot()
fromSnapshot(
__namedParameters
):SnapshotNode
<Props
> |Promise
<SnapshotNode
<Props
>>
Parameters
__namedParameters
Returns
SnapshotNode
<Props
> | Promise
<SnapshotNode
<Props
>>
Defined in
packages/framework/store/src/transformer/base.ts:52
toSnapshot()
toSnapshot(
__namedParameters
):BlockSnapshotLeaf
Parameters
__namedParameters
ToSnapshotPayload
<Props
>
Returns
BlockSnapshotLeaf
Defined in
packages/framework/store/src/transformer/base.ts:67