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

Function getFirstDeclaration

test/fixtures/snapshot/typescript.js:161090–161102  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

161088 }
161089 }
161090 function getFirstDeclaration(type) {
161091 var firstDeclaration;
161092 var symbol = type.symbol;
161093 if (symbol && symbol.declarations) {
161094 for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
161095 var declaration = _a[_i];
161096 if (firstDeclaration === undefined || declaration.pos < firstDeclaration.pos) {
161097 firstDeclaration = declaration;
161098 }
161099 }
161100 }
161101 return firstDeclaration;
161102 }
161103 function compareTypesByDeclarationOrder(_a, _b) {
161104 var type1 = _a.type, declaration1 = _a.declaration;
161105 var type2 = _b.type, declaration2 = _b.declaration;

Callers 1

extractFunctionInScopeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…