mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
19 lines
317 B
TypeScript
19 lines
317 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
|
|
const unaryF = [+"str"] as const
|