tuil
ReferencePackages@mwillbanks/tuil-eventsAPI

ObservedEvent

interface exported by @mwillbanks/tuil-events.

View rawEdit

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

MemberTypeRequiredDescriptionRelated types
idstringYesThe id member uses the string contract.
typestringYesThe type member uses the string contract.
payloadunknownYesThe payload member uses the unknown contract.
timestampnumberYesThe timestamp member uses the number contract.
sourceEventSource | undefinedNoThe source member uses the EventSource | undefined contract.EventSource
targetEventTarget | undefinedNoThe target member uses the EventTarget | undefined contract.EventTarget
metadataReadonly<Record<string, unknown>>YesThe metadata member uses the Readonly<Record<string, unknown>> contract.
priorityEventPriorityYesThe priority member uses the EventPriority contract.EventPriority
defaultPreventedbooleanYesThe 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.

Source

View the secondary source reference

Package

@mwillbanks/tuil-events

On this page