# @types/oboe

> TypeScript definitions for oboe

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

## Install

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

## 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.1.4 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51434 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 2.1.4 (latest) — 2023-11-07
- 2.1.2 (ts4.3) — 2023-09-03
- 2.1.1 (ts3.6) — 2021-07-08
- 2.1.0 (ts3.4) — 2021-03-02
- 2.0.29 (ts3.0) — 2020-05-15
- 2.0.28 (ts2.0) — 2016-09-19
- 2.1.3 — 2023-10-18
- 2.0.27 — 2016-07-14
- 2.0.26-alpha — 2016-07-08
- 2.0.25-alpha — 2016-07-04
- 2.0.24-alpha — 2016-07-02
- 2.0.23-alpha — 2016-07-01
- 2.0.22-alpha — 2016-07-01
- 2.0.21-alpha — 2016-05-25
- 2.0.20-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/oboe/versions

## README

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

declare namespace oboe {
    interface OboeFunction extends Function {
        drop: Object;
        (url: string): Oboe; // simple fetch the url
        (options: Options): Oboe; // fetch with full parameters
        (stream: NodeJS.ReadableStream): Oboe; // read data from the given Node stream
        (): Oboe; // parse data given by the emit() calls
    }

    interface Oboe {
        done(callback: (result: any) => void): Oboe;

        fail(callback: (result: FailReason) => void): Oboe;

        node(pattern: string, callback: CallbackSignature): Oboe;
        node(patterns: PatternMap): Oboe;

        on(event: string, pattern: string, callback: CallbackSignature): Oboe;
        on(eventPattern: string, callback: CallbackSignature): Oboe;

        path(pattern: string, callback: CallbackSignature): Oboe;
        path(listeners: any): Oboe;

        removeListener(eventPattern: string, callback: CallbackSignature): Oboe;
        removeListener(event: string, pattern: string, callback: CallbackSignature): Oboe;

        start(callback: (status: number, headers: Object) => void): Oboe;

        abort(): void;

        emit(message: "data" | "end", data?: string): void;

        source: string;
    }

    interface CallbackSignature {
        (node: any, pathOrHeaders: any, ancestors: Object[]): any;
    }

    interface Options {
        url: string;
        method?: string | undefined;
        headers?: Object | undefined;
        body?: any;
        cached?: boolean | undefined;
        withCredentials?: boolean | undefined;
    }

    interface FailReason {
        thrown?: Error | undefined;
        statusCode?: number | undefined;
        body?: string | undefined;
        jsonBody?: Object | undefined;
    }

    interface PatternMap {
        [pattern: string]: CallbackSignature;
    }
}

declare var oboe: oboe.OboeFunction;

export = oboe;
export as namespace oboe;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Jared Klopper](https://github.com/optical).

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