import { IType, IAnyType, ExtractCSTWithSTN } from "../../internal"; /** @hidden */ export declare type ValidOptionalValue = string | boolean | number | null | undefined; /** @hidden */ export declare type ValidOptionalValues = [ValidOptionalValue, ...ValidOptionalValue[]]; /** @hidden */ export declare type OptionalDefaultValueOrFunction = IT["CreationType"] | IT["SnapshotType"] | (() => ExtractCSTWithSTN); /** @hidden */ export interface IOptionalIType extends IType { } export declare function optional(type: IT, defaultValueOrFunction: OptionalDefaultValueOrFunction): IOptionalIType; export declare function optional(type: IT, defaultValueOrFunction: OptionalDefaultValueOrFunction, optionalValues: OptionalVals): IOptionalIType; /** * Returns if a value represents an optional type. * * @template IT * @param type * @returns */ export declare function isOptionalType(type: IT): type is IT;