# @types/xmpp__events

> TypeScript definitions for @xmpp/events

Latest version **0.14.0** (published 2025-12-11) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 70/100 (B)** — status: stable.

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.14.0 |
| Published | 2025-12-11 |
| First published | 2021-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51469 |
| Maintainers | types |

## Links

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

## Dependencies (3)

- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/xmpp__xml](https://npm.io/package/@types/xmpp__xml.md) *
- [@types/xmpp__connection](https://npm.io/package/@types/xmpp__connection.md) *

## Recent versions

- 0.14.0 (latest) — 2025-12-11
- 0.13.3 (ts5.0) — 2023-11-07
- 0.13.1 (ts4.3) — 2023-08-30
- 0.13.0 (ts3.9) — 2021-11-30
- 0.13.4 — 2025-10-24
- 0.13.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/xmpp__events`

# Summary
This package contains type definitions for @xmpp/events (https://github.com/xmppjs/xmpp.js/tree/main/packages/events).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__events.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__events/index.d.ts)
````ts
/// <reference types="node" />

import Connection from "@xmpp/connection";
import { Element } from "@xmpp/xml";
import * as events from "events";

export const EventEmitter: typeof events.EventEmitter;
export type EventEmitter = events.EventEmitter;

export class TimeoutError extends Error {
    readonly name: "TimeoutError";
}

export function delay(ms: number): Promise<void> & { timeout: NodeJS.Timeout | number };
export function timeout<TPromise extends PromiseLike<unknown>>(
    promise: TPromise,
    ms: number,
): TPromise extends PromiseLike<infer TValue> ? Promise<TValue> : never;
export function promise(
    emitter: EventEmitter,
    event: string | symbol,
    rejectEvent?: string | symbol | null,
    timeout?: number | null,
): Promise<unknown>;

export class Deferred<TValue> {
    readonly promise: Promise<TValue>;
    resolve(value: TValue | PromiseLike<TValue>): void;
    reject(reason?: any): void;
}

export function procedure<T>(
    entity: Connection,
    stanza: Element | null | undefined,
    handler: (element: Element, done: (args: T) => void) => Promise<void>,
): Promise<T>;

export function tick(): Promise<void>;

````

### Additional Details
 * Last updated: Thu, 11 Dec 2025 21:02:12 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/xmpp__connection](https://npmjs.com/package/@types/xmpp__connection), [@types/xmpp__xml](https://npmjs.com/package/@types/xmpp__xml)

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).

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