Improve typing around event emitter handlers (#7816)
This commit is contained in:
parent
213b32bf14
commit
7fa01ffb06
79 changed files with 548 additions and 471 deletions
|
@ -29,8 +29,14 @@ export enum NotificationStateEvents {
|
|||
Update = "update",
|
||||
}
|
||||
|
||||
export abstract class NotificationState extends TypedEventEmitter<NotificationStateEvents>
|
||||
type EventHandlerMap = {
|
||||
[NotificationStateEvents.Update]: () => void;
|
||||
};
|
||||
|
||||
export abstract class NotificationState
|
||||
extends TypedEventEmitter<NotificationStateEvents, EventHandlerMap>
|
||||
implements INotificationStateSnapshotParams, IDestroyable {
|
||||
//
|
||||
protected _symbol: string | null;
|
||||
protected _count: number;
|
||||
protected _color: NotificationColor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue