JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 366780
  • Score
    100M100P100Q170595F
  • License MIT

TypeScript definitions for component-emitter

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/component-emitter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/component-emitter

    Summary

    This package contains type definitions for component-emitter (https://www.npmjs.com/package/component-emitter).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/component-emitter.

    index.d.ts

    // TypeScript Version: 2.2
    
    interface Emitter<Event = string> {
        on(event: Event, listener: Function): Emitter;
        once(event: Event, listener: Function): Emitter;
        off(event?: Event, listener?: Function): Emitter;
        emit(event: Event, ...args: any[]): Emitter;
        listeners(event: Event): Function[];
        hasListeners(event: Event): boolean;
        removeListener(event?: Event, listener?: Function): Emitter;
        removeEventListener(event?: Event, listener?: Function): Emitter;
        removeAllListeners(event?: Event): Emitter;
    }
    
    declare const Emitter: {
        (obj?: object): Emitter;
        new(obj?: object): Emitter;
    };
    
    export = Emitter;
    

    Additional Details

    • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
    • Dependencies: none

    Credits

    These definitions were written by Peter Snider.