Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@types/oboe

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/oboe

TypeScript definitions for oboe

ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
2.1.4
Version published
Weekly downloads
18K
-79.31%
Maintainers
1
Weekly downloads
 
Created
Source

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

/// <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

Credits

These definitions were written by Jared Klopper.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts