Skip to content

API > @blocksuite/blocks > ListBlockSchema

Variable: ListBlockSchema ​

const ListBlockSchema: object

Type declaration ​

model ​

model: {flavour: "affine:list"; props: PropsGetter< {checked: boolean; collapsed: ListCollapsed; text: Text; type: ListType;} >; role: "root" | "hub" | "content";} & {parent: string[]; role: "content"; version: number;}

model.flavour ​

flavour: "affine:list"

model.props ​

props: PropsGetter< {checked: boolean; collapsed: ListCollapsed; text: Text; type: ListType;} >

model.role ​

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

model.parent ​

parent: string[]

model.role ​

role: "content" = 'content'

model.version ​

version: number = 1


onUpgrade ​

optional onUpgrade: function

Parameters ​

ParameterType
dataobject
data.checkedboolean
data.collapsedListCollapsed
data.textText
data.typeListType
previousVersionnumber
latestVersionnumber

Returns ​

void


transformer ​

optional transformer: function

Returns ​

BaseBlockTransformer< {checked: boolean; collapsed: ListCollapsed; text: Text; type: ListType;} >


version ​

version: number

Defined In ​

packages/blocks/src/list-block/list-model.ts:12