Boolean when no value placeholder and type is not string/number/array
(def: OptionDef)
| 13 | |
| 14 | /** Boolean when no value placeholder and type is not string/number/array */ |
| 15 | function isBooleanDef(def: OptionDef): boolean { |
| 16 | if (def.type === 'boolean') return true; |
| 17 | if (def.type === 'string' || def.type === 'number' || def.type === 'array') return false; |
| 18 | return !def.flag.includes('<') && !def.flag.includes('['); |
| 19 | } |
| 20 | |
| 21 | interface FlagSchema { |
| 22 | booleans: Set<string>; |