(specifier: string, fromFile: string, context: ResolutionContext)
| 864 | * default import of the package depends on. Undefined when none does. |
| 865 | */ |
| 866 | export function findAmbientModuleFile(specifier: string, fromFile: string, context: ResolutionContext): Node | undefined { |
| 867 | const [mod] = declarationsFor(specifier, fromFile, context); |
| 868 | if (!mod || mod.file === fromFile) return undefined; |
| 869 | return context.getNodesInFile(mod.file).find((n) => n.kind === 'file'); |
| 870 | } |
| 871 | |
| 872 | /** Whether the repository declares `specifier` itself, and its declaration exports `name` (or the default). */ |
| 873 | export function ambientModuleDeclares(specifier: string, name: string, isDefault: boolean, ref: UnresolvedRef, context: ResolutionContext): boolean { |
no test coverage detected