Type aliases
BucketQueueEntry
BucketQueueEntry<T>: { reject: any; resolve: any; task: any }
Type parameters
Type declaration
reject:function
resolve:function
- resolve(taskResult: T): void
task:function
EEMethodReturnType
EEMethod
Return
Type
<T, S, TValue, FValue>: S extends keyof T ? InnerEEMethodReturnType<T[S], TValue, FValue> : FValueType parameters
T
S: string
TValue
FValue = void
Exclude
Exclude<T, U>: T extends U ? never : T
Type parameters
InnerEEMethodReturnType
InnerEEMethod
Return
Type
<T, TValue, FValue>: T extends (...args
: any[]) => any ? ReturnType<T> extends void | undefined ? FValue : TValue : FValueType parameters
IteratorResult
Type parameters
ListenerType
ListenerType<T>: [T] extends [(...args: infer U) => any] ? U : [T] extends [void] ? [] : [T]
Type parameters
OverriddenKeys
OverriddenMethods
OverriddenMethods<TEmitter, TEventRecord, TEmitRecord>: { addEventListener: any; addListener: any; emit: any; on: any; once: any; removeEventListener: any; removeListener: any }
Type parameters
TEmitter
TEventRecord
TEmitRecord = TEventRecord
Type declaration
addEventListener:function
Type parameters
P: string | number | symbol
T
Parameters
this: T
event: P
listener: (...args: ListenerType<TEventRecord[P]>) => void
Returns EEMethodReturnType<TEmitter, "addEventListener", T, void>
Parameters
listener: (...args: any[]) => any
Returns void
addListener:function
Type parameters
P: string | number | symbol
T
Parameters
this: T
event: P
listener: (...args: ListenerType<TEventRecord[P]>) => void
Returns EEMethodReturnType<TEmitter, "addListener", T, void>
Parameters
listener: (...args: any[]) => any
Returns void
emit:function
Type parameters
P: string | number | symbol
T
Parameters
Parameters
Returns void
on:function
Type parameters
P: string | number | symbol
T
Parameters
this: T
event: P
listener: (...args: ListenerType<TEventRecord[P]>) => void
Parameters
listener: (...args: any[]) => any
Returns void
once:function
Type parameters
P: string | number | symbol
T
Parameters
this: T
event: P
listener: (...args: ListenerType<TEventRecord[P]>) => void
Parameters
listener: (...args: any[]) => any
Returns void
removeEventListener:function
- removeEventListener<P, T>(this: T, event: P, listener: (...args: any[]) => any): EEMethodReturnType<TEmitter, "removeEventListener", T, void>
- removeEventListener(event: typeof assignmentCompatibilityHack, listener: (...args: any[]) => any): void
Type parameters
P: string | number | symbol
T
Parameters
this: T
event: P
listener: (...args: any[]) => any
Returns EEMethodReturnType<TEmitter, "removeEventListener", T, void>
Parameters
listener: (...args: any[]) => any
Returns void
removeListener:function
- removeListener<P, T>(this: T, event: P, listener: (...args: any[]) => any): EEMethodReturnType<TEmitter, "removeListener", T, void>
- removeListener(event: typeof assignmentCompatibilityHack, listener: (...args: any[]) => any): void
Type parameters
P: string | number | symbol
T
Parameters
this: T
event: P
listener: (...args: any[]) => any
Returns EEMethodReturnType<TEmitter, "removeListener", T, void>
Parameters
listener: (...args: any[]) => any
Returns void
Pick
Pick<T, K>: { [ P in K]: T[P] }
Type parameters
ReturnType
ReturnType<T>: T extends (...args: any) => infer R ? R : any
Type parameters
StrictEventEmitter
Strict
Event
Emitter
<TEmitterType, TEventRecord, TEmitRecord, UnneededMethods, NeededMethods>: TypeRecord<TEmitterType, TEventRecord, TEmitRecord> & Pick<TEmitterType, Exclude<keyof TEmitterType, OverriddenKeys>> & Pick<OverriddenMethods<TEmitterType, TEventRecord, TEmitRecord>, NeededMethods>Type parameters
TEmitterType
TEventRecord
TEmitRecord = TEventRecord
Exclude from T those types that are assignable to U