enumValues.include()
accepts only values from the enum
#4805
Unanswered
Siddhesh-Agarwal
asked this question in
Q&A
Replies: 1 comment
-
I can obviously do this to escape the problem: const temp = "temp";
supportTicketStatus.enumValues.include(temp as any); but that is a workaround |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, I have been facing a problem and I can explain it with an example.
Let us say I have the following enum:
and I want to check if a string is present in it:
VS Code shows me the following message:
If I can only check values that are already a art of the enum, the
includes
method is redundant. Ideally, that message should not be shownBeta Was this translation helpful? Give feedback.
All reactions