* 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)
| 3969 | * `vscode` for its test runner. |
| 3970 | */ |
| 3971 | function isRepositoryModule(specifier: string, file: string | null, ref: UnresolvedRef, context: ResolutionContext): boolean { |
| 3972 | if (file === null || isDeclarationFile(file)) return false; |
| 3973 | const workspaces = context.getWorkspacePackages?.(); |
| 3974 | return !!workspaces && workspaceImportTargets(specifier, workspaces, ref.filePath) !== null; |
| 3975 | } |
| 3976 | |
| 3977 | /** |
| 3978 | * What an import of `want` from `source` names, `file` being where `source` |
no test coverage detected