Skip to content

API > @blocksuite/block-std > UIEventStateContext

Class: UIEventStateContext ​

Constructors ​

constructor ​

new UIEventStateContext(): UIEventStateContext

Returns ​

UIEventStateContext

Properties ​

_map ​

private _map: Record< string, UIEventState > = {}

Defined In ​

block-std/src/event/base.ts:15

Methods ​

add ​

add<State>(state): void

Type parameters ​

ParameterDefault
State extends UIEventStateUIEventState

Parameters ​

ParameterType
stateState

Returns ​

void

Defined In ​

block-std/src/event/base.ts:25


get ​

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

Type parameters ​

ParameterDefault
Type extends keyof BlockSuiteUIEventStatekeyof BlockSuiteUIEventState

Parameters ​

ParameterType
typeType

Returns ​

MatchEvent< Type >

Defined In ​

block-std/src/event/base.ts:38


has ​

has(type): boolean

Parameters ​

ParameterType
typekeyof BlockSuiteUIEventState

Returns ​

boolean

Defined In ​

block-std/src/event/base.ts:34


from ​

static from(...states): UIEventStateContext

Parameters ​

ParameterType
...statesUIEventState[]

Returns ​

UIEventStateContext

Defined In ​

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