You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to define an array that contains exactly the elements of all possible values of a union once.
typeUnion="prevStep"|"nextStep"|"submit"|"order";// this works:constlist: LiteralList<Union>=["nextStep","order","prevStep","submit"];// this fails:constlist: LiteralList<Union>=["nextStep","order","prevStep","submit","submit"];// this fails:constlist: LiteralList<Union>=["nextStep","order","prevStep"];
I want to be able to define an array that contains exactly the elements of all possible values of a union once.
I already made this work with this type:
I'm not sure though if it makes sense since I asked ChatGPT to do it.
Is it possible to add this type helper to type-fest?
Upvote & Fund
The text was updated successfully, but these errors were encountered: