Class: TypedEventTarget<TEvents>
Type parameters
Name | Type |
---|---|
TEvents | extends Record <string , Event > |
Hierarchy
TypedEventTarget
Constructors
constructor
• new TypedEventTarget<TEvents
>()
Type parameters
Name | Type |
---|---|
TEvents | extends Record <string , Event > |
Methods
dispatchEvent
▸ dispatchEvent<TEventType
>(event
): void
Type parameters
Name | Type |
---|---|
TEventType | extends string |
Parameters
Name | Type |
---|---|
event | TEvents [TEventType ] |
Returns
void
Defined in
packages/core/src/eventtarget.ts:53
addEventListener
▸ addEventListener<TEventType
>(type
, handler
): void
Type parameters
Name | Type |
---|---|
TEventType | extends string |
Parameters
Name | Type |
---|---|
type | TEventType |
handler | (event : TEvents [TEventType ]) => void |
Returns
void
Defined in
packages/core/src/eventtarget.ts:57
removeEventListener
▸ removeEventListener<TEventType
>(type
, handler
): void
Type parameters
Name | Type |
---|---|
TEventType | extends string |
Parameters
Name | Type |
---|---|
type | TEventType |
handler | (event : TEvents [TEventType ]) => void |
Returns
void
Defined in
packages/core/src/eventtarget.ts:64