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
This change will allow me to avoid the any cast, and allow me to get TS work correctly for this type.
Right now it doesn't give me any auto completion and complains when I do not cast to any.
The text was updated successfully, but these errors were encountered:
I understand why you'd want to make undefined allowed, but then in this case, the MintStatus could be constructed as not proper. I think doing any to construct dynamically is probably the best in terms of data integrity in this case.
Curious about other thoughts and opinions, but I think allowing undefined is probably also not an ideal solution.
pyramation
changed the title
[Question] wrong enum prasing?
[Question] adding undefined for message types
Dec 8, 2022
I have an enum:
This enum is a response to a query in my contract, when I use ts-codegen, it parses it to this:
To me it feels wrong, because this forces me to cast my
MintStatus
type intoany
, in order to do something like this:I would suggest to change the parsing into something like this:
This change will allow me to avoid the
any
cast, and allow me to get TS work correctly for this type.Right now it doesn't give me any auto completion and complains when I do not cast to any.
The text was updated successfully, but these errors were encountered: