Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

BucketQueueEntry<T>: { reject: any; resolve: any; task: any }

Type parameters

  • T = any

Type declaration

EEMethodReturnType<T, S, TValue, FValue>: S extends keyof T ? InnerEEMethodReturnType<T[S], TValue, FValue> : FValue

Type parameters

  • T

  • S: string

  • TValue

  • FValue = void

Exclude<T, U>: T extends U ? never : T

Exclude from T those types that are assignable to U

Type parameters

  • T

  • U

InnerEEMethodReturnType<T, TValue, FValue>: T extends (...args: any[]) => any ? ReturnType<T> extends void | undefined ? FValue : TValue : FValue

Type parameters

  • T

  • TValue

  • FValue

IteratorResult<T, TReturn>: IteratorYieldResult<T> | IteratorReturnResult<TReturn>

Type parameters

  • T

  • TReturn = any

ListenerType<T>: [T] extends [(...args: infer U) => any] ? U : [T] extends [void] ? [] : [T]

Type parameters

  • T

OverriddenKeys: keyof OverriddenMethods<any, any, any>
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

      • event: typeof assignmentCompatibilityHack
      • listener: (...args: any[]) => any
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns 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

      • event: typeof assignmentCompatibilityHack
      • listener: (...args: any[]) => any
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns any

      Returns void

  • emit:function
    • Type parameters

      • P: string | number | symbol

      • T

      Parameters

      Returns EEMethodReturnType<TEmitter, "emit", T, void>

    • Parameters

      Returns void

  • on:function
    • Type parameters

      • P: string | number | symbol

      • T

      Parameters

      • this: T
      • event: P
      • listener: (...args: ListenerType<TEventRecord[P]>) => void

      Returns EEMethodReturnType<TEmitter, "on", T, void>

    • Parameters

      • event: typeof assignmentCompatibilityHack
      • listener: (...args: any[]) => any
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns any

      Returns void

  • once:function
    • Type parameters

      • P: string | number | symbol

      • T

      Parameters

      • this: T
      • event: P
      • listener: (...args: ListenerType<TEventRecord[P]>) => void

      Returns EEMethodReturnType<TEmitter, "once", T, void>

    • Parameters

      • event: typeof assignmentCompatibilityHack
      • listener: (...args: any[]) => any
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns 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
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns any

      Returns EEMethodReturnType<TEmitter, "removeEventListener", T, void>

    • Parameters

      • event: typeof assignmentCompatibilityHack
      • listener: (...args: any[]) => any
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns 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
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns any

      Returns EEMethodReturnType<TEmitter, "removeListener", T, void>

    • Parameters

      • event: typeof assignmentCompatibilityHack
      • listener: (...args: any[]) => any
          • (...args: any[]): any
          • Parameters

            • Rest ...args: any[]

            Returns any

      Returns void

Pick<T, K>: { [ P in K]: T[P] }

From T, pick a set of properties whose keys are in the union K

Type parameters

  • T

  • K: keyof T

ReturnType<T>: T extends (...args: any) => infer R ? R : any

Obtain the return type of a function type

Type parameters

  • T: (...args: any) => any

StrictEventEmitter<TEmitterType, TEventRecord, TEmitRecord, UnneededMethods, NeededMethods>: TypeRecord<TEmitterType, TEventRecord, TEmitRecord> & Pick<TEmitterType, Exclude<keyof TEmitterType, OverriddenKeys>> & Pick<OverriddenMethods<TEmitterType, TEventRecord, TEmitRecord>, NeededMethods>

Type parameters

Variables

Error: ErrorConstructor
assignmentCompatibilityHack: unique symbol