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

Function getEffectiveDeclarationFlags

test/fixtures/snapshot/typescript.js:80901–80916  ·  view source on GitHub ↗
(n, flagsToCheck)

Source from the content-addressed store, hash-verified

80899 return (ts.hasEffectiveModifier(node, 8 /* ModifierFlags.Private */) || ts.isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 16777216 /* NodeFlags.Ambient */);
80900 }
80901 function getEffectiveDeclarationFlags(n, flagsToCheck) {
80902 var flags = ts.getCombinedModifierFlags(n);
80903 // children of classes (even ambient classes) should not be marked as ambient or export
80904 // because those flags have no useful semantics there.
80905 if (n.parent.kind !== 258 /* SyntaxKind.InterfaceDeclaration */ &&
80906 n.parent.kind !== 257 /* SyntaxKind.ClassDeclaration */ &&
80907 n.parent.kind !== 226 /* SyntaxKind.ClassExpression */ &&
80908 n.flags & 16777216 /* NodeFlags.Ambient */) {
80909 if (!(flags & 2 /* ModifierFlags.Ambient */) && !(ts.isModuleBlock(n.parent) && ts.isModuleDeclaration(n.parent.parent) && ts.isGlobalScopeAugmentation(n.parent.parent))) {
80910 // It is nested in an ambient context, which means it is automatically exported
80911 flags |= 1 /* ModifierFlags.Export */;
80912 }
80913 flags |= 2 /* ModifierFlags.Ambient */;
80914 }
80915 return flags & flagsToCheck;
80916 }
80917 function checkFunctionOrConstructorSymbol(symbol) {
80918 addLazyDiagnostic(function () { return checkFunctionOrConstructorSymbolWorker(symbol); });
80919 }

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…