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

Function getDeclaringConstructor

test/fixtures/snapshot/typescript.js:56084–56096  ·  view source on GitHub ↗
(symbol)

Source from the content-addressed store, hash-verified

56082 !declaration.initializer && (noImplicitAny || ts.isInJSFile(declaration));
56083 }
56084 function getDeclaringConstructor(symbol) {
56085 if (!symbol.declarations) {
56086 return;
56087 }
56088 for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
56089 var declaration = _a[_i];
56090 var container = ts.getThisContainer(declaration, /*includeArrowFunctions*/ false);
56091 if (container && (container.kind === 171 /* SyntaxKind.Constructor */ || isJSConstructor(container))) {
56092 return container;
56093 }
56094 }
56095 ;
56096 }
56097 /** Create a synthetic property access flow node after the last statement of the file */
56098 function getFlowTypeFromCommonJSExport(symbol) {
56099 var file = ts.getSourceFileOfNode(symbol.declarations[0]);

Calls 1

isJSConstructorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…