* The file that declares `specifier` as a module, for `ref`'s file (see * ./ambient-modules): the module, whatever file the specifier resolves to, * short of a module of the repository's own packages.
(specifier: string, ref: UnresolvedRef, context: ResolutionContext)
| 3580 | * short of a module of the repository's own packages. |
| 3581 | */ |
| 3582 | function declaredModuleFile(specifier: string, ref: UnresolvedRef, context: ResolutionContext): Node | undefined { |
| 3583 | if (!isBareModuleSpecifier(specifier, ref.language)) return undefined; |
| 3584 | const declaring = findAmbientModuleFile(specifier, ref.filePath, context); |
| 3585 | if (!declaring) return undefined; |
| 3586 | return isRepositoryModule(specifier, resolveImportPath(specifier, ref.filePath, ref.language, context), ref, context) ? undefined : declaring; |
| 3587 | } |
| 3588 | |
| 3589 | /** |
| 3590 | * Reference kinds the extractor records by a qualified name's last part: a |
no test coverage detected