import { ErrorInfo } from './report.js'; /** Code stamped on every type-check diagnostic so the report/hints can key on it. */ export declare const TYPECHECK_CODE = "TYPECHECK"; /** * Read `pkg.exports['.'].import.`, falling back to `pkg.exports['.'].` — the * two shapes a conditional exports map uses for a subpath's declared entry (types, an * ESM default, etc). Shared with `esmEntryOf` in preview/evaluate.ts, which resolves the * same map for a different key. */ export declare function exportsField(exportsValue: unknown, key: string): string | undefined; export declare function packageRootOf(startDir: string, name: string): string | undefined; export interface TypecheckResult { /** True when the part has no type errors (or the check was skipped because types were unresolvable). */ ok: boolean; errors: ErrorInfo[]; } /** * Type-check a single `.brep.ts` part against the bundled (or local) `brepjs` declarations. * * Uses a synthetic in-memory program: a `paths` mapping points the bare `brepjs` specifier at * the resolved `.d.ts`, so the part can be checked without a real install or tsconfig. If the * `brepjs` types cannot be resolved, the check is skipped (ok:true, no errors) rather than * failing — `--check` should never be worse than not passing it. */ export declare function typecheckPart(partPath: string, toolDir?: string): TypecheckResult;