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
constenumColor{Blue,Red=1}interfaceIColors{// Error: A computed property name in an interface must be a compile-time constant[Color.Blue]: any;[Color.Red]: any;// No errors thrown[2]: any;}
Expected behavior:
No red squigglies
Actual behavior:
Red squigglies, because a const enum's value isn't considered a compile-time constant (isn't it?).
The text was updated successfully, but these errors were encountered:
The issue here is not that they are constants or not. the issue is that the way the compiler is layered, it does not necessary know what they are when a it forms the shape of the internal data structure representing the interface or class (symbol). see #5579 for more details.
TypeScript Version: 1.8.0
Code
Expected behavior:
No red squigglies
Actual behavior:
Red squigglies, because a const enum's value isn't considered a compile-time constant (isn't it?).
The text was updated successfully, but these errors were encountered: