The declaration `export default NAME` names in this file (see FileExportIndex.defaultBinding).
(filePath: string, idx: FileExportIndex, context: ResolutionContext)
| 165 | |
| 166 | /** The declaration `export default NAME` names in this file (see FileExportIndex.defaultBinding). */ |
| 167 | function defaultExportBindingNode(filePath: string, idx: FileExportIndex, context: ResolutionContext): Node | undefined { |
| 168 | if (idx.defaultBinding === undefined) { |
| 169 | const bound = defaultExportBinding(filePath, context); |
| 170 | idx.defaultBinding = |
| 171 | bound === null |
| 172 | ? null |
| 173 | : (nodesInFileNamed(filePath, bound, context) |
| 174 | .filter((n) => DEFAULT_BINDING_KINDS.has(n.kind)) |
| 175 | .sort((a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn)[0] ?? null); |
| 176 | } |
| 177 | return idx.defaultBinding ?? undefined; |
| 178 | } |
| 179 | |
| 180 | /** What this file exports as `name`: an exported declaration, else a local export clause's binding. */ |
| 181 | function exportedByName(filePath: string, idx: FileExportIndex, name: string, context: ResolutionContext): Node | undefined { |
no test coverage detected