mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 01:43:59 -05:00
Use visitNode (#18059)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user