3.0.3 • Published 6 months ago

@types/try-to-catch v3.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for try-to-catch 3.0
// Project: https://github.com/coderaiser/try-to-catch
// Definitions by: Coderaiser <https://github.com/coderaiser>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.0

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: Sun, 29 Aug 2021 06:31:24 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Coderaiser.

3.0.3

6 months ago

3.0.2

7 months ago

3.0.1

8 months ago

3.0.0

3 years ago