* 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)
| 3753 | * short of a module of the repository's own packages. |
| 3754 | */ |
| 3755 | function declaredModuleFile(specifier: string, ref: UnresolvedRef, context: ResolutionContext): Node | undefined { |
| 3756 | if (!isBareModuleSpecifier(specifier, ref.language)) return undefined; |
| 3757 | const declaring = findAmbientModuleFile(specifier, ref.filePath, context); |
| 3758 | if (!declaring) return undefined; |
| 3759 | return isRepositoryModule(specifier, resolveImportPath(specifier, ref.filePath, ref.language, context), ref, context) ? undefined : declaring; |
| 3760 | } |
| 3761 | |
| 3762 | /** |
| 3763 | * Reference kinds the extractor records by a qualified name's last part: a |
no test coverage detected