Skip to content

API > @blocksuite/store > BaseBlockModel

Class: BaseBlockModel<Props> ​

Extends ​

  • Props

Constructors ​

constructor ​

new BaseBlockModel<Props>(): BaseBlockModel< Props >

Type parameters ​

ParameterDefault
Props extends objectobject

Returns ​

BaseBlockModel< Props >

Inherited from ​

MagicProps()<Props>.constructor

Defined In ​

packages/store/src/schema/base.ts:168

Properties ​

childMap ​

childMap: Map< string, number >

Defined In ​

packages/store/src/schema/base.ts:196


children ​

children: BaseBlockModel< object >[] = []

Defined In ​

packages/store/src/schema/base.ts:197


childrenUpdated ​

childrenUpdated: Slot< void >

Defined In ​

packages/store/src/schema/base.ts:194


created ​

created: Slot< void >

Defined In ​

packages/store/src/schema/base.ts:188


deleted ​

deleted: Slot< void >

Defined In ​

packages/store/src/schema/base.ts:189


flavour ​

flavour: string

Defined In ​

packages/store/src/schema/base.ts:178


id ​

id: string

Defined In ​

packages/store/src/schema/base.ts:181


keys ​

keys: string[]

Defined In ​

packages/store/src/schema/base.ts:183


page ​

page: Page

Defined In ​

packages/store/src/schema/base.ts:180


propsUpdated ​

propsUpdated: Slot< {newProps: unknown; oldProps: unknown;} >

Defined In ​

packages/store/src/schema/base.ts:190


role ​

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

Defined In ​

packages/store/src/schema/base.ts:179


text ​

optional text: Text

Defined In ​

packages/store/src/schema/base.ts:186


yBlock ​

yBlock: YBlock

Defined In ​

packages/store/src/schema/base.ts:182

Methods ​

clone ​

clone(): BaseBlockModel< Props >

Returns ​

BaseBlockModel< Props >

Defined In ​

packages/store/src/schema/base.ts:235


dispose ​

dispose(): void

Returns ​

void

Defined In ​

packages/store/src/schema/base.ts:228


firstChild ​

firstChild(): null | BaseBlockModel< object >

Returns ​

null | BaseBlockModel< object >

Defined In ​

packages/store/src/schema/base.ts:203


firstItem ​

firstItem(): null | BaseBlockModel< object >

Returns ​

null | BaseBlockModel< object >

Defined In ​

packages/store/src/schema/base.ts:214


isEmpty ​

isEmpty(): boolean

Returns ​

boolean

Defined In ​

packages/store/src/schema/base.ts:199


lastChild ​

lastChild(): null | BaseBlockModel< object >

Returns ​

null | BaseBlockModel< object >

Defined In ​

packages/store/src/schema/base.ts:207


lastItem ​

lastItem(): null | BaseBlockModel< object >

Returns ​

null | BaseBlockModel< object >

Defined In ​

packages/store/src/schema/base.ts:221