(sym, kind)
| 138778 | return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol, 4 /* EntryKind.SearchedPropertyFoundLocal */); |
| 138779 | } |
| 138780 | function fromRoot(sym, kind) { |
| 138781 | // If this is a union property: |
| 138782 | // - In populateSearchSymbolsSet we will add all the symbols from all its source symbols in all unioned types. |
| 138783 | // - In findRelatedSymbol, we will just use the union symbol if any source symbol is included in the search. |
| 138784 | // If the symbol is an instantiation from a another symbol (e.g. widened symbol): |
| 138785 | // - In populateSearchSymbolsSet, add the root the list |
| 138786 | // - In findRelatedSymbol, return the source symbol if that is in the search. (Do not return the instantiation symbol.) |
| 138787 | return ts.firstDefined(checker.getRootSymbols(sym), function (rootSymbol) { |
| 138788 | return cbSymbol(sym, rootSymbol, /*baseSymbol*/ undefined, kind) |
| 138789 | // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions |
| 138790 | || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* SymbolFlags.Class */ | 64 /* SymbolFlags.Interface */) && allowBaseTypes(rootSymbol) |
| 138791 | ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, function (base) { return cbSymbol(sym, rootSymbol, base, kind); }) |
| 138792 | : undefined); |
| 138793 | }); |
| 138794 | } |
| 138795 | function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker) { |
| 138796 | var bindingElement = ts.getDeclarationOfKind(symbol, 203 /* SyntaxKind.BindingElement */); |
| 138797 | if (bindingElement && ts.isObjectBindingElementWithoutPropertyName(bindingElement)) { |
no test coverage detected