API > @blocksuite/store > BaseBlockTransformer
Class: BaseBlockTransformer<Props>
​
Constructors ​
constructor ​
new BaseBlockTransformer<
Props
>():BaseBlockTransformer
<Props
>
Type parameters ​
Parameter | Default |
---|---|
Props extends object | object |
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 ​
Parameter | Type |
---|---|
propsJson | Record < string , unknown > |
Returns ​
Props
Defined In ​
packages/store/src/transformer/base.ts:29
_propsToSnapshot ​
protected
_propsToSnapshot(model
):object
Parameters ​
Parameter | Type |
---|---|
model | BaseBlockModel < object > |
Returns ​
object
Defined In ​
packages/store/src/transformer/base.ts:37
fromSnapshot ​
fromSnapshot(
__namedParameters
):Promise
<SnapshotReturn
<Props
> >
Parameters ​
Parameter | Type |
---|---|
__namedParameters | FromSnapshotPayload |
Returns ​
Promise
< SnapshotReturn
< Props
> >
Defined In ​
packages/store/src/transformer/base.ts:46
toSnapshot ​
toSnapshot(
__namedParameters
):Promise
<BlockSnapshotLeaf
>
Parameters ​
Parameter | Type |
---|---|
__namedParameters | ToSnapshotPayload < Props > |
Returns ​
Promise
< BlockSnapshotLeaf
>
Defined In ​
packages/store/src/transformer/base.ts:60