Earlier quoted context omitted.
…or just use Zod?
I don't like writing type definitions with zod's DSL. I want to write definitions in the "first party syntax" - which both JSDoc and Typescript types are - and have everything else generated out from that.
Typescript's types simply aren't able to provide input validation, both because they don't exist at runtime and for lack of power ("number must be 0..10").
At least with Zod, you also get Typescript types, from the same schema.