Skip to main content

EventDispatcher

ai-research-agent / editor/util/EventDispatcher

Classes

EventDispatcher<T>

Extended by

Type Parameters

Type ParameterDefault type

T extends Record<string, any>

Record<string, Event>

Constructors

new EventDispatcher()
new EventDispatcher<T>(): EventDispatcher<T>
Returns

EventDispatcher<T>

Methods

addEventListener()
Call Signature
addEventListener<K>(
type,
listener,
options?): void
Type Parameters
Type Parameter

K extends string | number | symbol

Parameters
ParameterType

type

K

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

Call Signature
addEventListener(
type,
listener,
options?): void
Parameters
ParameterType

type

string

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

dispatchEvent()
dispatchEvent(event, catchErrors?): void
Parameters
ParameterType

event

Event

catchErrors?

boolean

Returns

void

off()
Call Signature
off<K>(
type,
listener,
options?): void
Type Parameters
Type Parameter

K extends string | number | symbol

Parameters
ParameterType

type

K

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

Call Signature
off(
type,
listener,
options?): void
Parameters
ParameterType

type

string

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

on()
Call Signature
on<K>(
type,
listener,
options?): void
Type Parameters
Type Parameter

K extends string | number | symbol

Parameters
ParameterType

type

K

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

Call Signature
on(
type,
listener,
options?): void
Parameters
ParameterType

type

string

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

removeEventListener()
Call Signature
removeEventListener<K>(
type,
listener,
options?): void
Type Parameters
Type Parameter

K extends string | number | symbol

Parameters
ParameterType

type

K

listener

(event) => any

options?

AddEventListenerOptions

Returns

void

Call Signature
removeEventListener(
type,
listener,
options?): void
Parameters
ParameterType

type

string

listener

(event) => any

options?

AddEventListenerOptions

Returns

void