Does the reference's own file declare a function (or a const holding one) by that name?
(ref: UnresolvedRef, context: ResolutionContext)
| 325 | |
| 326 | /** Does the reference's own file declare a function (or a const holding one) by that name? */ |
| 327 | function declaresOwnFunction(ref: UnresolvedRef, context: ResolutionContext): boolean { |
| 328 | return context |
| 329 | .getNodesInFile(ref.filePath) |
| 330 | .some((n) => n.name === ref.referenceName && (n.kind === 'function' || n.kind === 'constant' || n.kind === 'variable')); |
| 331 | } |
| 332 | |
| 333 | /** |
| 334 | * Check if string is PascalCase |
no test coverage detected