Skip to content

API > @blocksuite/blocks > NoteBlockSchema

Variable: NoteBlockSchema ​

const NoteBlockSchema: object

Type declaration ​

model ​

model: {flavour: "affine:note"; props: PropsGetter< {background: string; hidden: boolean; index: string; xywh: string;} >; role: "root" | "hub" | "content";} & {children: string[]; parent: string[]; role: "hub"; version: number;}

model.flavour ​

flavour: "affine:note"

model.props ​

props: PropsGetter< {background: string; hidden: boolean; index: string; xywh: string;} >

model.role ​

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

model.children ​

children: string[]

model.parent ​

parent: string[]

model.role ​

role: "hub" = 'hub'

model.version ​

version: number = 1


onUpgrade ​

optional onUpgrade: function

Parameters ​

ParameterType
dataobject
data.backgroundstring
data.hiddenboolean
data.indexstring
data.xywhstring
previousVersionnumber
latestVersionnumber

Returns ​

void


transformer ​

optional transformer: function

Returns ​

BaseBlockTransformer< {background: string; hidden: boolean; index: string; xywh: string;} >


version ​

version: number

Defined In ​

packages/blocks/src/note-block/note-model.ts:30