Closed
Description
var x;
export { x as default };
This code should be legal, but I get "Identifier expected" on the default
keyword. The grammar says that this can be an IdentifierName.
Also, this crashes the compiler:
if (specifier.name.text === "default") {
^
TypeError: Cannot read property 'text' of undefined
at ts.forEach.exportDefault (built/local/tsc.js:22592:47)
at Object.forEach (built/local/tsc.js:602:30)
at _i (built/local/tsc.js:22591:28)
at Object.forEach (built/local/tsc.js:602:30)
at createExternalModuleInfo (built/local/tsc.js:22589:20)
at emitAMDModule (built/local/tsc.js:22639:17)
at emitSourceFileNode (built/local/tsc.js:22777:25)
at emitJavaScriptWorker (built/local/tsc.js:22987:32)
at emitNodeWithoutSourceMap (built/local/tsc.js:22804:17)
at emitSourceFile (built/local/tsc.js:19555:17)