TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Erroneous javascript generated with "export default function" and es6 target

Open srowan opened this issue 10 years ago • 1 comments

Typescript 1.7.

When targeting commonjs / es6, the following typescript produces no errors on compilation:

export default function() { var hello = "world"; }

but generates invalid javascript:

function () { var hello = "world"; } exports.default = default_1;

srowan avatar Feb 01 '16 03:02 srowan

Duplicate of #5844. Should be fixed in 1.8 beta and the nightlies.

DanielRosenwasser avatar Feb 01 '16 04:02 DanielRosenwasser