* Whether `specifier`, resolving to `file` from `ref`'s file, names a module of * a package this repository holds: a workspace member or a path dependency. * That module is implemented here, and a `declare module` of its name only * describes it to the type checker: react's ESLint plugin stubs *
(specifier: string, file: string | null, ref: UnresolvedRef, context: ResolutionContext)
| 3548 | * `vscode` for its test runner. |
| 3549 | */ |
| 3550 | function isRepositoryModule(specifier: string, file: string | null, ref: UnresolvedRef, context: ResolutionContext): boolean { |
| 3551 | if (file === null || isDeclarationFile(file)) return false; |
| 3552 | const workspaces = context.getWorkspacePackages?.(); |
| 3553 | return !!workspaces && workspaceImportTargets(specifier, workspaces, ref.filePath) !== null; |
| 3554 | } |
| 3555 | |
| 3556 | /** |
| 3557 | * What an import of `want` from `source` names, `file` being where `source` |
no test coverage detected