Skip to content

API > @blocksuite/block-std > BlockSpec

Interface: BlockSpec<WidgetNames> ​

Type parameters ​

ParameterDefault
WidgetNames extends stringstring

Properties ​

schema ​

schema: object

Type declaration ​

schema.model ​

model: object

Type declaration ​
model.children ​

optional children: string[]

model.flavour ​

flavour: string

model.parent ​

optional parent: string[]

model.props ​

optional props: function

Parameters ​
ParameterType
args_0InternalPrimitives
...args_1unknown[]
Returns ​

Record< string, any >

model.role ​

role: "root" | "hub" | "content"

model.toModel ​

optional toModel: function

Parameters ​
ParameterType
...argsunknown[]
Returns ​

BaseBlockModel< object >

schema.onUpgrade ​

optional onUpgrade: function

Parameters ​
ParameterType
args_0any
args_1number
args_2number
...args_3unknown[]
Returns ​

void

schema.transformer ​

optional transformer: function

Parameters ​
ParameterType
...argsunknown[]
Returns ​

BaseBlockTransformer< object >

schema.version ​

version: number

Defined In ​

block-std/src/spec/type.ts:11


service ​

optional service: BlockServiceConstructor

Defined In ​

block-std/src/spec/type.ts:12


view ​

view: BlockView< WidgetNames >

Defined In ​

block-std/src/spec/type.ts:13