(checker, declaration)
| 140043 | containerName: containerName }, ts.FindAllReferences.toContextSpan(textSpan, sourceFile, ts.FindAllReferences.getContextNode(declaration))), { isLocal: !isDefinitionVisible(checker, declaration), isAmbient: !!(declaration.flags & 16777216 /* NodeFlags.Ambient */), unverified: unverified, failedAliasResolution: failedAliasResolution }); |
| 140044 | } |
| 140045 | function isDefinitionVisible(checker, declaration) { |
| 140046 | if (checker.isDeclarationVisible(declaration)) |
| 140047 | return true; |
| 140048 | if (!declaration.parent) |
| 140049 | return false; |
| 140050 | // Variable initializers are visible if variable is visible |
| 140051 | if (ts.hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) |
| 140052 | return isDefinitionVisible(checker, declaration.parent); |
| 140053 | // Handle some exceptions here like arrow function, members of class and object literal expression which are technically not visible but we want the definition to be determined by its parent |
| 140054 | switch (declaration.kind) { |
| 140055 | case 167 /* SyntaxKind.PropertyDeclaration */: |
| 140056 | case 172 /* SyntaxKind.GetAccessor */: |
| 140057 | case 173 /* SyntaxKind.SetAccessor */: |
| 140058 | case 169 /* SyntaxKind.MethodDeclaration */: |
| 140059 | // Private/protected properties/methods are not visible |
| 140060 | if (ts.hasEffectiveModifier(declaration, 8 /* ModifierFlags.Private */)) |
| 140061 | return false; |
| 140062 | // Public properties/methods are visible if its parents are visible, so: |
| 140063 | // falls through |
| 140064 | case 171 /* SyntaxKind.Constructor */: |
| 140065 | case 296 /* SyntaxKind.PropertyAssignment */: |
| 140066 | case 297 /* SyntaxKind.ShorthandPropertyAssignment */: |
| 140067 | case 205 /* SyntaxKind.ObjectLiteralExpression */: |
| 140068 | case 226 /* SyntaxKind.ClassExpression */: |
| 140069 | case 214 /* SyntaxKind.ArrowFunction */: |
| 140070 | case 213 /* SyntaxKind.FunctionExpression */: |
| 140071 | return isDefinitionVisible(checker, declaration.parent); |
| 140072 | default: |
| 140073 | return false; |
| 140074 | } |
| 140075 | } |
| 140076 | function createDefinitionFromSignatureDeclaration(typeChecker, decl, failedAliasResolution) { |
| 140077 | return createDefinitionInfo(decl, typeChecker, decl.symbol, decl, /*unverified*/ false, failedAliasResolution); |
| 140078 | } |
no outgoing calls
no test coverage detected