mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +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>
7 lines
239 B
TypeScript
7 lines
239 B
TypeScript
import niceTry = require("nice-try");
|
|
|
|
niceTry(() => true); // $ExpectType boolean | undefined
|
|
niceTry(() => (1).toString(999)); // $ExpectType string | undefined
|
|
niceTry(); // $ExpectType undefined
|
|
niceTry(true); // $ExpectType undefined
|