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 ​
Parameter | Type |
---|---|
data | object |
data.background | string |
data.hidden | boolean |
data.index | string |
data.xywh | string |
previousVersion | number |
latestVersion | number |
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