(search, referenceSymbol, referenceLocation, state)
| 138832 | return !!(modifierFlags & 32 /* ModifierFlags.Static */); |
| 138833 | } |
| 138834 | function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { |
| 138835 | var checker = state.checker; |
| 138836 | return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, |
| 138837 | /*onlyIncludeBindingElementAtReferenceLocation*/ state.options.use !== 2 /* FindReferencesUse.Rename */ || !!state.options.providePrefixAndSuffixTextForRename, function (sym, rootSymbol, baseSymbol, kind) { |
| 138838 | // check whether the symbol used to search itself is just the searched one. |
| 138839 | if (baseSymbol) { |
| 138840 | // static method/property and instance method/property might have the same name. Only check static or only check instance. |
| 138841 | if (isStaticSymbol(referenceSymbol) !== isStaticSymbol(baseSymbol)) { |
| 138842 | baseSymbol = undefined; |
| 138843 | } |
| 138844 | } |
| 138845 | return search.includes(baseSymbol || rootSymbol || sym) |
| 138846 | // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. |
| 138847 | ? { symbol: rootSymbol && !(ts.getCheckFlags(sym) & 6 /* CheckFlags.Synthetic */) ? rootSymbol : sym, kind: kind } |
| 138848 | : undefined; |
| 138849 | }, |
| 138850 | /*allowBaseTypes*/ function (rootSymbol) { |
| 138851 | return !(search.parents && !search.parents.some(function (parent) { return explicitlyInheritsFrom(rootSymbol.parent, parent, state.inheritsFromCache, checker); })); |
| 138852 | }); |
| 138853 | } |
| 138854 | /** |
| 138855 | * Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations |
| 138856 | * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class |
no test coverage detected