import type { JSONSchema } from "./types.js";
type SchemaPropertyType = "string" | "number" | "integer" | "boolean" | "object" | "array";
interface SchemaPropertyDef {
    type: SchemaPropertyType;
    description?: string;
    optional?: boolean;
    [keyword: string]: unknown;
}
type SchemaDefinition = Record<string, SchemaPropertyDef>;
type InferType<T extends SchemaPropertyType> = T extends "string" ? string : T extends "number" | "integer" ? number : T extends "boolean" ? boolean : T extends "object" ? Record<string, unknown> : T extends "array" ? unknown[] : never;
type InferSchema<T extends SchemaDefinition> = {
    [K in keyof T as T[K]["optional"] extends true ? never : K]: InferType<T[K]["type"]>;
} & {
    [K in keyof T as T[K]["optional"] extends true ? K : never]?: InferType<T[K]["type"]>;
};
export interface TypedSchema<T> extends JSONSchema {
    __type?: T;
}
export declare function defineSchema<T extends SchemaDefinition>(definition: T): TypedSchema<InferSchema<T>>;
export {};
