Skip to content

API > @blocksuite/blocks > SurfaceBlockSchema

Variable: SurfaceBlockSchema ​

const SurfaceBlockSchema: object

Type declaration ​

model ​

model: {flavour: "affine:surface"; props: PropsGetter< SurfaceBlockProps >; role: "root" | "hub" | "content";} & {children: string[]; parent: string[]; role: "hub"; version: number;}

model.flavour ​

flavour: "affine:surface"

model.props ​

props: PropsGetter< SurfaceBlockProps >

model.role ​

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

model.children ​

children: string[]

model.parent ​

parent: string[]

model.role ​

role: "hub" = 'hub'

model.version ​

version: number = 5


onUpgrade ​

optional onUpgrade: function

Parameters ​

ParameterType
dataSurfaceBlockProps
previousVersionnumber
latestVersionnumber

Returns ​

void


transformer ​

optional transformer: function

Returns ​

SurfaceBlockTransformer


version ​

version: number

Defined In ​

packages/blocks/src/surface-block/surface-model.ts:111