(referenceLocation, relatedSymbol, state)
| 138318 | } |
| 138319 | } |
| 138320 | function addReference(referenceLocation, relatedSymbol, state) { |
| 138321 | var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line no-in-operator |
| 138322 | // if rename symbol from default export anonymous function, for example `export default function() {}`, we do not need to add reference |
| 138323 | if (state.options.use === 2 /* FindReferencesUse.Rename */ && referenceLocation.kind === 88 /* SyntaxKind.DefaultKeyword */) { |
| 138324 | return; |
| 138325 | } |
| 138326 | var addRef = state.referenceAdder(symbol); |
| 138327 | if (state.options.implementations) { |
| 138328 | addImplementationReferences(referenceLocation, addRef, state); |
| 138329 | } |
| 138330 | else { |
| 138331 | addRef(referenceLocation, kind); |
| 138332 | } |
| 138333 | } |
| 138334 | /** Adds references when a constructor is used with `new this()` in its own class and `super()` calls in subclasses. */ |
| 138335 | function addConstructorReferences(referenceLocation, sourceFile, search, state) { |
| 138336 | if (ts.isNewExpressionTarget(referenceLocation)) { |
no test coverage detected