/** * TypeScript-compiler-API helper for tests that need to verify generated output actually * TYPECHECKS, not just that it contains the right substrings. Complements the in-memory * compileFiles helper in packages/openapi-zod-ts/src/__tests__/helpers.ts (not imported * directly: it lives in a sibling package's test-only sources, outside its public API, and * that helper never needed real node_modules resolution since openapi-zod-ts client output * has zero runtime deps). * * Unlike an in-memory virtual filesystem, this writes files to a REAL temp directory nested * inside this package (not os.tmpdir()) so that Node's module resolution, walking up from * the temp directory, finds this package's real node_modules (zod, hono, express, fastify, * fastify-type-provider-zod) and resolves their real .d.ts files. * * Import with the .js extension as required by NodeNext module resolution: * import { compileGeneratedFiles } from './ts-compile-helpers.js' */ import ts from 'typescript'; /** * Write `files` (keyed by relative path, e.g. 'router.ts', '_shared/errors.ts') into a fresh * temp directory under this package, compile them with the real TypeScript compiler, and * return only the diagnostics that belong to those files (node_modules/lib.d.ts excluded). * Always cleans up the temp directory before returning, even on failure. */ export declare function compileGeneratedFiles(files: Record): readonly ts.Diagnostic[]; /** * Assert that a TypeScript compilation produced no diagnostics. Throws a descriptive * error listing all messages when diagnostics are present. * * @param diagnostics - result from compileGeneratedFiles * @param context - short label for the error message, e.g. "hono router + service (#377)" */ export declare function assertNoTsDiagnostics(diagnostics: readonly ts.Diagnostic[], context: string): void; //# sourceMappingURL=ts-compile-helpers.d.ts.map