Properties
addEvent
addEvent: (<Key>(event: Key, callback: T[keyof T]) => void) = ...
Type declaration
- <Key>(event: Key, callback: T[keyof T]): void
Type Parameters
Key extends string | number | symbol
Parameters
event: Key
callback: T[keyof T]
Returns void
Protected callEvent
callEvent: (<Key>(event: number | Key, ...data: Parameters<T[Key]>) => void) = ...
Type declaration
- <Key>(event: number | Key, ...data: Parameters<T[Key]>): void
Type Parameters
Key extends string | number | symbol
Parameters
event: number | Key
Rest ...data: Parameters<T[Key]>
Returns void
removeEvent
removeEvent: (<Key>(event: Key, callback?: T[keyof T]) => void) = ...
Type declaration
- <Key>(event: Key, callback?: T[keyof T]): void
Type Parameters
Key extends string | number | symbol
Parameters
event: Key
Optional callback: T[keyof T]
Returns void
订阅