Allow Source Mapping inside destructuring assignment (#37298)

* Add support for source maps inside of destructured code

* Adds tests for the source maps inside destructured code
This commit is contained in:
Orta
2020-04-03 17:23:02 -04:00
committed by GitHub
parent 7317292782
commit 20ecbb0f46
113 changed files with 28039 additions and 14657 deletions

View File

@@ -107,9 +107,6 @@ namespace ts {
return aggregateTransformFlags(inlineExpressions(expressions!)) || createOmittedExpression();
function emitExpression(expression: Expression) {
// NOTE: this completely disables source maps, but aligns with the behavior of
// `emitAssignment` in the old emitter.
setEmitFlags(expression, EmitFlags.NoNestedSourceMaps);
aggregateTransformFlags(expression);
expressions = append(expressions, expression);
}
@@ -234,9 +231,6 @@ namespace ts {
);
variable.original = original;
setTextRange(variable, location);
if (isIdentifier(name)) {
setEmitFlags(variable, EmitFlags.NoNestedSourceMaps);
}
aggregateTransformFlags(variable);
declarations.push(variable);
}