import type { NodeTrait } from '../../cst/mixin.js'; import { Node } from '../../cst/node.js'; import type { SchemaOptions } from '../base.js'; export declare class OptionalType extends Node { _type: "optional"; _children: [Node]; infer: T['infer'] | undefined; input: T['input'] | undefined; constructor(item: T, options?: SchemaOptions); unwrap(): T; static from(item: T, options?: SchemaOptions): OptionalType; } export interface OptionalType extends Node, NodeTrait { } /** * Create a new `ThereforeNode` instance with the given options. * * ### Example * ```ts * $object({ * foo: $optional($string) * }) * ``` * * @param literal - The schema to make an optional property. * @param value - Controls how the optional value is rendered, where `explict` adds the undefined as a union explicitly. * * @group Modifiers */ export declare function $optional(literal: T | (() => T)): OptionalType;