Documentation
API Reference
Classes
EventEmitter

graphql-tools-monorepo / federation/src / EventEmitter

Class: EventEmitter<T>

federation/src.EventEmitter

Type parameters

NameType
Textends EventMap<T>

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new EventEmitter<T>(): EventEmitter<T>

Type parameters

NameType
Textends EventMap<T>

Returns

EventEmitter<T>

Methods

emit

emit<K>(eventName, ...args): boolean

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
eventNameK
...argsT[K]

Returns

boolean

Defined in

packages/federation/src/utils.ts:214


off

off<K>(eventName, listener): this

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
eventNameK
listener(…args: T[K]) => void

Returns

this

Defined in

packages/federation/src/utils.ts:205


on

on<K>(eventName, listener): this

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
eventNameK
listener(…args: T[K]) => void

Returns

this

Defined in

packages/federation/src/utils.ts:186


once

once<K>(eventName, listener): this

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
eventNameK
listener(…args: T[K]) => void

Returns

this

Defined in

packages/federation/src/utils.ts:196