BlockSuite API Documentation / @blocksuite/blocks / CodeBlockSchema
Variable: CodeBlockSchema
const
CodeBlockSchema:object
Type declaration
model
model:
object
&object
Type declaration
flavour
flavour:
"affine:code"
props
props:
@blocksuite/store
Type declaration
children
children:
never
[]
parent
parent:
string
[]
role
role:
"content"
version
version:
number
onUpgrade()?
optional
onUpgrade: (data
,previousVersion
,latestVersion
) =>void
Parameters
• data: CodeBlockProps
• previousVersion: number
• latestVersion: number
Returns
void
transformer()?
optional
transformer: () =>@blocksuite/store
Returns
version
version:
number
Defined in
packages/affine/model/dist/blocks/code/code-model.d.ts:8