mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-13 20:32:48 +00:00
* feat: Add typings for nice-try Signed-off-by: Richie Bendall <richiebendall@gmail.com> * feat: Add typings for incorrect parameters Signed-off-by: Richie Bendall <richiebendall@gmail.com> * fix: Change void to undefined Signed-off-by: Richie Bendall <richiebendall@gmail.com> * chore: Update expected types Signed-off-by: Richie Bendall <richiebendall@gmail.com>
10 lines
345 B
TypeScript
10 lines
345 B
TypeScript
// Type definitions for nice-try 2.0
|
|
// Project: https://github.com/electerious/nice-try
|
|
// Definitions by: Richie Bendall <https://github.com/Richienb>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare function niceTry<T>(fn: () => T): T | undefined;
|
|
declare function niceTry(val?: any): undefined;
|
|
|
|
export = niceTry;
|