Installation
npm install --save @types/try-to-catch
Summary
This package contains type definitions for try-to-catch (https://github.com/coderaiser/try-to-catch).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/try-to-catch.
index.d.ts
declare function tryToCatch<PromiseData, FnArgs extends any[]>(
fn: (...args: FnArgs) => Promise<PromiseData>,
...fnArgs: FnArgs
): Promise<[Error] | [null, PromiseData]>;
declare function tryToCatch<Data, FnArgs extends any[]>(
fn: (...args: FnArgs) => Data,
...fnArgs: FnArgs
): Promise<[Error] | [null, Data]>;
export = tryToCatch;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Coderaiser.