MCPcopy Index your code
hub / github.com/nodejs/node / updateFieldDeclaration

Function updateFieldDeclaration

test/fixtures/snapshot/typescript.js:158197–158207  ·  view source on GitHub ↗
(changeTracker, file, declaration, type, fieldName, modifiers)

Source from the content-addressed store, hash-verified

158195 changeTracker.replacePropertyAssignment(file, declaration, assignment);
158196 }
158197 function updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) {
158198 if (ts.isPropertyDeclaration(declaration)) {
158199 updatePropertyDeclaration(changeTracker, file, declaration, type, fieldName, modifiers);
158200 }
158201 else if (ts.isPropertyAssignment(declaration)) {
158202 updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName);
158203 }
158204 else {
158205 changeTracker.replaceNode(file, declaration, ts.factory.updateParameterDeclaration(declaration, declaration.decorators, modifiers, declaration.dotDotDotToken, ts.cast(fieldName, ts.isIdentifier), declaration.questionToken, declaration.type, declaration.initializer));
158206 }
158207 }
158208 function insertAccessor(changeTracker, file, accessor, declaration, container) {
158209 ts.isParameterPropertyDeclaration(declaration, declaration.parent) ? changeTracker.insertMemberAtStart(file, container, accessor) :
158210 ts.isPropertyAssignment(declaration) ? changeTracker.insertNodeAfterComma(file, declaration, accessor) :

Callers 1

Tested by

no test coverage detected