import * as _$arktype from "arktype"; import { type } from "arktype"; import * as _$arktype_internal_keywords_string_ts0 from "arktype/internal/keywords/string.ts"; import * as _$arktype_internal_attributes_ts0 from "arktype/internal/attributes.ts"; //#region ../internal/scope/dist/index.d.ts //#region src/root.d.ts /** * The root scope for the ArkEnv library, * containing extensions to the ArkType scopes with ArkEnv-specific types * like `string.host` and `number.port`. */ declare const $: _$arktype.Scope<{ string: _$arktype.Submodule<{ trim: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.trim.$ & { " arkInferred": (In: string) => _$arktype_internal_attributes_ts0.To; }>; normalize: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.normalize.$ & { " arkInferred": (In: string) => _$arktype_internal_attributes_ts0.To; }>; root: string; alpha: string; alphanumeric: string; hex: string; base64: _$arktype.Submodule<{ root: string; url: string; } & { " arkInferred": string; }>; capitalize: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.capitalize.$ & { " arkInferred": (In: string) => _$arktype_internal_attributes_ts0.To; }>; creditCard: string; date: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.stringDate.$ & { " arkInferred": string; }>; digits: string; email: string; integer: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.stringInteger.$ & { " arkInferred": string; }>; ip: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.ip.$ & { " arkInferred": string; }>; json: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.stringJson.$ & { " arkInferred": string; }>; lower: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.lower.$ & { " arkInferred": (In: string) => _$arktype_internal_attributes_ts0.To; }>; numeric: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.stringNumeric.$ & { " arkInferred": string; }>; regex: string; semver: string; upper: _$arktype.Submodule<{ root: (In: string) => _$arktype_internal_attributes_ts0.To; preformatted: string; } & { " arkInferred": (In: string) => _$arktype_internal_attributes_ts0.To; }>; url: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.url.$ & { " arkInferred": string; }>; uuid: _$arktype.Submodule<_$arktype_internal_keywords_string_ts0.uuid.$ & { " arkInferred": string; }>; " arkInferred": string; host: string; }>; number: _$arktype.Submodule<{ NaN: number; Infinity: number; root: number; integer: number; " arkInferred": number; epoch: number; safe: number; NegativeInfinity: number; port: number; }>; }>; type $ = (typeof $)["t"]; //#endregion //#endregion //#region ../internal/types/dist/helpers.d.ts type Dict = Record; //#endregion //#region ../internal/types/dist/standard-schema.d.ts /** * @see https://github.com/standard-schema/standard-schema/tree/3130ce43fdd848d9ab49dbb0458d04f18459961c/packages/spec * * Copied from standard-schema (MIT License) * Copyright (c) 2024 Colin McDannell */ /** The Standard Typed interface. This is a base type extended by other specs. */ interface StandardTypedV1 { /** The Standard properties. */ readonly "~standard": StandardTypedV1.Props; } declare namespace StandardTypedV1 { /** The Standard Typed properties interface. */ interface Props { /** The version number of the standard. */ readonly version: 1; /** The vendor name of the schema library. */ readonly vendor: string; /** Inferred types associated with the schema. */ readonly types?: Types | undefined; } /** The Standard Typed types interface. */ interface Types { /** The input type of the schema. */ readonly input: Input; /** The output type of the schema. */ readonly output: Output; } /** Infers the input type of a Standard Typed. */ type InferInput = NonNullable["input"]; /** Infers the output type of a Standard Typed. */ type InferOutput = NonNullable["output"]; } /** The Standard Schema interface. */ interface StandardSchemaV1 { /** The Standard Schema properties. */ readonly "~standard": StandardSchemaV1.Props; } declare namespace StandardSchemaV1 { /** The Standard Schema properties interface. */ interface Props extends StandardTypedV1.Props { /** Validates unknown input values. */ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result | Promise>; } /** The result interface of the validate function. */ type Result = SuccessResult | FailureResult; /** The result interface if validation succeeds. */ interface SuccessResult { /** The typed output value. */ readonly value: Output; /** A falsy value for `issues` indicates success. */ readonly issues?: undefined; } interface Options { /** Explicit support for additional vendor-specific parameters, if needed. */ readonly libraryOptions?: Record | undefined; } /** The result interface if validation fails. */ interface FailureResult { /** The issues of failed validation. */ readonly issues: ReadonlyArray; } /** The issue interface of the failure output. */ interface Issue { /** The error message of the issue. */ readonly message: string; /** The path of the issue, if any. */ readonly path?: ReadonlyArray | undefined; } /** The path segment interface of the issue. */ interface PathSegment { /** The key representing a path segment. */ readonly key: PropertyKey; } /** The Standard types interface. */ interface Types extends StandardTypedV1.Types {} /** Infers the input type of a Standard. */ type InferInput = StandardTypedV1.InferInput; /** Infers the output type of a Standard. */ type InferOutput = StandardTypedV1.InferOutput; } //#endregion //#region ../internal/types/dist/infer-type.d.ts /** * Extract the inferred type from a schema definition. * Supports both ArkType type definitions and Standard Schema 1.0 validators. * * For Standard Schema validators (e.g., Zod, Valibot), extracts the output type. * For ArkType definitions, checks the call signature or type properties. * * @template T - The schema definition to infer from */ type InferType = T extends StandardSchemaV1 ? Output : T extends ((value: Dict) => infer R) ? R extends type.errors ? never : R : T extends { t: infer U; } ? U : T extends type.Any ? U : never; //#endregion //#region ../internal/types/dist/schema.d.ts type SchemaShape = Record; //#endregion //#region src/types.d.ts /** * Shared type utilities for Next.js entry points. */ type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; type ResolveExtendsElement = [InferType] extends [never] ? T : InferType; type MergeExtends = TExtends extends readonly unknown[] ? UnionToIntersection> : {}; //#endregion export { $ as i, SchemaShape as n, Dict as r, MergeExtends as t }; //# sourceMappingURL=types-BzoNhHhq.d.ts.map