Skip to main content

NotificationListeners TypeAlias

Used to specify the kinds of notifications emitted by a NotificationListenable.

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

Signature

type NotificationListeners<E> = {
[P in keyof E as IfNotificationListener<E[P], P, never>]: E[P];
};

Type Parameters

ParameterDescription
E

Remarks

Any object type is a valid NotificationListeners, but only the notification-like properties of that type will be included.

Example

interface MyNotifications {
load: (user: string, data: IUserData) => void;
requestPause: (period: number) => void;
}