/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Stop writing CLI validation. Parse it right the first time
(hackers.pub)
203 points
dahlia
| 4 comments |
06 Sep 25 18:20 UTC
|
HN request time: 0.914s
|
source
1.
thealistra
◴[
06 Sep 25 21:49 UTC
]
No.
45153186
[source]
▶
>>45151622 (OP)
#
Isn’t this like argparse from Python for typescript?
replies(1):
>>45153443
#
ID:
GO
2.
whilenot-dev
◴[
06 Sep 25 22:23 UTC
]
No.
45153443
[source]
▶
>>45153186 (TP)
#
What OP calls an "combinatorial parser" I'd call object schema validation and that's more similar to pydantic[0] than argparse in python land.
[0]:
https://docs.pydantic.dev/latest/
replies(1):
>>45154075
#
3.
nhumrich
◴[
07 Sep 25 00:13 UTC
]
No.
45154075
[source]
▶
>>45153443
#
So, typer than
replies(1):
>>45155884
#
4.
mrugge
◴[
07 Sep 25 06:31 UTC
]
No.
45155884
{3}
[source]
▶
>>45154075
#
Or click
↑