* The value a file declares beside a type of the same name — `export * function Ok()` beside `export interface Ok`, a class merged with an * interface — which a call or `new` written with the name reaches. The * first by position; null when the file declares none.
(type: Node)
| 5159 | * first by position; null when the file declares none. |
| 5160 | */ |
| 5161 | private sameNamedValueOfType(type: Node): Node | null { |
| 5162 | return this.context |
| 5163 | .getNodesInFile(type.filePath) |
| 5164 | .filter((n) => n.name === type.name && TYPE_COMPANION_VALUE_KINDS.has(n.kind)) |
| 5165 | .sort((a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn)[0] ?? null; |
| 5166 | } |
| 5167 | |
| 5168 | private sameNamedTypeOfValue(value: Node): Node | null { |
| 5169 | if (value.kind !== 'constant' && value.kind !== 'variable') return null; |
no test coverage detected