Open dvins opened 1 year ago
For instance, if you want to just define a subset of valid job names, you could create a type like:
type MyJobNames = "foo" | "bar" | "baz";
They are still strings, but only those three would be allowed by the Typescript compiler.
Is your feature request related to a problem? Please describe. Could someone in the know add some commentary or color on the thoughts behind how Job's are typed in TypeScript, particularly the intent behind the string-only NameType?
Describe the solution you'd like Some additional design documentation and guidance on how we should properly model or use this typing.
Describe alternatives you've considered Looking for guidance more than anything. It sort of gnaws at me every time I see it and I'm not sure I'm leveraging it either for or against me in any way that it is intended it be used.
Additional context Love BullMQ, awesome framework!