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

Function getStatementsOrClassElements

test/fixtures/snapshot/typescript.js:161183–161200  ·  view source on GitHub ↗
(scope)

Source from the content-addressed store, hash-verified

161181 }
161182 }
161183 function getStatementsOrClassElements(scope) {
161184 if (ts.isFunctionLikeDeclaration(scope)) {
161185 var body = scope.body; // TODO: GH#18217
161186 if (ts.isBlock(body)) {
161187 return body.statements;
161188 }
161189 }
161190 else if (ts.isModuleBlock(scope) || ts.isSourceFile(scope)) {
161191 return scope.statements;
161192 }
161193 else if (ts.isClassLike(scope)) {
161194 return scope.members;
161195 }
161196 else {
161197 ts.assertType(scope);
161198 }
161199 return ts.emptyArray;
161200 }
161201 /**
161202 * If `scope` contains a function after `minPos`, then return the first such function.
161203 * Otherwise, return `undefined`.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…