import { type TAny } from '../any/index'; import { type TArray, type ArrayOptions } from '../array/index'; import { type TBoolean } from '../boolean/index'; import { type TComposite } from '../composite/index'; import { type TConst } from '../const/index'; import { type TEnum, type TEnumKey, type TEnumValue } from '../enum/index'; import { type TExclude, type TExcludeFromMappedResult, type TExcludeFromTemplateLiteral } from '../exclude/index'; import { type TExtends, type TExtendsFromMappedKey, type TExtendsFromMappedResult } from '../extends/index'; import { type TExtract, type TExtractFromMappedResult, type TExtractFromTemplateLiteral } from '../extract/index'; import { TIndex, type TIndexPropertyKeys, type TIndexFromMappedKey, type TIndexFromMappedResult, type TIndexFromComputed } from '../indexed/index'; import { type IntegerOptions, type TInteger } from '../integer/index'; import { Intersect, type IntersectOptions } from '../intersect/index'; import { type TCapitalize, type TUncapitalize, type TLowercase, type TUppercase } from '../intrinsic/index'; import { type TKeyOf } from '../keyof/index'; import { type TLiteral, type TLiteralValue } from '../literal/index'; import { type TMappedFunction, type TMapped, type TMappedResult } from '../mapped/index'; import { type TNever } from '../never/index'; import { type TNot } from '../not/index'; import { type TNull } from '../null/index'; import { type TMappedKey } from '../mapped/index'; import { TModule } from '../module/index'; import { type TNumber, type NumberOptions } from '../number/index'; import { type TObject, type TProperties, type ObjectOptions } from '../object/index'; import { type TOmit } from '../omit/index'; import { type TOptionalWithFlag, type TOptionalFromMappedResult } from '../optional/index'; import { type TPartial, type TPartialFromMappedResult } from '../partial/index'; import { type TPick } from '../pick/index'; import { type TReadonlyWithFlag, type TReadonlyFromMappedResult } from '../readonly/index'; import { type TReadonlyOptional } from '../readonly-optional/index'; import { type TRecordOrObject } from '../record/index'; import { type TRecursive, type TThis } from '../recursive/index'; import { type TRef, type TRefUnsafe } from '../ref/index'; import { type TRequired, type TRequiredFromMappedResult } from '../required/index'; import { type TRest } from '../rest/index'; import { type TSchema, type SchemaOptions } from '../schema/index'; import { type TString, type StringOptions } from '../string/index'; import { type TTemplateLiteral, type TTemplateLiteralKind, type TTemplateLiteralSyntax } from '../template-literal/index'; import { TransformDecodeBuilder } from '../transform/index'; import { type TTuple } from '../tuple/index'; import { Union } from '../union/index'; import { type TUnknown } from '../unknown/index'; import { type TUnsafe, type UnsafeOptions } from '../unsafe/index'; /** Json Type Builder with Static Resolution for TypeScript */ export declare class JsonTypeBuilder { /** `[Json]` Creates a Readonly and Optional property */ ReadonlyOptional(type: Type): TReadonlyOptional; /** `[Json]` Creates a Readonly property */ Readonly(type: Type, enable: Flag): TReadonlyFromMappedResult; /** `[Json]` Creates a Readonly property */ Readonly(type: Type, enable: Flag): TReadonlyWithFlag; /** `[Json]` Creates a Optional property */ Readonly(type: Type): TReadonlyFromMappedResult; /** `[Json]` Creates a Readonly property */ Readonly(type: Type): TReadonlyWithFlag; /** `[Json]` Creates a Optional property */ Optional(type: Type, enable: Flag): TOptionalFromMappedResult; /** `[Json]` Creates a Optional property */ Optional(type: Type, enable: Flag): TOptionalWithFlag; /** `[Json]` Creates a Optional property */ Optional(type: Type): TOptionalFromMappedResult; /** `[Json]` Creates a Optional property */ Optional(type: Type): TOptionalWithFlag; /** `[Json]` Creates an Any type */ Any(options?: SchemaOptions): TAny; /** `[Json]` Creates an Array type */ Array(items: Type, options?: ArrayOptions): TArray; /** `[Json]` Creates a Boolean type */ Boolean(options?: SchemaOptions): TBoolean; /** `[Json]` Intrinsic function to Capitalize LiteralString types */ Capitalize(schema: T, options?: SchemaOptions): TCapitalize; /** `[Json]` Creates a Composite object type */ Composite(schemas: [...T], options?: ObjectOptions): TComposite; /** `[JavaScript]` Creates a readonly const type from the given value. */ Const(value: T, options?: SchemaOptions): TConst; /** `[Json]` Creates a Enum type */ Enum>(item: T, options?: SchemaOptions): TEnum; /** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */ Exclude(unionType: L, excludedMembers: R, options?: SchemaOptions): TExcludeFromMappedResult; /** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */ Exclude(unionType: L, excludedMembers: R, options?: SchemaOptions): TExcludeFromTemplateLiteral; /** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */ Exclude(unionType: L, excludedMembers: R, options?: SchemaOptions): TExclude; /** `[Json]` Creates a Conditional type */ Extends(L: L, R: R, T: T, F: F, options?: SchemaOptions): TExtendsFromMappedResult; /** `[Json]` Creates a Conditional type */ Extends(L: L, R: R, T: T, F: F, options?: SchemaOptions): TExtendsFromMappedKey; /** `[Json]` Creates a Conditional type */ Extends(L: L, R: R, T: T, F: F, options?: SchemaOptions): TExtends; /** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */ Extract(type: L, union: R, options?: SchemaOptions): TExtractFromMappedResult; /** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */ Extract(type: L, union: R, options?: SchemaOptions): TExtractFromTemplateLiteral; /** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */ Extract(type: L, union: R, options?: SchemaOptions): TExtract; /** `[Json]` Returns an Indexed property type for the given keys */ Index(type: Type, key: Key, options?: SchemaOptions): TIndexFromComputed; /** `[Json]` Returns an Indexed property type for the given keys */ Index(type: Type, key: Key, options?: SchemaOptions): TIndexFromComputed; /** `[Json]` Returns an Indexed property type for the given keys */ Index(type: Type, key: Key, options?: SchemaOptions): TIndexFromComputed; /** `[Json]` Returns an Indexed property type for the given keys */ Index(type: Type, mappedResult: MappedResult, options?: SchemaOptions): TIndexFromMappedResult; /** `[Json]` Returns an Indexed property type for the given keys */ Index(type: Type, mappedKey: MappedKey, options?: SchemaOptions): TIndexFromMappedKey; /** `[Json]` Returns an Indexed property type for the given keys */ Index>(T: Type, K: Key, options?: SchemaOptions): TIndex; /** `[Json]` Returns an Indexed property type for the given keys */ Index(type: Type, propertyKeys: readonly [...PropertyKeys], options?: SchemaOptions): TIndex; /** `[Json]` Creates an Integer type */ Integer(options?: IntegerOptions): TInteger; /** `[Json]` Creates an Intersect type */ Intersect(types: [...Types], options?: IntersectOptions): Intersect; /** `[Json]` Creates a KeyOf type */ KeyOf(type: Type, options?: SchemaOptions): TKeyOf; /** `[Json]` Creates a Literal type */ Literal(literalValue: LiteralValue, options?: SchemaOptions): TLiteral; /** `[Json]` Intrinsic function to Lowercase LiteralString types */ Lowercase(type: Type, options?: SchemaOptions): TLowercase; /** `[Json]` Creates a Mapped object type */ Mapped, F extends TMappedFunction = TMappedFunction, R extends TMapped = TMapped>(key: K, map: F, options?: ObjectOptions): R; /** `[Json]` Creates a Mapped object type */ Mapped = TMappedFunction, R extends TMapped = TMapped>(key: [...K], map: F, options?: ObjectOptions): R; /** `[Json]` Creates a Type Definition Module. */ Module(properties: Properties): TModule; /** `[Json]` Creates a Never type */ Never(options?: SchemaOptions): TNever; /** `[Json]` Creates a Not type */ Not(type: T, options?: SchemaOptions): TNot; /** `[Json]` Creates a Null type */ Null(options?: SchemaOptions): TNull; /** `[Json]` Creates a Number type */ Number(options?: NumberOptions): TNumber; /** `[Json]` Creates an Object type */ Object(properties: T, options?: ObjectOptions): TObject; /** `[Json]` Constructs a type whose keys are picked from the given type */ Omit(type: Type, key: readonly [...Key], options?: SchemaOptions): TOmit; /** `[Json]` Constructs a type whose keys are picked from the given type */ Omit(type: Type, key: Key, options?: SchemaOptions): TOmit; /** `[Json]` Constructs a type where all properties are optional */ Partial(type: MappedResult, options?: SchemaOptions): TPartialFromMappedResult; /** `[Json]` Constructs a type where all properties are optional */ Partial(type: Type, options?: SchemaOptions): TPartial; /** `[Json]` Constructs a type whose keys are picked from the given type */ Pick(type: Type, key: readonly [...Key], options?: SchemaOptions): TPick; /** `[Json]` Constructs a type whose keys are picked from the given type */ Pick(type: Type, key: Key, options?: SchemaOptions): TPick; /** `[Json]` Creates a Record type */ Record(key: Key, value: Value, options?: ObjectOptions): TRecordOrObject; /** `[Json]` Creates a Recursive type */ Recursive(callback: (thisType: TThis) => T, options?: SchemaOptions): TRecursive; /** `[Json]` Creates a Ref type.*/ Ref($ref: Ref, options?: SchemaOptions): TRef; /** * @deprecated `[Json]` Creates a Ref type. This signature was deprecated in 0.34.0 where Ref requires callers to pass * a `string` value for the reference (and not a schema). * * To adhere to the 0.34.0 signature, Ref implementations should be updated to the following. * * ```typescript * // pre-0.34.0 * * const T = Type.String({ $id: 'T' }) * * const R = Type.Ref(T) * ``` * should be changed to the following * * ```typescript * // post-0.34.0 * * const T = Type.String({ $id: 'T' }) * * const R = Type.Unsafe>(Type.Ref('T')) * ``` * You can also create a generic function to replicate the pre-0.34.0 signature if required * * ```typescript * const LegacyRef = (schema: T) => Type.Unsafe>(Type.Ref(schema.$id!)) * ``` */ Ref(type: Type, options?: SchemaOptions): TRefUnsafe; /** `[Json]` Constructs a type where all properties are required */ Required(type: MappedResult, options?: SchemaOptions): TRequiredFromMappedResult; /** `[Json]` Constructs a type where all properties are required */ Required(type: Type, options?: SchemaOptions): TRequired; /** `[Json]` Extracts interior Rest elements from Tuple, Intersect and Union types */ Rest(type: Type): TRest; /** `[Json]` Creates a String type */ String(options?: StringOptions): TString; /** `[Json]` Creates a TemplateLiteral type from template dsl string */ TemplateLiteral(syntax: Syntax, options?: SchemaOptions): TTemplateLiteralSyntax; /** `[Json]` Creates a TemplateLiteral type */ TemplateLiteral(kinds: [...Kinds], options?: SchemaOptions): TTemplateLiteral; /** `[Json]` Creates a Transform type */ Transform(type: Type): TransformDecodeBuilder; /** `[Json]` Creates a Tuple type */ Tuple(types: [...Types], options?: SchemaOptions): TTuple; /** `[Json]` Intrinsic function to Uncapitalize LiteralString types */ Uncapitalize(type: Type, options?: SchemaOptions): TUncapitalize; /** `[Json]` Creates a Union type */ Union(types: [...Types], options?: SchemaOptions): Union; /** `[Json]` Creates an Unknown type */ Unknown(options?: SchemaOptions): TUnknown; /** `[Json]` Creates a Unsafe type that will infers as the generic argument T */ Unsafe(options?: UnsafeOptions): TUnsafe; /** `[Json]` Intrinsic function to Uppercase LiteralString types */ Uppercase(schema: T, options?: SchemaOptions): TUppercase; }