@@ -73,44 +73,44 @@ export type ConfigCallback = (configPath: string) => { [key: string]: any } | Er
73
73
74
74
export interface Options {
75
75
/** An object representing the set of aliases for a key: `{ alias: { foo: ['f']} }`. */
76
- alias : Dictionary < string | string [ ] > ;
76
+ alias ? : Dictionary < string | string [ ] > ;
77
77
/**
78
78
* Indicate that keys should be parsed as an array: `{ array: ['foo', 'bar'] }`.
79
79
* Indicate that keys should be parsed as an array and coerced to booleans / numbers:
80
80
* { array: [ { key: 'foo', boolean: true }, {key: 'bar', number: true} ] }`.
81
81
*/
82
- array : ArrayOption | ArrayOption [ ] ;
82
+ array ? : ArrayOption | ArrayOption [ ] ;
83
83
/** Arguments should be parsed as booleans: `{ boolean: ['x', 'y'] }`. */
84
- boolean : string | string [ ] ;
84
+ boolean ? : string | string [ ] ;
85
85
/** Indicate a key that represents a path to a configuration file (this file will be loaded and parsed). */
86
- config : string | string [ ] | Dictionary < boolean | ConfigCallback > ;
86
+ config ? : string | string [ ] | Dictionary < boolean | ConfigCallback > ;
87
87
/** configuration objects to parse, their properties will be set as arguments */
88
- configObjects : Dictionary < any > [ ] ;
88
+ configObjects ? : Dictionary < any > [ ] ;
89
89
/** Provide configuration options to the yargs-parser. */
90
- configuration : Partial < Configuration > ;
90
+ configuration ? : Partial < Configuration > ;
91
91
/**
92
92
* Provide a custom synchronous function that returns a coerced value from the argument provided (or throws an error), e.g.
93
93
* `{ coerce: { foo: function (arg) { return modifiedArg } } }`.
94
94
*/
95
- coerce : Dictionary < CoerceCallback > ;
95
+ coerce ? : Dictionary < CoerceCallback > ;
96
96
/** Indicate a key that should be used as a counter, e.g., `-vvv = {v: 3}`. */
97
- count : string | string [ ] ;
97
+ count ? : string | string [ ] ;
98
98
/** Provide default values for keys: `{ default: { x: 33, y: 'hello world!' } }`. */
99
- default : Dictionary < any > ;
99
+ default ? : Dictionary < any > ;
100
100
/** Environment variables (`process.env`) with the prefix provided should be parsed. */
101
- envPrefix : string ;
101
+ envPrefix ? : string ;
102
102
/** Specify that a key requires n arguments: `{ narg: {x: 2} }`. */
103
- narg : Dictionary < number > ;
103
+ narg ? : Dictionary < number > ;
104
104
/** `path.normalize()` will be applied to values set to this key. */
105
- normalize : string | string [ ] ;
105
+ normalize ? : string | string [ ] ;
106
106
/** Keys should be treated as strings (even if they resemble a number `-x 33`). */
107
- string : string | string [ ] ;
107
+ string ? : string | string [ ] ;
108
108
/** Keys should be treated as numbers. */
109
- number : string | string [ ] ;
109
+ number ? : string | string [ ] ;
110
110
/** i18n handler, defaults to util.format */
111
- __ : ( format : any , ...param : any [ ] ) => string ;
111
+ __ ? : ( format : any , ...param : any [ ] ) => string ;
112
112
/** alias lookup table defaults */
113
- key : Dictionary < any > ;
113
+ key ? : Dictionary < any > ;
114
114
}
115
115
116
116
export type OptionsDefault = ValueOf < Pick < Required < Options > , 'default' > > ;
0 commit comments