mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Use visitNode (#18059)
This commit is contained in:
parent
e73b10a304
commit
a32d99dfc8
@ -430,11 +430,8 @@ namespace ts {
|
||||
*/
|
||||
function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) {
|
||||
if (currentModuleInfo.exportEquals) {
|
||||
const expressionResult = importCallExpressionVisitor(currentModuleInfo.exportEquals.expression);
|
||||
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, importCallExpressionVisitor);
|
||||
if (expressionResult) {
|
||||
if (expressionResult instanceof Array) {
|
||||
return Debug.fail("export= expression should never be replaced with multiple expressions!");
|
||||
}
|
||||
if (emitAsReturn) {
|
||||
const statement = createReturn(expressionResult);
|
||||
setTextRange(statement, currentModuleInfo.exportEquals);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user