Merge pull request #9767 from RyanCavanaugh/fix9766

Emit parens around type-asserted binary operators
This commit is contained in:
Ryan Cavanaugh authored and GitHub committed 2016-08-01 15:44:48 -07:00
commit 2d20dbf25e
7 files changed
+76 -35

No files matched your search

-14
View File
@@ -1,14 +0,0 @@
// @filename: a.d.ts
export = ns;
export as namespace ns;
declare namespace ns {
export var x: number;
export interface IFoo { }
}
// @filename: b.d.ts
declare namespace ns.something {
export var p: ns.IFoo;
}
@@ -0,0 +1,9 @@
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);