BlockSuite API Documentation / @blocksuite/store / defineBlockSchema
Function: defineBlockSchema()
defineBlockSchema<
Flavour
,Role
,Props
,Metadata
,Model
,Transformer
>(options
):object
Type Parameters
• Flavour extends string
• Role extends "root"
| "hub"
| "content"
• Props extends object
• Metadata extends Readonly
<object
>
• Model extends BlockModel
<Props
, SignaledProps
<Props
>>
• Transformer extends BaseBlockTransformer
<Props
>
Parameters
• options
• options.flavour: Flavour
• options.metadata: Metadata
• options.props?
• options.toModel?
• options.transformer?
Returns
object
model
model:
object
&Metadata
Type declaration
flavour
flavour:
Flavour
props
props:
PropsGetter
<Props
>
transformer()?
optional
transformer: () =>Transformer
Returns
Transformer
version
version:
number
Defined in
packages/framework/store/src/schema/base.ts:72