mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
2ef8f01624
Improve error message for missing alternative for conditional expressions. ``` × Expected `:` but found `EOF` ╭─[misc/fail/missing-conditional-alternative-type.ts:2:1] 1 │ type A = 1 extends 2 ? 3 · ┬ · ╰── Conditional starts here ╰──── × Expected `:` but found `EOF` ╭─[misc/fail/missing-conditional-alternative.js:2:1] 1 │ const foo = 1 ? 2 · ┬ · ╰── Conditional starts here ╰──── ``` Without this PR, the error mesage is a simple ``Expected `:` but found `EOF` `` only.
2 lines
18 B
JavaScript
2 lines
18 B
JavaScript
const foo = 1 ? 2
|