|
|
|
Ask HN: Keeping TypeScript CLI options and types in sync
|
|
4 points
by ilbert
50 days ago
|
|
Building TypeScript CLIs, I keep running into the same problem. I define an option in one place (its default, its parser, its validator) and the type for it on argv ends up declared somewhere else. After enough changes, one of them is always slightly wrong, and I find out only when something silently coerces to undefined. Have you ever faced the same issue? How are you solving it? Same question for printing the --help output: handwritten strings, or generated from the config? |
|