createBroadcastChannel
function createBroadcastChannel<Name, Map>(name, map): object;Defined in: broadcast.ts:20
Type Parameters
Section titled “Type Parameters”Name extends string
Map extends Record<string, StandardSchemaV1<unknown, unknown>>
Parameters
Section titled “Parameters”Name
Map
Returns
Section titled “Returns”object
map: Map;name: Name;channel
Section titled “channel”Get Signature
Section titled “Get Signature”get channel(): BroadcastChannel;Returns
Section titled “Returns”BroadcastChannel
dispatch()
Section titled “dispatch()”dispatch<Event, Input>(name, input): void;Type Parameters
Section titled “Type Parameters”Event extends string
Input extends object
Parameters
Section titled “Parameters”Event
Input
Returns
Section titled “Returns”void
listen()
Section titled “listen()”listen<Event, Input>(name, callback): () => void;Type Parameters
Section titled “Type Parameters”Event extends string
Input extends object
Parameters
Section titled “Parameters”Event
callback
Section titled “callback”ListenerCallback<Input, "message">
Returns
Section titled “Returns”() => void