1 | // Type definitions for nice-try 2.1
|
2 | // Project: https://github.com/electerious/nice-try
|
3 | // Definitions by: Richie Bendall <https://github.com/Richienb>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 | declare const niceTry: {
|
7 | <T>(fn: () => T): T | undefined;
|
8 | (val?: any): undefined;
|
9 |
|
10 | promise<T>(fn: (() => PromiseLike<T>) | (() => T)): Promise<T | undefined>;
|
11 | promise(val?: any): Promise<undefined>;
|
12 | };
|
13 |
|
14 | export = niceTry;
|
15 |
|
\ | No newline at end of file |