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

Function checkMembersForOverrideModifier

test/fixtures/snapshot/typescript.js:84197–84221  ·  view source on GitHub ↗
(node, type, typeWithThis, staticType)

Source from the content-addressed store, hash-verified

84195 }
84196 }
84197 function checkMembersForOverrideModifier(node, type, typeWithThis, staticType) {
84198 var baseTypeNode = ts.getEffectiveBaseTypeNode(node);
84199 var baseTypes = baseTypeNode && getBaseTypes(type);
84200 var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
84201 var baseStaticType = getBaseConstructorTypeOfClass(type);
84202 var _loop_30 = function (member) {
84203 if (ts.hasAmbientModifier(member)) {
84204 return "continue";
84205 }
84206 if (ts.isConstructorDeclaration(member)) {
84207 ts.forEach(member.parameters, function (param) {
84208 if (ts.isParameterPropertyDeclaration(param, member)) {
84209 checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, param,
84210 /* memberIsParameterProperty */ true);
84211 }
84212 });
84213 }
84214 checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member,
84215 /* memberIsParameterProperty */ false);
84216 };
84217 for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
84218 var member = _a[_i];
84219 _loop_30(member);
84220 }
84221 }
84222 /**
84223 * @param member Existing member node to be checked.
84224 * Note: `member` cannot be a synthetic node.

Callers 1

Calls 5

getBaseTypesFunction · 0.85
getTypeWithThisArgumentFunction · 0.85
_loop_30Function · 0.85
firstMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…