mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
412 B
TypeScript
23 lines
412 B
TypeScript
//// [tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts] ////
|
|
|
|
//// [asOpEmitParens.ts]
|
|
declare var x;
|
|
// Must emit as (x + 1) * 3
|
|
(x + 1 as number) * 3;
|
|
|
|
// Should still emit as x.y
|
|
(x as any).y;
|
|
|
|
// Emit as new (x())
|
|
new (x() as any);
|
|
|
|
|
|
//// [asOpEmitParens.js]
|
|
"use strict";
|
|
// Must emit as (x + 1) * 3
|
|
(x + 1) * 3;
|
|
// Should still emit as x.y
|
|
x.y;
|
|
// Emit as new (x())
|
|
new (x());
|