/third_party/typescript/src/services/refactors/ |
D | convertExport.ts | 127 …changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDeclaration(/*modifiers*/… 146 …changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefine… 183 changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); 189 … changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text)); 199 … changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); 217 …changes.replaceNode(importingSourceFile, parent, factory.createImportTypeNode(importTypeNode.argum… 229 changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); 236 changes.replaceNode(importingSourceFile, parent.parent, defaultImport); 249 …changes.replaceNode(importingSourceFile, parent, makeExportSpecifier("default", parent.name.text));
|
D | convertImport.ts | 133 …changes.replaceNode(sourceFile, propertyAccessOrQualifiedName, factory.createIdentifier(importName… 147 …changes.replaceNode(sourceFile, importDecl, updateImport(importDecl, usedAsNamespaceOrDefault ? fa… 200 … changes.replaceNode(sourceFile, id.parent, factory.createPropertyAssignment(id.text, access)); 206 changes.replaceNode(sourceFile, id, access); 211 changes.replaceNode(sourceFile, toConvert, shouldUseDefault
|
D | convertArrowFunctionOrFunctionExpression.ts | 207 return textChanges.ChangeTracker.with(context, t => t.replaceNode(file, func, newNode)); 222 … return textChanges.ChangeTracker.with(context, t => t.replaceNode(file, statement, newNode)); 248 return textChanges.ChangeTracker.with(context, t => t.replaceNode(file, func, newNode));
|
D | extractType.ts | 209 …changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id =… 224 …changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id =… 250 …changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id =…
|
/third_party/typescript/src/services/codefixes/ |
D | convertToEsModule.ts | 30 …changes.replaceNode(importingFile, importNode, makeImport(importNode.name, /*namedImports*/ undefi… 34 …changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesiz… 62 changes.replaceNode(sourceFile, original, replacement); 98 … changes.replaceNode(sourceFile, node, factory.createIdentifier(exports.get(text) || text)); 136 …changes.replaceNode(sourceFile, statement, makeImport(/*name*/ undefined, /*namedImports*/ undefin… 379 … ? getSynthesizedDeepClonesWithReplacements(nodeOrNodes, /*includeTrivia*/ true, replaceNode) 380 … : getSynthesizedDeepCloneWithReplacements(nodeOrNodes, /*includeTrivia*/ true, replaceNode); 382 function replaceNode(original: Node) {
|
D | addMissingAwait.ts | 234 …changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createTok… 248 changeTracker.replaceNode(sourceFile, side, newNode); 258 changeTracker.replaceNode( 271 …changeTracker.replaceNode(sourceFile, insertionSite, factory.createParenthesizedExpression(factory… 281 …changeTracker.replaceNode(sourceFile, insertionSite, factory.createAwaitExpression(insertionSite));
|
D | fixStrictClassInitialization.ts | 79 changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property); 95 changeTracker.replaceNode(sourceFile, info.type, unionTypeNode); 120 changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property);
|
D | fixSpelling.ts | 108 changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion)); 111 …changes.replaceNode(sourceFile, node.parent, factory.createElementAccessExpression(node.parent.exp… 115 changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion));
|
D | generateAccessors.ts | 194 changeTracker.replaceNode(file, declaration, property); 210 changeTracker.replaceNode(file, declaration, 229 … changeTracker.replaceNode(file, node.argumentExpression, factory.createStringLiteral(fieldName)); 232 changeTracker.replaceNode(file, node.name, factory.createIdentifier(fieldName));
|
D | fixInvalidImportSyntax.ts | 28 …const changes = textChanges.ChangeTracker.with(context, t => t.replaceNode(sourceFile, node, repla… 90 …const changes = textChanges.ChangeTracker.with(context, t => t.replaceNode(sourceFile, expr, facto…
|
D | returnValueCorrect.ts | 210 changes.replaceNode(sourceFile, statement, factory.createReturnStatement(expression), { 222 changes.replaceNode(sourceFile, declaration.body, newBody); 226 …changes.replaceNode(sourceFile, declaration.body, factory.createParenthesizedExpression(expression…
|
D | useBigintLiteral.ts | 31 changeTracker.replaceNode(sourceFile, numericLiteral, factory.createBigIntLiteral(newText));
|
D | addMissingInvocationForDecorator.ts | 20 changeTracker.replaceNode(sourceFile, decorator.expression, replacement);
|
D | fixPropertyAssignment.ts | 22 …changes.replaceNode(sourceFile, node, factory.createPropertyAssignment(node.name, node.objectAssig…
|
D | fixAddMissingNewOperator.ts | 21 changes.replaceNode(sourceFile, call, newExpression);
|
D | removeUnnecessaryAwait.ts | 41 changeTracker.replaceNode(sourceFile, expressionToReplace, awaitExpression.expression);
|
D | addNameToNamelessParameter.ts | 34 changeTracker.replaceNode(sourceFile, param, replacement);
|
D | fixAddModuleReferTypeMissingTypeof.ts | 29 changes.replaceNode(sourceFile, importType, newTypeNode);
|
D | fixExpectedComma.ts | 44 changes.replaceNode(sourceFile, node, newNode);
|
D | fixNoPropertyAccessFromIndexSignature.ts | 24 changes.replaceNode(
|
D | splitTypeOnlyImport.ts | 30 changes.replaceNode(context.sourceFile, importDeclaration, factory.updateImportDeclaration(
|
D | correctQualifiedNameToIndexedAccessType.ts | 34 changeTracker.replaceNode(sourceFile, qualifiedName, replacement);
|
D | addConvertToUnknownForNonOverlappingTypes.ts | 26 changeTracker.replaceNode(sourceFile, assertion.expression, replacement);
|
D | convertLiteralTypeToMappedType.ts | 50 changes.replaceNode(sourceFile, container, factory.createMappedTypeNode(
|
/third_party/typescript/src/testRunner/unittests/services/ |
D | textChanges.ts | 237 changeTracker.replaceNode(sourceFile, findChild("y", sourceFile), newNode); 250 …changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTest… 253 …changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTest… 256 …changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTest… 259 …changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTest… 262 …changeTracker.replaceNode(sourceFile, findVariableStatementContaining("x", sourceFile), createTest…
|