ObservedEvent
interface exported by @mwillbanks/tuil-events.
interface
Public interface exported by @mwillbanks/tuil-events.
export interface ObservedEvent {
readonly id: string;
readonly type: string;
readonly payload: unknown;
readonly timestamp: number;
readonly source?: EventSource;
readonly target?: EventTarget;
readonly metadata: Readonly<Record<string, unknown>>;
readonly priority: EventPriority;
readonly defaultPrevented: boolean;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
id | string | Yes | The id member uses the string contract. | — |
type | string | Yes | The type member uses the string contract. | — |
payload | unknown | Yes | The payload member uses the unknown contract. | — |
timestamp | number | Yes | The timestamp member uses the number contract. | — |
source | EventSource | undefined | No | The source member uses the EventSource | undefined contract. | EventSource |
target | EventTarget | undefined | No | The target member uses the EventTarget | undefined contract. | EventTarget |
metadata | Readonly<Record<string, unknown>> | Yes | The metadata member uses the Readonly<Record<string, unknown>> contract. | — |
priority | EventPriority | Yes | The priority member uses the EventPriority contract. | EventPriority |
defaultPrevented | boolean | Yes | The defaultPrevented member uses the boolean contract. | — |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference