import { type CdnClient, type PackageRanges, type PackageService, type VersionResolver } from 'typebulb/resolver'; import { VirtualFs } from './virtualFs.js'; import type { DtsCache } from './cache.js'; import type { ResolvedTypeDef } from './typeProvider.js'; export type { TypeFetchResult, ModuleShim, ResolvedTypeFile, ResolvedTypeDef } from './typeProvider.js'; export interface DtsResolverDeps { cache: DtsCache; cdnClient: CdnClient; versionResolver: VersionResolver; packageService: PackageService; } /** * Resolves .d.ts files for a bulb's import set. Each instance owns its own * providers, in-flight map, virtual filesystem, and fetch closure. * * Web client wires Dexie-backed cache + typebulb/resolver web bits. * CLI wires FS-backed cache + typebulb/resolver Node bits. */ export declare class DtsResolver { private readonly inFlight; private readonly scanner; private readonly cache; private readonly cdnClient; private readonly versionResolver; private readonly packageService; private readonly fetchDts; private readonly typescriptProvider; private readonly definitelyTypedProvider; readonly virtualFs: VirtualFs; constructor(deps: DtsResolverDeps); private withInFlight; /** Reset in-flight requests, e.g. when ranges change reactively in the web client. */ invalidate(): void; private pushFileIfNew; private createStubDef; private fetchViaProviders; private fetchRootDts; private extractPackageRootUrl; private toVirtualPath; private computeEntryPath; private expandRelativeRefs; /** * Resolve one relative ref by trying each declaration-candidate URL in turn. * Exits as soon as one candidate succeeds, but the caller continues to the * next ref. (Subtle: this MUST be a separate function — folding it into the * caller's loop body lets `return` short-circuit all remaining refs.) */ private tryRelativeRef; private isDifferentPackage; private ambientlyDeclares; private markFileAmbient; private prefetchBareDeps; private prefetchBareDepsRecursive; resolve(code: string, ranges: PackageRanges, additionalPackages?: string[]): Promise; private resolveOne; private buildDefFromContent; } //# sourceMappingURL=dtsResolver.d.ts.map