Open clo4 opened 2 years ago
Not blocked on parser generator. I think I'll do this with an API like:
const spec = Fig.infer({
name: "...",
});
Fig.run(spec);
You can of course write it directly in Fig.run
but that's a bit of an antipattern.
I'm thinking this will do something more specific than Fig.Spec
etc. Instead it will use something like Fig.InferredSpec
which has a shitload of generics on it that Fig.infer
will infer for you. It has to be a function param atm, generics can't be inferred on an assignment :(
This is not possible, because of nesting subcommands. TS doesn't support this as a pattern
You can use
options.get("not an option")
and TS won't tell you there's a mistake, because actions currently cannot know their options or args statically.Blocked on parser generator. Can generate types too.