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

Function visitMethodDeclaration

test/fixtures/snapshot/typescript.js:93231–93247  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

93229 return ts.startOnNewLine(ts.removeAllComments(ts.setTextRange(ts.setOriginalNode(factory.createExpressionStatement(factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createThis(), propertyName), node.name), localName)), node), ts.moveRangePos(node, -1))));
93230 }
93231 function visitMethodDeclaration(node) {
93232 if (!shouldEmitFunctionLikeDeclaration(node)) {
93233 return undefined;
93234 }
93235 var updated = factory.updateMethodDeclaration(node,
93236 /*decorators*/ undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node),
93237 /*questionToken*/ undefined,
93238 /*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
93239 /*type*/ undefined, ts.visitFunctionBody(node.body, visitor, context));
93240 if (updated !== node) {
93241 // While we emit the source map for the node after skipping decorators and modifiers,
93242 // we need to emit the comments for the original range.
93243 ts.setCommentRange(updated, node);
93244 ts.setSourceMapRange(updated, ts.moveRangePastDecorators(node));
93245 }
93246 return updated;
93247 }
93248 /**
93249 * Determines whether to emit an accessor declaration. We should not emit the
93250 * declaration if it does not have a body and is abstract.

Callers 2

visitTypeScriptFunction · 0.85
visitorWorkerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…