mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Parser#check(...) is a chainable function, just like all the others
This commit is contained in:
@@ -35,7 +35,7 @@ parser = parser.options({});
|
||||
|
||||
parser = parser.usage(str);
|
||||
|
||||
parser.check(checkFn);
|
||||
parser = parser.check(checkFn);
|
||||
|
||||
parser = parser.boolean(str);
|
||||
parser = parser.boolean([str]);
|
||||
|
||||
Vendored
+1
-1
@@ -60,7 +60,7 @@ declare module "optimist" {
|
||||
/** Check that certain conditions are met in the provided arguments. If fn
|
||||
throws or returns false, show the thrown error, usage information, and exit.
|
||||
*/
|
||||
check(fn: (argv: any) => any): void;
|
||||
check(fn: (argv: any) => any): Parser;
|
||||
|
||||
/** Interpret key as a boolean. If a non-flag option follows key in process.argv,
|
||||
that string won't get set as the value of key. If key never shows up as a
|
||||
|
||||
Reference in New Issue
Block a user