API > @blocksuite/block-std > BlockSpec
Interface: BlockSpec<WidgetNames>
​
Type parameters ​
Parameter | Default |
---|---|
WidgetNames extends string | string |
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 ​
Parameter Type args_0
InternalPrimitives
... args_1
unknown
[]Returns ​
Record
<string
,any
>
model.role
​role:
"root"
|"hub"
|"content"
model.toModel
​
optional
toModel:function
Parameters ​
Parameter Type ... args
unknown
[]Returns ​
BaseBlockModel
<object
>
schema.onUpgrade
​
optional
onUpgrade:function
Parameters ​
Parameter Type args_0
any
args_1
number
args_2
number
... args_3
unknown
[]Returns ​
void
schema.transformer
​
optional
transformer:function
Parameters ​
Parameter Type ... args
unknown
[]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