# @types/jackrabbit

> TypeScript definitions for jackrabbit

Latest version **4.3.7** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

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

## 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 | 4.3.7 |
| Published | 2023-11-21 |
| First published | 2018-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 4.3.7 (latest) — 2023-11-21
- 4.3.3 (ts3.6) — 2021-07-08
- 4.3.2 (ts3.2) — 2019-05-24
- 4.3.1 (ts2.8) — 2018-07-14
- 4.3.0 (ts2.4) — 2018-04-03
- 4.3.6 — 2023-11-07
- 4.3.5 — 2023-10-18
- 4.3.4 — 2023-09-15

## README

# Installation
> `npm install --save @types/jackrabbit`

# Summary
This package contains type definitions for jackrabbit (https://github.com/hunterloftis/jackrabbit).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jackrabbit.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jackrabbit/index.d.ts)
````ts
import { Connection, Message, Options } from "amqplib";

declare namespace jackrabbit {
    function jackrabbit(url: string): JackRabbit;

    interface JackRabbit extends NodeJS.EventEmitter {
        default(): Exchange;
        direct(name?: string): Exchange;
        fanout(name?: string): Exchange;
        topic(name?: string): Exchange;
        close(callback: (e: Error) => any): void;
        getInternals: () => {
            amqp: any;
            connection: Connection;
        };
    }

    enum exchangeType {
        direct = "direct",
        fanout = "fanout",
        topic = "topic",
    }

    interface Exchange extends NodeJS.EventEmitter {
        name: string;
        type: exchangeType;
        options: Options.AssertExchange;
        queue(options: QueueOptions): Queue;
        connect(con: Connection): Exchange;
        publish(message: any, options?: PublishOptions): Exchange;
    }

    type PublishOptions = Options.Publish & {
        key: string;
        reply?: AckCallback | undefined;
    };

    type QueueOptions = Options.AssertQueue & {
        name?: string | undefined;
        key?: string | undefined;
        keys?: readonly string[] | undefined;
        prefetch?: number | undefined;
    };

    type AckCallback = (data?: any) => void;

    interface Queue extends NodeJS.EventEmitter {
        name: string;
        options: QueueOptions;
        connect(con: Connection): void;
        consume: (
            callback: (data: any, ack: AckCallback, nack: () => void, msg: Message) => void,
            options?: Options.Consume,
        ) => void;
        cancel(done: any): void;
        purge(done: any): void;
    }
}

export default jackrabbit.jackrabbit;

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/amqplib](https://npmjs.com/package/@types/amqplib)

# Credits
These definitions were written by [Elvis Adomnica](https://github.com/elvisvoer).

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