@types/try-to-catch
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/try-to-catch

Weekly Downloads

277

Version

3.0.3

License

MIT

Unpacked Size

3.27 kB

Total Files

5

Last publish

Collaborators

  • types