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

Function checkAssignmentDeclaration

test/fixtures/snapshot/typescript.js:79234–79249  ·  view source on GitHub ↗
(kind, rightType)

Source from the content-addressed store, hash-verified

79232 return isTypeAssignableToKind(left, 2112 /* TypeFlags.BigIntLike */) && isTypeAssignableToKind(right, 2112 /* TypeFlags.BigIntLike */);
79233 }
79234 function checkAssignmentDeclaration(kind, rightType) {
79235 if (kind === 2 /* AssignmentDeclarationKind.ModuleExports */) {
79236 for (var _i = 0, _a = getPropertiesOfObjectType(rightType); _i < _a.length; _i++) {
79237 var prop = _a[_i];
79238 var propType = getTypeOfSymbol(prop);
79239 if (propType.symbol && propType.symbol.flags & 32 /* SymbolFlags.Class */) {
79240 var name = prop.escapedName;
79241 var symbol = resolveName(prop.valueDeclaration, name, 788968 /* SymbolFlags.Type */, undefined, name, /*isUse*/ false);
79242 if ((symbol === null || symbol === void 0 ? void 0 : symbol.declarations) && symbol.declarations.some(ts.isJSDocTypedefTag)) {
79243 addDuplicateDeclarationErrorsForSymbols(symbol, ts.Diagnostics.Duplicate_identifier_0, ts.unescapeLeadingUnderscores(name), prop);
79244 addDuplicateDeclarationErrorsForSymbols(prop, ts.Diagnostics.Duplicate_identifier_0, ts.unescapeLeadingUnderscores(name), symbol);
79245 }
79246 }
79247 }
79248 }
79249 }
79250 function isEvalNode(node) {
79251 return node.kind === 79 /* SyntaxKind.Identifier */ && node.escapedText === "eval";
79252 }

Callers 1

Calls 5

getTypeOfSymbolFunction · 0.85
resolveNameFunction · 0.85
someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…