import type { Schema, Infer } from '../base.ts'; import { SCHEMA_KIND } from '../base.ts'; /** * Schema for nullable values (T | null). * Accepts null or the wrapped schema's type. * * @template T - The wrapped schema type * * @example * ```typescript * const schema = s.nullable(s.string()); * schema.parse('hello'); // 'hello' * schema.parse(null); // null * schema.parse(123); // throws ValidationError * ``` */ export declare class NullableSchema> implements Schema | null, Infer | null> { readonly [SCHEMA_KIND] = "NullableSchema"; readonly schema: T; description?: string; readonly '~standard': { version: 1; vendor: string; validate: (value: unknown) => import("@agentuity/core").StandardSchemaV1.Result | Promise>; types: { input: Infer | null; output: Infer | null; }; }; private parseMethods; constructor(schema: T); describe(description: string): this; optional(): Schema | null | undefined, Infer | null | undefined>; nullable(): this; parse: (this: Schema | null>, value: unknown) => Infer | null; safeParse: (this: Schema | null>, value: unknown) => import("../base.ts").SafeParseResult | null>; } /** * Make a schema nullable (T | null). * * @param schema - The schema to make nullable * * @example * ```typescript * const userSchema = s.object({ * name: s.string(), * bio: s.nullable(s.string()) * }); * ``` */ export declare function nullable>(schema: T): NullableSchema; //# sourceMappingURL=nullable.d.ts.map