/** * Import-target resolver for JavaScript. * * Delegates to the TypeScript `resolveTsTarget` standard-strategy resolver * with `language: SupportedLanguages.JavaScript` so the resolver tries * `.js` / `.jsx` extensions in addition to (or instead of) `.ts` / `.tsx`. * * The `TsResolveContext.language` flag already exists in `import-target.ts` * and the resolver (`resolveImportPath`) already branches on it — this * adapter just wires the right value in. * * CJS `require()` calls reference the same module-path strings as ESM * `import` statements, so the resolver handles them uniformly without any * CJS-specific logic here. * * No `tsconfig.json` path-alias support (JavaScript projects don't use * `tsconfig.json` compilerOptions.paths in general). Projects that DO use * tsconfig-based aliases alongside JavaScript can still resolve via the * standard extension-suffix fallback; the alias branch is a no-op when * `tsconfigPaths` is null. */ import { type TsResolveContext } from '../typescript/import-target.js'; export type JsResolveContext = TsResolveContext; /** * Build a memoized `resolveImportTarget` adapter for JavaScript. * Caches the derived arrays and per-pass resolve cache across * `resolveImportTarget` calls within a single workspace pass. */ export declare function makeJsResolveImportTarget(): (targetRaw: string, fromFile: string, allFilePaths: ReadonlySet, resolutionConfig?: unknown) => string | readonly string[] | null;