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

Function getImplementsTypes

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

Source from the content-addressed store, hash-verified

57144 return type.resolvedBaseConstructorType;
57145 }
57146 function getImplementsTypes(type) {
57147 var resolvedImplementsTypes = ts.emptyArray;
57148 if (type.symbol.declarations) {
57149 for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
57150 var declaration = _a[_i];
57151 var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration);
57152 if (!implementsTypeNodes)
57153 continue;
57154 for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) {
57155 var node = implementsTypeNodes_1[_b];
57156 var implementsType = getTypeFromTypeNode(node);
57157 if (!isErrorType(implementsType)) {
57158 if (resolvedImplementsTypes === ts.emptyArray) {
57159 resolvedImplementsTypes = [implementsType];
57160 }
57161 else {
57162 resolvedImplementsTypes.push(implementsType);
57163 }
57164 }
57165 }
57166 }
57167 }
57168 return resolvedImplementsTypes;
57169 }
57170 function reportCircularBaseType(node, type) {
57171 error(node, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, /*enclosingDeclaration*/ undefined, 2 /* TypeFormatFlags.WriteArrayAsGenericType */));
57172 }

Callers 1

serializeAsClassFunction · 0.85

Calls 3

getTypeFromTypeNodeFunction · 0.85
isErrorTypeFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…