Closed
Description
Bug Report
π Search Terms
- Syntax error
- error TS1005
π Version & Regression Information
- This changed between versions 4.6.3 and 4.7.2
β― Playground Link
Playground link with relevant code
π» Code
"use strict";
const enum MyVer { v1 = 1, v2 = 2 }
let ver = 21
const a = ver < (MyVer.v1 >= MyVer.v2 ? MyVer.v1 : MyVer.v2)
π Actual behavior
It reports error TS1005
:
R:/working/a.ts:4:27 - error TS1005: ')' expected.
4 const a = ver < (MyVer.v1 >= MyVer.v2 ? MyVer.v1 : MyVer.v2)
~
R:/working/a.ts:4:60 - error TS1005: ',' expected.
4 const a = ver < (MyVer.v1 >= MyVer.v2 ? MyVer.v1 : MyVer.v2)
~
Found 2 errors in the same file, starting at: R:/working/a.ts:4
π Expected behavior
The part between (
and )
should be parsed as an operand of <
.