You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
445 B
15 lines
445 B
/**
|
|
* A set of callback functions that are called when a resource recieves a
|
|
* notification
|
|
*/
|
|
export interface SubscriptionCallbacks<NotificationMessage> {
|
|
/**
|
|
* Triggers when a notification was received.
|
|
*/
|
|
onNotification?: (message: NotificationMessage) => void;
|
|
/**
|
|
* Triggers when a notification error was received.
|
|
*/
|
|
// TODO: make notification errors more specific
|
|
onNotificationError?: (error: Error) => void;
|
|
}
|
|
|