( arg: string, parsed: Parsed, booleanOptions: Map<string, BooleanKey>, )
| 54 | } |
| 55 | |
| 56 | function applyBooleanOption<Parsed extends object, BooleanKey extends keyof Parsed & string>( |
| 57 | arg: string, |
| 58 | parsed: Parsed, |
| 59 | booleanOptions: Map<string, BooleanKey>, |
| 60 | ) { |
| 61 | const option = booleanOptions.get(arg); |
| 62 | if (!option) { |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | parsed[option] = true as Parsed[BooleanKey]; |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | function applyValueOrPositionalOption< |
| 71 | Parsed extends object, |
no test coverage detected