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