(raw: string | undefined, flagName: string)
| 7655 | } |
| 7656 | |
| 7657 | function parseNumericFlag(raw: string | undefined, flagName: string): number | undefined { |
| 7658 | if (raw === undefined) return undefined; |
| 7659 | const n = Number(raw); |
| 7660 | if (!Number.isFinite(n)) { |
| 7661 | throw localValidationError(flagName, 'must be an integer'); |
| 7662 | } |
| 7663 | return n; |
| 7664 | } |
| 7665 | |
| 7666 | function resolveCommonOptions(command: Command): CommonOptions { |
| 7667 | const globals = command.optsWithGlobals() as Partial<CommonOptions> & { |
no test coverage detected