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
In our code we use several constants at the top of typescript files to store class config data. For example, we might want to limit the number of operations that can be performed simultaneously, but tweak the value from time to time. After upgrading to typescript@rc, this code no longer compiles
Code
constmaxPeople=4;classRace{// Compiles under 2.0.8, Doesn't compile under 2.1.1-rcmultiPersonRace(): boolean{returnmaxPeople>1;}}
TypeScript Version: 2.1.1 (RC)
In our code we use several constants at the top of typescript files to store class config data. For example, we might want to limit the number of operations that can be performed simultaneously, but tweak the value from time to time. After upgrading to typescript@rc, this code no longer compiles
Code
See https://github.com/berickson1/Playground/blob/master/constError.ts
Expected behavior:
Code compiles
Actual behavior:
constError.ts(5,16): error TS2365: Operator '>' cannot be applied to types '4' and '1'.
The text was updated successfully, but these errors were encountered: