Skip to content

API > @blocksuite/block-std > SpecStore

Class: SpecStore ​

Constructors ​

constructor ​

new SpecStore(std): SpecStore

Parameters ​

ParameterType
stdBlockStdProvider

Returns ​

SpecStore

Defined In ​

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

Properties ​

_services ​

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

Defined In ​

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


_specs ​

private _specs: Map< string, BlockSpec< string > >

Defined In ​

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


std ​

std: BlockStdProvider

Defined In ​

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

Methods ​

_buildSpecMap ​

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

Parameters ​

ParameterType
specsBlockSpec< string >[]

Returns ​

Map< string, BlockSpec< string > >

Defined In ​

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


_diffServices ​

private _diffServices(oldSpecs, newSpecs): void

Parameters ​

ParameterType
oldSpecsMap< string, BlockSpec< string > >
newSpecsMap< string, BlockSpec< string > >

Returns ​

void

Defined In ​

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


applySpecs ​

applySpecs(specs): void

Parameters ​

ParameterType
specsBlockSpec< string >[]

Returns ​

void

Defined In ​

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


dispose ​

dispose(): void

Returns ​

void

Defined In ​

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


getService ​

getService(flavour): undefined | BlockService< BaseBlockModel< object > >

Parameters ​

ParameterType
flavourstring

Returns ​

undefined | BlockService< BaseBlockModel< object > >

Defined In ​

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


getView ​

getView(flavour): null | BlockView< string >

Parameters ​

ParameterType
flavourstring

Returns ​

null | BlockView< string >

Defined In ​

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