BlockSuite API Documentation / @blocksuite/block-std / BlockSpec
Interface: BlockSpec<WidgetNames> ​
Contents ​
Type parameters ​
• WidgetNames extends string
= string
Properties ​
schema ​
schema:
Object
Type declaration ​
model ​
model:
Object
model.children? ​
model.children?:
string
[]
model.flavour ​
model.flavour:
string
model.parent? ​
model.parent?:
string
[]
model.props? ​
model.props?: (
args_0
, ...args_1
) =>Record
<string
,any
>
Parameters ​
• args_0: InternalPrimitives
• ...args_1: unknown
[]
Returns ​
Record
<string
, any
>
model.role ​
model.role:
"root"
|"hub"
|"content"
model.toModel? ​
model.toModel?: (...
args
) =>BaseBlockModel
<object
>
Parameters ​
• ...args: unknown
[]
Returns ​
BaseBlockModel
<object
>
onUpgrade? ​
onUpgrade?: (
args_0
,args_1
,args_2
, ...args_3
) =>void
Parameters ​
• args_0: any
• args_1: number
• args_2: number
• ...args_3: unknown
[]
Returns ​
void
transformer? ​
transformer?: (...
args
) =>BaseBlockTransformer
<object
>
Parameters ​
• ...args: unknown
[]
Returns ​
BaseBlockTransformer
<object
>
version ​
version:
number
Source ​
block-std/src/spec/type.ts:11
service? ​
service?:
BlockServiceConstructor
Source ​
block-std/src/spec/type.ts:12
view ​
view:
BlockView
<WidgetNames
>
Source ​
block-std/src/spec/type.ts:13
Generated using typedoc-plugin-markdown and TypeDoc