Skip to content

API > @blocksuite/blocks > AttachmentBlockSchema

Variable: AttachmentBlockSchema ​

const AttachmentBlockSchema: object

Type declaration ​

model ​

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

model.flavour ​

flavour: "affine:attachment"

model.props ​

props: PropsGetter< AttachmentBlockProps >

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
dataAttachmentBlockProps
previousVersionnumber
latestVersionnumber

Returns ​

void


transformer ​

optional transformer: function

Returns ​

BaseBlockTransformer< AttachmentBlockProps >


version ​

version: number

Defined In ​

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