import type { Diagnostic, EsmxDeclaration } from './types'; /** Package facts the resolver needs, read from a package root directory. */ export interface PackageRecord { name: string; version: string; root: string; private: boolean; dependencies: Record; peerDependencies: Record; devDependencies: Record; declaration: EsmxDeclaration | null; diagnostics: Diagnostic[]; } export interface ReadDeclarationResult extends PackageRecord { declaration: EsmxDeclaration; } /** * Reads a package root's package.json into a PackageRecord, whether or not * it carries an `esmx` declaration. Returns null when no package.json can * be read. */ export declare function readPackageRecord(packageDir: string): PackageRecord | null; /** * Reads a package's `esmx` declaration. Returns null when the package has * no `esmx` field (legacy module) or no readable package.json. Schema * violations are reported in `diagnostics` with the valid remainder kept. */ export declare function readDeclaration(packageDir: string): ReadDeclarationResult | null;