Interface NodeEventSource
interface NodeEventSource { emit(type,
...args): void; off(type,
listener): void; on(type,
listener): void; once(type,
listener): void; } Methods
emit
- emit(type, ...args): void
Parameters
type: string
Rest
...args: unknown[]
Returns void
off
- off(type, listener): void
Parameters
type: string
listener: (() => void)
Returns void
on
- on(type, listener): void
Parameters
type: string
listener: (() => void)
Returns void
once
- once(type, listener): void
Parameters
type: string
listener: (() => void)
Returns void
Event source that uses a Node.js-like interface using
on()
andoff()
.