# @types/fbemitter

> TypeScript definitions for fbemitter

Latest version **2.0.35** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/fbemitter
pnpm add @types/fbemitter
yarn add @types/fbemitter
bun add @types/fbemitter
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.35 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51482 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/fbemitter
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fbemitter
- npm.io page: https://npm.io/package/@types/fbemitter

## Recent versions

- 2.0.35 (latest) — 2023-11-07
- 2.0.32 (ts2.0) — 2016-09-19
- 2.0.34 — 2023-10-18
- 2.0.33 — 2023-09-14
- 2.0.31 — 2016-08-25
- 2.0.30 — 2016-08-19
- 2.0.29 — 2016-08-02
- 2.0.28 — 2016-07-14
- 2.0.27-alpha — 2016-07-08
- 2.0.26-alpha — 2016-07-04
- 2.0.25-alpha — 2016-07-02
- 2.0.24-alpha — 2016-07-01
- 2.0.23-alpha — 2016-07-01
- 2.0.22-alpha — 2016-05-25
- 2.0.21-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/fbemitter/versions

## README

# Installation
> `npm install --save @types/fbemitter`

# Summary
This package contains type definitions for fbemitter (https://github.com/facebook/emitter).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fbemitter.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fbemitter/index.d.ts)
````ts
export declare class EventSubscription {
    listener: Function;
    context: any;

    /**
     * Removes this subscription from the subscriber that controls it.
     */
    remove(): void;
}

export declare class EventEmitter {
    constructor();

    /**
     * Adds a listener to be invoked when events of the specified type are
     * emitted. An optional calling context may be provided. The data arguments
     * emitted will be passed to the listener function.
     */
    addListener(eventType: string, listener: Function, context?: any): EventSubscription;

    /**
     * Similar to addListener, except that the listener is removed after it is
     * invoked once.
     */
    once(eventType: string, listener: Function, context?: any): EventSubscription;

    /**
     * Removes all of the registered listeners, including those registered as
     * listener maps.
     */
    removeAllListeners(eventType?: string): void;

    /**
     * Provides an API that can be called during an eventing cycle to remove the
     * last listener that was invoked. This allows a developer to provide an event
     * object that can remove the listener (or listener map) during the
     * invocation.
     *
     * If it is called when not inside of an emitting cycle it will throw.
     */
    removeCurrentListener(): void;

    /**
     * Returns an array of listeners that are currently registered for the given
     * event.
     */
    listeners(eventType: string): Function[];

    /**
     * Emits an event of the given type with the given data. All handlers of that
     * particular type will be notified.
     */
    emit(eventType: string, ...data: any[]): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [kmxz](https://github.com/kmxz).

---
_Source: https://npm.io/package/@types/fbemitter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
