npm.io
0.0.32 • Published 2 years ago

@types/node-fibers

Licence
MIT
Version
0.0.32
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/node-fibers

Summary

This package contains type definitions for node-fibers (https://github.com/laverdet/node-fibers).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fibers.

index.d.ts

interface Fiber {
    reset: () => any;
    run: (param?: any) => any;
    throwInto: (ex: any) => any;
}

declare module "fibers" {
    function Fiber(fn: Function): Fiber;

    namespace Fiber {
        export var current: Fiber;
        export function yield(value?: any): any;
    }

    export = Fiber;
}

declare module "fibers/future" {
    class Future {
        constructor();
        detach(): void;
        get(): any;
        isResolved(): boolean;
        proxy(future: Future): void;
        proxyErrors(futureOrList: any): Future;
        resolver(): Function;
        resolve(fn: Function): void;
        resolveSuccess(fn: Function): void;
        return(result?: any): void;
        throw(error: any): void;
        wait(): void;
        static wait(future: Future): any;
        static wait(future_list: Future[]): any;
        static wrap(fn: Function): Future;
    }

    export = Future;
}

Additional Details

  • Last updated: Tue, 30 Jan 2024 2145 GMT
  • Dependencies: none

Credits

These definitions were written by Cary Haynie.