From the "release-1.8" branch, synced at 05803f5.
Repro:
typescript.transpileModule('var {x} = require("filename");', {
compilerOptions: {
sourceMap: true,
},
});
Stack:
TypeError: Cannot read property 'emittedColumn' of undefined
at encodeLastRecordedSourceMapSpan (third_party/TypeScript/1.8/typescript.js:30112:68)
at emitPos (third_party/TypeScript/1.8/typescript.js:30162:17)
at emitEnd (third_party/TypeScript/1.8/typescript.js:30189:13)
at emitAssignment (third_party/TypeScript/1.8/typescript.js:35090:17)
at emitBindingElement (third_party/TypeScript/1.8/typescript.js:35340:25)
at emitBindingElement (third_party/TypeScript/1.8/typescript.js:35326:33)
at emitDestructuring (third_party/TypeScript/1.8/typescript.js:35139:21)
at emitVariableDeclaration (third_party/TypeScript/1.8/typescript.js:35348:25)
at emitJavaScriptWorker (third_party/TypeScript/1.8/typescript.js:38642:32)
at emitNodeWithoutSourceMap (third_party/TypeScript/1.8/typescript.js:38438:21)
From the "release-1.8" branch, synced at 05803f5.
Repro:
Stack: