oxc/crates/oxc_isolated_declarations/tests/fixtures/infer-expression.ts

18 lines
No EOL
283 B
TypeScript

// Correct
// ParenthesizedExpression
const n = (0);
const s = ("");
const t = (``);
const b = (true);
// UnaryExpression
let unaryA = +12;
const unaryB = -1_2n;
// Incorrect
// UnaryExpression
const unaryC = +"str"
const unaryD = typeof "str"
const unaryE = {E: -"str"} as const