@likecoin/epub-ts
    Preparing search index...

    Interface IEventEmitter<E>

    interface IEventEmitter<E extends EventMap = Record<string, any[]>> {
        __listeners?: Record<string, ((...args: any[]) => void)[]>;
        emit<K extends string>(type: K, ...args: E[K]): void;
        off<K extends string>(type: K, fn?: (...args: E[K]) => void): void;
        on<K extends string>(type: K, fn: (...args: E[K]) => void): void;
    }

    Type Parameters

    • E extends EventMap = Record<string, any[]>

    Implemented by

    Index

    Properties

    Methods

    Properties

    __listeners?: Record<string, ((...args: any[]) => void)[]>

    Methods

    • Type Parameters

      • K extends string

      Parameters

      • type: K
      • ...args: E[K]

      Returns void

    • Type Parameters

      • K extends string

      Parameters

      • type: K
      • Optionalfn: (...args: E[K]) => void

      Returns void

    • Type Parameters

      • K extends string

      Parameters

      • type: K
      • fn: (...args: E[K]) => void

      Returns void