mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Export internal functions needed by dtsBundler.mjs (#52941)
This commit is contained in:
@@ -27,7 +27,6 @@ import {
|
||||
last,
|
||||
map,
|
||||
Node,
|
||||
nullTransformationContext,
|
||||
ParameterDeclaration,
|
||||
PropertyDeclaration,
|
||||
PropertySignature,
|
||||
@@ -144,7 +143,7 @@ function transformJSDocType(node: Node): Node {
|
||||
case SyntaxKind.JSDocTypeLiteral:
|
||||
return transformJSDocTypeLiteral(node as JSDocTypeLiteral);
|
||||
default:
|
||||
const visited = visitEachChild(node, transformJSDocType, nullTransformationContext);
|
||||
const visited = visitEachChild(node, transformJSDocType, /*context*/ undefined);
|
||||
setEmitFlags(visited, EmitFlags.SingleLine);
|
||||
return visited;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,6 @@ import {
|
||||
NodeArray,
|
||||
NodeBuilderFlags,
|
||||
NodeFlags,
|
||||
nullTransformationContext,
|
||||
ObjectFlags,
|
||||
ObjectLiteralExpression,
|
||||
ObjectType,
|
||||
@@ -913,7 +912,7 @@ export function tryGetAutoImportableReferenceFromTypeNode(importTypeNode: TypeNo
|
||||
const typeArguments = visitNodes(node.typeArguments, visit, isTypeNode);
|
||||
return factory.createTypeReferenceNode(qualifier, typeArguments);
|
||||
}
|
||||
return visitEachChild(node, visit, nullTransformationContext);
|
||||
return visitEachChild(node, visit, /*context*/ undefined);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ import {
|
||||
Node,
|
||||
NodeBuilderFlags,
|
||||
NodeFlags,
|
||||
nullTransformationContext,
|
||||
ObjectLiteralElementLike,
|
||||
ParameterDeclaration,
|
||||
positionIsSynthesized,
|
||||
@@ -1648,7 +1647,7 @@ function transformFunctionBody(body: Node, exposedVariableDeclarations: readonly
|
||||
const oldIgnoreReturns = ignoreReturns;
|
||||
ignoreReturns = ignoreReturns || isFunctionLikeDeclaration(node) || isClassLike(node);
|
||||
const substitution = substitutions.get(getNodeId(node).toString());
|
||||
const result = substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, nullTransformationContext);
|
||||
const result = substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, /*context*/ undefined);
|
||||
ignoreReturns = oldIgnoreReturns;
|
||||
return result;
|
||||
}
|
||||
@@ -1662,7 +1661,7 @@ function transformConstantInitializer(initializer: Expression, substitutions: Re
|
||||
|
||||
function visitor(node: Node): VisitResult<Node> {
|
||||
const substitution = substitutions.get(getNodeId(node).toString());
|
||||
return substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, nullTransformationContext);
|
||||
return substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, /*context*/ undefined);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,6 @@ import {
|
||||
normalizePath,
|
||||
NoSubstitutionTemplateLiteral,
|
||||
notImplemented,
|
||||
nullTransformationContext,
|
||||
NumericLiteral,
|
||||
or,
|
||||
OrganizeImports,
|
||||
@@ -3175,7 +3174,7 @@ function getSynthesizedDeepCloneWorker<T extends Node>(node: T, replaceNode?: (n
|
||||
const nodesClone: <T extends Node>(ns: NodeArray<T> | undefined) => NodeArray<T> | undefined = replaceNode
|
||||
? ns => ns && getSynthesizedDeepClonesWithReplacements(ns, /*includeTrivia*/ true, replaceNode)
|
||||
: ns => ns && getSynthesizedDeepClones(ns);
|
||||
const visited = visitEachChild(node, nodeClone, nullTransformationContext, nodesClone, nodeClone);
|
||||
const visited = visitEachChild(node, nodeClone, /*context*/ undefined, nodesClone, nodeClone);
|
||||
|
||||
if (visited === node) {
|
||||
// This only happens for leaf nodes - internal nodes always see their children change.
|
||||
|
||||
Reference in New Issue
Block a user