We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
The documentation says
It is a compile time error for constant enum expressions to be evaluated to NaN or Infinity.
But the below code does not throw any compile time error
enum FMixed { Data1 = 10 + 0.0 / 0.0, Data2 = 0 / 0, Data3 = 10 / 0.0 } console.log("FMixed.Data1 is "+FMixed.Data1);
TypeScript Version is 2.7.1
The text was updated successfully, but these errors were encountered:
Better to disallow NaN and Infinity in enum member value
Sorry, something went wrong.
undefined shouldn't be permitted in it as well.
undefined
No branches or pull requests
Hi,
The documentation says
It is a compile time error for constant enum expressions to be evaluated to NaN or Infinity.
But the below code does not throw any compile time error
TypeScript Version is 2.7.1
The text was updated successfully, but these errors were encountered: