mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
[meow] add booleanDefault option (#28520)
This commit is contained in:
Vendored
+6
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for meow 4.x
|
||||
// Type definitions for meow 5.x
|
||||
// Project: https://github.com/sindresorhus/meow
|
||||
// Definitions by: KnisterPeter <https://github.com/KnisterPeter>
|
||||
// Lindsey Smith <https://github.com/praxxis>
|
||||
@@ -26,6 +26,11 @@ declare namespace meow {
|
||||
flags?: buildOptions.Options;
|
||||
autoHelp?: boolean;
|
||||
autoVersion?: boolean;
|
||||
/**
|
||||
* Caution: Explicitly specifying undefined for booleanDefault
|
||||
* has different meaning from omitting key itself.
|
||||
*/
|
||||
booleanDefault?: boolean | null;
|
||||
}
|
||||
|
||||
interface Result {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import meow = require('meow');
|
||||
|
||||
const cli = meow('Help text', {
|
||||
booleanDefault: undefined,
|
||||
flags: {
|
||||
unicorn: {
|
||||
type: 'boolean',
|
||||
@@ -29,6 +30,7 @@ const cli3 = meow({
|
||||
inferType: true,
|
||||
autoHelp: true,
|
||||
autoVersion: true,
|
||||
booleanDefault: false,
|
||||
flags: {
|
||||
unicorn: {
|
||||
type: 'boolean',
|
||||
|
||||
Reference in New Issue
Block a user