/**
 * TypeScript compiler context for schema generation.
 *
 * Wraps `typescript-json-schema`'s program/checker/generator triple so
 * other introspection helpers can resolve named types into JSON Schemas
 * without each carrying its own copy of the compiler setup.
 *
 * The CLI's `cli-schema.d.ts` is always injected as the first file so
 * built-in helper types are visible to the generator.
 */
import type { JSONSchema } from '../types';
export type SchemaContext = {
    program: any;
    checker: any;
    generator: any;
};
/**
 * Build a `SchemaContext` from a list of source files.
 *
 * ASSUMES:
 *   - `files` are absolute paths (`.ts` or `.tsx`).
 *   - The TS compiler can read them with the default options below.
 *
 * RETURNS: an opaque context that callers pass to
 * `findTypeDeclaration` and `buildSchemaForType`. The generator inside
 * comes from `typescript-json-schema` and respects `strictNullChecks`,
 * `noExtraProps: true`, and `ignoreErrors: true` (so partially-broken
 * files still yield best-effort schemas).
 */
export declare const createSchemaContext: (files: string[]) => SchemaContext;
/**
 * Find an interface or type-alias declaration by name across all
 * source files in the program.
 *
 * ASSUMES: `program` was built by `createSchemaContext` (i.e. has the
 * relevant files loaded).
 *
 * RETURNS: `{ symbol, declaration }` for the first matching
 * InterfaceDeclaration or TypeAliasDeclaration; `null` if not found.
 *
 * ALGORITHM: linear walk over every non-`.d.ts` source file, DFS into
 * the AST. Returns at first hit; declaration files are skipped because
 * we want user-declared types only.
 */
export declare const findTypeDeclaration: (program: any, checker: any, typeName: string) => {
    symbol: any;
    declaration: any;
} | null;
/**
 * Build a JSON Schema for a named TS type (interface or type alias).
 *
 * ASSUMES: `typeName` is the identifier name of a declared type
 * reachable from any source file in the context.
 *
 * RETURNS:
 *   - the JSON Schema produced by `typescript-json-schema`, then
 *     post-processed by `patchSchemaForType` so that special types like
 *     `CSSProperties` collapse to `{ type: "object", additionalProperties: true }`.
 *   - `null` if the generator fails or the type isn't found.
 *
 * ALGORITHM:
 *   1. `generator.getSchemaForSymbol(typeName)` produces the raw schema.
 *   2. `findTypeDeclaration` locates the declaration node so the
 *      post-processor can walk it with the checker.
 *   3. `patchSchemaForType` mutates the schema to fix known
 *      `typescript-json-schema` quirks (CSSProperties, etc.).
 */
export declare const buildSchemaForType: (ctx: SchemaContext, typeName: string) => JSONSchema | null;
//# sourceMappingURL=schemaContext.d.ts.map