@stephansama packages / @stephansama/typed-events / message / TypedMessage
Interface: TypedMessage<Name, Map>
Defined in: message.ts:5
Extends
ValidatorMap<Name,Map,"message", {origin:string;window:Window; }>
Type Parameters
Name
Name extends string
Map
Map extends Record<string, StandardSchemaV1>
Properties
map
ts
map: Map;Defined in: utils/types.ts:62
Inherited from
name
ts
name: Name;Defined in: utils/types.ts:63
Inherited from
window
ts
window: Window;Defined in: message.ts:14
Methods
dispatch()
ts
dispatch<Event, Input>(
name,
input,
opts?): void;Defined in: utils/types.ts:45
Type Parameters
Event
Event extends string
Input
Input extends object
Parameters
name
Event
input
Input
opts?
origin
string
window
Window
Returns
void
Inherited from
listen()
ts
listen<Event, Input>(name, callback): () => void;Defined in: utils/types.ts:54
Type Parameters
Event
Event extends string
Input
Input extends object
Parameters
name
Event
callback
ListenerCallback<Input, "message">
Returns
ts
(): void;Returns
void