17 lines
428 B
Plaintext
17 lines
428 B
Plaintext
=== tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts ===
|
|
declare var x;
|
|
>x : Symbol(x, Decl(asOpEmitParens.ts, 0, 11))
|
|
|
|
// Must emit as (x + 1) * 3
|
|
(x + 1 as number) * 3;
|
|
>x : Symbol(x, Decl(asOpEmitParens.ts, 0, 11))
|
|
|
|
// Should still emit as x.y
|
|
(x as any).y;
|
|
>x : Symbol(x, Decl(asOpEmitParens.ts, 0, 11))
|
|
|
|
// Emit as new (x())
|
|
new (x() as any);
|
|
>x : Symbol(x, Decl(asOpEmitParens.ts, 0, 11))
|
|
|