Add explanatory comment to FAR call-site

This commit is contained in:
Andrew Casey 2018-01-04 14:28:24 -08:00
parent 1e93967ec4
commit f0d9cb3fbf

View File

@ -510,6 +510,8 @@ namespace ts.FindAllReferences.Core {
/** @param allSearchSymbols set of additinal symbols for use by `includes`. */
createSearch(location: Node, symbol: Symbol, comingFrom: ImportExport | undefined, searchOptions: { text?: string, allSearchSymbols?: Symbol[] } = {}): Search {
// Note: if this is an external module symbol, the name doesn't include quotes.
// Note: getLocalSymbolForExportDefault handles `export default class C {}`, but not `export default C` or `export { C as default }`.
// The other two forms seem to be handled downstream (i.e. special-casing the first form here appears to be intentional).
const {
text = stripQuotes(unescapeLeadingUnderscores((getLocalSymbolForExportDefault(symbol) || symbol).escapedName)),
allSearchSymbols = undefined,