Skip to content

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

Class: UIEventStateContext

Constructors

new UIEventStateContext()

new UIEventStateContext(): UIEventStateContext

Returns

UIEventStateContext

Methods

add()

add<State>(state): void

Type Parameters

State extends UIEventState = UIEventState

Parameters

state: State

Returns

void

Defined in

packages/framework/block-std/src/event/base.ts:17


get()

get<Type>(type): MatchEvent<Type>

Type Parameters

Type extends keyof BlockSuiteUIEventState = keyof BlockSuiteUIEventState

Parameters

type: Type

Returns

MatchEvent<Type>

Defined in

packages/framework/block-std/src/event/base.ts:26


has()

has(type): boolean

Parameters

type: keyof BlockSuiteUIEventState

Returns

boolean

Defined in

packages/framework/block-std/src/event/base.ts:39


from()

static from(...states): UIEventStateContext

Parameters

• ...states: UIEventState[]

Returns

UIEventStateContext

Defined in

packages/framework/block-std/src/event/base.ts:43