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

Function getNodeToInsertFunctionBefore

test/fixtures/snapshot/typescript.js:161205–161209  ·  view source on GitHub ↗

* If `scope` contains a function after `minPos`, then return the first such function. * Otherwise, return `undefined`.

(minPos, scope)

Source from the content-addressed store, hash-verified

161203 * Otherwise, return `undefined`.
161204 */
161205 function getNodeToInsertFunctionBefore(minPos, scope) {
161206 return ts.find(getStatementsOrClassElements(scope), function (child) {
161207 return child.pos >= minPos && ts.isFunctionLikeDeclaration(child) && !ts.isConstructorDeclaration(child);
161208 });
161209 }
161210 function getNodeToInsertPropertyBefore(maxPos, scope) {
161211 var members = scope.members;
161212 ts.Debug.assert(members.length > 0, "Found no members"); // There must be at least one child, since we extracted from one.

Callers 1

extractFunctionInScopeFunction · 0.85

Calls 2

findMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…