MCPcopy Create free account
hub / github.com/nodejs/node / getSuggestedLibForNonExistentName

Function getSuggestedLibForNonExistentName

test/fixtures/snapshot/typescript.js:74941–74952  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

74939 return prop !== undefined && !!prop.valueDeclaration && ts.isStatic(prop.valueDeclaration);
74940 }
74941 function getSuggestedLibForNonExistentName(name) {
74942 var missingName = diagnosticName(name);
74943 var allFeatures = ts.getScriptTargetFeatures();
74944 var libTargets = ts.getOwnKeys(allFeatures);
74945 for (var _i = 0, libTargets_1 = libTargets; _i < libTargets_1.length; _i++) {
74946 var libTarget = libTargets_1[_i];
74947 var containingTypes = ts.getOwnKeys(allFeatures[libTarget]);
74948 if (containingTypes !== undefined && ts.contains(containingTypes, missingName)) {
74949 return libTarget;
74950 }
74951 }
74952 }
74953 function getSuggestedLibForNonExistentProperty(missingProperty, containingType) {
74954 var container = getApparentType(containingType).symbol;
74955 if (!container) {

Callers 1

resolveNameHelperFunction · 0.85

Calls 2

diagnosticNameFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected