Closed as not planned
Description
TypeScript Version: 3.5.0-dev.20190511
Search Terms:
compile-time operations numerical constants
Code
main.ts
const TWO: 2 = 1 + 1;
Expected behavior:
Transpiles without error
Actual behavior:
$> tsc main.ts
main.ts:1:7 - error TS2322: Type 'number' is not assignable to type '2'.
Playground Link:
https://www.typescriptlang.org/play/#src=const%20TWO%3A%202%20%3D%201%20%2B%201%3B
Related Issues: