Skip to content

BlockSuite API Documentation / @blocksuite/block-std / SpecStore

Class: SpecStore

Constructors

new SpecStore(std)

new SpecStore(std): SpecStore

Parameters

std: BlockStdScope

Returns

SpecStore

Source

block-std/src/spec/spec-store.ts:12

Properties

_disposables

private _disposables: DisposableGroup

Source

block-std/src/spec/spec-store.ts:10


_services

private _services: Map<string, BlockService<BlockModel<object>>>

Source

block-std/src/spec/spec-store.ts:9


_specs

private _specs: Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Source

block-std/src/spec/spec-store.ts:8


std

std: BlockStdScope

Source

block-std/src/spec/spec-store.ts:12

Methods

_buildSpecMap()

private _buildSpecMap(specs): Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Parameters

specs: BlockSpec<string, BlockService<BlockModel<object>>>[]

Returns

Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Source

block-std/src/spec/spec-store.ts:92


_diffServices()

private _diffServices(oldSpecs, newSpecs): void

Parameters

oldSpecs: Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

newSpecs: Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Returns

void

Source

block-std/src/spec/spec-store.ts:53


applySpecs()

applySpecs(specs): void

Parameters

specs: BlockSpec<string, BlockService<BlockModel<object>>>[]

Returns

void

Source

block-std/src/spec/spec-store.ts:29


getService()

getService(flavour)

getService<Key>(flavour): BlockServices[Key]

Type parameters

Key extends never

Parameters

flavour: Key

Returns

BlockServices[Key]

Source

block-std/src/spec/spec-store.ts:45

getService(flavour)

getService<Service>(flavour): Service

Type parameters

Service extends BlockService<BlockModel<object>>

Parameters

flavour: string

Returns

Service

Source

block-std/src/spec/spec-store.ts:48


getView()

getView(flavour): null | BlockView<string>

Parameters

flavour: string

Returns

null | BlockView<string>

Source

block-std/src/spec/spec-store.ts:36


mount()

mount(): void

Returns

void

Source

block-std/src/spec/spec-store.ts:14


unmount()

unmount(): void

Returns

void

Source

block-std/src/spec/spec-store.ts:20


Generated using TypeDoc and typedoc-plugin-markdown.