BlockSuite API Documentation / @blocksuite/block-std / UIEventStateContext
Class: UIEventStateContext
Constructors
new UIEventStateContext()
new UIEventStateContext():
UIEventStateContext
Returns
Properties
_map
private
_map:Record
<string
,UIEventState
> ={}
Source
packages/framework/block-std/src/event/base.ts:15
Methods
add()
add<
State
>(state
):void
Type parameters
• State extends UIEventState
= UIEventState
Parameters
• state: State
Returns
void
Source
packages/framework/block-std/src/event/base.ts:25
get()
get<
Type
>(type
):MatchEvent
<Type
>
Type parameters
• Type extends keyof BlockSuiteUIEventState
= keyof BlockSuiteUIEventState
Parameters
• type: Type
Returns
MatchEvent
<Type
>
Source
packages/framework/block-std/src/event/base.ts:38
has()
has(
type
):boolean
Parameters
• type: keyof BlockSuiteUIEventState
Returns
boolean
Source
packages/framework/block-std/src/event/base.ts:34
from()
static
from(...states
):UIEventStateContext
Parameters
• ...states: UIEventState
[]
Returns
Source
packages/framework/block-std/src/event/base.ts:17