From fbd59d5b12275cb09bf1c421c099a633e3867252 Mon Sep 17 00:00:00 2001 From: Bilal Godil Date: Wed, 23 Jul 2025 15:03:59 -0700 Subject: [PATCH 1/2] arktype typing in editor --- apps/dashboard/package.json | 2 +- .../components/vibe-coding/code-editor.tsx | 14 ++++--------- .../src/components/vibe-coding/dts/index.ts | 9 ++++++++ .../components/vibe-coding/dts/schema-dts.ts | 4 ++++ .../components/vibe-coding/dts/type-dts.ts | 4 ++++ .../components/vibe-coding/dts/util-dts.ts | 4 ++++ pnpm-lock.yaml | 21 ++++++++----------- 7 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 apps/dashboard/src/components/vibe-coding/dts/index.ts create mode 100644 apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts create mode 100644 apps/dashboard/src/components/vibe-coding/dts/type-dts.ts create mode 100644 apps/dashboard/src/components/vibe-coding/dts/util-dts.ts diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 654db04ba0..3d0f9fa9b1 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -22,7 +22,7 @@ "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@hookform/resolvers": "^3.3.4", - "@monaco-editor/react": "4.7.0-rc.0", + "@monaco-editor/react": "4.7.0", "@next/bundle-analyzer": "15.2.3", "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-tooltip": "^1.1.3", diff --git a/apps/dashboard/src/components/vibe-coding/code-editor.tsx b/apps/dashboard/src/components/vibe-coding/code-editor.tsx index d3521ecc24..8d8c7a24ae 100644 --- a/apps/dashboard/src/components/vibe-coding/code-editor.tsx +++ b/apps/dashboard/src/components/vibe-coding/code-editor.tsx @@ -3,7 +3,7 @@ import { runAsynchronously } from '@stackframe/stack-shared/dist/utils/promises' import { deindent } from '@stackframe/stack-shared/dist/utils/strings'; import { Typography } from "@stackframe/stack-ui"; import { useTheme } from 'next-themes'; - +import { dtsBundles } from './dts'; type CodeEditorProps = { code: string, @@ -84,15 +84,9 @@ export default function CodeEditor({ } `, ); - // There is some issue with arktype type definitions and monaco editor that isn't letting them work properly. - // TODO: add actual type definitions for arktype. - monaco.languages.typescript.typescriptDefaults.addExtraLib( - deindent` - declare module "arktype" { - const type: any; - } - `, - ); + monaco.languages.typescript.typescriptDefaults.addExtraLib(dtsBundles.arkType); + monaco.languages.typescript.typescriptDefaults.addExtraLib(dtsBundles.arkUtil); + monaco.languages.typescript.typescriptDefaults.addExtraLib(dtsBundles.arkSchema); const reactEmailPackages = [ 'components', 'body', 'button', 'code-block', 'code-inline', 'column', diff --git a/apps/dashboard/src/components/vibe-coding/dts/index.ts b/apps/dashboard/src/components/vibe-coding/dts/index.ts new file mode 100644 index 0000000000..3b44c18197 --- /dev/null +++ b/apps/dashboard/src/components/vibe-coding/dts/index.ts @@ -0,0 +1,9 @@ +import { typeDts } from "./type-dts" +import { schemaDts } from "./schema-dts" +import { utilDts } from "./util-dts" + +export const dtsBundles = { + arkSchema: schemaDts, + arkType: typeDts, + arkUtil: utilDts, +} diff --git a/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts b/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts new file mode 100644 index 0000000000..e1ba745f94 --- /dev/null +++ b/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts @@ -0,0 +1,4 @@ +// FROM https://github.com/arktypeio/arktype/tree/main/ark/docs/components/dts +/** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ +// prettier-ignore +export const schemaDts = "declare module \"@ark/schema\" {\n import { DynamicBase, anyOrNever, ReadonlyArray as ReadonlyArray$1, array, propwiseXor, merge, show, CastableBase, ReadonlyPath, JsonObject, JsonArray, mutable, Thunk, Callable, Hkt, JsonStructure, autocomplete, listable, satisfy, Domain as Domain$1, Constructor, Json, requireKeys, NonNegativeIntegerLiteral, flattenListable, noSuggest, intersectUnion, conform, ParseError, Key, propValueOf, Entry, KeySet, keySetOf, arrayIndexOf, JsonPrimitive, SerializedPrimitive, inferred, Fn, BuiltinObjectKind, describe, GuardablePredicate, Brand, dict, ArkRegistry } from '@ark/util';\nexport { ParseError } from '@ark/util';\n\ndeclare const intrinsic: {\n emptyStructure: StructureNode;\n jsonPrimitive: BaseRoot;\n jsonObject: BaseRoot;\n jsonData: BaseRoot;\n integer: BaseRoot;\n key: BaseRoot;\n lengthBoundable: BaseRoot;\n nonNegativeIntegerString: BaseRoot;\n string: BaseRoot;\n number: BaseRoot;\n bigint: BaseRoot;\n boolean: BaseRoot;\n symbol: BaseRoot;\n undefined: BaseRoot;\n object: BaseRoot;\n null: BaseRoot;\n Array: BaseRoot;\n Date: BaseRoot;\n never: BaseRoot;\n unknown: BaseRoot;\n true: BaseRoot;\n false: BaseRoot;\n};\n\ntype PreparsedNodeResolution = {\n [arkKind]: \"generic\" | \"module\";\n};\ndeclare class RootModule extends DynamicBase {\n get [arkKind](): \"module\";\n}\ninterface InternalModule extends RootModule {\n root?: BaseRoot;\n}\ndeclare const bindModule: (module: InternalModule, $: BaseScope) => InternalModule;\ntype exportSchemaScope<$> = {\n [k in keyof $]: instantiateRoot<$[k]>;\n};\ntype instantiateRoot = t extends InternalResolution ? [\n t\n] extends [anyOrNever] ? BaseRoot : t : BaseRoot;\ndeclare const SchemaModule: new <$ = {}>(types: exportSchemaScope<$>) => SchemaModule<$>;\ninterface SchemaModule<$ = {}> extends RootModule> {\n}\n\n/** From https://github.com/standard-schema/standard-schema */\n/**\n * The Standard Schema interface.\n */\ntype StandardSchemaV1 = {\n /**\n * The Standard Schema properties.\n */\n readonly \"~standard\": StandardSchemaV1.Props;\n};\ndeclare namespace StandardSchemaV1 {\n /**\n * The Standard Schema properties interface.\n */\n export interface Props {\n /**\n * The version number of the standard.\n */\n readonly version: 1;\n /**\n * The vendor name of the schema library.\n */\n readonly vendor: string;\n /**\n * Validates unknown input values.\n */\n readonly validate: (value: unknown) => Result | Promise>;\n /**\n * Inferred types associated with the schema.\n */\n readonly types?: Types | undefined;\n }\n export interface ArkTypeProps extends Props {\n readonly vendor: \"arktype\";\n }\n /**\n * The result interface of the validate function.\n */\n export type Result = SuccessResult | FailureResult;\n /**\n * The result interface if validation succeeds.\n */\n export interface SuccessResult {\n /**\n * The typed output value.\n */\n readonly value: Output;\n /**\n * The non-existent issues.\n */\n readonly issues?: undefined;\n }\n /**\n * The result interface if validation fails.\n */\n export interface FailureResult {\n /**\n * The issues of failed validation.\n */\n readonly issues: ReadonlyArray;\n }\n /**\n * The issue interface of the failure output.\n */\n export interface Issue {\n /**\n * The error message of the issue.\n */\n readonly message: string;\n /**\n * The path of the issue, if any.\n */\n readonly path?: ReadonlyArray | undefined;\n }\n /**\n * The path segment interface of the issue.\n */\n export interface PathSegment {\n /**\n * The key representing a path segment.\n */\n readonly key: PropertyKey;\n }\n /**\n * The Standard Schema types interface.\n */\n export interface Types {\n /**\n * The input type of the schema.\n */\n readonly input: Input;\n /**\n * The output type of the schema.\n */\n readonly output: Output;\n }\n /**\n * Infers the input type of a Standard Schema.\n */\n export type InferInput = NonNullable[\"input\"];\n /**\n * Infers the output type of a Standard Schema.\n */\n export type InferOutput = NonNullable[\"output\"];\n export { };\n}\n\ntype ArkErrorResult = ArkError | ArkErrors;\ndeclare class ArkError extends CastableBase> {\n readonly [arkKind] = \"error\";\n path: ReadonlyPath;\n data: Prerequisite;\n private nodeConfig;\n protected input: ArkErrorContextInput;\n protected ctx: Traversal;\n constructor(input: ArkErrorContextInput, ctx: Traversal);\n transform(f: (input: ArkErrorContextInput) => ArkErrorContextInput): ArkError;\n hasCode(code: code): this is ArkError;\n get propString(): string;\n get expected(): string;\n get actual(): string;\n get problem(): string;\n get message(): string;\n get flat(): ArkError[];\n toJSON(): JsonObject;\n toString(): string;\n throw(): never;\n}\ndeclare namespace ArkErrors {\n type Handler = (errors: ArkErrors) => returns;\n}\n/**\n * A ReadonlyArray of `ArkError`s returned by a Type on invalid input.\n *\n * Subsequent errors added at an existing path are merged into an\n * ArkError intersection.\n */\ndeclare class ArkErrors extends ReadonlyArray$1 implements StandardSchemaV1.FailureResult {\n readonly [arkKind] = \"errors\";\n protected ctx: Traversal;\n constructor(ctx: Traversal);\n /**\n * Errors by a pathString representing their location.\n */\n byPath: Record;\n /**\n * {@link byPath} flattened so that each value is an array of ArkError instances at that path.\n *\n * ✅ Since \"intersection\" errors will be flattened to their constituent `.errors`,\n * they will never be directly present in this representation.\n */\n get flatByPath(): Record;\n /**\n * {@link byPath} flattened so that each value is an array of problem strings at that path.\n */\n get flatProblemsByPath(): Record;\n /**\n * All pathStrings at which errors are present mapped to the errors occuring\n * at that path or any nested path within it.\n */\n byAncestorPath: Record;\n count: number;\n private mutable;\n /**\n * Throw a TraversalError based on these errors.\n */\n throw(): never;\n /**\n * Converts ArkErrors to TraversalError, a subclass of `Error` suitable for throwing with nice\n * formatting.\n */\n toTraversalError(): TraversalError;\n /**\n * Append an ArkError to this array, ignoring duplicates.\n */\n add(error: ArkError): void;\n transform(f: (e: ArkError) => ArkError): ArkErrors;\n /**\n * Add all errors from an ArkErrors instance, ignoring duplicates and\n * prefixing their paths with that of the current Traversal.\n */\n merge(errors: ArkErrors): void;\n /**\n * A human-readable summary of all errors.\n */\n get summary(): string;\n /**\n * Alias of this ArkErrors instance for StandardSchema compatibility.\n */\n get issues(): this;\n toJSON(): JsonArray;\n toString(): string;\n private _add;\n private addAncestorPaths;\n}\ndeclare class TraversalError extends Error {\n readonly name = \"TraversalError\";\n arkErrors: ArkErrors;\n constructor(errors: ArkErrors);\n}\ninterface DerivableErrorContext {\n expected: string;\n actual: string;\n problem: string;\n message: string;\n data: Prerequisite;\n path: array;\n propString: string;\n}\ntype DerivableErrorContextInput = Partial> & propwiseXor<{\n path?: array;\n}, {\n relativePath?: array;\n prefixPath?: array;\n}>;\ntype ArkErrorCode = {\n [kind in NodeKind]: errorContext extends null ? never : kind;\n}[NodeKind];\ntype ArkErrorContextInputsByCode = {\n [code in ArkErrorCode]: errorContext & DerivableErrorContextInput;\n};\ntype ArkErrorContextInput = merge;\ntype NodeErrorContextInput = ArkErrorContextInputsByCode[code] & {\n meta: NodeMeta;\n};\ntype MessageContext = Omit, \"message\">;\ntype ProblemContext = Omit, \"problem\">;\ntype CustomErrorInput = show<{\n code?: undefined;\n} & DerivableErrorContextInput>;\ntype ArkErrorInput = string | ArkErrorContextInput | CustomErrorInput;\ntype ProblemConfig = string | ProblemWriter;\ntype ProblemWriter = (context: ProblemContext) => string;\ntype MessageConfig = string | MessageWriter;\ntype MessageWriter = (context: MessageContext) => string;\ntype getAssociatedDataForError = code extends NodeKind ? Prerequisite : unknown;\ntype ExpectedConfig = string | ExpectedWriter;\ntype ExpectedWriter = (source: errorContext) => string;\ntype ActualConfig = string | ActualWriter;\ntype ActualWriter = (data: getAssociatedDataForError) => string;\n\ndeclare const makeRootAndArrayPropertiesMutable: (o: o) => makeRootAndArrayPropertiesMutable;\ntype makeRootAndArrayPropertiesMutable = {\n -readonly [k in keyof inner]: inner[k] extends array | undefined ? mutable : inner[k];\n} & unknown;\ntype internalImplementationOf = {\n [k in Exclude]: external[k] extends ((...args: infer args) => unknown) ? (...args: {\n [i in keyof args]: never;\n }) => unknown : unknown;\n};\ntype arkKind = typeof arkKind;\ndeclare const arkKind: \" arkKind\";\ninterface ArkKinds {\n constraint: BaseConstraint;\n root: BaseRoot;\n scope: BaseScope;\n generic: GenericRoot;\n module: InternalModule;\n error: ArkError;\n errors: ArkErrors;\n context: BaseParseContext;\n}\ntype ArkKind = show;\ndeclare const hasArkKind: (value: unknown, kind: kind) => value is ArkKinds[kind];\ndeclare const isNode: (value: unknown) => value is BaseNode;\ntype unwrapDefault = thunkableValue extends Thunk ? returnValue : thunkableValue;\n\ntype GenericParamAst = [name: name, constraint: constraint];\ntype GenericParamDef = name | readonly [name, unknown];\ndeclare const parseGeneric: (paramDefs: array, bodyDef: unknown, $: BaseScope) => GenericRoot;\ntype genericParamNames> = {\n [i in keyof params]: params[i][0];\n};\ntype genericParamConstraints> = {\n [i in keyof params]: params[i][1];\n};\ntype GenericArgResolutions = array> = {\n [i in keyof params as params[i & `${number}`][0]]: BaseRoot;\n};\ndeclare class LazyGenericBody extends Callable<(args: argResolutions) => returns> {\n}\ninterface GenericAst = array, bodyDef = unknown, $ = unknown, arg$ = $> {\n [arkKind]: \"generic\";\n paramsAst: params;\n bodyDef: bodyDef;\n $: $;\n arg$: arg$;\n names: genericParamNames;\n t: this;\n}\ndeclare class GenericRoot = array, bodyDef = unknown> extends Callable<(...args: {\n [i in keyof params]: BaseRoot;\n}) => BaseRoot> {\n readonly [arkKind] = \"generic\";\n readonly paramsAst: params;\n readonly t: GenericAst;\n paramDefs: array;\n bodyDef: bodyDef;\n $: BaseScope;\n arg$: BaseScope;\n baseInstantiation: BaseRoot;\n hkt: Hkt.constructor | null;\n description: string;\n constructor(paramDefs: array, bodyDef: bodyDef, $: BaseScope, arg$: BaseScope, hkt: Hkt.constructor | null);\n defIsLazy(): this is GenericRoot;\n protected cacheGetter(name: name, value: this[name]): this[name];\n get json(): JsonStructure;\n get params(): {\n [i in keyof params]: [params[i][0], BaseRoot];\n };\n get names(): genericParamNames;\n get constraints(): {\n [i in keyof params]: BaseRoot;\n };\n get internal(): this;\n get referencesById(): Record;\n get references(): BaseNode[];\n}\ntype genericParamSchemasToAst = {\n [i in keyof schemas]: schemas[i] extends GenericParamDef ? [\n name,\n unknown\n ] : never;\n};\ntype genericHktToConstraints Hkt> = InstanceType[\"constraints\"];\ntype GenericRootParser = (...params: paramsDef) => GenericRootBodyParser>;\ntype GenericRootBodyParser> = {\n (body: RootSchema): GenericRoot;\n (instantiateDef: LazyGenericBody>, hkt: hkt): GenericRoot<{\n [i in keyof params]: [params[i][0], genericHktToConstraints[i]];\n }, InstanceType>;\n};\ndeclare const writeUnsatisfiedParameterConstraintMessage: (name: name, constraint: constraint, arg: arg) => writeUnsatisfiedParameterConstraintMessage;\ntype writeUnsatisfiedParameterConstraintMessage = `${name} must be assignable to ${constraint} (was ${arg})`;\n\ntype ListableJsonSchema = listable;\ntype JsonSchemaOrBoolean = listable;\ntype JsonSchema = JsonSchema.NonBooleanBranch;\ndeclare namespace JsonSchema {\n type TypeName = \"string\" | \"integer\" | \"number\" | \"object\" | \"array\" | \"boolean\" | \"null\";\n /**\n * a subset of JSON Schema's annotations, see:\n * https://json-schema.org/understanding-json-schema/reference/annotations\n **/\n interface Meta extends UniversalMeta {\n $schema?: string;\n $defs?: Record;\n }\n type Format = autocomplete<\"date-time\" | \"date\" | \"time\" | \"email\" | \"ipv4\" | \"ipv6\" | \"uri\" | \"uuid\" | \"regex\">;\n /**\n * doesn't include root-only keys like $schema\n */\n interface UniversalMeta {\n title?: string;\n description?: string;\n format?: Format;\n deprecated?: true;\n default?: t;\n examples?: readonly t[];\n }\n type Composition = Union | OneOf | Intersection | Not;\n type NonBooleanBranch = Constrainable | Const | Composition | Enum | String | Numeric | Object | Array | Ref;\n type Branch = boolean | JsonSchema;\n type RefString = `#/$defs/${string}`;\n interface Ref extends Meta {\n $ref: RefString;\n type?: never;\n }\n interface Constrainable extends Meta {\n type?: listable;\n }\n interface Intersection extends Meta {\n allOf: readonly JsonSchema[];\n }\n interface Not extends Meta {\n not: JsonSchema;\n }\n interface OneOf extends Meta {\n oneOf: readonly JsonSchema[];\n }\n interface Union extends Meta {\n anyOf: readonly JsonSchema[];\n }\n interface Const extends Meta {\n const: unknown;\n }\n interface Enum extends Meta {\n enum: array;\n }\n interface String extends Meta {\n type: \"string\";\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n format?: string;\n }\n interface Numeric extends Meta {\n type: \"number\" | \"integer\";\n multipleOf?: number;\n minimum?: number;\n exclusiveMinimum?: number;\n maximum?: number;\n exclusiveMaximum?: number;\n }\n interface Object extends Meta {\n type: \"object\";\n properties?: Record;\n required?: string[];\n patternProperties?: Record;\n additionalProperties?: JsonSchemaOrBoolean;\n maxProperties?: number;\n minProperties?: number;\n propertyNames?: String;\n }\n interface Array extends Meta {\n type: \"array\";\n additionalItems?: JsonSchemaOrBoolean;\n contains?: JsonSchemaOrBoolean;\n uniqueItems?: boolean;\n minItems?: number;\n maxItems?: number;\n items?: JsonSchemaOrBoolean;\n prefixItems?: readonly Branch[];\n }\n type LengthBoundable = String | Array;\n type Structure = Object | Array;\n}\n\ndeclare class ToJsonSchemaError extends Error {\n readonly name = \"ToJsonSchemaError\";\n readonly code: code;\n readonly context: ToJsonSchema.ContextByCode[code];\n constructor(code: code, context: ToJsonSchema.ContextByCode[code]);\n hasCode(code: code): this is ToJsonSchemaError;\n}\ndeclare const ToJsonSchema: {\n Error: typeof ToJsonSchemaError;\n throw: (code: keyof ToJsonSchema.ContextByCode, context: ToJsonSchema.MorphContext | ToJsonSchema.UnitContext | ToJsonSchema.ProtoContext | ToJsonSchema.DomainContext | ToJsonSchema.PredicateContext | ToJsonSchema.DateContext | ToJsonSchema.ArrayObjectContext | ToJsonSchema.ArrayPostfixContext | ToJsonSchema.DefaultValueContext | ToJsonSchema.PatternIntersectionContext | ToJsonSchema.SymbolKeyContext) => never;\n throwInternalOperandError: (kind: ConstraintKind, schema: JsonSchema) => never;\n defaultConfig: ToJsonSchema.Context;\n};\ndeclare namespace ToJsonSchema {\n type Unjsonifiable = object | symbol | bigint | undefined;\n type Error = InstanceType;\n interface BaseContext {\n code: code;\n base: base;\n }\n interface ArrayObjectContext extends BaseContext<\"arrayObject\", JsonSchema.Array> {\n object: JsonSchema.Object;\n }\n interface ArrayPostfixContext extends BaseContext<\"arrayPostfix\", VariadicArraySchema> {\n elements: readonly JsonSchema[];\n }\n interface DefaultValueContext extends BaseContext<\"defaultValue\", JsonSchema> {\n value: Unjsonifiable;\n }\n interface DomainContext extends BaseContext<\"domain\", JsonSchema> {\n domain: satisfy;\n }\n interface MorphContext extends BaseContext<\"morph\", JsonSchema> {\n out: JsonSchema | null;\n }\n interface PatternIntersectionContext extends BaseContext<\"patternIntersection\", StringSchemaWithPattern> {\n pattern: string;\n }\n interface PredicateContext extends BaseContext<\"predicate\", JsonSchema> {\n predicate: Predicate;\n }\n interface ProtoContext extends BaseContext<\"proto\", JsonSchema> {\n proto: Constructor;\n }\n type SymbolKeyContext = IndexSymbolKeyContext | RequiredSymbolKeyContext | OptionalSymbolKeyContext;\n interface IndexSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: null;\n value: JsonSchema;\n optional: false;\n }\n interface RequiredSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: symbol;\n value: JsonSchema;\n optional: false;\n }\n interface OptionalSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: symbol;\n value: JsonSchema;\n optional: true;\n default?: Json;\n }\n interface UnitContext extends BaseContext<\"unit\", JsonSchema> {\n unit: Unjsonifiable;\n }\n interface DateContext extends BaseContext<\"date\", JsonSchema> {\n before?: Date;\n after?: Date;\n }\n interface ContextByCode {\n arrayObject: ArrayObjectContext;\n arrayPostfix: ArrayPostfixContext;\n defaultValue: DefaultValueContext;\n domain: DomainContext;\n morph: MorphContext;\n patternIntersection: PatternIntersectionContext;\n predicate: PredicateContext;\n proto: ProtoContext;\n symbolKey: SymbolKeyContext;\n unit: UnitContext;\n date: DateContext;\n }\n type Code = keyof ContextByCode;\n type FallbackContext = ContextByCode[Code];\n type HandlerByCode = satisfy<{\n [code in Code]: (ctx: ContextByCode[code]) => unknown;\n }, {\n arrayObject: (ctx: ArrayObjectContext) => JsonSchema.Structure;\n arrayPostfix: (ctx: ArrayPostfixContext) => VariadicArraySchema;\n defaultValue: (ctx: DefaultValueContext) => JsonSchema;\n domain: (ctx: DomainContext) => JsonSchema;\n morph: (ctx: MorphContext) => JsonSchema;\n patternIntersection: (ctx: PatternIntersectionContext) => JsonSchema.String;\n predicate: (ctx: PredicateContext) => JsonSchema;\n proto: (ctx: ProtoContext) => JsonSchema;\n symbolKey: (ctx: SymbolKeyContext) => JsonSchema.Object;\n unit: (ctx: UnitContext) => JsonSchema;\n date: (ctx: DateContext) => JsonSchema;\n }>;\n type VariadicArraySchema = requireKeys;\n type StringSchemaWithPattern = requireKeys;\n type UniversalFallback = (ctx: FallbackContext) => JsonSchema;\n interface FallbackObject extends Partial {\n default?: UniversalFallback;\n }\n type FallbackOption = UniversalFallback | FallbackObject;\n interface Options {\n /** value to assign to the generated $schema key\n *\n * - set to `null` to omit the `$schema` key\n * - does not affect the contents of the generated schema\n *\n * @default \"https://json-schema.org/draft/2020-12/schema\"\n */\n dialect?: string | null;\n useRefs?: boolean;\n fallback?: FallbackOption;\n }\n interface Context extends Required {\n fallback: HandlerByCode;\n }\n}\n\ndeclare class AliasNode extends BaseRoot {\n readonly expression: string;\n readonly structure: undefined;\n get resolution(): BaseRoot;\n protected _resolve(): BaseRoot;\n get resolutionId(): NodeId;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare namespace Alias {\n type Schema = `$${alias}` | NormalizedSchema;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly reference: alias;\n readonly resolve?: () => BaseRoot;\n }\n interface Inner {\n readonly reference: alias;\n readonly resolve?: () => BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"alias\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n }> {\n }\n type Node = AliasNode;\n}\ndeclare const Alias: {\n implementation: nodeImplementationOf;\n Node: typeof AliasNode;\n};\n\ndeclare const registryName: string;\ndeclare const $ark: ArkSchemaRegistry;\ndeclare const reference: (name: string) => RegisteredReference;\ndeclare const registeredReference: (value: object | symbol) => RegisteredReference;\ntype RegisteredReference = `$ark${\"\" | NonNegativeIntegerLiteral}.${to}`;\n\ntype InternalResolutions = Record;\ntype exportedNameOf<$> = Exclude;\ntype resolvableReferenceIn<$> = {\n [k in keyof $]: k extends string ? k extends PrivateDeclaration ? alias : k extends noSuggest | \"root\" ? never : k : never;\n}[keyof $];\ntype resolveReference, $> = reference extends keyof $ ? $[reference] : $[`#${reference}` & keyof $];\ntype flatResolutionsOf<$> = show extends infer k ? k extends keyof $ & string ? resolutionsOfReference : unknown : unknown>>;\ntype resolutionsOfReference = [\n v\n] extends [{\n [arkKind]: \"module\";\n}] ? [\n v\n] extends [anyOrNever] ? {\n [_ in k]: v;\n} : prefixKeys, k> & {\n [innerKey in keyof v as innerKey extends \"root\" ? k : never]: v[innerKey];\n} : {\n [_ in k]: v;\n};\ntype prefixKeys = {\n [k in keyof o & string as `${prefix}.${k}`]: o[k];\n} & unknown;\ntype PrivateDeclaration = `#${key}`;\ntype InternalResolution = BaseRoot | GenericRoot | InternalModule;\ntype toInternalScope<$> = BaseScope<{\n [k in keyof $]: $[k] extends {\n [arkKind]: infer kind;\n } ? [\n $[k]\n ] extends [anyOrNever] ? BaseRoot : kind extends \"generic\" ? GenericRoot : kind extends \"module\" ? InternalModule : never : BaseRoot;\n}>;\ntype CachedResolution = NodeId | BaseRoot | GenericRoot;\ndeclare const writeDuplicateAliasError: (alias: alias) => writeDuplicateAliasError;\ntype writeDuplicateAliasError = `#${alias} duplicates public alias ${alias}`;\ntype AliasDefEntry = [name: string, defValue: unknown];\ntype GlobalOnlyConfigOptionName = satisfy;\ninterface ScopeOnlyConfigOptions {\n name?: string;\n prereducedAliases?: boolean;\n}\ninterface ArkSchemaScopeConfig extends Omit, ScopeOnlyConfigOptions {\n}\ninterface ResolvedScopeConfig extends ResolvedConfig, ScopeOnlyConfigOptions {\n}\ntype PrecompiledReferences = {\n [k: `${string}Allows`]: TraverseAllows;\n [k: `${string}Apply`]: TraverseApply;\n [k: `${string}Optimistic`]: (data: unknown) => unknown;\n};\ndeclare abstract class BaseScope<$ extends {} = {}> {\n readonly config: ArkSchemaScopeConfig;\n readonly resolvedConfig: ResolvedScopeConfig;\n readonly name: string;\n get [arkKind](): \"scope\";\n readonly referencesById: {\n [id: string]: BaseNode;\n };\n references: readonly BaseNode[];\n readonly resolutions: {\n [alias: string]: CachedResolution | undefined;\n };\n exportedNames: string[];\n readonly aliases: Record;\n protected resolved: boolean;\n readonly nodesByHash: Record;\n readonly intrinsic: Omit;\n constructor(\n /** The set of names defined at the root-level of the scope mapped to their\n * corresponding definitions.**/\n def: Record, config?: ArkSchemaScopeConfig);\n protected cacheGetter(name: name, value: this[name]): this[name];\n get internal(): this;\n private _json;\n get json(): JsonStructure;\n defineSchema(def: def): def;\n generic: GenericRootParser;\n units: (values: array, opts?: BaseParseOptions) => BaseRoot;\n protected lazyResolutions: Alias.Node[];\n lazilyResolve(resolve: () => BaseRoot, syntheticAlias?: string): Alias.Node;\n schema: InternalSchemaParser;\n parseSchema: InternalSchemaParser;\n protected preparseNode(kinds: NodeKind | listable, schema: unknown, opts: BaseParseOptions): BaseNode | NodeParseContextInput;\n bindReference(reference: reference): reference;\n resolveRoot(name: string): BaseRoot;\n maybeResolveRoot(name: string): BaseRoot | undefined;\n /** If name is a valid reference to a submodule alias, return its resolution */\n protected maybeResolveSubalias(name: string): BaseRoot | GenericRoot | undefined;\n get ambient(): InternalModule;\n maybeResolve(name: string): Exclude | undefined;\n protected createParseContext(input: input): input & AttachedParseContext;\n traversal(root: unknown): Traversal;\n import(): SchemaModule<{\n [k in exportedNameOf<$> as PrivateDeclaration]: $[k];\n }>;\n import[]>(...names: names): SchemaModule<{\n [k in names[number] as PrivateDeclaration]: $[k];\n } & unknown>;\n precompilation: string | undefined;\n private _exportedResolutions;\n private _exports;\n export(): SchemaModule<{\n [k in exportedNameOf<$>]: $[k];\n }>;\n export[]>(...names: names): SchemaModule<{\n [k in names[number]]: $[k];\n } & unknown>;\n resolve>(name: name): instantiateRoot<$[name]>;\n node: , prereduced extends boolean = false>(kinds: kinds, nodeSchema: NodeSchema>, opts?: BaseParseOptions) => nodeOfKind : reducibleKindOf>>;\n parse: (def: unknown, opts?: BaseParseOptions) => BaseRoot;\n parseDefinition(def: unknown, opts?: BaseParseOptions): BaseRoot;\n finalize(node: node): node;\n protected abstract preparseOwnDefinitionFormat(def: unknown, opts: BaseParseOptions): BaseRoot | BaseParseContextInput;\n abstract parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot;\n protected abstract preparseOwnAliasEntry(k: string, v: unknown): AliasDefEntry;\n protected abstract normalizeRootScopeValue(resolution: unknown): unknown;\n}\ndeclare class SchemaScope<$ extends {} = {}> extends BaseScope<$> {\n parseOwnDefinitionFormat(def: unknown, ctx: NodeParseContext): BaseRoot;\n protected preparseOwnDefinitionFormat(schema: RootSchema, opts: BaseParseOptions): BaseRoot | NodeParseContextInput;\n protected preparseOwnAliasEntry(k: string, v: unknown): AliasDefEntry;\n protected normalizeRootScopeValue(v: unknown): unknown;\n}\ntype instantiateAliases = {\n [k in keyof aliases]: aliases[k] extends InternalResolution ? aliases[k] : BaseRoot;\n} & unknown;\ntype SchemaScopeParser = (aliases: {\n [k in keyof aliases]: conform;\n}, config?: ArkSchemaScopeConfig) => BaseScope>;\ndeclare const schemaScope: SchemaScopeParser;\ntype InternalSchemaParser = (schema: RootSchema, opts?: BaseParseOptions) => BaseRoot;\ndeclare const rootSchemaScope: SchemaScope;\ndeclare const parseAsSchema: (def: unknown, opts?: BaseParseOptions) => BaseRoot | ParseError;\ntype RootExportCache = Record;\ndeclare const writeUnresolvableMessage: (token: token) => writeUnresolvableMessage;\ntype writeUnresolvableMessage = `'${token}' is unresolvable`;\ndeclare const writeNonSubmoduleDotMessage: (name: name) => writeNonSubmoduleDotMessage;\ntype writeNonSubmoduleDotMessage = `'${name}' must reference a module to be accessed using dot syntax`;\ndeclare const writeMissingSubmoduleAccessMessage: (name: name) => writeMissingSubmoduleAccessMessage;\ntype writeMissingSubmoduleAccessMessage = `Reference to submodule '${name}' must specify an alias`;\ndeclare const rootSchema: BaseScope[\"schema\"];\ndeclare const node: BaseScope[\"node\"];\ndeclare const defineSchema: BaseScope[\"defineSchema\"];\ndeclare const genericNode: BaseScope[\"generic\"];\n\ndeclare class IndexNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n expression: string;\n flatRefs: FlatRef>[];\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n compile(): void;\n}\ndeclare namespace Index {\n type KeyKind = Exclude;\n type KeyNode = nodeOfKind;\n interface Schema extends BaseNormalizedSchema {\n readonly signature: RootSchema;\n readonly value: RootSchema;\n }\n interface Inner {\n readonly signature: KeyNode;\n readonly value: BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"index\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n }> {\n }\n type Node = IndexNode;\n}\ndeclare const Index: {\n implementation: nodeImplementationOf;\n Node: typeof IndexNode;\n};\ndeclare const writeEnumerableIndexBranches: (keys: string[]) => string;\ndeclare const writeInvalidPropertyKeyMessage: (indexSchema: indexSchema) => writeInvalidPropertyKeyMessage;\ntype writeInvalidPropertyKeyMessage = `Indexed key definition '${indexSchema}' must be a string or symbol`;\n\ndeclare class RequiredNode extends BaseProp<\"required\"> {\n expression: string;\n errorContext: NodeErrorContextInput<\"required\">;\n compiledErrorContext: string;\n}\ndeclare namespace Required$1 {\n interface ErrorContext extends BaseErrorContext<\"required\"> {\n missingValueDescription: string;\n }\n interface Schema extends Prop.Schema {\n }\n interface Inner extends Prop.Inner {\n }\n type Declaration = declareNode & {\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n errorContext: ErrorContext;\n }>;\n type Node = RequiredNode;\n}\ndeclare const Required$1: {\n implementation: nodeImplementationOf<{\n reducibleTo: \"required\";\n kind: \"required\";\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n schema: Required$1.Schema;\n normalizedSchema: Required$1.Schema;\n inner: Required$1.Inner;\n errorContext: Required$1.ErrorContext;\n }>;\n Node: typeof RequiredNode;\n};\n\ndeclare namespace Prop {\n type Kind = \"required\" | \"optional\";\n type Node = nodeOfKind;\n interface Schema extends BaseNormalizedSchema {\n readonly key: Key;\n readonly value: RootSchema;\n }\n interface Inner {\n readonly key: Key;\n readonly value: BaseRoot;\n }\n interface Declaration {\n kind: kind;\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n }\n}\ndeclare const intersectProps: (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => nodeOfKind | Disjoint | null;\ndeclare abstract class BaseProp extends BaseConstraint {\n required: boolean;\n optional: boolean;\n impliedBasis: BaseRoot;\n serializedKey: string;\n compiledKey: string;\n flatRefs: FlatRef[];\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n hasDefault(): this is Optional.Node.withDefault;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare const writeDefaultIntersectionMessage: (lValue: unknown, rValue: unknown) => string;\n\ndeclare class OptionalNode extends BaseProp<\"optional\"> {\n constructor(...args: ConstructorParameters);\n get outProp(): Prop.Node;\n expression: string;\n defaultValueMorph: Morph | undefined;\n defaultValueMorphRef: string | undefined;\n}\ndeclare namespace Optional {\n interface Schema extends Prop.Schema {\n default?: unknown;\n }\n interface Inner extends Prop.Inner {\n default?: unknown;\n }\n type Declaration = declareNode & {\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n }>;\n type Node = OptionalNode;\n namespace Node {\n type withDefault = requireKeys;\n }\n}\ndeclare const Optional: {\n implementation: nodeImplementationOf<{\n reducibleTo: \"optional\";\n errorContext: null;\n kind: \"optional\";\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n schema: Optional.Schema;\n normalizedSchema: Optional.Schema;\n inner: Optional.Inner;\n }>;\n Node: typeof OptionalNode;\n};\ndeclare const computeDefaultValueMorph: (key: PropertyKey, value: BaseRoot, defaultInput: unknown) => Morph;\ndeclare const assertDefaultValueAssignability: (node: BaseRoot, value: unknown, key: PropertyKey | null) => unknown;\ntype writeUnassignableDefaultValueMessage = `Default value ${defaultValue} must be assignable to ${baseDef}`;\ndeclare const writeNonPrimitiveNonFunctionDefaultValueMessage: (key: PropertyKey | null) => string;\n\ninterface BaseRangeDeclaration extends BaseNodeDeclaration {\n kind: RangeKind;\n inner: BaseRangeInner;\n normalizedSchema: UnknownExpandedRangeSchema;\n}\ndeclare abstract class BaseRange extends InternalPrimitiveConstraint {\n readonly exclusive?: true;\n readonly boundOperandKind: OperandKindsByBoundKind[d[\"kind\"]];\n readonly compiledActual: string;\n readonly comparator: RelativeComparator;\n readonly numericLimit: number;\n readonly expression: string;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly stringLimit: string;\n readonly limitKind: LimitKind;\n isStricterThan(r: nodeOfKind>): boolean;\n overlapsRange(r: nodeOfKind>): boolean;\n overlapIsUnit(r: nodeOfKind>): boolean;\n}\ninterface BaseRangeInner {\n readonly rule: LimitValue;\n}\ntype LimitValue = Date | number;\ntype LimitSchemaValue = Date | number | string;\ntype LimitInnerValue = kind extends \"before\" | \"after\" ? Date : number;\ninterface UnknownExpandedRangeSchema extends BaseNormalizedSchema {\n readonly rule: LimitSchemaValue;\n readonly exclusive?: boolean;\n}\ninterface UnknownNormalizedRangeSchema extends BaseNormalizedSchema {\n readonly rule: LimitSchemaValue;\n}\ntype UnknownRangeSchema = LimitSchemaValue | UnknownExpandedRangeSchema;\ninterface ExclusiveExpandedDateRangeSchema extends BaseNormalizedSchema {\n rule: LimitSchemaValue;\n exclusive?: true;\n}\ntype ExclusiveDateRangeSchema = LimitSchemaValue | ExclusiveExpandedDateRangeSchema;\ninterface InclusiveExpandedDateRangeSchema extends BaseNormalizedSchema {\n rule: LimitSchemaValue;\n exclusive?: false;\n}\ntype InclusiveDateRangeSchema = LimitSchemaValue | InclusiveExpandedDateRangeSchema;\ninterface ExclusiveNormalizedNumericRangeSchema extends BaseNormalizedSchema {\n rule: number;\n exclusive?: true;\n}\ntype ExclusiveNumericRangeSchema = number | ExclusiveNormalizedNumericRangeSchema;\ninterface InclusiveNormalizedNumericRangeSchema extends BaseNormalizedSchema {\n rule: number;\n exclusive?: false;\n}\ntype InclusiveNumericRangeSchema = number | InclusiveNormalizedNumericRangeSchema;\ntype LimitKind = \"lower\" | \"upper\";\ntype RelativeComparator = {\n lower: \">\" | \">=\";\n upper: \"<\" | \"<=\";\n}[kind];\ndeclare const boundKindPairsByLower: BoundKindPairsByLower;\ntype BoundKindPairsByLower = {\n min: \"max\";\n minLength: \"maxLength\";\n after: \"before\";\n};\ntype BoundKindPairsByUpper = {\n max: \"min\";\n maxLength: \"minLength\";\n before: \"after\";\n};\ntype pairedRangeKind = kind extends LowerBoundKind ? BoundKindPairsByLower[kind] : BoundKindPairsByUpper[kind & UpperBoundKind];\ntype LowerBoundKind = keyof typeof boundKindPairsByLower;\ntype LowerNode = nodeOfKind;\ntype UpperBoundKind = propValueOf;\ntype UpperNode = nodeOfKind;\ntype NumericallyBoundable = string | number | array;\ntype Boundable = NumericallyBoundable | Date;\ndeclare const parseExclusiveKey: keySchemaDefinitions>[\"exclusive\"];\ndeclare const createLengthSchemaNormalizer: (kind: kind) => (schema: NodeSchema) => NormalizedSchema;\ndeclare const createDateSchemaNormalizer: (kind: kind) => (schema: NodeSchema) => NormalizedSchema;\ndeclare const parseDateLimit: (limit: LimitSchemaValue) => Date;\ntype LengthBoundKind = \"minLength\" | \"maxLength\" | \"exactLength\";\ndeclare const writeInvalidLengthBoundMessage: (kind: LengthBoundKind, limit: number) => string;\ndeclare const createLengthRuleParser: (kind: LengthBoundKind) => (limit: number) => number | undefined;\ntype OperandKindsByBoundKind = satisfy, {\n min: \"value\";\n max: \"value\";\n minLength: \"length\";\n maxLength: \"length\";\n after: \"date\";\n before: \"date\";\n}>;\ndeclare const compileComparator: (kind: RangeKind, exclusive: boolean | undefined) => RelativeComparator;\ntype BoundOperandKind = \"value\" | \"length\" | \"date\";\ntype LengthBoundableData = string | array;\ntype DateRangeKind = \"before\" | \"after\";\ndeclare const dateLimitToString: (limit: LimitSchemaValue) => string;\ndeclare const writeUnboundableMessage: (root: root) => writeUnboundableMessage;\ntype writeUnboundableMessage = `Bounded expression ${root} must be exactly one of number, string, Array, or Date`;\n\ndeclare class ExactLengthNode extends InternalPrimitiveConstraint {\n traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n readonly expression: string;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace ExactLength {\n interface Inner {\n readonly rule: number;\n }\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"exactLength\">, Inner {\n }\n type Declaration = declareNode<{\n kind: \"exactLength\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n errorContext: ErrorContext;\n }>;\n type Node = ExactLengthNode;\n}\ndeclare const ExactLength: {\n implementation: nodeImplementationOf<{\n intersectionIsOpen: false;\n childKind: never;\n reducibleTo: \"exactLength\";\n kind: \"exactLength\";\n schema: ExactLength.Schema;\n normalizedSchema: ExactLength.NormalizedSchema;\n inner: ExactLength.Inner;\n prerequisite: LengthBoundableData;\n errorContext: ExactLength.ErrorContext;\n }>;\n Node: typeof ExactLengthNode;\n};\n\ndeclare class MaxLengthNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace MaxLength {\n interface Inner extends BaseRangeInner {\n rule: number;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: number;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = ExpandedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"maxLength\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"maxLength\";\n schema: Schema;\n reducibleTo: \"exactLength\";\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MaxLengthNode;\n}\ndeclare const MaxLength: {\n implementation: nodeImplementationOf;\n Node: typeof MaxLengthNode;\n};\n\ndeclare class MinLengthNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace MinLength {\n interface Inner extends BaseRangeInner {\n rule: number;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: number;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = ExpandedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"minLength\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"minLength\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n reducibleTo: \"intersection\";\n errorContext: ErrorContext;\n }> {\n }\n type Node = MinLengthNode;\n}\ndeclare const MinLength: {\n implementation: nodeImplementationOf;\n Node: typeof MinLengthNode;\n};\n\ndeclare class SequenceNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n tuple: SequenceTuple;\n prefixLength: number;\n defaultablesLength: number;\n optionalsLength: number;\n postfixLength: number;\n defaultablesAndOptionals: BaseRoot[];\n prevariadic: array;\n variadicOrPostfix: array;\n flatRefs: FlatRef[];\n protected addFlatRefs(): FlatRef[];\n isVariadicOnly: boolean;\n minVariadicLength: number;\n minLength: number;\n minLengthNode: MinLengthNode | null;\n maxLength: number | null;\n maxLengthNode: MaxLengthNode | ExactLengthNode | null;\n impliedSiblings: array;\n defaultValueMorphs: Morph[];\n defaultValueMorphsReference: `$ark.${string}` | `$ark0.${string}` | `$ark${`1${string}` & `${bigint}`}.${string}` | `$ark${`4${string}` & `${bigint}`}.${string}` | `$ark${`2${string}` & `${bigint}`}.${string}` | `$ark${`3${string}` & `${bigint}`}.${string}` | `$ark${`5${string}` & `${bigint}`}.${string}` | `$ark${`6${string}` & `${bigint}`}.${string}` | `$ark${`7${string}` & `${bigint}`}.${string}` | `$ark${`8${string}` & `${bigint}`}.${string}` | `$ark${`9${string}` & `${bigint}`}.${string}` | undefined;\n protected elementAtIndex(data: array, index: number): SequenceElement;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n get element(): BaseRoot;\n compile(js: NodeCompiler): void;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n expression: string;\n reduceJsonSchema(schema: JsonSchema.Array, ctx: ToJsonSchema.Context): JsonSchema.Array;\n}\ndeclare namespace Sequence {\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly prefix?: array;\n readonly defaultables?: array;\n readonly optionals?: array;\n readonly variadic?: RootSchema;\n readonly minVariadicLength?: number;\n readonly postfix?: array;\n }\n type Schema = NormalizedSchema | RootSchema;\n type DefaultableSchema = [schema: RootSchema, defaultValue: unknown];\n type DefaultableElement = [node: BaseRoot, defaultValue: unknown];\n interface Inner {\n readonly prefix?: array;\n readonly defaultables?: array;\n readonly optionals?: array;\n readonly variadic?: BaseRoot;\n readonly minVariadicLength?: number;\n readonly postfix?: array;\n }\n interface Declaration extends declareNode<{\n kind: \"sequence\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: array;\n reducibleTo: \"sequence\";\n childKind: RootKind;\n }> {\n }\n type Node = SequenceNode;\n}\ndeclare const Sequence: {\n implementation: nodeImplementationOf;\n Node: typeof SequenceNode;\n};\ndeclare const postfixAfterOptionalOrDefaultableMessage = \"A postfix required element cannot follow an optional or defaultable element\";\ntype postfixAfterOptionalOrDefaultableMessage = typeof postfixAfterOptionalOrDefaultableMessage;\ndeclare const postfixWithoutVariadicMessage = \"A postfix element requires a variadic element\";\ntype postfixWithoutVariadicMessage = typeof postfixWithoutVariadicMessage;\ntype SequenceElement = PrevariadicSequenceElement | VariadicSequenceElement | PostfixSequenceElement;\ntype SequenceElementKind = satisfy;\ntype PrevariadicSequenceElement = PrefixSequenceElement | DefaultableSequenceElement | OptionalSequenceElement;\ntype PrefixSequenceElement = {\n kind: \"prefix\";\n node: BaseRoot;\n};\ntype OptionalSequenceElement = {\n kind: \"optionals\";\n node: BaseRoot;\n};\ntype PostfixSequenceElement = {\n kind: \"postfix\";\n node: BaseRoot;\n};\ntype VariadicSequenceElement = {\n kind: \"variadic\";\n node: BaseRoot;\n};\ntype DefaultableSequenceElement = {\n kind: \"defaultables\";\n node: BaseRoot;\n default: unknown;\n};\ntype SequenceTuple = array;\n\n/**\n * - `\"ignore\"` (default) - allow and preserve extra properties\n * - `\"reject\"` - disallow extra properties\n * - `\"delete\"` - clone and remove extra properties from output\n */\ntype UndeclaredKeyBehavior = \"ignore\" | UndeclaredKeyHandling;\ntype UndeclaredKeyHandling = \"reject\" | \"delete\";\ndeclare class StructureNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n impliedSiblings: BaseConstraint[];\n props: array;\n propsByKey: Record;\n propsByKeyReference: RegisteredReference;\n expression: string;\n requiredKeys: Key[];\n optionalKeys: Key[];\n literalKeys: Key[];\n _keyof: BaseRoot | undefined;\n keyof(): BaseRoot;\n map(flatMapProp: PropFlatMapper): StructureNode;\n assertHasKeys(keys: array): void;\n get(indexer: GettableKeyOrNode, ...path: array): BaseRoot;\n pick(...keys: KeyOrKeyNode[]): StructureNode;\n omit(...keys: KeyOrKeyNode[]): StructureNode;\n optionalize(): StructureNode;\n require(): StructureNode;\n merge(r: StructureNode): StructureNode;\n private filterKeys;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n protected _traverse: (traversalKind: TraversalKind, data: object, ctx: InternalTraversal) => boolean;\n get defaultable(): Optional.Node.withDefault[];\n declaresKey: (k: Key) => boolean;\n _compileDeclaresKey(js: NodeCompiler): string;\n get structuralMorph(): Morph | undefined;\n structuralMorphRef: RegisteredReference | undefined;\n compile(js: NodeCompiler): unknown;\n protected compileExhaustiveEntry(js: NodeCompiler): NodeCompiler;\n reduceJsonSchema(schema: JsonSchema.Structure, ctx: ToJsonSchema.Context): JsonSchema.Structure;\n reduceObjectJsonSchema(schema: JsonSchema.Object, ctx: ToJsonSchema.Context): JsonSchema.Object;\n}\ntype PropFlatMapper = (entry: Prop.Node) => listable;\ntype MappedPropInner = BaseMappedPropInner | OptionalMappedPropInner;\ninterface BaseMappedPropInner extends Required$1.Schema {\n kind?: \"required\" | \"optional\";\n}\ninterface OptionalMappedPropInner extends Optional.Schema {\n kind: \"optional\";\n}\ndeclare namespace Structure {\n interface Schema extends BaseNormalizedSchema {\n readonly optional?: readonly Optional.Schema[];\n readonly required?: readonly Required$1.Schema[];\n readonly index?: readonly Index.Schema[];\n readonly sequence?: Sequence.Schema;\n readonly undeclared?: UndeclaredKeyBehavior;\n }\n interface Inner {\n readonly optional?: readonly Optional.Node[];\n readonly required?: readonly Required$1.Node[];\n readonly index?: readonly Index.Node[];\n readonly sequence?: Sequence.Node;\n readonly undeclared?: UndeclaredKeyHandling;\n }\n namespace Inner {\n type mutable = makeRootAndArrayPropertiesMutable;\n }\n interface Declaration extends declareNode<{\n kind: \"structure\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n prerequisite: object;\n childKind: StructuralKind;\n }> {\n }\n type Node = StructureNode;\n}\ndeclare const Structure: {\n implementation: nodeImplementationOf;\n Node: typeof StructureNode;\n};\ndeclare const writeNumberIndexMessage: (indexExpression: string, sequenceExpression: string) => string;\ntype NormalizedIndex = {\n index?: Index.Node;\n required?: Required$1.Node[];\n optional?: Optional.Node[];\n};\n/** extract enumerable named props from an index signature */\ndeclare const normalizeIndex: (signature: BaseRoot, value: BaseRoot, $: BaseScope) => NormalizedIndex;\ndeclare const typeKeyToString: (k: KeyOrKeyNode) => string;\ndeclare const writeInvalidKeysMessage: >(o: o, keys: keys) => string;\n\ndeclare const basisKinds: readonly [\"unit\", \"proto\", \"domain\"];\ntype BasisKind = (typeof basisKinds)[number];\ndeclare const structuralKinds: readonly [\"required\", \"optional\", \"index\", \"sequence\"];\ntype StructuralKind = (typeof structuralKinds)[number];\ntype RangeKind = Exclude;\ntype BoundKind = Exclude;\ndeclare const refinementKinds: readonly [\"pattern\", \"divisor\", \"exactLength\", \"max\", \"min\", \"maxLength\", \"minLength\", \"before\", \"after\"];\ntype RefinementKind = (typeof refinementKinds)[number];\ntype orderedConstraintKinds = [\n ...typeof refinementKinds,\n ...typeof structuralKinds,\n \"structure\",\n \"predicate\"\n];\ndeclare const constraintKinds: orderedConstraintKinds;\ntype ConstraintKind = (typeof constraintKinds)[number];\ndeclare const rootKinds: readonly [\"alias\", \"union\", \"morph\", \"unit\", \"intersection\", \"proto\", \"domain\"];\ntype RootKind = (typeof rootKinds)[number];\ntype NodeKind = RootKind | ConstraintKind;\ntype orderedNodeKinds = [...typeof rootKinds, ...typeof constraintKinds];\ndeclare const nodeKinds: orderedNodeKinds;\ntype OpenNodeKind = {\n [k in NodeKind]: Declaration[\"intersectionIsOpen\"] extends true ? k : never;\n}[NodeKind];\ntype ClosedNodeKind = Exclude;\ntype PrimitiveKind = RefinementKind | BasisKind | \"predicate\";\ntype CompositeKind = Exclude;\ntype OrderedNodeKinds = typeof nodeKinds;\ndeclare const constraintKeys: KeySet;\ndeclare const structureKeys: keySetOf;\ntype RightsByKind = accumulateRightKinds;\ntype kindOrRightOf = kind | kindRightOf;\ntype kindLeftOf = Exclude>;\ntype kindOrLeftOf = kind | kindLeftOf;\ntype accumulateRightKinds = remaining extends (readonly [infer head extends NodeKind, ...infer tail extends NodeKind[]]) ? accumulateRightKinds : result;\ninterface InternalIntersectionOptions {\n pipe: boolean;\n}\ninterface IntersectionContext extends InternalIntersectionOptions {\n $: BaseScope;\n invert: boolean;\n}\ntype ConstraintIntersection> = (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => BaseNode | Disjoint | null;\ntype ConstraintIntersectionMap = show<{\n [_ in kind]: ConstraintIntersection;\n} & {\n [rKind in kindRightOf]?: ConstraintIntersection;\n}>;\ntype RootIntersection> = (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => BaseRoot | Disjoint;\ntype TypeIntersectionMap = {\n [rKind in schemaKindOrRightOf]: RootIntersection;\n};\ntype IntersectionMap = kind extends RootKind ? TypeIntersectionMap : ConstraintIntersectionMap;\ntype UnknownIntersectionMap = {\n [k in NodeKind]?: (l: BaseNode, r: BaseNode, ctx: IntersectionContext) => UnknownIntersectionResult;\n};\ntype UnknownIntersectionResult = BaseNode | Disjoint | null;\ntype PrecedenceByKind = {\n [i in arrayIndexOf as OrderedNodeKinds[i]]: i;\n};\ndeclare const precedenceByKind: PrecedenceByKind;\ndeclare const isNodeKind: (value: unknown) => value is NodeKind;\ndeclare function assertNodeKind(value: BaseNode, kind: kind): asserts value is nodeOfKind;\ntype precedenceOfKind = PrecedenceByKind[kind];\ndeclare const precedenceOfKind: (kind: kind) => precedenceOfKind;\ntype kindRightOf = RightsByKind[kind];\ndeclare const schemaKindsRightOf: (kind: kind) => schemaKindRightOf[];\ndeclare const unionChildKinds: readonly [...(\"intersection\" | \"morph\" | \"unit\" | \"proto\" | \"domain\")[], \"alias\"];\ntype UnionChildKind = (typeof unionChildKinds)[number];\ndeclare const morphChildKinds: readonly [...(\"intersection\" | \"unit\" | \"proto\" | \"domain\")[], \"alias\"];\ntype MorphChildKind = (typeof morphChildKinds)[number];\ntype keySchemaDefinitions = {\n [k in keyRequiringSchemaDefinition]: NodeKeyImplementation;\n};\ntype keyRequiringSchemaDefinition = Exclude;\ndeclare const defaultValueSerializer: (v: unknown) => Json;\ntype NodeKeyImplementation : never> = requireKeys<{\n preserveUndefined?: true;\n child?: boolean | ((value: instantiated) => BaseNode[]);\n serialize?: (schema: instantiated) => Json;\n reduceIo?: (ioKind: \"in\" | \"out\", inner: makeRootAndArrayPropertiesMutable, value: d[\"inner\"][k]) => void;\n parse?: (schema: Exclude, ctx: NodeParseContext) => instantiated | undefined;\n}, (d[\"normalizedSchema\"][k] extends instantiated | undefined ? never : \"parse\") | ([instantiated] extends [listable] ? \"child\" : never)>;\ninterface CommonNodeImplementationInput {\n kind: d[\"kind\"];\n keys: keySchemaDefinitions;\n normalize: (schema: d[\"schema\"], $: BaseScope) => d[\"normalizedSchema\"];\n applyConfig?: (schema: d[\"normalizedSchema\"], config: ResolvedScopeConfig) => d[\"normalizedSchema\"];\n hasAssociatedError: d[\"errorContext\"] extends null ? false : true;\n finalizeInnerJson?: (json: {\n [k in keyof d[\"inner\"]]: Json;\n }) => JsonStructure;\n collapsibleKey?: keyof d[\"inner\"];\n reduce?: (inner: d[\"inner\"], $: BaseScope) => nodeOfKind | Disjoint | undefined;\n obviatesBasisDescription?: d[\"kind\"] extends RefinementKind ? true : never;\n obviatesBasisExpression?: d[\"kind\"] extends RefinementKind ? true : never;\n}\ninterface UnknownNodeImplementation extends CommonNodeImplementationInput {\n defaults: ResolvedUnknownNodeConfig;\n intersectionIsOpen: boolean;\n intersections: UnknownIntersectionMap;\n keys: Record>;\n}\ndeclare const compileObjectLiteral: (ctx: object) => string;\ntype nodeImplementationOf = nodeImplementationInputOf & {\n intersections: IntersectionMap;\n intersectionIsOpen: d[\"intersectionIsOpen\"];\n defaults: Required>;\n};\ntype nodeImplementationInputOf = CommonNodeImplementationInput & {\n intersections: IntersectionMap;\n defaults: nodeSchemaaultsImplementationInputFor;\n} & (d[\"intersectionIsOpen\"] extends true ? {\n intersectionIsOpen: true;\n} : {}) & (d[\"reducibleTo\"] extends d[\"kind\"] ? {} : {\n reduce: {};\n});\ntype nodeSchemaaultsImplementationInputFor = requireKeys, \"description\" | (Inner extends (Omit, keyof BaseErrorContext | \"description\">) ? never : \"expected\" & keyof NodeConfig)>;\ntype DescriptionWriter = (node: nodeOfKind) => string;\ninterface UnknownAttachments {\n readonly kind: NodeKind;\n readonly impl: UnknownNodeImplementation;\n readonly id: NodeId;\n readonly inner: Record;\n readonly innerEntries: readonly Entry[];\n readonly innerJson: object;\n readonly innerHash: string;\n readonly meta: NodeMeta;\n readonly metaJson: object;\n readonly json: object;\n readonly hash: string;\n readonly collapsibleJson: Json;\n readonly children: BaseNode[];\n}\ninterface NarrowedAttachments extends UnknownAttachments {\n kind: d[\"kind\"];\n inner: d[\"inner\"];\n json: JsonStructure;\n innerJson: JsonStructure;\n collapsibleJson: Json;\n children: nodeOfKind[];\n}\ndeclare const implementNode: (_: nodeImplementationInputOf) => nodeImplementationOf;\n\ndeclare abstract class InternalBasis extends BaseRoot {\n abstract compiledCondition: string;\n abstract compiledNegation: string;\n structure: undefined;\n traverseApply: TraverseApply;\n get errorContext(): d[\"errorContext\"];\n get compiledErrorContext(): string;\n compile(js: NodeCompiler): void;\n}\n\ndeclare class DomainNode extends InternalBasis {\n private readonly requiresNaNCheck;\n readonly traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly expression: string;\n get nestableExpression(): string;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema.Constrainable;\n}\ntype Domain = Domain$1;\ndeclare namespace Domain {\n type Enumerable = \"undefined\" | \"null\" | \"boolean\";\n type NonEnumerable = Exclude;\n interface Inner {\n readonly domain: domain;\n readonly numberAllowsNaN?: boolean;\n }\n interface NormalizedSchema extends BaseNormalizedSchema, Inner {\n }\n type Schema = domain | NormalizedSchema;\n interface ErrorContext extends BaseErrorContext<\"domain\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"domain\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = DomainNode;\n}\ndeclare const Domain: {\n implementation: nodeImplementationOf;\n Node: typeof DomainNode;\n writeBadAllowNanMessage: (actual: Exclude) => string;\n};\n\ninterface DisjointEntry {\n kind: kind;\n l: OperandsByDisjointKind[kind];\n r: OperandsByDisjointKind[kind];\n path: Key[];\n optional: boolean;\n}\ntype OperandsByDisjointKind = {\n domain: nodeOfKind<\"domain\"> | Domain.Enumerable;\n unit: nodeOfKind<\"unit\">;\n proto: nodeOfKind<\"proto\">;\n presence: BaseRoot;\n range: nodeOfKind;\n assignability: BaseNode;\n union: readonly BaseRoot[];\n};\ntype DisjointEntryContext = {\n path?: Key[];\n optional?: true;\n};\ndeclare class Disjoint extends Array {\n static init(kind: kind, l: OperandsByDisjointKind[kind], r: OperandsByDisjointKind[kind], ctx?: DisjointEntryContext): Disjoint;\n add(kind: kind, l: OperandsByDisjointKind[kind], r: OperandsByDisjointKind[kind], ctx?: DisjointEntryContext): Disjoint;\n get summary(): string;\n describeReasons(): string;\n throw(): never;\n invert(): Disjoint;\n withPrefixKey(key: PropertyKey, kind: Prop.Kind): Disjoint;\n toNeverIfDisjoint(): BaseRoot;\n}\ntype DisjointKind = keyof OperandsByDisjointKind;\ndeclare const writeUnsatisfiableExpressionError: (expression: expression) => writeUnsatisfiableExpressionError;\ntype writeUnsatisfiableExpressionError = `${expression} results in an unsatisfiable type`;\n\ntype withMetaPrefixedKeys = {\n [k in keyof o as k extends string ? `meta.${k}` : never]: o[k];\n};\ninterface DefaultArkEnv {\n meta(): {};\n onFail(errors: ArkErrors): ArkErrors;\n}\ninterface NodeMeta extends JsonSchema.UniversalMeta, UnknownErrorConfigs {\n alias?: string;\n onFail?: ArkErrors.Handler;\n}\ndeclare global {\n export interface ArkEnv extends DefaultArkEnv {\n }\n export namespace ArkEnv {\n type meta = show>;\n type onFail = ReturnType;\n }\n}\ntype TypeMeta = Omit;\ndeclare namespace TypeMeta {\n type Collapsible = meta | string;\n type Mapper = (existing: Readonly) => meta;\n type MappableInput = Collapsible | Mapper;\n namespace MappableInput {\n type Internal = MappableInput;\n }\n}\ninterface BaseNormalizedSchema extends withMetaPrefixedKeys {\n readonly meta?: ArkEnv.meta | string;\n}\ninterface DeclarationInput {\n kind: NodeKind;\n schema: unknown;\n normalizedSchema: BaseNormalizedSchema;\n inner: object;\n errorContext?: BaseErrorContext;\n reducibleTo?: NodeKind;\n intersectionIsOpen?: true;\n prerequisite?: unknown;\n childKind?: NodeKind;\n}\ninterface BaseErrorContext {\n readonly description?: string;\n readonly code: kind;\n readonly meta: NodeMeta;\n}\ntype defaultErrorContext = show & d[\"inner\"]>;\ntype declareNode = merge<{\n intersectionIsOpen: false;\n prerequisite: prerequisiteOf;\n childKind: never;\n reducibleTo: d[\"kind\"];\n errorContext: null;\n}, d>;\ntype prerequisiteOf = \"prerequisite\" extends keyof d ? d[\"prerequisite\"] : unknown;\ntype attachmentsOf = NarrowedAttachments & attachedInner;\ntype attachedInner = \"intersection\" & d[\"kind\"] extends never ? d[\"inner\"] : {};\ninterface BaseNodeDeclaration {\n kind: NodeKind;\n schema: unknown;\n normalizedSchema: BaseNormalizedSchema;\n inner: {};\n reducibleTo: NodeKind;\n prerequisite: any;\n intersectionIsOpen: boolean;\n childKind: NodeKind;\n errorContext: BaseErrorContext | null;\n}\ntype ownIntersectionResult = nodeOfKind> | Disjoint;\n\ndeclare class DivisorNode extends InternalPrimitiveConstraint {\n traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n readonly expression: string;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Divisor {\n interface Inner {\n readonly rule: number;\n }\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"divisor\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"divisor\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = DivisorNode;\n}\ndeclare const Divisor: {\n implementation: nodeImplementationOf;\n Node: typeof DivisorNode;\n};\ndeclare const writeIndivisibleMessage: (t: BaseRoot) => string;\ntype writeIndivisibleMessage = writeInvalidOperandMessage<\"divisor\", actual>;\ndeclare const writeNonIntegerDivisorMessage: (divisor: divisor) => writeNonIntegerDivisorMessage;\ntype writeNonIntegerDivisorMessage = `divisor must be an integer (was ${divisor})`;\n\ndeclare class PatternNode extends InternalPrimitiveConstraint {\n readonly instance: RegExp;\n readonly expression: string;\n traverseAllows: (string: string) => boolean;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n reduceJsonSchema(base: JsonSchema.String, ctx: ToJsonSchema.Context): JsonSchema.String;\n}\ndeclare namespace Pattern {\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: string;\n readonly flags?: string;\n }\n interface Inner {\n readonly rule: string;\n readonly flags?: string;\n }\n type Schema = NormalizedSchema | string | RegExp;\n interface ErrorContext extends BaseErrorContext<\"pattern\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"pattern\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n intersectionIsOpen: true;\n prerequisite: string;\n errorContext: ErrorContext;\n }> {\n }\n type Node = PatternNode;\n}\ndeclare const Pattern: {\n implementation: nodeImplementationOf;\n Node: typeof PatternNode;\n};\n\ndeclare class UnitNode extends InternalBasis {\n compiledValue: JsonPrimitive;\n serializedValue: string;\n compiledCondition: string;\n compiledNegation: string;\n expression: string;\n domain: Domain$1;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n}\ndeclare namespace Unit {\n interface Schema extends BaseNormalizedSchema {\n readonly unit: value;\n }\n interface Inner {\n readonly unit: value;\n }\n interface ErrorContext extends BaseErrorContext<\"unit\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"unit\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = UnitNode;\n}\ndeclare const Unit: {\n implementation: nodeImplementationOf;\n Node: typeof UnitNode;\n};\n\ndeclare class UnionNode extends BaseRoot {\n isBoolean: boolean;\n get branchGroups(): BaseRoot[];\n unitBranches: (MorphNode | UnitNode)[];\n discriminant: Discriminant | null;\n discriminantJson: JsonStructure | null;\n expression: string;\n createBranchedOptimisticRootApply(): BaseNode[\"rootApply\"];\n get shallowMorphs(): array;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n traverseOptimistic: (data: unknown) => unknown;\n compile(js: NodeCompiler): void;\n private compileIndiscriminable;\n get nestableExpression(): string;\n discriminate(): Discriminant | null;\n}\ndeclare namespace Union {\n type ChildKind = UnionChildKind;\n type ChildSchema = NodeSchema;\n type ChildNode = nodeOfKind;\n type Schema = NormalizedSchema | readonly RootSchema[];\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly branches: array;\n readonly ordered?: true;\n }\n interface Inner {\n readonly branches: readonly ChildNode[];\n readonly ordered?: true;\n }\n interface ErrorContext extends BaseErrorContext<\"union\"> {\n errors: readonly ArkError[];\n }\n interface Declaration extends declareNode<{\n kind: \"union\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n reducibleTo: RootKind;\n childKind: UnionChildKind;\n }> {\n }\n type Node = UnionNode;\n}\ndeclare const Union: {\n implementation: nodeImplementationOf;\n Node: typeof UnionNode;\n};\ntype DescribeBranchesOptions = {\n delimiter?: string;\n finalDelimiter?: string;\n};\ndeclare const describeBranches: (descriptions: string[], opts?: DescribeBranchesOptions) => string;\ndeclare const intersectBranches: (l: readonly Union.ChildNode[], r: readonly Union.ChildNode[], ctx: IntersectionContext) => readonly Union.ChildNode[] | Disjoint;\ndeclare const reduceBranches: ({ branches, ordered }: Union.Inner) => readonly Union.ChildNode[];\ntype CaseKey = DiscriminantKind extends kind ? string : DiscriminantKinds[kind] | \"default\";\ntype DiscriminantLocation = {\n path: PropertyKey[];\n optionallyChainedPropString: string;\n kind: kind;\n};\ninterface Discriminant extends DiscriminantLocation {\n cases: DiscriminatedCases;\n}\ntype CaseContext = {\n branchIndices: number[];\n condition: nodeOfKind | Domain.Enumerable;\n};\ntype CaseDiscriminant = nodeOfKind | Domain.Enumerable;\ntype DiscriminatedCases = {\n [caseKey in CaseKey]: BaseRoot | true;\n};\ntype DiscriminantKinds = {\n domain: Domain;\n unit: SerializedPrimitive | RegisteredReference;\n};\ntype DiscriminantKind = show;\ndeclare const pruneDiscriminant: (discriminantBranch: BaseRoot, discriminantCtx: DiscriminantLocation) => BaseRoot | null;\ndeclare const writeIndiscriminableMorphMessage: (lDescription: string, rDescription: string) => string;\ndeclare const writeOrderedIntersectionMessage: (lDescription: string, rDescription: string) => string;\n\ninterface InternalRootDeclaration extends BaseNodeDeclaration {\n kind: RootKind;\n}\ndeclare abstract class BaseRoot<\n/** @ts-ignore cast variance */\nout d extends InternalRootDeclaration = InternalRootDeclaration> extends BaseNode implements StandardSchemaV1 {\n readonly [arkKind]: \"root\";\n readonly [inferred]: unknown;\n constructor(attachments: UnknownAttachments, $: BaseScope);\n get internal(): this;\n get \"~standard\"(): StandardSchemaV1.ArkTypeProps;\n as(): this;\n brand(name: string): this;\n readonly(): this;\n readonly branches: readonly nodeOfKind[];\n distribute(mapBranch: (branch: nodeOfKind, i: number, branches: array>) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut;\n abstract get defaultShortDescription(): string;\n get shortDescription(): string;\n toJsonSchema(opts?: ToJsonSchema.Options): JsonSchema;\n toJsonSchemaRecurse(ctx: ToJsonSchema.Context): JsonSchema;\n get alwaysExpandJsonSchema(): boolean;\n protected toResolvedJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n protected abstract innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n intersect(r: unknown): BaseRoot | Disjoint;\n rawIntersect(r: BaseRoot): BaseRoot;\n toNeverIfDisjoint(): BaseRoot;\n and(r: unknown): BaseRoot;\n rawAnd(r: BaseRoot): BaseRoot;\n or(r: unknown): BaseRoot;\n rawOr(r: BaseRoot): BaseRoot;\n map(flatMapEntry: PropFlatMapper): BaseRoot;\n pick(...keys: KeyOrKeyNode[]): BaseRoot;\n omit(...keys: KeyOrKeyNode[]): BaseRoot;\n required(): BaseRoot;\n partial(): BaseRoot;\n private _keyof?;\n keyof(): BaseRoot;\n get props(): Prop.Node[];\n merge(r: unknown): BaseRoot;\n private applyStructuralOperation;\n get(...path: GettableKeyOrNode[]): BaseRoot;\n extract(r: unknown): BaseRoot;\n exclude(r: unknown): BaseRoot;\n array(): BaseRoot;\n overlaps(r: unknown): boolean;\n extends(r: unknown): boolean;\n ifExtends(r: unknown): BaseRoot | undefined;\n subsumes(r: unknown): boolean;\n configure(meta: TypeMeta.MappableInput, selector?: NodeSelector): this;\n describe(description: string, selector?: NodeSelector): this;\n optional(): [this, \"?\"];\n default(thunkableValue: unknown): [this, \"=\", unknown];\n from(input: unknown): unknown;\n protected _pipe(...morphs: Morph[]): BaseRoot;\n protected tryPipe(...morphs: Morph[]): BaseRoot;\n pipe: ((...morphs: Morph[]) => BaseRoot) & {\n try: (...morphs: Morph[]) => BaseRoot;\n };\n to(def: unknown): BaseRoot;\n private toNode;\n rawPipeOnce(morph: Morph): BaseRoot;\n narrow(predicate: Predicate): BaseRoot;\n constrain(kind: kind, schema: NodeSchema): BaseRoot;\n constrainIn(kind: kind, schema: NodeSchema): BaseRoot;\n constrainOut(kind: kind, schema: NodeSchema): BaseRoot;\n private _constrain;\n onUndeclaredKey(cfg: UndeclaredKeyBehavior | UndeclaredKeyConfig): BaseRoot;\n hasEqualMorphs(r: BaseRoot): boolean;\n onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): BaseRoot;\n filter(predicate: Predicate): BaseRoot;\n divisibleBy(schema: Divisor.Schema): BaseRoot;\n matching(schema: Pattern.Schema): BaseRoot;\n atLeast(schema: InclusiveNumericRangeSchema): BaseRoot;\n atMost(schema: InclusiveNumericRangeSchema): BaseRoot;\n moreThan(schema: ExclusiveNumericRangeSchema): BaseRoot;\n lessThan(schema: ExclusiveNumericRangeSchema): BaseRoot;\n atLeastLength(schema: InclusiveNumericRangeSchema): BaseRoot;\n atMostLength(schema: InclusiveNumericRangeSchema): BaseRoot;\n moreThanLength(schema: ExclusiveNumericRangeSchema): BaseRoot;\n lessThanLength(schema: ExclusiveNumericRangeSchema): BaseRoot;\n exactlyLength(schema: ExactLength.Schema): BaseRoot;\n atOrAfter(schema: InclusiveDateRangeSchema): BaseRoot;\n atOrBefore(schema: InclusiveDateRangeSchema): BaseRoot;\n laterThan(schema: ExclusiveDateRangeSchema): BaseRoot;\n earlierThan(schema: ExclusiveDateRangeSchema): BaseRoot;\n}\ntype UndeclaredKeyConfig = {\n rule: UndeclaredKeyBehavior;\n deep?: boolean;\n};\ndeclare const emptyBrandNameMessage = \"Expected a non-empty brand name after #\";\ntype emptyBrandNameMessage = typeof emptyBrandNameMessage;\ndeclare const exclusivizeRangeSchema: (schema: schema) => schema;\ntype exclusivizeRangeSchema = schema extends LimitSchemaValue ? {\n rule: schema;\n exclusive: true;\n} : schema;\ndeclare const typeOrTermExtends: (t: unknown, base: unknown) => boolean;\ntype intersectRoot = [\n l,\n r\n] extends [r, l] ? l : asymmetricIntersectionOf | asymmetricIntersectionOf;\ntype asymmetricIntersectionOf = l extends unknown ? r extends kindRightOf ? l | reducibleKindOf : never : never;\ntype schemaKindRightOf = Extract, RootKind>;\ntype schemaKindOrRightOf = kind | schemaKindRightOf;\ntype StructuralOperationBranchResultByName = {\n keyof: Union.ChildNode;\n pick: Union.ChildNode;\n omit: Union.ChildNode;\n get: Union.ChildNode;\n map: Union.ChildNode;\n required: Union.ChildNode;\n partial: Union.ChildNode;\n merge: Union.ChildNode;\n props: array;\n};\ntype StructuralOperationName = keyof StructuralOperationBranchResultByName;\ndeclare const writeLiteralUnionEntriesMessage: (expression: string) => string;\ndeclare const writeNonStructuralOperandMessage: (operation: operation, operand: operand) => writeNonStructuralOperandMessage;\ntype writeNonStructuralOperandMessage = `${operation} operand must be an object (was ${operand})`;\n\ndeclare class MorphNode extends BaseRoot {\n serializedMorphs: string[];\n compiledMorphs: string;\n lastMorph: BaseRoot | Morph | undefined;\n lastMorphIfNode: BaseRoot | undefined;\n introspectableIn: BaseRoot | undefined;\n introspectableOut: BaseRoot | undefined;\n get shallowMorphs(): array;\n get in(): BaseRoot;\n get out(): BaseRoot;\n declareIn(declaredIn: BaseRoot): MorphNode;\n declareOut(declaredOut: BaseRoot): MorphNode;\n expression: string;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n compile(js: NodeCompiler): void;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n /** Check if the morphs of r are equal to those of this node */\n hasEqualMorphs(r: MorphNode): boolean;\n}\ndeclare namespace Morph {\n interface Inner {\n readonly in?: BaseRoot;\n readonly morphs: array;\n readonly declaredIn?: BaseRoot;\n readonly declaredOut?: BaseRoot;\n }\n interface Schema extends BaseNormalizedSchema {\n readonly in?: RootSchema;\n readonly morphs: listable;\n readonly declaredIn?: BaseRoot;\n readonly declaredOut?: BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"morph\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n childKind: RootKind;\n }> {\n }\n type Node = MorphNode;\n type In = morph extends Morph ? i : never;\n type Out = morph extends Morph ? o : never;\n type ContextFree = (In: i) => o;\n}\ntype Morph = (In: i, ctx: Traversal) => o;\ndeclare const Morph: {\n implementation: nodeImplementationOf;\n Node: typeof MorphNode;\n};\ndeclare const writeMorphIntersectionMessage: (lDescription: string, rDescription: string) => string;\n\ntype MorphsAtPath = {\n path: ReadonlyPath;\n morphs: array;\n};\ntype BranchTraversal = {\n error: ArkError | undefined;\n queuedMorphs: MorphsAtPath[];\n};\ntype InternalTraversal = Omit;\ndeclare class Traversal {\n /**\n * #### the path being validated or morphed\n *\n * ✅ array indices represented as numbers\n * ⚠️ mutated during traversal - use `path.slice(0)` to snapshot\n * 🔗 use {@link propString} for a stringified version\n */\n path: PropertyKey[];\n /**\n * #### {@link ArkErrors} that will be part of this traversal's finalized result\n *\n * ✅ will always be an empty array for a valid traversal\n */\n errors: ArkErrors;\n /**\n * #### the original value being traversed\n */\n root: unknown;\n /**\n * #### configuration for this traversal\n *\n * ✅ options can affect traversal results and error messages\n * ✅ defaults < global config < scope config\n * ✅ does not include options configured on individual types\n */\n config: ResolvedConfig;\n queuedMorphs: MorphsAtPath[];\n branches: BranchTraversal[];\n seen: {\n [id in string]?: unknown[];\n };\n constructor(root: unknown, config: ResolvedConfig);\n /**\n * #### the data being validated or morphed\n *\n * ✅ extracted from {@link root} at {@link path}\n */\n get data(): unknown;\n /**\n * #### a string representing {@link path}\n *\n * @propString\n */\n get propString(): string;\n /**\n * #### add an {@link ArkError} and return `false`\n *\n * ✅ useful for predicates like `.narrow`\n */\n reject(input: ArkErrorInput): false;\n /**\n * #### add an {@link ArkError} from a description and return `false`\n *\n * ✅ useful for predicates like `.narrow`\n * 🔗 equivalent to {@link reject}({ expected })\n */\n mustBe(expected: string): false;\n /**\n * #### add and return an {@link ArkError}\n *\n * ✅ useful for morphs like `.pipe`\n */\n error(input: input): ArkError;\n /**\n * #### whether {@link currentBranch} (or the traversal root, outside a union) has one or more errors\n */\n hasError(): boolean;\n get currentBranch(): BranchTraversal | undefined;\n queueMorphs(morphs: array): void;\n finalize(onFail?: ArkErrors.Handler | null): unknown;\n get currentErrorCount(): number;\n get failFast(): boolean;\n pushBranch(): void;\n popBranch(): BranchTraversal | undefined;\n private errorFromContext;\n private applyQueuedMorphs;\n private applyMorphsAtPath;\n}\ndeclare const traverseKey: (key: PropertyKey, fn: () => result, ctx: InternalTraversal | undefined) => result;\ntype TraversalMethodsByKind = {\n Allows: TraverseAllows;\n Apply: TraverseApply;\n};\ntype TraversalKind = keyof TraversalMethodsByKind;\ntype TraverseAllows = (data: data, ctx: InternalTraversal) => boolean;\ntype TraverseApply = (data: data, ctx: InternalTraversal) => void;\n\ntype CoercibleValue = string | number | boolean | null | undefined;\ndeclare class CompiledFunction unknown, args extends readonly string[] = readonly string[]> extends CastableBase<{\n [k in args[number]]: k;\n}> {\n readonly argNames: args;\n readonly body = \"\";\n constructor(...args: args);\n indentation: number;\n indent(): this;\n dedent(): this;\n prop(key: PropertyKey, optional?: boolean): string;\n index(key: string | number, optional?: boolean): string;\n line(statement: string): this;\n const(identifier: string, expression: CoercibleValue): this;\n let(identifier: string, expression: CoercibleValue): this;\n set(identifier: string, expression: CoercibleValue): this;\n if(condition: string, then: (self: this) => this): this;\n elseIf(condition: string, then: (self: this) => this): this;\n else(then: (self: this) => this): this;\n /** Current index is \"i\" */\n for(until: string, body: (self: this) => this, initialValue?: CoercibleValue): this;\n /** Current key is \"k\" */\n forIn(object: string, body: (self: this) => this): this;\n block(prefix: string, contents: (self: this) => this, suffix?: string): this;\n return(expression?: CoercibleValue): this;\n write(name?: string, indent?: number): string;\n compile(): compiledSignature;\n}\ndeclare const compileSerializedValue: (value: unknown) => string;\ndeclare const compileLiteralPropAccess: (key: PropertyKey, optional?: boolean) => string;\ndeclare const serializeLiteralKey: (key: PropertyKey) => string;\ndeclare const indexPropAccess: (key: string, optional?: boolean) => string;\ninterface InvokeOptions extends ReferenceOptions {\n arg?: string;\n}\ninterface ReferenceOptions {\n kind?: TraversalKind;\n bind?: string;\n}\ndeclare namespace NodeCompiler {\n interface Context {\n kind: TraversalKind;\n optimistic?: true;\n }\n}\ndeclare class NodeCompiler extends CompiledFunction {\n traversalKind: TraversalKind;\n optimistic: boolean;\n constructor(ctx: NodeCompiler.Context);\n invoke(node: BaseNode | NodeId, opts?: InvokeOptions): string;\n referenceToId(id: NodeId, opts?: ReferenceOptions): string;\n requiresContextFor(node: BaseNode): boolean;\n initializeErrorCount(): this;\n returnIfFail(): this;\n returnIfFailFast(): this;\n traverseKey(keyExpression: string, accessExpression: string, node: BaseNode): this;\n check(node: BaseNode, opts?: InvokeOptions): this;\n}\n\ndeclare class PredicateNode extends BaseConstraint {\n serializedPredicate: RegisteredReference;\n compiledCondition: string;\n compiledNegation: string;\n impliedBasis: null;\n expression: string;\n traverseAllows: TraverseAllows;\n errorContext: Predicate.ErrorContext;\n compiledErrorContext: string;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n reduceJsonSchema(base: JsonSchema.Constrainable, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace Predicate {\n type Schema = NormalizedSchema | predicate;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly predicate: predicate;\n }\n interface Inner {\n readonly predicate: predicate;\n }\n interface ErrorContext extends BaseErrorContext<\"predicate\"> {\n readonly predicate?: Predicate;\n }\n interface Declaration extends declareNode<{\n kind: \"predicate\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n intersectionIsOpen: true;\n errorContext: ErrorContext;\n }> {\n }\n type Node = PredicateNode;\n}\ndeclare const Predicate: {\n implementation: nodeImplementationOf;\n Node: typeof PredicateNode;\n};\ntype Predicate = (data: data, ctx: Traversal) => boolean;\ndeclare namespace Predicate {\n type Casted = (input: input, ctx: Traversal) => input is narrowed;\n type Castable = Predicate | Casted;\n}\n\ndeclare class ProtoNode extends InternalBasis {\n builtinName: BuiltinObjectKind | null;\n serializedConstructor: string;\n private readonly requiresInvalidDateCheck;\n traverseAllows: TraverseAllows;\n compiledCondition: string;\n compiledNegation: string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n expression: string;\n get nestableExpression(): string;\n readonly domain = \"object\";\n get defaultShortDescription(): string;\n}\ndeclare namespace Proto {\n type Reference = Constructor | BuiltinObjectKind;\n type Schema = proto | ExpandedSchema;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface ExpandedSchema {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface Inner {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface ErrorContext extends BaseErrorContext<\"proto\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"proto\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = ProtoNode;\n}\ndeclare const Proto: {\n implementation: nodeImplementationOf;\n Node: typeof ProtoNode;\n writeBadInvalidDateMessage: (actual: Constructor) => string;\n writeInvalidSchemaMessage: (actual: unknown) => string;\n};\n\ndeclare class IntersectionNode extends BaseRoot {\n basis: nodeOfKind | null;\n refinements: array>;\n structure: Structure.Node | undefined;\n expression: string;\n get shallowMorphs(): array;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare namespace Intersection {\n type BasisKind = \"domain\" | \"proto\";\n type ChildKind = BasisKind | RefinementKind | \"predicate\" | \"structure\";\n type FlattenedChildKind = ChildKind | StructuralKind;\n type RefinementsInner = {\n [k in RefinementKind]?: intersectionChildInnerValueOf;\n };\n interface Inner extends RefinementsInner {\n domain?: Domain.Node;\n proto?: Proto.Node;\n structure?: Structure.Node;\n predicate?: array;\n }\n namespace Inner {\n type mutable = makeRootAndArrayPropertiesMutable;\n }\n type ConstraintsSchema = show>;\n type NormalizedSchema = Omit;\n type Schema = ConstraintsSchema;\n interface AstSchema extends BaseNormalizedSchema {\n intersection: readonly RootSchema[];\n }\n interface ErrorContext extends BaseErrorContext<\"intersection\">, Inner {\n errors: readonly ArkError[];\n }\n type Declaration = declareNode<{\n kind: \"intersection\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n reducibleTo: \"intersection\" | BasisKind;\n errorContext: ErrorContext;\n childKind: ChildKind;\n }>;\n type Node = IntersectionNode;\n}\ndeclare const Intersection: {\n implementation: nodeImplementationOf<{\n intersectionIsOpen: false;\n prerequisite: unknown;\n kind: \"intersection\";\n schema: Intersection.Schema;\n normalizedSchema: Intersection.NormalizedSchema;\n inner: Intersection.Inner;\n reducibleTo: \"intersection\" | Intersection.BasisKind;\n errorContext: Intersection.ErrorContext;\n childKind: Intersection.ChildKind;\n }>;\n Node: typeof IntersectionNode;\n};\ntype ConditionalTerminalIntersectionRoot = {\n undeclared?: UndeclaredKeyBehavior;\n};\ntype ConditionalTerminalIntersectionKey = keyof ConditionalTerminalIntersectionRoot;\ntype ConditionalIntersectionKey = ConstraintKind | ConditionalTerminalIntersectionKey;\ntype constraintKindOf = {\n [k in ConstraintKind]: t extends Prerequisite ? k : never;\n}[ConstraintKind];\ntype conditionalIntersectionKeyOf = constraintKindOf | (t extends object ? \"undeclared\" : never);\ntype intersectionChildSchemaValueOf = k extends OpenNodeKind ? listable> : NodeSchema;\ntype conditionalSchemaValueOfKey = k extends Intersection.FlattenedChildKind ? intersectionChildSchemaValueOf : ConditionalTerminalIntersectionRoot[k & ConditionalTerminalIntersectionKey];\ntype intersectionChildInnerValueOf = k extends OpenNodeKind ? readonly nodeOfKind[] : nodeOfKind;\ntype conditionalRootOf = {\n [k in conditionalIntersectionKeyOf]?: conditionalSchemaValueOfKey;\n};\n\ndeclare namespace Constraint {\n interface Declaration extends BaseNodeDeclaration {\n kind: ConstraintKind;\n }\n type ReductionResult = BaseRoot | Disjoint | Intersection.Inner.mutable;\n interface Attachments {\n impliedBasis: BaseRoot | null;\n impliedSiblings?: array | null;\n }\n type PrimitiveKind = Exclude;\n}\ndeclare abstract class BaseConstraint<\n/** @ts-ignore allow instantiation assignment to the base type */\nout d extends Constraint.Declaration = Constraint.Declaration> extends BaseNode {\n readonly [arkKind]: \"constraint\";\n constructor(attachments: UnknownAttachments, $: BaseScope);\n abstract readonly impliedBasis: BaseRoot | null;\n readonly impliedSiblings?: array;\n intersect(r: r): intersectConstraintKinds;\n}\ndeclare abstract class InternalPrimitiveConstraint extends BaseConstraint {\n abstract traverseAllows: TraverseAllows;\n abstract readonly compiledCondition: string;\n abstract readonly compiledNegation: string;\n abstract reduceJsonSchema(base: JsonSchema.Constrainable, ctx: ToJsonSchema.Context): JsonSchema.Constrainable;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n get errorContext(): d[\"errorContext\"];\n get compiledErrorContext(): string;\n}\ndeclare const constraintKeyParser: (kind: kind) => (schema: listable>, ctx: NodeParseContext) => innerAttachedAs | undefined;\ntype ConstraintGroupKind = satisfy;\ninterface ConstraintIntersectionState {\n kind: kind;\n baseInner: Record;\n l: BaseConstraint[];\n r: BaseConstraint[];\n roots: BaseRoot[];\n ctx: IntersectionContext;\n}\ndeclare const intersectConstraints: (s: ConstraintIntersectionState) => nodeOfKind> | Disjoint;\ndeclare const flattenConstraints: (inner: object) => BaseConstraint[];\ntype FlatIntersectionInner = Intersection.Inner & Structure.Inner;\ndeclare const unflattenConstraints: (constraints: array) => FlatIntersectionInner;\ntype constraintKindLeftOf = ConstraintKind & kindLeftOf;\ntype constraintKindOrLeftOf = kind | constraintKindLeftOf;\ntype intersectConstraintKinds = nodeOfKind | Disjoint | null;\ndeclare const throwInvalidOperandError: (...args: Parameters) => never;\ndeclare const writeInvalidOperandMessage: (kind: kind, expected: expected, actual: actual) => string;\ntype writeInvalidOperandMessage = `${Capitalize} operand must be ${describe>} (was ${describe>>})`;\n\ndeclare abstract class BaseNode<\n/** @ts-ignore allow instantiation assignment to the base type */\nout d extends BaseNodeDeclaration = BaseNodeDeclaration> extends Callable<(data: d[\"prerequisite\"], ctx?: Traversal, onFail?: ArkErrors.Handler | null) => unknown, attachmentsOf> {\n attachments: UnknownAttachments;\n $: BaseScope;\n onFail: ArkErrors.Handler | null;\n includesTransform: boolean;\n includesContextualPredicate: boolean;\n isCyclic: boolean;\n allowsRequiresContext: boolean;\n rootApplyStrategy: \"allows\" | \"contextual\" | \"optimistic\" | \"branchedOptimistic\";\n contextFreeMorph: ((data: unknown) => unknown) | undefined;\n rootApply: (data: unknown, onFail: ArkErrors.Handler | null) => unknown;\n referencesById: Record;\n shallowReferences: BaseNode[];\n flatRefs: FlatRef[];\n flatMorphs: FlatRef[];\n allows: (data: d[\"prerequisite\"]) => boolean;\n get shallowMorphs(): array;\n constructor(attachments: UnknownAttachments, $: BaseScope);\n protected createRootApply(): this[\"rootApply\"];\n abstract traverseAllows: TraverseAllows;\n abstract traverseApply: TraverseApply;\n abstract expression: string;\n abstract compile(js: NodeCompiler): void;\n readonly compiledMeta: string;\n protected cacheGetter(name: name, value: this[name]): this[name];\n get description(): string;\n get references(): BaseNode[];\n readonly precedence: number;\n precompilation: string | undefined;\n assert: (data: d[\"prerequisite\"], pipedFromCtx?: Traversal) => unknown;\n traverse(data: d[\"prerequisite\"], pipedFromCtx?: Traversal): ArkErrors | {} | null | undefined;\n get in(): this extends {\n [arkKind]: \"root\";\n } ? BaseRoot : BaseNode;\n get out(): this extends {\n [arkKind]: \"root\";\n } ? BaseRoot : BaseNode;\n getIo(ioKind: \"in\" | \"out\"): BaseNode;\n toJSON(): JsonStructure;\n toString(): string;\n equals(r: unknown): boolean;\n ifEquals(r: unknown): BaseNode | undefined;\n hasKind(kind: kind): this is nodeOfKind;\n assertHasKind(kind: kind): nodeOfKind;\n hasKindIn(...kinds: kinds): this is nodeOfKind;\n assertHasKindIn(...kinds: kinds): nodeOfKind;\n isBasis(): this is nodeOfKind;\n isConstraint(): this is BaseConstraint;\n isStructural(): this is nodeOfKind;\n isRefinement(): this is nodeOfKind;\n isRoot(): this is BaseRoot;\n isUnknown(): boolean;\n isNever(): boolean;\n hasUnit(value: unknown): this is Unit.Node & {\n unit: value;\n };\n hasOpenIntersection(): this is nodeOfKind;\n get nestableExpression(): string;\n select>>(selector: NodeSelector.validateComposite): NodeSelector.infer;\n select(selector: selector): NodeSelector.infer;\n private _select;\n transform(mapper: mapper, opts?: DeepNodeTransformOptions): nodeOfKind> | Extract, null>;\n protected _createTransformContext(opts: DeepNodeTransformOptions | undefined): DeepNodeTransformContext;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n configureReferences(meta: TypeMeta.MappableInput.Internal, selector?: NodeSelector): this;\n}\n/** a literal key (named property) or a node (index signatures) representing part of a type structure */\ntype KeyOrKeyNode = Key | BaseRoot;\ntype GettableKeyOrNode = KeyOrKeyNode | number;\ntype FlatRef = {\n path: array;\n node: root;\n propString: string;\n};\ntype NodeSelector = NodeSelector.Single | NodeSelector.Composite;\ndeclare namespace NodeSelector {\n type SelectableFn = {\n >>(input: input, selector?: NodeSelector.validateComposite): returns;\n (input: input, selector?: selector): returns;\n };\n type Single = NodeSelector.Boundary | NodeSelector.Kind | GuardablePredicate;\n type Boundary = \"self\" | \"child\" | \"shallow\" | \"references\";\n type Kind = NodeKind;\n type Method = \"filter\" | \"assertFilter\" | \"find\" | \"assertFind\";\n interface Composite {\n method?: Method;\n boundary?: Boundary;\n kind?: Kind;\n where?: GuardablePredicate;\n }\n type Normalized = requireKeys;\n type CompositeInput = Omit;\n type BaseResult = BaseNode | BaseNode[] | undefined;\n type validateComposite = {\n [k in keyof selector]: k extends \"where\" ? predicate : conform;\n };\n type infer = applyMethod ? narrowed : NodeSelector.inferSelectKind, selector>;\n type BoundaryInput = b | {\n boundary: b;\n };\n type KindInput = k | {\n kind: k;\n };\n type WhereCastInput = ((In: kindNode) => In is narrowed) | {\n where: (In: kindNode) => In is narrowed;\n };\n type inferSelectKind = selectKind extends infer kind extends NodeKind ? NodeKind extends kind ? BaseNode : nodeOfKind : never;\n type selectKind = selector extends BoundaryInput<\"self\"> ? selfKind : selector extends KindInput ? kind : selector extends BoundaryInput<\"child\"> ? selfKind | childKindOf : NodeKind;\n type applyMethod = selector extends {\n method: infer method extends Method;\n } ? method extends \"filter\" ? t[] : method extends \"assertFilter\" ? [t, ...t[]] : method extends \"find\" ? t | undefined : method extends \"assertFind\" ? t : never : t[];\n}\ndeclare const typePathToPropString: (path: array) => string;\ndeclare const flatRef: (path: array, node: node) => FlatRef;\ndeclare const flatRefsAreEqual: (l: FlatRef, r: FlatRef) => boolean;\ndeclare const appendUniqueFlatRefs: (existing: FlatRef[] | undefined, refs: listable>) => FlatRef[];\ndeclare const appendUniqueNodes: (existing: node[] | undefined, refs: listable) => node[];\ntype DeepNodeTransformOptions = {\n shouldTransform?: ShouldTransformFn;\n bindScope?: BaseScope;\n prereduced?: boolean;\n selected?: readonly BaseNode[] | undefined;\n};\ntype ShouldTransformFn = (node: BaseNode, ctx: DeepNodeTransformContext) => boolean;\ninterface DeepNodeTransformContext extends DeepNodeTransformOptions {\n root: BaseNode;\n selected: readonly BaseNode[] | undefined;\n path: mutable>;\n seen: {\n [originalId: string]: (() => BaseNode | undefined) | undefined;\n };\n parseOptions: BaseParseOptions;\n undeclaredKeyHandling: UndeclaredKeyHandling | undefined;\n}\ntype DeepNodeTransformation = (kind: kind, innerWithMeta: Inner & {\n meta: NodeMeta;\n}, ctx: DeepNodeTransformContext) => NormalizedSchema | null;\n\ndeclare class AfterNode extends BaseRange {\n impliedBasis: BaseRoot;\n collapsibleLimitString: string;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(base: JsonSchema, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace After {\n interface Inner extends BaseRangeInner {\n rule: Date;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: LimitSchemaValue;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: LimitSchemaValue;\n }\n type Schema = ExpandedSchema | LimitSchemaValue;\n interface ErrorContext extends BaseErrorContext<\"after\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"after\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: Date;\n errorContext: ErrorContext;\n }> {\n }\n type Node = AfterNode;\n}\ndeclare const After: {\n implementation: nodeImplementationOf;\n Node: typeof AfterNode;\n};\n\ndeclare class BeforeNode extends BaseRange {\n collapsibleLimitString: string;\n traverseAllows: TraverseAllows;\n impliedBasis: BaseRoot;\n reduceJsonSchema(base: JsonSchema, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace Before {\n interface Inner extends BaseRangeInner {\n rule: Date;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: LimitSchemaValue;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: LimitSchemaValue;\n }\n type Schema = ExpandedSchema | LimitSchemaValue;\n interface ErrorContext extends BaseErrorContext<\"before\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"before\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: Date;\n errorContext: ErrorContext;\n }> {\n }\n type Node = BeforeNode;\n}\ndeclare const Before: {\n implementation: nodeImplementationOf;\n Node: typeof BeforeNode;\n};\n\ndeclare class MaxNode extends BaseRange {\n impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Max {\n interface Inner extends BaseRangeInner {\n rule: number;\n exclusive?: true;\n }\n interface NormalizedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"max\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"max\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MaxNode;\n}\ndeclare const Max: {\n implementation: nodeImplementationOf;\n Node: typeof MaxNode;\n};\n\ndeclare class MinNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Min {\n interface Inner extends BaseRangeInner {\n rule: number;\n exclusive?: true;\n }\n interface NormalizedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"min\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"min\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MinNode;\n}\ndeclare const Min: {\n implementation: nodeImplementationOf;\n Node: typeof MinNode;\n};\n\ninterface BoundDeclarations {\n min: Min.Declaration;\n max: Max.Declaration;\n minLength: MinLength.Declaration;\n maxLength: MaxLength.Declaration;\n exactLength: ExactLength.Declaration;\n after: After.Declaration;\n before: Before.Declaration;\n}\ninterface BoundNodesByKind {\n min: Min.Node;\n max: Max.Node;\n minLength: MinLength.Node;\n maxLength: MaxLength.Node;\n exactLength: ExactLength.Node;\n after: After.Node;\n before: Before.Node;\n}\n\ninterface NodeDeclarationsByKind extends BoundDeclarations {\n alias: Alias.Declaration;\n domain: Domain.Declaration;\n unit: Unit.Declaration;\n proto: Proto.Declaration;\n union: Union.Declaration;\n morph: Morph.Declaration;\n intersection: Intersection.Declaration;\n sequence: Sequence.Declaration;\n divisor: Divisor.Declaration;\n required: Required$1.Declaration;\n optional: Optional.Declaration;\n index: Index.Declaration;\n pattern: Pattern.Declaration;\n predicate: Predicate.Declaration;\n structure: Structure.Declaration;\n}\ndeclare const nodeImplementationsByKind: Record;\ndeclare const nodeClassesByKind: Record BaseNode>;\ninterface NodesByKind extends BoundNodesByKind {\n alias: Alias.Node;\n union: Union.Node;\n morph: Morph.Node;\n intersection: Intersection.Node;\n unit: Unit.Node;\n proto: Proto.Node;\n domain: Domain.Node;\n divisor: Divisor.Node;\n pattern: Pattern.Node;\n predicate: Predicate.Node;\n required: Required$1.Node;\n optional: Optional.Node;\n index: Index.Node;\n sequence: Sequence.Node;\n structure: Structure.Node;\n}\ntype nodeOfKind = NodesByKind[kind];\ntype Declaration = NodeDeclarationsByKind[kind];\ntype NodeSchema = Declaration[\"schema\"];\ntype RootSchema = NodeSchema;\ntype NormalizedSchema = Declaration[\"normalizedSchema\"];\ntype childKindOf = Declaration[\"childKind\"];\ntype Prerequisite = Declaration[\"prerequisite\"];\ntype reducibleKindOf = Declaration[\"reducibleTo\"] extends NodeKind ? Declaration[\"reducibleTo\"] : kind;\ntype Inner = Declaration[\"inner\"];\ntype defAttachedAs = kind extends OpenNodeKind ? listable> : NodeSchema;\ntype innerAttachedAs = kind extends OpenNodeKind ? array> : nodeOfKind;\n/** make nested arrays mutable while keeping nested nodes immutable */\ntype mutableInnerOfKind = makeRootAndArrayPropertiesMutable>;\ntype mutableNormalizedRootOfKind = makeRootAndArrayPropertiesMutable>;\ntype errorContext = Declaration[\"errorContext\"];\n\ntype ContextualArgs = Record;\ntype BaseParseOptions = {\n alias?: string;\n prereduced?: prereduced;\n args?: ContextualArgs;\n id?: NodeId;\n};\ninterface BaseParseContextInput extends BaseParseOptions {\n prefix: string;\n def: unknown;\n}\ninterface AttachedParseContext {\n [arkKind]: \"context\";\n $: BaseScope;\n id: NodeId;\n phase: \"unresolved\" | \"resolving\" | \"resolved\";\n}\ninterface BaseParseContext extends BaseParseContextInput, AttachedParseContext {\n id: NodeId;\n}\ninterface NodeParseContextInput extends BaseParseContextInput {\n kind: kind;\n def: NormalizedSchema;\n}\ninterface NodeParseContext extends NodeParseContextInput, AttachedParseContext {\n id: NodeId;\n}\ndeclare const schemaKindOf: (schema: unknown, allowedKinds?: readonly kind[]) => kind;\ndeclare const writeInvalidSchemaMessage: (schema: unknown) => string;\ntype NodeId = Brand;\ntype NodeResolver = (id: NodeId) => BaseNode;\ndeclare const nodesByRegisteredId: Record;\ndeclare const registerNodeId: (prefix: string) => NodeId;\ndeclare const parseNode: (ctx: NodeParseContext) => BaseNode;\ntype CreateNodeInput = {\n id: NodeId;\n kind: NodeKind;\n inner: dict;\n meta: NodeMeta;\n $: BaseScope;\n ignoreCache?: true;\n};\ndeclare const createNode: ({ id, kind, inner, meta, $, ignoreCache }: CreateNodeInput) => BaseNode;\ndeclare const withId: (node: node, id: NodeId) => node;\ndeclare const withMeta: (node: node, meta: ArkEnv.meta, id?: NodeId) => node;\n\ninterface ArkSchemaRegistry extends ArkRegistry {\n intrinsic: typeof intrinsic;\n config: ArkSchemaConfig;\n defaultConfig: ResolvedConfig;\n resolvedConfig: ResolvedConfig;\n nodesByRegisteredId: typeof nodesByRegisteredId;\n}\ntype nodeConfigForKind = Readonly;\n} & (kind extends ArkErrorCode ? {\n expected?: ExpectedConfig;\n actual?: ActualConfig;\n problem?: ProblemConfig;\n message?: MessageConfig;\n} : {})>>;\ntype NodeConfigsByKind = {\n [kind in NodeKind]: nodeConfigForKind;\n};\ntype NodeConfig = NodeConfigsByKind[kind];\ninterface UnknownErrorConfigs {\n expected?: ExpectedConfig;\n actual?: ActualConfig;\n problem?: ProblemConfig;\n message?: MessageConfig;\n}\ninterface UnknownNodeConfig extends UnknownErrorConfigs {\n description?: DescriptionWriter;\n}\ntype ResolvedUnknownNodeConfig = requireKeys;\ndeclare const configureSchema: (config: ArkSchemaConfig) => ArkSchemaConfig;\ndeclare const mergeConfigs: (base: base, merged: ArkSchemaConfig | undefined) => base;\ntype MergeToJsonSchemaConfigs = (baseConfig: base, mergedConfig: ToJsonSchema.Options | undefined) => base extends ToJsonSchema.Context ? ToJsonSchema.Context : ToJsonSchema.Options;\ndeclare const mergeToJsonSchemaConfigs: MergeToJsonSchemaConfigs;\ntype CloneImplementation = (original: original) => original;\ninterface ArkSchemaConfig extends Partial> {\n readonly jitless?: boolean;\n readonly clone?: boolean | CloneImplementation;\n readonly onUndeclaredKey?: UndeclaredKeyBehavior;\n readonly numberAllowsNaN?: boolean;\n readonly dateAllowsInvalid?: boolean;\n readonly exactOptionalPropertyTypes?: boolean;\n readonly onFail?: ArkErrors.Handler | null;\n readonly keywords?: Record;\n readonly toJsonSchema?: ToJsonSchema.Options;\n}\ntype resolveConfig = show<{\n [k in keyof ArkSchemaConfig]-?: k extends NodeKind ? Required : k extends \"clone\" ? CloneImplementation | false : k extends \"keywords\" ? Record : k extends \"toJsonSchema\" ? ToJsonSchema.Context : config[k];\n} & Omit>;\ntype ResolvedConfig = resolveConfig;\n\ntype InternalNodeIntersection = (l: l, r: r, ctx: ctx) => l[\"kind\"] | r[\"kind\"] extends RootKind ? BaseRoot | Disjoint : BaseNode | Disjoint | null;\ndeclare const intersectNodesRoot: InternalNodeIntersection;\ndeclare const pipeNodesRoot: InternalNodeIntersection;\ndeclare const intersectOrPipeNodes: InternalNodeIntersection;\n\nexport { $ark, type ActualConfig, type ActualWriter, After, AfterNode, type AliasDefEntry, ArkError, type ArkErrorCode, type ArkErrorContextInput, type ArkErrorInput, type ArkErrorResult, ArkErrors, type ArkKind, type ArkKinds, type ArkSchemaConfig, type ArkSchemaRegistry, type ArkSchemaScopeConfig, type AttachedParseContext, BaseConstraint, type BaseErrorContext, type BaseMappedPropInner, BaseNode, type BaseNodeDeclaration, type BaseNormalizedSchema, type BaseParseContext, type BaseParseContextInput, type BaseParseOptions, BaseProp, BaseRange, type BaseRangeDeclaration, type BaseRangeInner, BaseRoot, BaseScope, type BasisKind, Before, BeforeNode, type BoundKind, type BoundOperandKind, type Boundable, type BranchTraversal, type CaseContext, type CaseDiscriminant, type CaseKey, type CloneImplementation, type ClosedNodeKind, type CoercibleValue, CompiledFunction, type CompositeKind, type ConditionalTerminalIntersectionRoot, Constraint, type ConstraintIntersection, type ConstraintIntersectionMap, type ConstraintKind, type ContextualArgs, type CreateNodeInput, type CustomErrorInput, type DateRangeKind, type Declaration, type DeepNodeTransformContext, type DeepNodeTransformOptions, type DeepNodeTransformation, type DefaultArkEnv, type DefaultableSequenceElement, type DerivableErrorContext, type DerivableErrorContextInput, type DescriptionWriter, type Discriminant, type DiscriminantKind, type DiscriminantKinds, type DiscriminatedCases, Disjoint, type DisjointEntry, type DisjointEntryContext, type DisjointKind, Divisor, DivisorNode, Domain, DomainNode, ExactLength, ExactLengthNode, type ExclusiveDateRangeSchema, type ExclusiveExpandedDateRangeSchema, type ExclusiveNormalizedNumericRangeSchema, type ExclusiveNumericRangeSchema, type ExpectedConfig, type ExpectedWriter, type FlatRef, type GenericArgResolutions, type GenericAst, type GenericParamAst, type GenericParamDef, GenericRoot, type GenericRootBodyParser, type GenericRootParser, type GettableKeyOrNode, type GlobalOnlyConfigOptionName, type InclusiveDateRangeSchema, type InclusiveExpandedDateRangeSchema, type InclusiveNormalizedNumericRangeSchema, type InclusiveNumericRangeSchema, Index, IndexNode, Inner, type InternalIntersectionOptions, type InternalModule, InternalPrimitiveConstraint, type InternalResolution, type InternalResolutions, type InternalRootDeclaration, type InternalSchemaParser, type InternalTraversal, Intersection, type IntersectionContext, type IntersectionMap, IntersectionNode, type InvokeOptions, JsonSchema, type JsonSchemaOrBoolean, type KeyOrKeyNode, LazyGenericBody, type LengthBoundKind, type LengthBoundableData, type LimitInnerValue, type LimitKind, type LimitSchemaValue, type LimitValue, type ListableJsonSchema, type LowerBoundKind, type LowerNode, type MappedPropInner, Max, MaxLength, MaxLengthNode, MaxNode, type MessageConfig, type MessageContext, type MessageWriter, Min, MinLength, MinLengthNode, MinNode, Morph, type MorphChildKind, MorphNode, type MorphsAtPath, type NarrowedAttachments, NodeCompiler, type NodeConfig, type NodeDeclarationsByKind, type NodeErrorContextInput, type NodeId, type NodeKeyImplementation, type NodeKind, type NodeMeta, type NodeParseContext, type NodeParseContextInput, type NodeResolver, type NodeSchema, NodeSelector, type NormalizedIndex, type NormalizedSchema, type NumericallyBoundable, type OpenNodeKind, Optional, type OptionalMappedPropInner, OptionalNode, type OptionalSequenceElement, type OrderedNodeKinds, Pattern, PatternNode, type PostfixSequenceElement, type PrecompiledReferences, Predicate, PredicateNode, type PrefixSequenceElement, type PreparsedNodeResolution, type Prerequisite, type PrevariadicSequenceElement, type PrimitiveKind, type PrivateDeclaration, type ProblemConfig, type ProblemContext, type ProblemWriter, Prop, type PropFlatMapper, Proto, ProtoNode, type RangeKind, type ReferenceOptions, type RefinementKind, type RegisteredReference, type RelativeComparator, Required$1 as Required, RequiredNode, type ResolvedConfig, type ResolvedScopeConfig, type ResolvedUnknownNodeConfig, type RootExportCache, type RootIntersection, type RootKind, RootModule, type RootSchema, SchemaModule, SchemaScope, type SchemaScopeParser, type ScopeOnlyConfigOptions, Sequence, type SequenceElement, type SequenceElementKind, SequenceNode, type SequenceTuple, type ShouldTransformFn, StandardSchemaV1, type StructuralKind, type StructuralOperationBranchResultByName, type StructuralOperationName, Structure, StructureNode, ToJsonSchema, Traversal, TraversalError, type TraversalKind, type TraversalMethodsByKind, type TraverseAllows, type TraverseApply, type TypeIntersectionMap, TypeMeta, type UndeclaredKeyBehavior, type UndeclaredKeyConfig, type UndeclaredKeyHandling, Union, type UnionChildKind, UnionNode, Unit, UnitNode, type UnknownAttachments, type UnknownErrorConfigs, type UnknownExpandedRangeSchema, type UnknownIntersectionMap, type UnknownIntersectionResult, type UnknownNodeImplementation, type UnknownNormalizedRangeSchema, type UnknownRangeSchema, type UpperBoundKind, type UpperNode, type VariadicSequenceElement, appendUniqueFlatRefs, appendUniqueNodes, arkKind, assertDefaultValueAssignability, assertNodeKind, type attachmentsOf, basisKinds, bindModule, boundKindPairsByLower, type childKindOf, compileComparator, compileLiteralPropAccess, compileObjectLiteral, compileSerializedValue, computeDefaultValueMorph, type conditionalRootOf, configureSchema, constraintKeyParser, constraintKeys, type constraintKindLeftOf, type constraintKindOf, type constraintKindOrLeftOf, constraintKinds, createDateSchemaNormalizer, createLengthRuleParser, createLengthSchemaNormalizer, createNode, dateLimitToString, type declareNode, type defAttachedAs, type defaultErrorContext, defaultValueSerializer, defineSchema, describeBranches, emptyBrandNameMessage, type errorContext, exclusivizeRangeSchema, type exportedNameOf, flatRef, flatRefsAreEqual, type flatResolutionsOf, flattenConstraints, type genericHktToConstraints, genericNode, type genericParamConstraints, type genericParamNames, type genericParamSchemasToAst, type getAssociatedDataForError, hasArkKind, implementNode, indexPropAccess, type innerAttachedAs, type instantiateRoot, type internalImplementationOf, intersectBranches, type intersectConstraintKinds, intersectConstraints, intersectNodesRoot, intersectOrPipeNodes, intersectProps, type intersectRoot, intrinsic, isNode, isNodeKind, type keySchemaDefinitions, type kindLeftOf, type kindOrLeftOf, type kindOrRightOf, type kindRightOf, makeRootAndArrayPropertiesMutable, mergeConfigs, mergeToJsonSchemaConfigs, morphChildKinds, type mutableInnerOfKind, type mutableNormalizedRootOfKind, node, nodeClassesByKind, type nodeImplementationInputOf, type nodeImplementationOf, nodeImplementationsByKind, nodeKinds, type nodeOfKind, nodesByRegisteredId, normalizeIndex, type ownIntersectionResult, type pairedRangeKind, parseAsSchema, parseDateLimit, parseExclusiveKey, parseGeneric, parseNode, pipeNodesRoot, postfixAfterOptionalOrDefaultableMessage, postfixWithoutVariadicMessage, precedenceByKind, precedenceOfKind, pruneDiscriminant, reduceBranches, type reducibleKindOf, reference, refinementKinds, registerNodeId, registeredReference, registryName, type resolvableReferenceIn, type resolveConfig, type resolveReference, rootKinds, rootSchema, rootSchemaScope, schemaKindOf, type schemaKindOrRightOf, type schemaKindRightOf, schemaKindsRightOf, schemaScope, serializeLiteralKey, structuralKinds, structureKeys, throwInvalidOperandError, type toInternalScope, traverseKey, typeKeyToString, typeOrTermExtends, typePathToPropString, unflattenConstraints, unionChildKinds, type unwrapDefault, withId, withMeta, writeDefaultIntersectionMessage, writeDuplicateAliasError, writeEnumerableIndexBranches, writeIndiscriminableMorphMessage, writeIndivisibleMessage, writeInvalidKeysMessage, writeInvalidLengthBoundMessage, writeInvalidOperandMessage, writeInvalidPropertyKeyMessage, writeInvalidSchemaMessage, writeLiteralUnionEntriesMessage, writeMissingSubmoduleAccessMessage, writeMorphIntersectionMessage, writeNonIntegerDivisorMessage, writeNonPrimitiveNonFunctionDefaultValueMessage, writeNonStructuralOperandMessage, writeNonSubmoduleDotMessage, writeNumberIndexMessage, writeOrderedIntersectionMessage, type writeUnassignableDefaultValueMessage, writeUnboundableMessage, writeUnresolvableMessage, writeUnsatisfiableExpressionError, writeUnsatisfiedParameterConstraintMessage };\n\n}" diff --git a/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts b/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts new file mode 100644 index 0000000000..3c68ff5ed8 --- /dev/null +++ b/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts @@ -0,0 +1,4 @@ +// FROM https://github.com/arktypeio/arktype/tree/main/ark/docs/components/dts +/** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ +// prettier-ignore +export const typeDts = "declare module \"arktype\" {\n import * as _ark_schema from '@ark/schema';\nimport { TypeMeta, arkKind, BaseMappedPropInner, OptionalMappedPropInner, Prop, InclusiveNumericRangeSchema, ExclusiveNumericRangeSchema, ExactLength, InclusiveDateRangeSchema, ExclusiveDateRangeSchema, Divisor, Pattern, BaseRoot, BaseParseContext, GenericAst, GenericRoot, genericParamNames, resolvableReferenceIn, writeUnresolvableMessage, writeNonSubmoduleDotMessage, emptyBrandNameMessage, writeUnboundableMessage, writeUnassignableDefaultValueMessage, writeIndivisibleMessage, writeNonStructuralOperandMessage, PrivateDeclaration, writeMissingSubmoduleAccessMessage, GenericParamAst, writeUnsatisfiedParameterConstraintMessage, writeInvalidPropertyKeyMessage, UndeclaredKeyBehavior, ArkSchemaScopeConfig, BaseNode, exportedNameOf, toInternalScope, RootSchema, NodeKind, RootKind, NodeSchema, BaseParseOptions, nodeOfKind, reducibleKindOf, PreparsedNodeResolution, writeDuplicateAliasError, BaseScope, AliasDefEntry, GenericParamDef, BaseParseContextInput, Morph, unwrapDefault, Predicate, Sequence, postfixAfterOptionalOrDefaultableMessage, ArkErrors, ToJsonSchema, JsonSchema, NodeSelector, Disjoint, StandardSchemaV1, flatResolutionsOf, LazyGenericBody, RootModule, ArkError } from '@ark/schema';\nexport { ArkError, ArkErrors, ArkSchemaConfig, ArkSchemaScopeConfig, JsonSchema, Traversal, TraversalError } from '@ark/schema';\nimport * as util from '@ark/util';\nimport { anyOrNever, array, arkKeyOf, arkIndexableOf, arkGet, toArkKey, merge, ErrorType, listable, Key, show, intersectUnion, inferred, optionalKeyOf, JsonStructure, Scanner, EscapeChar, WhitespaceChar, Stringifiable, requireKeys, ErrorMessage, Completion, defined, NumberLiteral, join, lastOf, BigintLiteral, trim as trim$1, typeToString, writeMalformedNumericLiteralMessage, Hkt, flattenListable, Brand, noSuggest, Constructor, satisfy, conform, Fn, ifEmptyObjectLiteral, Primitive, objectKindOrDomainOf, equals, requiredKeyOf, Callable, unset, numericStringKeyOf, isDisjoint, unionToTuple, propValueOf, Json, omit, pick, Digit, liftArray, EcmascriptObjects, PlatformObjects, isSafelyMappable, intersectArrays, unionKeyOf } from '@ark/util';\nexport { Hkt, ParseError, inferred } from '@ark/util';\nimport { ArkSchemaConfig } from '@ark/schema/config';\n\ntype KeywordConfig = {\n [k in keyof Ark.flat as parseConfigurableFlatAlias]?: TypeMeta.Collapsible;\n};\ntype parseConfigurableFlatAlias = [\n v\n] extends [anyOrNever] ? k : v extends {\n [arkKind]: \"generic\" | \"module\";\n} ? never : k extends `${infer prefix}.root` ? prefix : k;\ninterface ArkConfig extends ArkSchemaConfig {\n keywords?: KeywordConfig;\n}\ndeclare const configure: (config: config) => config;\ndeclare global {\n export interface ArkEnv {\n $(): Ark;\n }\n}\n/**\n * This mirrors the global ArkEnv namespace as a local export. We use it instead\n * of the global internally due to a bug in twoslash that prevents `ark/docs`\n * from building if we refer to the global directly.\n *\n * If, in the future, docs can build while arktype refers to `ArkEnv.$` directly,\n * this can be removed.\n */\ndeclare namespace ArkAmbient {\n type $ = ReturnType;\n type meta = ArkEnv.meta;\n type prototypes = ArkEnv.prototypes;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$6 extends Type {\n readonly(): t extends array ? Type$5<{\n readonly [i in keyof t]: t[i];\n }, $> : Type$6<{\n readonly [k in keyof t]: t[k];\n }, $>;\n keyof(): instantiateType, $>;\n /**\n * Get the `Type` of a property of this `Type`.\n * @example type({ foo: \"string\" }).get(\"foo\") // Type\n */\n get, r = instantiateType, $>>(k1: k1 | type.cast): r extends infer _ ? _ : never;\n get, const k2 extends arkIndexableOf>, r = instantiateType, k2>, $>>(k1: k1 | type.cast, k2: k2 | type.cast): r extends infer _ ? _ : never;\n get, const k2 extends arkIndexableOf>, const k3 extends arkIndexableOf, k2>>, r = instantiateType, k2>, k3>, $>>(k1: k1 | type.cast, k2: k2 | type.cast, k3: k3 | type.cast): r extends infer _ ? _ : never;\n /**\n * Create a copy of this `Type` with only the specified properties.\n * @example type({ foo: \"string\", bar: \"number\" }).pick(\"foo\") // Type<{ foo: string }>\n */\n pick = never>(...keys: (key | type.cast)[]): Type$6<{\n [k in keyof t as Extract, key>]: t[k];\n }, $>;\n /**\n * Create a copy of this `Type` with all properties except the specified ones.\n * @example type({ foo: \"string\", bar: \"number\" }).omit(\"foo\") // Type<{ bar: number }>\n */\n omit = never>(...keys: (key | type.cast)[]): Type$6<{\n [k in keyof t as Exclude, key>]: t[k];\n }, $>;\n /**\n * Merge another `Type` definition, overriding properties of this `Type` with the duplicate keys.\n * @example type({ a: \"1\", b: \"2\" }).merge({ b: \"3\", c: \"4\" }) // Type<{ a: 1, b: 3, c: 4 }>\n */\n merge, r = Type$6, $>>(def: type.validate & (inferredDef extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n /**\n * Create a copy of this `Type` with all properties required.\n * @example const T = type({ \"foo?\"\": \"string\" }).required() // Type<{ foo: string }>\n */\n required(): Type$6<{\n [k in keyof t]-?: t[k];\n }, $>;\n /**\n * Create a copy of this `Type` with all properties optional.\n * @example: const T = type({ foo: \"string\" }).optional() // Type<{ foo?: string }>\n */\n partial(): Type$6<{\n [k in keyof t]?: t[k];\n }, $>;\n map, r = Type$6, $>>(flatMapEntry: (entry: typePropOf) => transformed): r extends infer _ ? _ : never;\n /**\n * List of property info of this `Type`.\n * @example type({ foo: \"string = \"\" }).props // [{ kind: \"required\", key: \"foo\", value: Type, default: \"\" }]\n */\n props: array>;\n}\ntype typePropOf = keyof o extends infer k ? k extends keyof o ? typeProp : never : never;\ntype typeProp = t extends Default ? DefaultedTypeProp : BaseTypeProp ? \"optional\" : \"required\", k & Key, t, $>;\ninterface BaseTypeProp {\n kind: kind;\n key: k;\n value: instantiateType;\n meta: ArkEnv.meta;\n toJSON: () => JsonStructure;\n}\ninterface DefaultedTypeProp extends BaseTypeProp<\"optional\", k, v, $> {\n default: defaultValue;\n}\ntype MappedTypeProp = BaseMappedTypeProp | OptionalMappedTypeProp;\ntype BaseMappedTypeProp = merge;\n}>;\ntype OptionalMappedTypeProp = merge;\n default?: v;\n}>;\ntype constructMapped> = show>>;\ntype fromTypeProps> = show<{\n [prop in props[number] as Extract, {\n kind: \"required\";\n }>[\"key\"]]: prop[\"value\"][inferred];\n} & {\n [prop in props[number] as Extract, {\n kind: \"optional\";\n default?: never;\n }>[\"key\"]]?: prop[\"value\"][inferred];\n} & {\n [prop in props[number] as Extract, {\n kind: \"optional\";\n default: unknown;\n }>[\"key\"]]: withDefault;\n}>;\ntype NonObjectMergeErrorMessage = \"Merged type must be an object\";\ntype applyHomomorphicOptionality = prop[\"kind\"] extends string ? prop : prop & {\n kind: prop[\"key\"] extends optionalKeyOf ? \"optional\" : \"required\";\n};\n\ninterface Type$5<\n/** @ts-ignore cast variance */\nout t extends readonly unknown[] = readonly unknown[], $ = {}> extends Type$6 {\n atLeastLength(schema: InclusiveNumericRangeSchema): this;\n atMostLength(schema: InclusiveNumericRangeSchema): this;\n moreThanLength(schema: ExclusiveNumericRangeSchema): this;\n lessThanLength(schema: ExclusiveNumericRangeSchema): this;\n exactlyLength(schema: ExactLength.Schema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$4 extends Type$6 {\n atOrAfter(schema: InclusiveDateRangeSchema): this;\n atOrBefore(schema: InclusiveDateRangeSchema): this;\n laterThan(schema: ExclusiveDateRangeSchema): this;\n earlierThan(schema: ExclusiveDateRangeSchema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$3 extends Type {\n divisibleBy(schema: Divisor.Schema): this;\n atLeast(schema: InclusiveNumericRangeSchema): this;\n atMost(schema: InclusiveNumericRangeSchema): this;\n moreThan(schema: ExclusiveNumericRangeSchema): this;\n lessThan(schema: ExclusiveNumericRangeSchema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$2 extends Type {\n matching(schema: Pattern.Schema): this;\n atLeastLength(schema: InclusiveNumericRangeSchema): this;\n atMostLength(schema: InclusiveNumericRangeSchema): this;\n moreThanLength(schema: ExclusiveNumericRangeSchema): this;\n lessThanLength(schema: ExclusiveNumericRangeSchema): this;\n exactlyLength(schema: ExactLength.Schema): this;\n}\n\ntype instantiateType = [\n t\n] extends [anyOrNever] ? Type : [t] extends [object] ? [\n t\n] extends [array] ? Type$5 : [t] extends [Date] ? Type$4 : Type$6 : [t] extends [string] ? Type$2 : [t] extends [number] ? Type$3 : Type;\n\ntype StringifiablePrefixOperator = \"keyof\";\ndeclare const minComparators: {\n readonly \">\": true;\n readonly \">=\": true;\n};\ntype MinComparator = keyof typeof minComparators;\ndeclare const maxComparators: {\n readonly \"<\": true;\n readonly \"<=\": true;\n};\ntype MaxComparator = keyof typeof maxComparators;\ndeclare const comparators: {\n \">\": boolean;\n \">=\": boolean;\n \"<\": boolean;\n \"<=\": boolean;\n \"==\": boolean;\n};\ntype Comparator = keyof typeof comparators;\ntype InvertedComparators = {\n \"<\": \">\";\n \">\": \"<\";\n \"<=\": \">=\";\n \">=\": \"<=\";\n \"==\": \"==\";\n};\ntype BranchOperator = \"&\" | \"|\" | \"|>\";\ntype OpenLeftBound = {\n limit: LimitLiteral;\n comparator: MinComparator;\n};\ndeclare const writeUnmatchedGroupCloseMessage: (unscanned: unscanned) => writeUnmatchedGroupCloseMessage;\ntype writeUnmatchedGroupCloseMessage = `Unmatched )${unscanned extends \"\" ? \"\" : ` before ${unscanned}`}`;\ndeclare const writeUnclosedGroupMessage: (missingChar: missingChar) => writeUnclosedGroupMessage;\ntype writeUnclosedGroupMessage = `Missing ${missingChar}`;\ndeclare const writeOpenRangeMessage: (min: min, comparator: comparator) => writeOpenRangeMessage;\ntype writeOpenRangeMessage = `Left bounds are only valid when paired with right bounds (try ...${comparator}${min})`;\ntype writeUnpairableComparatorMessage = `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`;\ndeclare const writeUnpairableComparatorMessage: (comparator: comparator) => writeUnpairableComparatorMessage;\ndeclare const writeMultipleLeftBoundsMessage: (openLimit: openLimit, openComparator: openComparator, limit: limit, comparator: comparator) => writeMultipleLeftBoundsMessage;\ntype writeMultipleLeftBoundsMessage = `An expression may have at most one left bound (parsed ${openLimit}${InvertedComparators[openComparator]}, ${limit}${InvertedComparators[comparator]})`;\n\ndeclare class ArkTypeScanner extends Scanner {\n shiftUntilNextTerminator(): string;\n static terminatingChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n readonly \"<\": 1;\n readonly \">\": 1;\n readonly \"=\": 1;\n readonly \"|\": 1;\n readonly \"&\": 1;\n readonly \")\": 1;\n readonly \"[\": 1;\n readonly \"%\": 1;\n readonly \",\": 1;\n readonly \":\": 1;\n readonly \"?\": 1;\n readonly \"#\": 1;\n };\n static finalizingLookaheads: {\n readonly \">\": 1;\n readonly \",\": 1;\n readonly \"\": 1;\n readonly \"=\": 1;\n readonly \"?\": 1;\n };\n static lookaheadIsFinalizing: (lookahead: string, unscanned: string) => lookahead is \">\" | \",\" | \"=\" | \"?\";\n}\ndeclare namespace ArkTypeScanner {\n type lookaheadIsFinalizing = lookahead extends \">\" ? unscanned extends `=${infer nextUnscanned}` ? nextUnscanned extends `=${string}` ? true : false : ArkTypeScanner.skipWhitespace extends (\"\" | `${TerminatingChar}${string}`) ? true : false : lookahead extends \"=\" ? unscanned extends `=${string}` ? false : true : lookahead extends \",\" | \"?\" ? true : false;\n type TerminatingChar = keyof typeof ArkTypeScanner.terminatingChars;\n type FinalizingLookahead = keyof typeof ArkTypeScanner.finalizingLookaheads;\n type InfixToken = Comparator | \"|\" | \"&\" | \"%\" | \":\" | \"=>\" | \"|>\" | \"#\" | \"@\" | \"=\";\n type PostfixToken = \"[]\" | \"?\";\n type OperatorToken = InfixToken | PostfixToken;\n type shift = `${lookahead}${unscanned}`;\n type shiftUntil = unscanned extends shift ? lookahead extends terminator ? scanned extends `${infer base}${EscapeChar}` ? shiftUntil : [scanned, unscanned] : shiftUntil : [scanned, \"\"];\n type shiftUntilNot = unscanned extends shift ? lookahead extends nonTerminator ? shiftUntilNot : [scanned, unscanned] : [scanned, \"\"];\n type shiftUntilNextTerminator = shiftUntil;\n type skipWhitespace = shiftUntilNot[1];\n type shiftResult = [\n scanned,\n unscanned\n ];\n}\n\ntype astToString = ast extends InferredAst | DefAst ? ast[2] : ast extends PostfixExpression ? operator extends \"[]\" ? `${astToString}[]` : never : ast extends InfixExpression ? operator extends \"&\" | \"|\" | \"%\" | Comparator ? `${astToString} ${operator} ${astToString}` : never : ast extends Stringifiable ? `${ast extends bigint ? `${ast}n` : ast}` : \"...\";\ntype writeConstrainedMorphMessage = `To constrain the output of ${astToString}, pipe like myMorph.to('number > 0').\nTo constrain the input, intersect like myMorph.and('number > 0').`;\n\ntype BranchState$1 = {\n prefixes: StringifiablePrefixOperator[];\n leftBound: OpenLeftBound | null;\n intersection: BaseRoot | null;\n union: BaseRoot | null;\n pipe: BaseRoot | null;\n};\ntype DynamicStateWithRoot = requireKeys;\ndeclare class DynamicState {\n root: BaseRoot | undefined;\n branches: BranchState$1;\n finalizer: ArkTypeScanner.FinalizingLookahead | undefined;\n groups: BranchState$1[];\n scanner: ArkTypeScanner;\n ctx: BaseParseContext;\n constructor(scanner: ArkTypeScanner, ctx: BaseParseContext);\n error(message: string): never;\n hasRoot(): this is DynamicStateWithRoot;\n setRoot(root: BaseRoot): void;\n unsetRoot(): this[\"root\"];\n constrainRoot(...args: Parameters[\"constrain\"]>): void;\n finalize(finalizer: ArkTypeScanner.FinalizingLookahead): void;\n reduceLeftBound(limit: LimitLiteral, comparator: Comparator): void;\n finalizeBranches(): void;\n finalizeGroup(): void;\n addPrefix(prefix: StringifiablePrefixOperator): void;\n applyPrefixes(): void;\n pushRootToBranch(token: BranchOperator): void;\n parseUntilFinalizer(): DynamicStateWithRoot;\n parseOperator(this: DynamicStateWithRoot): void;\n parseOperand(): void;\n private assertRangeUnset;\n reduceGroupOpen(): void;\n previousOperator(): MinComparator | StringifiablePrefixOperator | ArkTypeScanner.InfixToken | undefined;\n shiftedByOne(): this;\n}\n\ntype StaticState = {\n root: unknown;\n branches: BranchState;\n groups: BranchState[];\n finalizer: ArkTypeScanner.FinalizingLookahead | ErrorMessage | undefined;\n scanned: string;\n unscanned: string;\n};\ntype BranchState = {\n prefixes: StringifiablePrefixOperator[];\n leftBound: OpenLeftBound | undefined;\n intersection: unknown;\n pipe: unknown;\n union: unknown;\n};\ndeclare namespace state {\n type initialize = from<{\n root: undefined;\n branches: initialBranches;\n groups: [];\n finalizer: undefined;\n scanned: \"\";\n unscanned: def;\n }>;\n type error = from<{\n root: ErrorMessage;\n branches: initialBranches;\n groups: [];\n finalizer: ErrorMessage;\n scanned: \"\";\n unscanned: \"\";\n }>;\n type completion = from<{\n root: Completion;\n branches: initialBranches;\n groups: [];\n finalizer: Completion;\n scanned: \"\";\n unscanned: \"\";\n }>;\n type initialBranches = branchesFrom<{\n prefixes: [];\n leftBound: undefined;\n intersection: undefined;\n pipe: undefined;\n union: undefined;\n }>;\n type updateScanned = previousUnscanned extends `${infer justScanned}${updatedUnscanned}` ? `${previousScanned}${justScanned}` : previousScanned;\n type setRoot = from<{\n root: root;\n branches: s[\"branches\"];\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type addPrefix = from<{\n root: s[\"root\"];\n branches: {\n prefixes: [...s[\"branches\"][\"prefixes\"], prefix];\n leftBound: s[\"branches\"][\"leftBound\"];\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceBranch = s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : from<{\n root: undefined;\n branches: {\n prefixes: [];\n leftBound: undefined;\n intersection: token extends \"&\" ? mergeToIntersection : undefined;\n union: token extends \"|\" ? mergeToUnion : token extends \"|>\" ? undefined : s[\"branches\"][\"union\"];\n pipe: token extends \"|>\" ? mergeToPipe : s[\"branches\"][\"pipe\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceLeftBound = comparator extends \"<\" | \"<=\" ? s[\"branches\"][\"leftBound\"] extends {} ? state.error> : from<{\n root: undefined;\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: {\n limit: limit;\n comparator: InvertedComparators[comparator];\n };\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }> : state.error>;\n type reduceRange = state.from<{\n root: [minLimit, minComparator, [s[\"root\"], maxComparator, maxLimit]];\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: undefined;\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceSingleBound = state.from<{\n root: [s[\"root\"], comparator, limit];\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: undefined;\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type mergeToIntersection = s[\"branches\"][\"intersection\"] extends undefined ? mergePrefixes : [s[\"branches\"][\"intersection\"], \"&\", mergePrefixes];\n type mergeToUnion = s[\"branches\"][\"union\"] extends undefined ? mergeToIntersection : [s[\"branches\"][\"union\"], \"|\", mergeToIntersection];\n type mergeToPipe = s[\"branches\"][\"pipe\"] extends undefined ? mergeToUnion : [s[\"branches\"][\"pipe\"], \"|>\", mergeToUnion];\n type mergePrefixes = remaining extends [infer head, ...infer tail] ? [\n head,\n mergePrefixes\n ] : s[\"root\"];\n type popGroup = [\n ...stack,\n top\n ];\n type finalizeGroup = s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : s[\"groups\"] extends popGroup ? from<{\n groups: stack;\n branches: top;\n root: mergeToPipe;\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }> : state.error>;\n type reduceGroupOpen = from<{\n groups: [...s[\"groups\"], s[\"branches\"]];\n branches: initialBranches;\n root: undefined;\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type finalize = s[\"groups\"] extends [] ? s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : from<{\n root: mergeToPipe;\n groups: s[\"groups\"];\n branches: initialBranches;\n finalizer: finalizer;\n scanned: s[\"scanned\"];\n unscanned: s[\"unscanned\"];\n }> : state.error>;\n type openRangeError> = state.error>;\n type previousOperator = s[\"branches\"][\"leftBound\"] extends {} ? s[\"branches\"][\"leftBound\"][\"comparator\"] : s[\"branches\"][\"prefixes\"] extends ([\n ...unknown[],\n infer tail extends string\n ]) ? tail : s[\"branches\"][\"intersection\"] extends {} ? \"&\" : s[\"branches\"][\"union\"] extends {} ? \"|\" : undefined;\n type scanTo = from<{\n root: s[\"root\"];\n branches: s[\"branches\"];\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type from = s;\n type branchesFrom = b;\n}\n\ntype StringLiteral = DoubleQuotedStringLiteral | SingleQuotedStringLiteral;\ntype DoubleQuotedStringLiteral = `\"${Text}\"`;\ntype SingleQuotedStringLiteral = `'${Text}'`;\ndeclare const parseEnclosed: (s: DynamicState, enclosing: EnclosingStartToken) => void;\ntype parseEnclosed = ArkTypeScanner.shiftUntil extends ArkTypeScanner.shiftResult ? nextUnscanned extends \"\" ? state.error> : state.setRoot, nextUnscanned extends ArkTypeScanner.shift ? unscanned : \"\"> : never;\ndeclare const enclosingQuote: {\n readonly \"'\": 1;\n readonly '\"': 1;\n};\ntype EnclosingQuote = keyof typeof enclosingQuote;\ndeclare const enclosingTokens: {\n readonly \"d'\": \"'\";\n readonly 'd\"': \"\\\"\";\n readonly \"'\": \"'\";\n readonly '\"': \"\\\"\";\n readonly \"/\": \"/\";\n};\ntype EnclosingTokens = typeof enclosingTokens;\ntype EnclosingStartToken = keyof EnclosingTokens;\ndeclare const enclosingCharDescriptions: {\n readonly '\"': \"double-quote\";\n readonly \"'\": \"single-quote\";\n readonly \"/\": \"forward slash\";\n};\ntype enclosingCharDescriptions = typeof enclosingCharDescriptions;\ndeclare const writeUnterminatedEnclosedMessage: (fragment: fragment, enclosingStart: enclosingStart) => writeUnterminatedEnclosedMessage;\ntype writeUnterminatedEnclosedMessage = `${enclosingStart}${fragment} requires a closing ${enclosingCharDescriptions[EnclosingTokens[enclosingStart]]}`;\n\ndeclare const parseUnenclosed: (s: DynamicState) => void;\ntype parseUnenclosed = ArkTypeScanner.shiftUntilNextTerminator extends (ArkTypeScanner.shiftResult) ? tryResolve extends state.from ? s : never : never;\ntype parseResolution = resolutionToAst extends infer ast ? ast extends GenericAst ? parseGenericInstantiation, $, args> : state.setRoot : never;\ndeclare const parseGenericInstantiation: (name: string, g: GenericRoot, s: DynamicState) => BaseRoot;\ntype parseGenericInstantiation = ArkTypeScanner.skipWhitespace extends `<${infer unscanned}` ? parseGenericArgs extends infer result ? result extends ParsedArgs ? state.setRoot, nextUnscanned> : result : never : state.error, [\n]>>;\ntype tryResolve = token extends keyof args ? parseResolution : token extends keyof $ ? parseResolution : `#${token}` extends keyof $ ? parseResolution : token extends keyof ArkAmbient.$ ? parseResolution : token extends NumberLiteral ? state.setRoot, unscanned> : token extends (`${infer submodule extends keyof $ & string}.${infer reference}`) ? tryResolveSubmodule : token extends (`${infer submodule extends keyof ArkAmbient.$ & string}.${infer reference}`) ? tryResolveSubmodule : token extends BigintLiteral ? state.setRoot, unscanned> : token extends \"keyof\" ? state.addPrefix : unresolvableState;\ntype tryResolveSubmodule = resolution extends {\n [arkKind]: \"module\";\n} ? reference extends keyof resolution ? parseResolution : reference extends (`${infer nestedSubmodule extends keyof resolution & string}.${infer nestedReference}`) ? tryResolveSubmodule : unresolvableState : state.error>>;\n/** Provide valid completions for the current token, or fallback to an\n * unresolvable error if there are none */\ntype unresolvableState = [\n token,\n s[\"unscanned\"]\n] extends ([\n \"\",\n ArkTypeScanner.shift<\"#\", infer unscanned>\n]) ? ArkTypeScanner.shiftUntilNextTerminator extends (ArkTypeScanner.shiftResult) ? state.error> : never : validReferenceFromToken extends (never) ? state.error>> : state.completion<`${s[\"scanned\"]}${qualifiedReference, submodulePath>}`>;\ntype qualifiedReference = join<[...submodulePath, reference], \".\">;\ntype validReferenceFromToken = Extract : resolvableReferenceIn<$>, `${token}${string}`>;\ntype writeMissingRightOperandMessage = `Token '${token}' requires a right operand${unscanned extends \"\" ? \"\" : ` before '${unscanned}'`}`;\ndeclare const writeMissingRightOperandMessage: (token: token, unscanned?: unscanned) => writeMissingRightOperandMessage;\n\ndeclare const parseOperand: (s: DynamicState) => void;\ntype parseOperand = s[\"unscanned\"] extends (ArkTypeScanner.shift) ? lookahead extends \"(\" ? state.reduceGroupOpen : lookahead extends EnclosingStartToken ? parseEnclosed : lookahead extends WhitespaceChar ? parseOperand, $, args> : lookahead extends \"d\" ? unscanned extends (ArkTypeScanner.shift) ? parseEnclosed : parseUnenclosed : parseUnenclosed : state.completion<`${s[\"scanned\"]}${BaseCompletions<$, args>}`>;\n\ntype UnitLiteralKeyword = \"null\" | \"undefined\" | \"true\" | \"false\";\ntype UnitLiteral = StringLiteral | BigintLiteral | NumberLiteral | DateLiteral | UnitLiteralKeyword;\ntype ParsedDefaultableProperty = readonly [BaseRoot, \"=\", unknown];\ndeclare const parseDefault: (s: DynamicStateWithRoot) => ParsedDefaultableProperty;\ntype parseDefault = trim$1 extends infer defaultValue extends UnitLiteral ? [\n root,\n \"=\",\n defaultValue\n] : ErrorMessage>>;\ndeclare const writeNonLiteralDefaultMessage: (defaultDef: defaultDef) => writeNonLiteralDefaultMessage;\ntype writeNonLiteralDefaultMessage = `Default value '${defaultDef}' must a literal value`;\n\ndeclare const parseBound: (s: DynamicStateWithRoot, start: ComparatorStartChar) => void;\ntype parseBound = shiftComparator extends infer shiftResultOrError ? shiftResultOrError extends (ArkTypeScanner.shiftResult) ? s[\"root\"] extends (InferredAst) ? state.reduceLeftBound : parseRightBound, comparator, $, args> : shiftResultOrError : never;\ntype OneCharComparator = \">\" | \"<\";\ntype ComparatorStartChar = Comparator extends `${infer char}${string}` ? char : never;\ndeclare const shiftComparator: (s: DynamicState, start: ComparatorStartChar) => Comparator;\ntype shiftComparator = unscanned extends `=${infer nextUnscanned}` ? [`${start}=`, nextUnscanned] : [start & OneCharComparator, unscanned];\ndeclare const parseRightBound: (s: DynamicStateWithRoot, comparator: Comparator) => void;\ntype parseRightBound = parseOperand extends infer nextState extends StaticState ? nextState[\"root\"] extends (InferredAst) ? s[\"branches\"][\"leftBound\"] extends {} ? comparator extends MaxComparator ? state.reduceRange : state.error> : state.reduceSingleBound : state.error, \"right\">> : never;\ndeclare const writeInvalidLimitMessage: (comparator: comparator, limit: limit, boundKind: boundKind) => writeInvalidLimitMessage;\ntype writeInvalidLimitMessage = `Comparator ${boundKind extends \"left\" ? InvertedComparators[comparator] : comparator} must be ${boundKind extends \"left\" ? \"preceded\" : \"followed\"} by a corresponding literal (was ${limit})`;\ntype BoundExpressionKind = \"left\" | \"right\";\n\ndeclare const parseBrand: (s: DynamicStateWithRoot) => void;\ntype parseBrand = ArkTypeScanner.shiftUntilNextTerminator> extends (ArkTypeScanner.shiftResult<`${infer brandName}`, infer nextUnscanned>) ? brandName extends \"\" ? state.error : state.setRoot : never;\n\ndeclare const parseDivisor: (s: DynamicStateWithRoot) => void;\ntype parseDivisor = ArkTypeScanner.shiftUntilNextTerminator> extends ArkTypeScanner.shiftResult ? scanned extends `${infer divisor extends number}` ? divisor extends 0 ? state.error> : state.setRoot : state.error> : never;\ndeclare const writeInvalidDivisorMessage: (divisor: divisor) => writeInvalidDivisorMessage;\ntype writeInvalidDivisorMessage = `% operator must be followed by a non-zero integer literal (was ${divisor})`;\n\ndeclare const parseOperator: (s: DynamicStateWithRoot) => void;\ntype parseOperator = s[\"unscanned\"] extends (ArkTypeScanner.shift) ? lookahead extends \"[\" ? unscanned extends ArkTypeScanner.shift<\"]\", infer nextUnscanned> ? state.setRoot : state.error : lookahead extends \"|\" ? unscanned extends ArkTypeScanner.shift<\">\", infer nextUnscanned> ? state.reduceBranch\", nextUnscanned> : state.reduceBranch : lookahead extends \"&\" ? state.reduceBranch : lookahead extends \")\" ? state.finalizeGroup : ArkTypeScanner.lookaheadIsFinalizing extends true ? state.finalize, lookahead & ArkTypeScanner.FinalizingLookahead> : lookahead extends ComparatorStartChar ? parseBound : lookahead extends \"%\" ? parseDivisor : lookahead extends \"#\" ? parseBrand : lookahead extends WhitespaceChar ? parseOperator, $, args> : state.error> : state.finalize;\ndeclare const writeUnexpectedCharacterMessage: (char: char, shouldBe?: shouldBe) => writeUnexpectedCharacterMessage;\ntype writeUnexpectedCharacterMessage = `'${char}' is not allowed here${shouldBe extends \"\" ? \"\" : ` (should be ${shouldBe})`}`;\ndeclare const incompleteArrayTokenMessage = \"Missing expected ']'\";\ntype incompleteArrayTokenMessage = typeof incompleteArrayTokenMessage;\n\ndeclare const parseString: (def: string, ctx: BaseParseContext) => InnerParseResult;\n/**\n * Try to parse the definition from right to left using the most common syntax.\n * This can be much more efficient for simple definitions.\n */\ntype parseString = def extends keyof $ ? resolutionToAst : def extends `${infer child}[]` ? child extends keyof $ ? [\n resolutionToAst,\n \"[]\"\n] : fullStringParse, $, args> : fullStringParse, $, args>;\ntype inferString = inferAstRoot, $, args>;\ntype BaseCompletions<$, args, otherSuggestions extends string = never> = resolvableReferenceIn<$> | resolvableReferenceIn | (keyof args & string) | StringifiablePrefixOperator | otherSuggestions;\ndeclare const fullStringParse: (s: DynamicState) => InnerParseResult;\ntype fullStringParse = extractFinalizedResult>;\ndeclare const parseUntilFinalizer: (s: DynamicState) => DynamicStateWithRoot;\ntype parseUntilFinalizer = s[\"finalizer\"] extends undefined ? parseUntilFinalizer, $, args> : s;\ndeclare const next: (s: DynamicState) => void;\ntype next = s[\"root\"] extends undefined ? parseOperand : parseOperator;\ntype extractFinalizedResult = s[\"finalizer\"] extends \"\" ? s[\"root\"] : s[\"finalizer\"] extends ErrorMessage ? s[\"finalizer\"] : s[\"finalizer\"] extends \"?\" ? [s[\"root\"], \"?\"] : s[\"finalizer\"] extends \"=\" ? parseDefault : ErrorMessage>;\n\ndeclare const parseGenericArgs: (name: string, g: GenericRoot, s: DynamicState) => BaseRoot[];\ntype parseGenericArgs = _parseGenericArgs;\ntype ParsedArgs = {\n result: result;\n unscanned: unscanned;\n};\ndeclare const _parseGenericArgs: (name: string, g: GenericRoot, s: DynamicState, argNodes: BaseRoot[]) => BaseRoot[];\ntype _parseGenericArgs = parseUntilFinalizer, $, args> extends (infer finalArgState extends StaticState) ? {\n defs: [\n ...argDefs,\n finalArgState[\"scanned\"] extends `${infer def}${\",\" | \">\"}` ? def : finalArgState[\"scanned\"]\n ];\n asts: [...argAsts, finalArgState[\"root\"]];\n unscanned: finalArgState[\"unscanned\"];\n} extends ({\n defs: infer nextDefs extends string[];\n asts: infer nextAsts extends unknown[];\n unscanned: infer nextUnscanned extends string;\n}) ? finalArgState[\"finalizer\"] extends \">\" ? nextAsts[\"length\"] extends g[\"paramsAst\"][\"length\"] ? ParsedArgs : state.error, nextDefs>> : finalArgState[\"finalizer\"] extends \",\" ? _parseGenericArgs : finalArgState[\"finalizer\"] extends ErrorMessage ? finalArgState : state.error\">> : never : never;\ndeclare const writeInvalidGenericArgCountMessage: , argDefs extends array>(name: name, params: params, argDefs: argDefs) => writeInvalidGenericArgCountMessage;\ntype writeInvalidGenericArgCountMessage, argDefs extends array> = `${name}<${join}> requires exactly ${params[\"length\"]} args (got ${argDefs[\"length\"]}${argDefs[\"length\"] extends (0) ? \"\" : `: ${join}`})`;\n\ntype validateRange = [\n l\n] extends [LimitLiteral] ? validateBound : [l] extends [[infer leftAst, Comparator, unknown]] ? ErrorMessage>> : validateBound;\ntype validateBound = inferAstRoot extends infer bounded ? isNumericallyBoundable extends true ? limit extends number ? validateAst : ErrorMessage> : [bounded] extends [Date] ? validateAst : [bounded] extends [InferredMorph] ? ErrorMessage> : ErrorMessage>> : never;\ntype isNumericallyBoundable = [\n bounded\n] extends [number] ? true : [bounded] extends [string] ? true : [bounded] extends [array] ? true : false;\ndeclare const writeDoubleRightBoundMessage: (root: root) => writeDoubleRightBoundMessage;\ntype writeDoubleRightBoundMessage = `Expression ${root} must have at most one right bound`;\n\ntype validateDefault = validateAst extends infer e extends ErrorMessage ? e : type.infer extends inferAstIn ? undefined : ErrorMessage, unitLiteral>>;\n\ntype validateDivisor = inferAstRoot extends infer data ? [\n data\n] extends [number] ? validateAst : [data] extends [InferredMorph] ? ErrorMessage> : ErrorMessage> : never;\n\ntype validateKeyof = inferAstRoot extends infer data ? [\n data\n] extends [object] ? validateAst : ErrorMessage>> : never;\n\ntype validateAst = ast extends ErrorMessage ? ast : ast extends InferredAst ? validateInferredAst : ast extends DefAst ? ast[2] extends PrivateDeclaration ? ErrorMessage> : undefined : ast extends PostfixExpression<\"[]\" | \"?\", infer operand> ? validateAst : ast extends InfixExpression ? operator extends BranchOperator ? validateInfix : operator extends Comparator ? validateRange : operator extends \"%\" ? validateDivisor : operator extends \"=\" ? validateDefault : operator extends \"#\" ? validateAst : ErrorMessage>> : ast extends [\"keyof\", infer operand] ? validateKeyof : ast extends GenericInstantiationAst ? validateGenericInstantiation : ErrorMessage>> & {\n ast: ast;\n};\ntype writeUnexpectedExpressionMessage = `Failed to parse the expression resulting from ${expression}`;\ndeclare const writePrefixedPrivateReferenceMessage: (name: name) => writePrefixedPrivateReferenceMessage;\ntype writePrefixedPrivateReferenceMessage = `Private type references should not include '#'. Use '${name}' instead.`;\ntype validateInferredAst = def extends NumberLiteral ? number extends inferred ? ErrorMessage> : undefined : def extends BigintLiteral ? bigint extends inferred ? ErrorMessage> : undefined : [inferred] extends [anyOrNever] ? undefined : def extends PrivateDeclaration ? ErrorMessage> : inferred extends Generic ? ErrorMessage> : inferred extends {\n [arkKind]: \"module\";\n} ? \"root\" extends keyof inferred ? undefined : ErrorMessage> : def extends ErrorMessage ? def : undefined;\ntype validateString = parseString extends infer ast ? validateAst extends infer result extends ErrorMessage ? result extends Completion ? text : result : def : never;\ntype validateInfix = validateAst extends infer e extends ErrorMessage ? e : validateAst extends infer e extends ErrorMessage ? e : undefined;\ndeclare const shallowOptionalMessage = \"Optional definitions like 'string?' are only valid as properties in an object or tuple\";\ntype shallowOptionalMessage = typeof shallowOptionalMessage;\ndeclare const shallowDefaultableMessage = \"Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple\";\ntype shallowDefaultableMessage = typeof shallowDefaultableMessage;\n\ntype GenericInstantiationAst = [generic, \"<>\", argAsts];\ntype inferGenericInstantiation = g[\"bodyDef\"] extends Hkt ? Hkt.apply;\n}> : inferDefinition, {\n [i in keyof g[\"names\"] & `${number}` as g[\"names\"][i]]: inferExpression, args>;\n}>;\ntype validateGenericInstantiation = validateGenericArgs;\ntype validateGenericArgs, argAsts extends array, $, args, indices extends 1[]> = argAsts extends readonly [infer arg, ...infer argsTail] ? validateAst extends infer e extends ErrorMessage ? e : inferAstRoot extends params[indices[\"length\"]][1] ? validateGenericArgs : ErrorMessage, astToString>> : undefined;\ntype resolveScope = g$ extends UnparsedScope ? $ : g$;\n\ntype inferAstRoot = ast extends array ? inferExpression : never;\ntype inferAstIn = distill.In>;\ntype DefAst = [\n def,\n \"def\",\n alias\n];\ntype InferredAst = [\n t,\n \"inferred\",\n def\n];\ntype inferExpression = ast extends array ? ast extends InferredAst ? resolution : ast extends DefAst ? inferDefinition : ast extends GenericInstantiationAst ? inferGenericInstantiation : ast[1] extends \"[]\" ? inferExpression[] : ast[1] extends \"|\" ? inferExpression | inferExpression : ast[1] extends \"&\" ? inferIntersection, inferExpression> : ast[1] extends \"|>\" ? inferPipe, inferExpression> : ast[1] extends \"=\" ? type.infer extends infer defaultValue ? withDefault, defaultValue> : never : ast[1] extends \"#\" ? type.brand, ast[2]> : ast[1] extends Comparator ? ast[0] extends LimitLiteral ? inferExpression : inferExpression : ast[1] extends \"%\" ? inferExpression : ast[1] extends \"?\" ? inferExpression : ast[0] extends \"keyof\" ? arkKeyOf> : never : never;\ntype PostfixExpression = readonly [operand, operator];\ntype InfixExpression = [l, operator, r];\n\ntype inferObjectLiteral = show<\"...\" extends keyof def ? merge, _inferObjectLiteral> : _inferObjectLiteral>;\n/**\n * Infers the contents of an object literal, ignoring a spread definition\n */\ntype _inferObjectLiteral = {\n -readonly [k in keyof def as nonOptionalKeyFromEntry]: inferDefinition;\n} & {\n -readonly [k in keyof def as optionalKeyFromEntry]?: def[k] extends OptionalPropertyDefinition ? inferDefinition : inferDefinition;\n};\ntype validateObjectLiteral = {\n [k in keyof def]: preparseKey extends (infer parsedKey extends PreparsedKey) ? parsedKey extends PreparsedEntryKey<\"index\"> ? validateString extends (ErrorMessage) ? ErrorType : inferDefinition extends Key ? validateProperty : ErrorMessage> : validateProperty : never;\n};\ntype nonOptionalKeyFromEntry = preparseKey extends infer parsedKey ? parsedKey extends PreparsedEntryKey<\"required\"> ? [\n v\n] extends [OptionalPropertyDefinition] ? [\n v\n] extends [anyOrNever] ? parsedKey[\"normalized\"] : never : parsedKey[\"normalized\"] : parsedKey extends PreparsedEntryKey<\"index\"> ? inferDefinition & Key : never : never;\ntype optionalKeyFromEntry = preparseKey extends infer parsedKey ? parsedKey extends PreparsedEntryKey<\"optional\"> ? parsedKey[\"normalized\"] : v extends OptionalPropertyDefinition ? k : never : never;\ntype normalizedKeyKind = kind extends \"index\" ? string : Key;\ntype PreparsedEntryKey = normalizedKeyKind> = {\n kind: kind;\n normalized: normalized;\n};\ntype PreparsedSpecialKey = {\n kind: kind;\n};\ntype PreparsedKey = PreparsedEntryKey | PreparsedSpecialKey;\ndeclare namespace PreparsedKey {\n type from = t;\n}\ntype ParsedKeyKind = EntryKeyKind | SpecialKeyKind;\ntype EntryKeyKind = \"required\" | \"optional\" | \"index\";\ntype SpecialKeyKind = \"spread\" | \"undeclared\";\ntype MetaKey = \"...\" | \"+\";\ntype IndexKey = `[${def}]`;\ndeclare const preparseKey: (key: Key) => PreparsedKey;\ntype preparseKey = k extends symbol ? PreparsedKey.from<{\n kind: \"required\";\n normalized: k;\n}> : k extends `${infer inner}?` ? inner extends `${infer baseName}${EscapeChar}` ? PreparsedKey.from<{\n kind: \"required\";\n normalized: `${baseName}?`;\n}> : PreparsedKey.from<{\n kind: \"optional\";\n normalized: inner;\n}> : k extends \"+\" ? {\n kind: \"undeclared\";\n} : k extends \"...\" ? {\n kind: \"spread\";\n} : k extends `${EscapeChar}${infer escapedMeta extends MetaKey}` ? PreparsedKey.from<{\n kind: \"required\";\n normalized: escapedMeta;\n}> : k extends IndexKey ? PreparsedKey.from<{\n kind: \"index\";\n normalized: def;\n}> : PreparsedKey.from<{\n kind: \"required\";\n normalized: k extends (`${EscapeChar}${infer escapedIndexKey extends IndexKey}`) ? escapedIndexKey : k extends Key ? k : `${k & number}`;\n}>;\ndeclare const writeInvalidSpreadTypeMessage: (def: def) => writeInvalidSpreadTypeMessage;\ntype writeInvalidSpreadTypeMessage = `Spread operand must resolve to an object literal type (was ${def})`;\n\ntype ParsedOptionalProperty = readonly [BaseRoot, \"?\"];\ntype validateProperty = [\n def\n] extends [anyOrNever] ? \n/** this extra [anyOrNever] check is required to ensure that nested `type` invocations\n * like the following are not prematurely validated by the outer call:\n *\n * ```ts\n * type({\n * \t\"test?\": type(\"string\").pipe(x => x === \"true\")\n * })\n * ```\n */\ndef : keyKind extends \"spread\" ? def extends validateInnerDefinition ? inferDefinition extends object ? def : ErrorType>>> : validateInnerDefinition : keyKind extends \"undeclared\" ? UndeclaredKeyBehavior : keyKind extends \"required\" ? validateInnerDefinition : def extends OptionalPropertyDefinition ? ErrorMessage : isDefaultable extends true ? ErrorMessage : validateInnerDefinition;\ntype isDefaultable = def extends DefaultablePropertyTuple ? true : def extends PossibleDefaultableStringDefinition ? parseString extends DefaultablePropertyTuple ? true : false : false;\ntype OptionalPropertyDefinition = OptionalPropertyTuple | OptionalPropertyString;\ntype OptionalPropertyString = `${baseDef}?`;\ntype OptionalPropertyTuple = readonly [baseDef, \"?\"];\ntype PossibleDefaultableStringDefinition = `${string}=${string}`;\ntype DefaultablePropertyTuple = readonly [baseDef, \"=\", thunkableProperty];\ndeclare const invalidOptionalKeyKindMessage = \"Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }\";\ntype invalidOptionalKeyKindMessage = typeof invalidOptionalKeyKindMessage;\ndeclare const invalidDefaultableKeyKindMessage = \"Only required keys may specify default values, e.g. { value: 'number = 0' }\";\ntype invalidDefaultableKeyKindMessage = typeof invalidDefaultableKeyKindMessage;\n\ninterface ArkScopeConfig extends ArkSchemaScopeConfig {\n}\ninterface ScopeParser {\n (def: scope.validate, config?: ArkScopeConfig): Scope>;\n define: (def: scope.validate) => def;\n}\ntype ModuleParser = (def: scope.validate, config?: ArkScopeConfig) => scope.infer extends infer $ ? Module<{\n [k in exportedNameOf<$>]: $[k];\n}> : never;\ntype bindThis = {\n this: Def;\n};\n/** nominal type for an unparsed definition used during scope bootstrapping */\ntype Def = Brand;\n/** sentinel indicating a scope that will be associated with a generic has not yet been parsed */\ntype UnparsedScope = \"$\";\n/** These are legal as values of a scope but not as definitions in other contexts */\ntype PreparsedResolution = PreparsedNodeResolution;\ntype bootstrapAliases = {\n [k in Exclude]: def[k] extends (PreparsedResolution) ? def[k] extends {\n t: infer g extends GenericAst;\n } ? g : def[k] extends Module | BoundModule ? Submodule<$> : def[k] : def[k] extends (() => infer thunkReturn extends PreparsedResolution) ? thunkReturn extends {\n t: infer g extends GenericAst;\n } ? g : thunkReturn extends Module | BoundModule ? Submodule<$> : thunkReturn : Def;\n} & {\n [k in keyof def & GenericDeclaration as extractGenericName]: GenericAst, bootstrapAliases>, def[k], UnparsedScope>;\n};\ntype inferBootstrapped<$> = {\n [name in keyof $]: $[name] extends Def ? inferDefinition : $[name] extends {\n t: infer g extends GenericAst;\n } ? bindGenericToScope : $[name];\n} & unknown;\ntype bindGenericToScope = GenericAst;\ntype extractGenericName = k extends GenericDeclaration ? name : never;\ntype extractGenericParameters = k extends `${string}<${infer params}>` ? ParameterString : never;\ntype resolutionToAst = [\n resolution\n] extends [anyOrNever] ? InferredAst : resolution extends Def ? DefAst : resolution extends {\n [arkKind]: \"module\";\n root: infer root;\n} ? InferredAst : resolution extends GenericAst ? resolution : InferredAst;\ninterface InternalScope {\n constructor: typeof InternalScope;\n}\ndeclare class InternalScope<$ extends {} = {}> extends BaseScope<$> {\n get ambientAttachments(): Ark.boundTypeAttachments<$> | undefined;\n protected preparseOwnAliasEntry(alias: string, def: unknown): AliasDefEntry;\n parseGenericParams(def: string, opts: BaseParseOptions): array;\n protected normalizeRootScopeValue(resolution: unknown): unknown;\n protected preparseOwnDefinitionFormat(def: unknown, opts: BaseParseOptions): BaseRoot | BaseParseContextInput;\n parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot;\n unit: UnitTypeParser<$>;\n valueOf: ValueOfTypeParser<$>;\n enumerated: EnumeratedTypeParser<$>;\n instanceOf: InstanceOfTypeParser<$>;\n or: NaryUnionParser<$>;\n and: NaryIntersectionParser<$>;\n merge: NaryMergeParser<$>;\n pipe: NaryPipeParser<$>;\n match: InternalMatchParser;\n declare: () => {\n type: InternalTypeParser;\n };\n define(def: def): def;\n type: InternalTypeParser;\n static scope: ScopeParser;\n static module: ModuleParser;\n}\ndeclare const scope: ScopeParser;\ndeclare namespace scope {\n type validate = {\n [k in keyof def]: k extends noSuggest ? unknown : parseScopeKey[\"params\"] extends infer params ? params extends array ? params[\"length\"] extends 0 ? def[k] extends type.Any | PreparsedResolution ? def[k] : k extends (PrivateDeclaration) ? ErrorType> : type.validate, {}> : type.validate, baseGenericConstraints> : params : never;\n };\n type infer = inferBootstrapped>;\n}\ninterface ScopeConstructor {\n new <$ = {}>(...args: ConstructorParameters): Scope<$>;\n scope: ScopeParser;\n module: ModuleParser;\n}\ninterface Scope<$ = {}> {\n t: $;\n [arkKind]: \"scope\";\n config: ArkScopeConfig;\n references: readonly BaseNode[];\n json: JsonStructure;\n exportedNames: array>;\n /** The set of names defined at the root-level of the scope mapped to their\n * corresponding definitions.**/\n aliases: Record;\n internal: toInternalScope<$>;\n defineSchema(schema: def): def;\n node>(kinds: kinds, schema: NodeSchema>, opts?: BaseParseOptions): nodeOfKind>>;\n unit: UnitTypeParser<$>;\n enumerated: EnumeratedTypeParser<$>;\n valueOf: ValueOfTypeParser<$>;\n instanceOf: InstanceOfTypeParser<$>;\n type: TypeParser<$>;\n match: MatchParser<$>;\n declare: DeclarationParser<$>;\n define: DefinitionParser<$>;\n generic: GenericParser<$>;\n schema: SchemaParser<$>;\n import(): Module<{\n [k in exportedNameOf<$> as PrivateDeclaration]: $[k];\n }>;\n import[]>(...names: names): BoundModule<{\n [k in names[number] as PrivateDeclaration]: $[k];\n } & unknown, $>;\n export(): Module<{\n [k in exportedNameOf<$>]: $[k];\n }>;\n export[]>(...names: names): BoundModule<{\n [k in names[number]]: $[k];\n } & unknown, $>;\n resolve>(name: name): instantiateExport<$[name], $>;\n}\ndeclare const Scope: ScopeConstructor;\ntype parseScopeKey = k extends `${infer name}<${infer params}>` ? parseGenericScopeKey : {\n name: k;\n params: [];\n};\ntype parseGenericScopeKey = {\n name: name;\n params: parseGenericParams>;\n};\ntype InnerParseResult = BaseRoot | ParsedOptionalProperty | ParsedDefaultableProperty;\n\ntype maybeValidateTupleExpression = def extends IndexZeroExpression ? validatePrefixExpression : def extends IndexOneExpression ? validateIndexOneExpression : def extends (readonly [\"\", ...unknown[]] | readonly [unknown, \"\", ...unknown[]]) ? readonly [\n def[0] extends \"\" ? BaseCompletions<$, args, IndexZeroOperator | \"...\"> : def[0],\n def[1] extends \"\" ? BaseCompletions<$, args, IndexOneOperator | \"...\"> : def[1]\n] : null;\ntype inferTupleExpression = def[1] extends \"[]\" ? inferDefinition[] : def[1] extends \"?\" ? inferDefinition : def[1] extends \"&\" ? inferIntersection, inferDefinition> : def[1] extends \"|\" ? inferDefinition | inferDefinition : def[1] extends \":\" ? inferPredicate, def[2]> : def[1] extends \"=>\" ? parseMorph : def[1] extends \"|>\" ? parseTo : def[1] extends \"=\" ? withDefault, unwrapDefault> : def[1] extends \"@\" ? inferDefinition : def extends readonly [\"===\", ...infer values] ? values[number] : def extends (readonly [\"instanceof\", ...infer constructors extends Constructor[]]) ? InstanceType : def[0] extends \"keyof\" ? inferKeyOfExpression : never;\ntype validatePrefixExpression = def[\"length\"] extends 1 ? readonly [writeMissingRightOperandMessage] : def[0] extends \"keyof\" ? readonly [def[0], validateDefinition] : def[0] extends \"===\" ? readonly [def[0], ...unknown[]] : def[0] extends \"instanceof\" ? readonly [def[0], ...Constructor[]] : never;\ntype validateIndexOneExpression = def[1] extends TuplePostfixOperator ? readonly [validateDefinition, def[1]] : readonly [\n validateDefinition,\n def[\"length\"] extends 2 ? writeMissingRightOperandMessage : def[1],\n def[1] extends \"|\" ? validateDefinition : def[1] extends \"&\" ? validateDefinition : def[1] extends \":\" ? Predicate> : def[1] extends \"=>\" ? Morph> : def[1] extends \"|>\" ? validateDefinition : def[1] extends \"=\" ? defaultFor> : def[1] extends \"@\" ? TypeMeta.MappableInput : validateDefinition\n];\ntype inferKeyOfExpression = show>;\ntype TupleExpression = IndexZeroExpression | IndexOneExpression;\ntype ArgTwoOperator = Exclude;\ntype parseTo = inferPipe, inferDefinition>;\ntype parseMorph = morph extends Morph ? inferMorphOut extends infer out ? (In: distill.In>) => Out : never : never;\ntype IndexOneExpression = readonly [unknown, token, ...unknown[]];\ntype IndexOneParser = (def: IndexOneExpression, ctx: BaseParseContext) => BaseRoot;\ndeclare const postfixParsers: {\n \"?\": IndexOneParser<\"?\">;\n \"[]\": IndexOneParser<\"[]\">;\n};\ntype TuplePostfixOperator = keyof typeof postfixParsers;\ndeclare const infixParsers: {\n \"|\": IndexOneParser<\"|\">;\n \"=\": IndexOneParser<\"=\">;\n \"|>\": IndexOneParser<\"|>\">;\n \"&\": IndexOneParser<\"&\">;\n \"=>\": IndexOneParser<\"=>\">;\n \":\": IndexOneParser<\":\">;\n \"@\": IndexOneParser<\"@\">;\n};\ntype TupleInfixOperator = keyof typeof infixParsers;\ndeclare const indexOneParsers: {\n \"|\": IndexOneParser<\"|\">;\n \"=\": IndexOneParser<\"=\">;\n \"|>\": IndexOneParser<\"|>\">;\n \"&\": IndexOneParser<\"&\">;\n \"=>\": IndexOneParser<\"=>\">;\n \":\": IndexOneParser<\":\">;\n \"@\": IndexOneParser<\"@\">;\n \"?\": IndexOneParser<\"?\">;\n \"[]\": IndexOneParser<\"[]\">;\n};\ntype IndexOneOperator = keyof typeof indexOneParsers;\ntype IndexZeroParser = (def: IndexZeroExpression, ctx: BaseParseContext) => BaseRoot;\ntype IndexZeroExpression = readonly [\n token,\n ...unknown[]\n];\ndeclare const indexZeroParsers: {\n keyof: IndexZeroParser<\"keyof\">;\n instanceof: IndexZeroParser<\"instanceof\">;\n \"===\": IndexZeroParser<\"===\">;\n};\ntype IndexZeroOperator = keyof typeof indexZeroParsers;\n\ntype validateTupleLiteral = parseSequence extends infer s extends SequenceParseState ? Readonly : never;\ntype inferTupleLiteral = parseSequence extends infer s extends SequenceParseState ? s[\"inferred\"] : never;\ntype SequencePhase = satisfy;\ndeclare namespace SequencePhase {\n type prefix = \"prefix\";\n type optionals = \"optionals\";\n type defaultables = \"defaultables\";\n type postfix = \"postfix\";\n}\ntype SequenceParseState = {\n unscanned: array;\n inferred: array;\n validated: array;\n phase: SequencePhase;\n};\ntype parseSequence = parseNextElement<{\n unscanned: def;\n inferred: [];\n validated: [];\n phase: SequencePhase.prefix;\n}, $, args>;\ntype PreparsedElementKind = \"required\" | SequencePhase.optionals | SequencePhase.defaultables;\ntype PreparsedElement = {\n head: unknown;\n tail: array;\n inferred: unknown;\n validated: unknown;\n kind: PreparsedElementKind;\n spread: boolean;\n};\ndeclare namespace PreparsedElement {\n type from = result;\n type required = \"required\";\n type optionals = \"optionals\";\n type defaultables = \"defaultables\";\n}\ntype preparseNextState = s[\"unscanned\"] extends readonly [\"...\", infer head, ...infer tail] ? preparseNextElement : s[\"unscanned\"] extends readonly [infer head, ...infer tail] ? preparseNextElement : null;\ntype preparseNextElement = PreparsedElement.from<{\n head: head;\n tail: tail;\n inferred: inferDefinition;\n validated: validateInnerDefinition;\n kind: head extends OptionalPropertyDefinition ? PreparsedElement.optionals : head extends DefaultablePropertyTuple ? PreparsedElement.defaultables : isDefaultable extends true ? PreparsedElement.defaultables : PreparsedElement.required;\n spread: spread;\n}>;\ntype parseNextElement = preparseNextState extends infer next extends PreparsedElement ? parseNextElement<{\n unscanned: next[\"tail\"];\n inferred: nextInferred;\n validated: nextValidated;\n phase: next[\"kind\"] extends (SequencePhase.optionals | SequencePhase.defaultables) ? next[\"kind\"] : number extends nextInferred[\"length\"] ? s[\"phase\"] : SequencePhase.prefix;\n}, $, args> : s;\ntype nextInferred = next[\"spread\"] extends true ? [\n ...s[\"inferred\"],\n ...conform\n] : next[\"kind\"] extends SequencePhase.optionals ? [\n ...s[\"inferred\"],\n next[\"inferred\"]?\n] : [...s[\"inferred\"], next[\"inferred\"]];\ntype nextValidated = [\n ...s[\"validated\"],\n ...nextValidatedSpreadOperatorIfPresent,\n nextValidatedElement\n];\ntype nextValidatedSpreadOperatorIfPresent = next[\"spread\"] extends true ? [\n next[\"inferred\"] extends infer spreadOperand extends array ? [\n number,\n number\n ] extends ([\n s[\"inferred\"][\"length\"],\n spreadOperand[\"length\"]\n ]) ? ErrorMessage : \"...\" : ErrorMessage>\n] : [];\ntype nextValidatedElement = next[\"kind\"] extends SequencePhase.optionals ? next[\"spread\"] extends true ? ErrorMessage : s[\"phase\"] extends SequencePhase.postfix ? ErrorMessage : next[\"validated\"] : next[\"kind\"] extends SequencePhase.defaultables ? next[\"spread\"] extends true ? ErrorMessage : s[\"phase\"] extends SequencePhase.optionals ? ErrorMessage : s[\"phase\"] extends SequencePhase.postfix ? ErrorMessage : next[\"validated\"] : [s[\"phase\"], next[\"spread\"]] extends ([\n SequencePhase.optionals | SequencePhase.defaultables,\n false\n]) ? ErrorMessage : next[\"validated\"];\ndeclare const writeNonArraySpreadMessage: (operand: operand) => writeNonArraySpreadMessage;\ntype writeNonArraySpreadMessage = `Spread element must be an array${operand extends string ? ` (was ${operand})` : \"\"}`;\ndeclare const multipleVariadicMesage = \"A tuple may have at most one variadic element\";\ntype multipleVariadicMessage = typeof multipleVariadicMesage;\ndeclare const optionalOrDefaultableAfterVariadicMessage = \"An optional element may not follow a variadic element\";\ntype optionalOrDefaultableAfterVariadicMessage = typeof optionalOrDefaultableAfterVariadicMessage;\ndeclare const spreadOptionalMessage = \"A spread element cannot be optional\";\ntype spreadOptionalMessage = typeof spreadOptionalMessage;\ndeclare const spreadDefaultableMessage = \"A spread element cannot have a default\";\ntype spreadDefaultableMessage = typeof spreadDefaultableMessage;\ndeclare const defaultablePostOptionalMessage = \"A defaultable element may not follow an optional element without a default\";\ntype defaultablePostOptionalMessage = typeof defaultablePostOptionalMessage;\n\ntype inferDefinition = [\n def\n] extends [anyOrNever] ? def : def extends type.cast ? ifEmptyObjectLiteral : def extends ThunkCast ? t : def extends string ? inferString : def extends array ? inferTuple : def extends RegExp ? string : def extends object ? inferObjectLiteral : never;\ntype validateDefinition = null extends undefined ? ErrorMessage<`'strict' or 'strictNullChecks' must be set to true in your tsconfig's 'compilerOptions'`> : [def] extends [anyOrNever] ? def : def extends OptionalPropertyDefinition ? ErrorMessage : isDefaultable extends true ? ErrorMessage : validateInnerDefinition;\ntype validateInnerDefinition = [\n def\n] extends [Terminal] ? def : def extends string ? validateString : def extends BadDefinitionType ? ErrorMessage>> : unknown extends def ? BaseCompletions<$, args> | {} : def extends readonly unknown[] ? validateTuple : validateObjectLiteral;\ntype validateTuple = maybeValidateTupleExpression extends infer result ? result extends null ? validateTupleLiteral : result : never;\ntype inferTuple = def extends TupleExpression ? inferTupleExpression : inferTupleLiteral;\ntype validateDeclared = def extends type.validate ? validateInference : type.validate;\ntype validateInference = def extends RegExp | type.cast | ThunkCast | TupleExpression ? validateShallowInference : def extends array ? declared extends array ? {\n [i in keyof declared]: i extends keyof def ? validateInference : declared[i];\n} : show> : def extends object ? show<{\n [k in requiredKeyOf]: k extends keyof def ? validateInference : declared[k];\n} & {\n [k in optionalKeyOf & string as `${k}?`]: `${k}?` extends (keyof def) ? validateInference, $, args> : declared[k];\n}> : validateShallowInference;\ntype validateShallowInference = equals, declared> extends true ? def : show>;\ntype declarationMismatch = {\n declared: declared;\n inferred: inferDefinition;\n};\ntype Terminal = type.cast | Fn | RegExp;\ntype ThunkCast = () => type.cast;\ntype BadDefinitionType = Exclude;\ndeclare const writeBadDefinitionTypeMessage: (actual: actual) => writeBadDefinitionTypeMessage;\ntype writeBadDefinitionTypeMessage = `Type definitions must be strings or objects (was ${actual})`;\n\n/** The convenience properties attached to `type` */\ntype TypeParserAttachments = Omit;\ninterface TypeParser<$ = {}> extends Ark.boundTypeAttachments<$> {\n /**\n * Create a {@link Type} from your definition.\n *\n * @example const Person = type({ name: \"string\" })\n */\n >(def: type.validate): r extends infer _ ? _ : never;\n /**\n * Create a {@link Generic} from a parameter string and body definition.\n *\n * @param params A string like \"\" specifying the\n * {@link Generic}'s parameters and any associated constraints via `extends`.\n *\n * @param def The definition for the body of the {@link Generic}. Can reference the\n * parameter names specified in the previous argument in addition to aliases\n * from its {@link Scope}.\n *\n * @example const BoxOf = type(\"\", { contents: \"t\" })\n */\n , def, $>>(params: validateParameterString, def: type.validate>>): r extends infer _ ? _ : never;\n /**\n * Create a {@link Type} from a [tuple expression](http://localhost:3000/docs/expressions)\n * spread as this function's arguments.\n *\n * @example type(\"string\", \"|\", { foo: \"number\" })\n */\n >(_0: zero extends IndexZeroOperator ? zero : type.validate, _1: zero extends \"keyof\" ? type.validate : zero extends \"instanceof\" ? conform : zero extends \"===\" ? conform : conform, ..._2: zero extends \"===\" ? rest : zero extends \"instanceof\" ? conform : one extends TupleInfixOperator ? one extends \":\" ? [Predicate>>] : one extends \"=>\" ? [Morph>, unknown>] : one extends \"|>\" ? [type.validate] : one extends \"@\" ? [TypeMeta.MappableInput] : [type.validate] : []): r extends infer _ ? _ : never;\n /**\n * An alias of the {@link ArkErrors} class, an instance of which is returned when a {@link Type}\n * is invoked with invalid input.\n *\n * @example\n * const out = myType(data)\n *\n * if(out instanceof type.errors) console.log(out.summary)\n *\n */\n errors: typeof ArkErrors;\n hkt: typeof Hkt;\n keywords: typeof keywords;\n /**\n * The {@link Scope} in which definitions passed to this function will be parsed.\n */\n $: Scope<$>;\n /**\n * An alias of `type` with no type-level validation or inference.\n *\n * Useful when wrapping `type` or using it to parse a dynamic definition.\n */\n raw(def: unknown): Type;\n module: ModuleParser;\n scope: ScopeParser;\n define: DefinitionParser<$>;\n generic: GenericParser<$>;\n match: MatchParser<$>;\n schema: SchemaParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value strictly equal (`===`) to the argument passed to this function.\n * @example const foo = type.unit('foo') // {@link Type}<'foo'>\n * @example const sym: unique symbol = Symbol(); type.unit(sym) // {@link Type}\n */\n unit: UnitTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value strictly equal (`===`) to one of the arguments passed to this function.\n * @example const enum = type.enumerated('foo', 'bar', obj) // obj is a by-reference object\n * @example const TupleForm = type(['===', 'foo', 'bar', obj])\n * @example const ArgsForm = type('===', 'foo', 'bar', obj)\n */\n enumerated: EnumeratedTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by one of the Object.values() of the argument passed to this function.\n *\n * ⚠️ For TypeScript enum compatibility, values at numeric keys with corresponding numeric values will not be included.\n * @example const myEnum = type.valueOf(myTsEnum)\n */\n valueOf: ValueOfTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value of a specific class.\n * @example const array = type.instanceOf(Array)\n */\n instanceOf: InstanceOfTypeParser<$>;\n /**\n * Create a {@link Type} from a union of definitions\n * @example const T = type.or(\"string\", \"number\")\n */\n or: NaryUnionParser<$>;\n /**\n * Create a {@link Type} from an intersection of definitions\n * @example const T = type.and({ a: \"1\" }, { b: \"2\" })\n */\n and: NaryIntersectionParser<$>;\n /**\n * Create a {@link Type} by merging object definitions, with later\n * definitions having precedence for overlapping keys\n * @example\n * // Type<{ a: \"3\", b: \"2\", c: \"4\" }>\n * const T = type.merge({ a: \"1\", b: \"2\" }, { a: \"3\", c: \"4\" })\n */\n merge: NaryMergeParser<$>;\n /**\n * Create a {@link Type} from a set of morphs (including Types)\n * @example\n * // Type<(In: string) => To>\n * const T = type.pipe(type.string, s => JSON.parse(s), type.object)\n */\n pipe: NaryPipeParser<$>;\n}\ndeclare class InternalTypeParser extends Callable<(...args: unknown[]) => BaseRoot | Generic, TypeParserAttachments> {\n constructor($: InternalScope);\n}\ntype DeclarationParser<$> = () => {\n type: (def: validateDeclared>) => Type$1;\n};\ntype UnitTypeParser<$> = (value: t) => Type$1;\ntype InstanceOfTypeParser<$> = (ctor: Constructor) => Type$1;\ntype EnumeratedTypeParser<$> = (...values: values) => Type$1;\ntype ValueOfTypeParser<$> = (o: o) => Type$1;\ntype DefinitionParser<$> = (def: type.validate) => def;\ntype SchemaParser<$> = (schema: RootSchema, opts?: BaseParseOptions) => Type$1;\ntype TypeConstructor = new (def: unknown, $: Scope<$>) => Type$1;\ntype Type$1 = instantiateType;\ndeclare const Type$1: TypeConstructor;\n\ntype NaryUnionParser<$> = {\n (): Type$1;\n , $>>(a: type.validate): r extends infer _ ? _ : never;\n | type.infer, $>>(a: type.validate, b: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate, q: type.validate): r extends infer _ ? _ : never;\n , $>>(...defs: {\n [i in keyof defs]: type.validate;\n }): r extends infer _ ? _ : never;\n};\ntype NaryIntersectionParser<$> = {\n (): Type$1;\n , $>>(a: type.validate): r extends infer _ ? _ : never;\n , type.infer>, $>>(a: type.validate, b: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate, q: type.validate): r extends infer _ ? _ : never;\n ;\n }>, $>>(...defs: {\n [i in keyof defs]: type.validate;\n }): r extends infer _ ? _ : never;\n};\ntype NaryMergeParser<$> = {\n (): Type$1;\n , r = Type$1>(a: type.validate & (inferredA extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType<\"Merged type must be an object\", [actual: inferredB]>)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, inferredP = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType), p: type.validate & (inferredP extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, inferredP = type.infer, inferredQ = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType), p: type.validate & (inferredP extends object ? unknown : ErrorType), q: type.validate & (inferredQ extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n ;\n }>, $>>(...defs: {\n [i in keyof defs]: type.validate & (type.infer extends object ? unknown : ErrorType\n ]>);\n }): r extends infer _ ? _ : never;\n};\ntype NaryPipeParser<$, initial = unknown> = {\n (): Type$1;\n >, r = instantiateType, $>>(a: a): r extends infer _ ? _ : never;\n >, b extends Morph>, r = instantiateType, a, b]>, $>>(a: a, b: b): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, r = instantiateType, a, b, c]>, $>>(a: a, b: b, c: c): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, r = instantiateType, a, b, c, d]>, $>>(a: a, b: b, c: c, d: d): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, r = instantiateType, a, b, c, d, e]>, $>>(a: a, b: b, c: c, d: d, e: e): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, r = instantiateType, a, b, c, d, e, f]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, r = instantiateType, a, b, c, d, e, f, g]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l, m]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l, m, n]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, p extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o,\n p\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o, p: p): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, p extends Morph>, q extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o,\n p,\n q\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o, p: p, q: q): r extends infer _ ? _ : never;\n , $>>(...defs: morphs): r extends infer _ ? _ : never;\n};\n\n/** @ts-ignore cast variance */\ninterface Inferred {\n internal: BaseRoot;\n [inferred]: t;\n /**\n * precompiled JS used to optimize validation\n *\n * ⚠️ will be `undefined` in [jitless](https://arktype.io/docs/configuration#jitless) mode\n */\n precompilation: string | undefined;\n /**\n * generic parameter representing this Type\n *\n * @typeonly\n *\n * ⚠️ May contain types representing morphs or default values that would\n * be inaccurate if used directly for runtime values. In those cases,\n * you should use {@link infer} or {@link inferIn} on this object instead.\n */\n t: t;\n /**\n * #### {@link Scope} in which chained methods are parsed\n */\n $: Scope<$>;\n /**\n * #### type of output this returns\n *\n * @typeonly\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type ParsedNumber = typeof parseNumber.infer // number\n */\n infer: this[\"inferOut\"];\n /**\n * type of output this returns\n *\n * 🔗 alias of {@link infer}\n * @typeonly\n *\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type ParsedNumber = typeof parseNumber.infer // number\n */\n inferOut: distill.Out;\n /**\n * type of output that can be introspected at runtime (e.g. via {@link out})\n *\n * ⚠️ If your Type contains morphs, they will be inferred as `unknown` unless\n * they are an ArkType keyword or have an explicitly defined output validator.\n *\n * @typeonly\n *\n * @example\n * const Unmorphed = type(\"string\")\n * // with no morphs, we can introspect the input and output as a single Type\n * type UnmorphedOut = typeof Unmorphed.inferIntrospectableOut // string\n *\n * const Morphed = type(\"string\").pipe(s => s.length)\n * // with a standard user-defined morph, TypeScript can infer a\n * // return type from your function, but we have no way to\n * // know the shape at runtime\n * type MorphOut = typeof Morphed.inferIntrospectableOut // unknown\n *\n * const Validated = type(\"string\").pipe(s => s.length).to(\"number\")\n * // morphs with validated output, including all morph keywords, are introspectable\n * type ValidatedMorphOut = typeof Validated.inferIntrospectableOut\n */\n inferIntrospectableOut: distill.introspectable.Out;\n /**\n * #### type of input this allows\n *\n * @typeonly\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type UnparsedNumber = typeof parseNumber.inferIn // string\n */\n inferIn: distill.In;\n /**\n * #### internal JSON representation\n */\n json: JsonStructure;\n /**\n * alias of {@link json} for `JSON.stringify` compatibility\n */\n toJSON(): JsonStructure;\n /**\n * #### generate a JSON Schema\n *\n * @throws {ToJsonSchema.Error} if this cannot be converted to JSON Schema\n */\n toJsonSchema(options?: ToJsonSchema.Options): JsonSchema;\n /**\n * #### metadata like custom descriptions and error messages\n *\n * ✅ type {@link https://arktype.io/docs/configuration#custom | can be customized} for your project\n */\n meta: ArkAmbient.meta;\n /**\n * #### human-readable English description\n *\n * ✅ works best for primitive values\n *\n * @example\n * const N = type(\"0 < number <= 100\")\n * console.log(N.description) // positive and at most 100\n */\n description: string;\n /**\n * #### syntax string similar to native TypeScript\n *\n * ✅ works well for both primitives and structures\n *\n * @example\n * const Loc = type({ coords: [\"number\", \"number\"] })\n * console.log(Loc.expression) // { coords: [number, number] }\n */\n expression: string;\n /**\n * #### validate and return transformed data or throw\n *\n * ✅ sugar to avoid checking for {@link type.errors} if they are unrecoverable\n *\n * @example\n * const CriticalPayload = type({\n * superImportantValue: \"string\"\n * })\n * // throws TraversalError: superImportantValue must be a string (was missing)\n * const data = CriticalPayload.assert({ irrelevantValue: \"whoops\" })\n * console.log(data.superImportantValue) // valid output can be accessed directly\n *\n * @throws {TraversalError}\n */\n assert(data: unknown): this[\"infer\"];\n /**\n * #### check input without applying morphs\n *\n * ✅ good for stuff like filtering that doesn't benefit from detailed errors\n *\n * @example\n * const Numeric = type(\"number | bigint\")\n * // [0, 2n]\n * const numerics = [0, \"one\", 2n].filter(Numeric.allows)\n */\n allows(data: unknown): data is this[\"inferIn\"];\n /**\n * #### add metadata to shallow references\n *\n * ⚠️ does not affect error messages within properties of an object\n *\n * @example\n * const NotOdd = type(\"number % 2\").configure({ description: \"not odd\" })\n * // all constraints at the root are affected\n * const odd = NotOdd(3) // must be not odd (was 3)\n * const nonNumber = NotOdd(\"two\") // must be not odd (was \"two\")\n *\n * const NotOddBox = type({\n * // we should have referenced notOdd or added meta here\n * notOdd: \"number % 2\",\n * // but instead chained from the root object\n * }).configure({ description: \"not odd\" })\n * // error message at path notOdd is not affected\n * const oddProp = NotOddBox({ notOdd: 3 }) // notOdd must be even (was 3)\n * // error message at root is affected, leading to a misleading description\n * const nonObject = NotOddBox(null) // must be not odd (was null)\n */\n configure: NodeSelector.SelectableFn;\n /**\n * #### add description to shallow references\n *\n * 🔗 equivalent to `.configure({ description })` (see {@link configure})\n * ⚠️ does not affect error messages within properties of an object\n *\n * @example\n * const AToZ = type(/^a.*z$/).describe(\"a string like 'a...z'\")\n * const good = AToZ(\"alcatraz\") // \"alcatraz\"\n * // ArkErrors: must be a string like 'a...z' (was \"albatross\")\n * const badPattern = AToZ(\"albatross\")\n */\n describe: NodeSelector.SelectableFn;\n /**\n * #### apply undeclared key behavior\n *\n * {@inheritDoc UndeclaredKeyBehavior}\n */\n onUndeclaredKey(behavior: UndeclaredKeyBehavior): this;\n /**\n * #### deeply apply undeclared key behavior\n *\n * {@inheritDoc UndeclaredKeyBehavior}\n **/\n onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): this;\n /**\n * #### alias for {@link assert} with typed input\n *\n * @example\n * const T = type({ foo: \"string\" });\n * // TypeScript: foo must be a string (was 5)\n * const data = T.from({ foo: 5 });\n */\n from(literal: this[\"inferIn\"]): this[\"infer\"];\n /**\n * #### deeply extract inputs\n *\n * ✅ will never include morphs\n * ✅ good for generating JSON Schema or other non-transforming formats\n *\n * @example\n * const User = type({\n * age: \"string.numeric.parse\"\n * })\n * // { age: 25 } (age parsed to a number)\n * const out = User({ age: \"25\" })\n * // { age: \"25\" } (age is still a string)\n * const inOut = User.in({ age: \"25\" })\n */\n get in(): instantiateType;\n /**\n * #### deeply extract outputs\n *\n * ✅ will never include morphs\n * ⚠️ if your type includes morphs, their output will likely be unknown unless they\n * were defined with an explicit output validator via `.to(outputDef)` or `.pipe(morph, outputType)`\n *\n * @example\n * const join = type(\"string[]\").pipe(a => a.join(\",\"))\n *\n * const T = type({\n * // all keywords have introspectable output\n * keyword: \"string.numeric.parse\",\n * // TypeScript knows this returns a string, but we can't introspect that at runtime\n * unvalidated: join,\n * // if needed, it can be made introspectable with an output validator\n * validated: join.to(\"string\")\n * })\n *\n * // Type<{ keyword: number; unvalidated: unknown; validated: string }>\n * const baseOut = base.out\n */\n get out(): instantiateType;\n /**\n * #### add a compile-time brand to output\n *\n * @typenoop\n *\n * @example\n * const Palindrome = type(\"string\")\n * .narrow(s => s === [...s].reverse().join(\"\"))\n * .brand(\"palindrome\")\n * // Brand\n * const out = Palindrome.assert(\"racecar\")\n */\n brand, $>>(name: name): r extends infer _ ? _ : never;\n /**\n * #### an array of this\n *\n * @example\n * // Type<{ rebmun: number }[]>\n * const T = type({ rebmun: \"number\" }).array();\n */\n array(): Type$5;\n /**\n * #### {@link https://arktype.io/docs/objects#properties-optional | optional definition}\n *\n * @chainedDefinition\n *\n * @example\n * const Prop = type({ foo: \"number\" })\n * // Type<{ bar?: { foo: number } }>\n * const Obj = type({ bar: Prop.optional() })\n */\n optional(): [this, \"?\"];\n /**\n * #### {@link https://arktype.io/docs/objects#properties-defaultable | defaultable definition}\n *\n * ✅ object defaults can be returned from a function\n * ⚠️ throws if the default value is not allowed\n * @chainedDefinition\n *\n * @example\n * // Type<{ count: Default }>\n * const State = type({ count: type.number.default(0) })\n * const Prop = type({ nested: \"boolean\" })\n * const ForObj = type({\n * key: Prop.default(() => ({ nested: false }))\n * })\n */\n default>(value: value): [this, \"=\", value];\n /**\n * #### apply a predicate function to input\n *\n * ⚠️ the behavior of {@link narrow}, this method's output counterpart, is usually more desirable\n * ✅ most useful for morphs with input types that are re-used externally\n * @predicateCast\n *\n * @example\n * const stringifyUser = type({ name: \"string\" }).pipe(user => JSON.stringify(user))\n * const stringifySafe = stringifyUser.filter(user => user.name !== \"Bobby Tables\")\n * // Type<(In: `${string}Z`) => To>\n * const WithPredicate = type(\"string.date.parse\").filter((s): s is `${string}Z` =>\n * s.endsWith(\"Z\")\n * )\n */\n filter ? (In: narrowed) => o : narrowed, $>>(predicate: Predicate.Castable): r extends infer _ ? _ : never;\n /**\n * #### apply a predicate function to output\n *\n * ✅ go-to fallback for validation not composable via built-in types and operators\n * ✅ runs after all other validators and morphs, if present\n * @predicateCast\n *\n * @example\n * const Palindrome = type(\"string\").narrow(s => s === [...s].reverse().join(\"\"))\n *\n * const PalindromicEmail = type(\"string.date.parse\").narrow((date, ctx) =>\n *\t\tdate.getFullYear() === 2025 || ctx.mustBe(\"the current year\")\n * )\n * // Type<`${string}.tsx`>\n * const WithPredicate = type(\"string\").narrow((s): s is `${string}.tsx` => /\\.tsx?$/.test(s))\n */\n narrow ? o extends To ? (In: i) => To : (In: i) => Out : narrowed, $>>(predicate: Predicate.Castable): r extends infer _ ? _ : never;\n /**\n * #### pipe output through arbitrary transformations or other Types\n *\n * @example\n * const User = type({ name: \"string\" })\n *\n * // parse a string and validate that the result as a user\n * const parseUser = type(\"string\").pipe(s => JSON.parse(s), user)\n */\n pipe: ChainedPipeParser<$, t>;\n /**\n * #### parse a definition as an output validator\n *\n * 🔗 `to({ name: \"string\" })` is equivalent to `.pipe(type({ name: \"string\" }))`\n *\n * @example\n * // parse a string and validate that the result as a user\n * const parseUser = type(\"string\").pipe(s => JSON.parse(s)).to({ name: \"string\" })\n */\n to>, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### query internal node references\n *\n * @experimental filters and returns the Type's internal representation from `@ark/schema`\n *\n * @example\n * // [\"blue\", \"red\"]\n * const values = type(\"'red' | 'blue'\").select(\"unit\").map(u => u.unit)\n */\n select: BaseNode[\"select\"];\n}\n/** @ts-ignore cast variance */\ninterface Type extends Callable<(data: unknown) => distill.Out | ArkEnv.onFail>, Inferred {\n /**\n * #### cast the way this is inferred\n *\n * @typenoop\n *\n * @example\n * // Type<`LEEEEEEEE${string}ROY`>\n * const Leeroy = type(/^LE{8,}ROY$/).as<`LEEEEEEEE${string}ROY`>()\n */\n as(...args: validateChainedAsArgs): instantiateType;\n /**\n * #### intersect the parsed Type, throwing if the result is unsatisfiable\n *\n * @example\n * // Type<{ foo: number; bar: string }>\n * const T = type({ foo: \"number\" }).and({ bar: \"string\" })\n * // ParseError: Intersection at foo of number and string results in an unsatisfiable type\n * const Bad = type({ foo: \"number\" }).and({ foo: \"string\" })\n */\n and>, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### union with the parsed Type\n *\n * ⚠️ a union that could apply different morphs to the same data is a ParseError ({@link https://arktype.io/docs/expressions#union-morphs | docs})\n *\n * @example\n * // Type\n * const T = type(\"string\").or({ box: \"string\" })\n */\n or, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### intersect the parsed Type, returning an introspectable {@link Disjoint} if the result is unsatisfiable\n *\n * @example\n * // Type<{ foo: number; bar: string }>\n * const T = type({ foo: \"number\" }).intersect({ bar: \"string\" })\n * const Bad = type(\"number > 10\").intersect(\"number < 5\")\n * // logs \"Intersection of > 10 and < 5 results in an unsatisfiable type\"\n * if (Bad instanceof Disjoint) console.log(`${bad.summary}`)\n */\n intersect>, $>>(def: type.validate): r extends infer _ ? _ | Disjoint : never;\n /**\n * #### check if the parsed Type's constraints are identical\n *\n * ✅ equal types have identical input and output constraints and transforms\n * @ignoresMeta\n *\n * @example\n * const DivisibleBy6 = type.number.divisibleBy(6).moreThan(0)\n * // false (left side must also be positive)\n * DivisibleBy6.equals(\"number % 6\")\n * // false (right side has an additional <100 constraint)\n * console.log(DivisibleBy6.equals(\"0 < (number % 6) < 100\"))\n * const ThirdTry = type(\"(number % 2) > 0\").divisibleBy(3)\n * // true (types are normalized and reduced)\n * console.log(DivisibleBy6.equals(ThirdTry))\n */\n equals(def: type.validate): boolean;\n /**\n * #### narrow this based on an {@link equals} check\n *\n * @ignoresMeta\n *\n * @example\n * const N = type.raw(`${Math.random()}`)\n * // Type<0.5> | undefined\n * const Ez = N.ifEquals(\"0.5\")\n */\n ifEquals>(def: type.validate): r extends infer _ ? _ | undefined : never;\n /**\n * #### check if this is a subtype of the parsed Type\n *\n * ✅ a subtype must include all constraints from the base type\n * ✅ unlike {@link equals}, additional constraints may be present\n * @ignoresMeta\n *\n * @example\n * type.string.extends(\"unknown\") // true\n * type.string.extends(/^a.*z$/) // false\n */\n extends(other: type.validate): boolean;\n /**\n * #### narrow this based on an {@link extends} check\n *\n * @ignoresMeta\n *\n * @example\n * const N = type(Math.random() > 0.5 ? \"true\" : \"0\") // Type<0 | true>\n * const Ez = N.ifExtends(\"boolean\") // Type | undefined\n */\n ifExtends>(other: type.validate): r extends infer _ ? _ | undefined : never;\n /**\n * #### check if a value could satisfy this and the parsed Type\n *\n * ⚠️ will return true unless a {@link Disjoint} can be proven\n *\n * @example\n * type.string.overlaps(\"string | number\") // true (e.g. \"foo\")\n * type(\"string | number\").overlaps(\"1\") // true (1)\n * type(\"number > 0\").overlaps(\"number < 0\") // false (no values exist)\n *\n * const NoAt = type(\"string\").narrow(s => !s.includes(\"@\"))\n * NoAt.overlaps(\"string.email\") // true (no values exist, but not provable)\n */\n overlaps(r: type.validate): boolean;\n /**\n * #### extract branches {@link extend}ing the parsed Type\n *\n * @example\n * // Type\n * const T = type(\"boolean | 0 | 'one' | 2 | bigint\").extract(\"number | 0n | true\")\n */\n extract ? t : never, $>>(r: type.validate): r extends infer _ extends r ? _ : never;\n /**\n * #### exclude branches {@link extend}ing the parsed Type\n *\n * @example\n *\n * // Type\n * const T = type(\"boolean | 0 | 'one' | 2 | bigint\").exclude(\"number | 0n | true\")\n */\n exclude ? never : t, $>>(r: type.validate): r extends infer _ ? _ : never;\n /**\n * @experimental\n * Map and optionally reduce branches of a union. Types that are not unions\n * are treated as a single branch.\n *\n * @param mapBranch - the mapping function, accepting a branch Type\n * Returning another `Type` is common, but any value can be returned and\n * inferred as part of the output.\n *\n * @param [reduceMapped] - an operation to perform on the mapped branches\n * Can be used to e.g. merge an array of returned Types representing\n * branches back to a single union.\n */\n distribute(mapBranch: (branch: Type, i: number, branches: array) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut;\n /** The Type's [StandardSchema](https://github.com/standard-schema/standard-schema) properties */\n \"~standard\": StandardSchemaV1.ArkTypeProps;\n /** @deprecated */\n apply: Function[\"apply\"];\n /** @deprecated */\n bind: Function[\"bind\"];\n /** @deprecated */\n call: Function[\"call\"];\n /** @deprecated */\n caller: Function;\n /** @deprecated */\n length: number;\n /** @deprecated */\n name: string;\n /** @deprecated */\n prototype: Function[\"prototype\"];\n /** @deprecated */\n arguments: Function[\"arguments\"];\n /** @deprecated */\n Symbol: never;\n}\ninterface ChainedPipeParser<$, t> extends NaryPipeParser<$, t> {\n try: NaryPipeParser<$, t>;\n}\ntype validateChainedAsArgs = [\n t\n] extends [unset] ? [\n t\n] extends [anyOrNever] ? [\n] : [\n ErrorMessage<\"as requires an explicit type parameter like myType.as()\">\n] : [];\n\ntype MatchParserContext = {\n cases: Morph[];\n $: unknown;\n input: input;\n checked: boolean;\n key: PropertyKey | null;\n};\ndeclare namespace ctx {\n type from = ctx;\n type init<$, input = unknown, checked extends boolean = false> = from<{\n cases: [];\n $: $;\n input: input;\n checked: checked;\n key: null;\n }>;\n type atKey = from<{\n cases: ctx[\"cases\"];\n $: ctx[\"$\"];\n input: ctx[\"input\"];\n checked: ctx[\"checked\"];\n key: key;\n }>;\n}\ninterface MatchParser<$> extends CaseMatchParser> {\n in(def: type.validate): ChainableMatchParser, true>>;\n in(...args: [typedInput] extends [never] ? [\n ErrorMessage<\"in requires a definition or type argument (in('string') or in())\">\n ] : []): ChainableMatchParser>;\n in(def: type.validate): ChainableMatchParser, true>>;\n case: CaseParser>;\n at: AtParser>;\n}\ntype addCasesToContext = cases extends Morph[] ? ctx.from<{\n $: ctx[\"$\"];\n input: ctx[\"input\"];\n cases: [...ctx[\"cases\"], ...cases];\n checked: ctx[\"checked\"];\n key: ctx[\"key\"];\n}> : never;\ntype addDefaultToContext> = ctx.from<{\n $: ctx[\"$\"];\n input: defaultCase extends \"never\" ? Morph.In : ctx[\"input\"];\n cases: defaultCase extends \"never\" | \"assert\" ? ctx[\"cases\"] : defaultCase extends Morph ? ctx[\"checked\"] extends true ? [\n (In: unknown) => ArkErrors,\n ...ctx[\"cases\"],\n defaultCase\n ] : [...ctx[\"cases\"], defaultCase] : [\n ...ctx[\"cases\"],\n (In: ctx[\"input\"]) => ArkErrors\n ];\n checked: ctx[\"checked\"];\n key: ctx[\"key\"];\n}>;\ntype CaseKeyKind = \"def\" | \"string\";\ntype casesToMorphTuple = unionToTuple]: cases[def] extends (Morph) ? kind extends \"def\" ? (In: inferCaseArg) => o : (In: maybeLiftToKey) => o : never;\n}>>;\ntype addCasesToParser = cases extends {\n default: infer defaultDef extends DefaultCase;\n} ? finalizeMatchParser>, defaultDef> : ChainableMatchParser>>;\ntype inferCaseArg = _finalizeCaseArg, ctx>, ctx, endpoint>;\ntype maybeLiftToKey = ctx[\"key\"] extends PropertyKey ? {\n [k in ctx[\"key\"]]: t;\n} : t;\ntype _finalizeCaseArg = [\n distill,\n distill\n] extends [infer i, infer result] ? [\n i\n] extends [ctx[\"input\"]] ? result : Extract extends never ? result : Extract : never;\ntype CaseParser = (def: type.validate, resolve: (In: inferCaseArg) => ret) => ChainableMatchParser) => ret]>>;\ntype validateKey = ctx[\"key\"] extends Key ? ErrorMessage : ctx[\"cases\"][\"length\"] extends 0 ? keyof ctx[\"input\"] extends never ? key : conform : ErrorMessage;\ninterface StringsParser {\n (def: cases extends validateStringCases ? cases : validateStringCases): addCasesToParser;\n}\ntype validateStringCases = unknown extends ctx[\"input\"] ? {\n [k in keyof cases]?: k extends \"default\" ? DefaultCase : (In: _finalizeCaseArg, ctx, \"out\">) => unknown;\n} & {\n default?: DefaultCase;\n} : {\n [k in keyof cases]?: k extends \"default\" ? DefaultCase : k extends stringValue ? (In: _finalizeCaseArg, ctx, \"out\">) => unknown : ErrorType<`${k & string} must be a possible string value`>;\n} & {\n [k in stringValue]?: unknown;\n} & {\n default?: DefaultCase;\n};\ntype stringValue = ctx[\"input\"] extends string ? ctx[\"input\"] : ctx[\"key\"] extends keyof ctx[\"input\"] ? ctx[\"input\"][ctx[\"key\"]] extends infer s extends string ? s : never : never;\ninterface AtParser {\n (key: validateKey): ChainableMatchParser>;\n >(key: validateKey, cases: cases extends validateCases ? cases : errorCases): addCasesToParser;\n}\ninterface ChainableMatchParser {\n case: CaseParser;\n match: CaseMatchParser;\n default: DefaultMethod;\n at: AtParser;\n /** @experimental */\n strings: StringsParser;\n}\ntype DefaultCaseKeyword = \"never\" | \"assert\" | \"reject\";\ntype DefaultCase> = DefaultCaseKeyword | Morph;\ntype DefaultMethod = >(def: def) => finalizeMatchParser;\ntype validateCases = {\n [def in keyof cases | BaseCompletions]?: def extends \"default\" ? DefaultCase : def extends number ? (In: inferCaseArg<`${def}`, ctx, \"out\">) => unknown : def extends type.validate ? (In: inferCaseArg) => unknown : type.validate;\n};\ntype errorCases = {\n [def in keyof cases]?: def extends \"default\" ? DefaultCase : def extends number ? (In: inferCaseArg<`${def}`, ctx, \"out\">) => unknown : def extends type.validate ? (In: inferCaseArg) => unknown : ErrorType>;\n} & {\n [k in BaseCompletions]?: (In: inferCaseArg) => unknown;\n} & {\n default?: DefaultCase;\n};\ntype CaseMatchParser = (def: cases extends validateCases ? cases : errorCases) => addCasesToParser;\ntype finalizeMatchParser> = addDefaultToContext extends (infer ctx extends MatchParserContext) ? Match : never;\ninterface Match extends Inferred<(In: Morph.In) => Out>> {\n (data: data): {\n [i in numericStringKeyOf]: isDisjoint> extends true ? never : Morph.Out;\n }[numericStringKeyOf];\n}\ndeclare class InternalMatchParser extends Callable {\n $: InternalScope;\n constructor($: InternalScope);\n in(def?: unknown): InternalChainedMatchParser;\n at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match;\n case(when: unknown, then: Morph): InternalChainedMatchParser;\n}\ntype InternalCases = Record;\ntype InternalCaseParserFn = (cases: InternalCases) => InternalChainedMatchParser | Match;\ntype CaseEntry = [BaseRoot, Morph] | [\"default\", DefaultCase];\ndeclare class InternalChainedMatchParser extends Callable {\n $: InternalScope;\n in: BaseRoot | undefined;\n protected key: Key | undefined;\n protected branches: BaseRoot[];\n constructor($: InternalScope, In?: BaseRoot);\n at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match;\n case(def: unknown, resolver: Morph): InternalChainedMatchParser;\n protected caseEntry(node: BaseRoot, resolver: Morph): InternalChainedMatchParser;\n match(cases: InternalCases): InternalChainedMatchParser | Match;\n strings(cases: InternalCases): InternalChainedMatchParser | Match;\n protected caseEntries(entries: CaseEntry[]): InternalChainedMatchParser | Match;\n default(defaultCase: DefaultCase): Match;\n}\ndeclare const chainedAtMessage = \"A key matcher must be specified before the first case i.e. match.at('foo') or match.in().at('bar')\";\ntype chainedAtMessage = typeof chainedAtMessage;\ndeclare const doubleAtMessage = \"At most one key matcher may be specified per expression\";\ntype doubleAtMessage = typeof doubleAtMessage;\n\ndeclare class MergeHkt extends Hkt<[base: object, props: object]> {\n body: util.merge;\n description: string;\n}\ndeclare const Merge: _ark_schema.GenericRoot;\ndeclare const arkBuiltins: arkBuiltins;\ntype arkBuiltins = Module;\ndeclare namespace arkBuiltins {\n type submodule = Submodule<$>;\n type $ = {\n Key: Key;\n Merge: typeof Merge.t;\n };\n}\n\ndeclare const number: number.module;\ndeclare namespace number {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: number;\n epoch: number;\n integer: number;\n safe: number;\n NaN: number;\n Infinity: number;\n NegativeInfinity: number;\n };\n}\n\ndeclare const stringInteger: stringInteger.module;\ndeclare namespace stringInteger {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare const base64: Module<{\n root: unknown;\n url: unknown;\n}>;\ndeclare namespace base64 {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n url: string;\n };\n}\ndeclare const capitalize: capitalize.module;\ndeclare namespace capitalize {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const stringDate: stringDate.module;\ndeclare namespace stringDate {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n iso: iso.submodule;\n epoch: epoch.submodule;\n };\n namespace iso {\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n }\n namespace epoch {\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n }\n}\ndeclare const ip: ip.module;\ndeclare namespace ip {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n v4: string;\n v6: string;\n };\n}\ndeclare namespace stringJson {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare namespace lower {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const normalize: Module<{\n root: unknown;\n NFC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n}>;\ndeclare namespace normalize {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n NFC: NFC.submodule;\n NFD: NFD.submodule;\n NFKC: NFKC.submodule;\n NFKD: NFKD.submodule;\n };\n namespace NFC {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFD {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFKC {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFKD {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n}\ndeclare const stringNumeric: stringNumeric.module;\ndeclare namespace stringNumeric {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare namespace trim {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const upper: upper.module;\ndeclare namespace upper {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const url: url.module;\ndeclare namespace url {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare const uuid: Module<{\n root: string;\n v1: unknown;\n v2: unknown;\n v3: unknown;\n v4: unknown;\n v5: unknown;\n v6: unknown;\n v7: unknown;\n v8: unknown;\n}>;\ndeclare namespace uuid {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n v1: string;\n v2: string;\n v3: string;\n v4: string;\n v5: string;\n v6: string;\n v7: string;\n v8: string;\n };\n namespace $ {\n type flat = {};\n }\n}\ndeclare const string: Module<{\n integer: Submodule;\n trim: Submodule;\n normalize: Submodule<{\n root: unknown;\n NFC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n }>;\n root: unknown;\n date: Submodule;\n email: unknown;\n uuid: Submodule<{\n root: string;\n v1: unknown;\n v2: unknown;\n v3: unknown;\n v4: unknown;\n v5: unknown;\n v6: unknown;\n v7: unknown;\n v8: unknown;\n }>;\n regex: unknown;\n json: Submodule;\n lower: Submodule;\n upper: Submodule;\n alpha: unknown;\n alphanumeric: unknown;\n hex: unknown;\n base64: Submodule<{\n root: unknown;\n url: unknown;\n }>;\n capitalize: Submodule;\n creditCard: unknown;\n digits: unknown;\n ip: Submodule;\n numeric: Submodule;\n semver: unknown;\n url: Submodule;\n}>;\ndeclare namespace string {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n alpha: string;\n alphanumeric: string;\n hex: string;\n base64: base64.submodule;\n capitalize: capitalize.submodule;\n creditCard: string;\n date: stringDate.submodule;\n digits: string;\n email: string;\n integer: stringInteger.submodule;\n ip: ip.submodule;\n json: stringJson.submodule;\n lower: lower.submodule;\n normalize: normalize.submodule;\n numeric: stringNumeric.submodule;\n regex: string;\n semver: string;\n trim: trim.submodule;\n upper: upper.submodule;\n url: url.submodule;\n uuid: uuid.submodule;\n };\n}\n\ndeclare const arkTsKeywords: arkTsKeywords;\ntype arkTsKeywords = Module;\ndeclare namespace arkTsKeywords {\n type submodule = Submodule<$>;\n type $ = {\n bigint: bigint;\n boolean: boolean;\n false: false;\n never: never;\n null: null;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n true: true;\n unknown: unknown;\n undefined: undefined;\n };\n}\ndeclare const unknown: Module<{\n any: unknown;\n root: unknown;\n}>;\ndeclare namespace unknown {\n type submodule = Submodule<$>;\n type $ = {\n root: unknown;\n any: any;\n };\n}\ndeclare const json: Module<{\n stringify: unknown;\n root: unknown;\n}>;\ndeclare namespace json {\n type submodule = Submodule<$>;\n type $ = {\n root: Json;\n stringify: (In: Json) => To;\n };\n}\ndeclare const object: Module<{\n root: unknown;\n json: Submodule<{\n stringify: unknown;\n root: unknown;\n }>;\n}>;\ndeclare namespace object {\n type submodule = Submodule<$>;\n type $ = {\n root: object;\n json: json.submodule;\n };\n}\ndeclare class RecordHkt extends Hkt<[Key, unknown]> {\n body: Record;\n description: string;\n}\ndeclare const Record: _ark_schema.GenericRoot;\ndeclare class PickHkt extends Hkt<[object, Key]> {\n body: pick;\n description: string;\n}\ndeclare const Pick: _ark_schema.GenericRoot;\ndeclare class OmitHkt extends Hkt<[object, Key]> {\n body: omit;\n description: string;\n}\ndeclare const Omit: _ark_schema.GenericRoot;\ndeclare class PartialHkt extends Hkt<[object]> {\n body: show>;\n description: string;\n}\ndeclare const Partial: _ark_schema.GenericRoot;\ndeclare class RequiredHkt extends Hkt<[object]> {\n body: show>;\n description: string;\n}\ndeclare const Required: _ark_schema.GenericRoot;\ndeclare class ExcludeHkt extends Hkt<[unknown, unknown]> {\n body: Exclude;\n description: string;\n}\ndeclare const Exclude: _ark_schema.GenericRoot;\ndeclare class ExtractHkt extends Hkt<[unknown, unknown]> {\n body: Extract;\n description: string;\n}\ndeclare const Extract: _ark_schema.GenericRoot;\ndeclare const arkTsGenerics: arkTsGenerics.module;\ndeclare namespace arkTsGenerics {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n Exclude: typeof Exclude.t;\n Extract: typeof Extract.t;\n Omit: typeof Omit.t;\n Partial: typeof Partial.t;\n Pick: typeof Pick.t;\n Record: typeof Record.t;\n Required: typeof Required.t;\n };\n}\n\ninterface Ark extends Omit, Ark.wrapped {\n}\ndeclare namespace Ark {\n interface keywords extends arkTsKeywords.$, arkTsGenerics.$, arkPrototypes.keywords, arkBuiltins.$ {\n }\n interface wrapped extends arkPrototypes.wrapped {\n string: string.submodule;\n number: number.submodule;\n object: object.submodule;\n unknown: unknown.submodule;\n }\n type flat = flatResolutionsOf;\n interface typeAttachments extends arkTsKeywords.$ {\n arrayIndex: arkPrototypes.$[\"Array\"][\"index\"];\n Key: arkBuiltins.$[\"Key\"];\n Record: arkTsGenerics.$[\"Record\"];\n Date: arkPrototypes.$[\"Date\"];\n Array: arkPrototypes.$[\"Array\"][\"root\"];\n }\n interface boundTypeAttachments<$> extends Omit, arkKind> {\n }\n}\ndeclare const ark: Scope;\ndeclare const keywords: Module;\ndeclare const type: TypeParser<{}>;\ndeclare namespace type {\n interface cast {\n [inferred]?: to;\n }\n type errors = ArkErrors;\n type validate> = validateDefinition;\n type instantiate> = instantiateType, $>;\n type infer> = inferDefinition;\n namespace infer {\n type In = distill.In>;\n type Out = distill.Out>;\n namespace introspectable {\n type Out = distill.introspectable.Out>;\n }\n }\n type brand = t extends InferredMorph ? o[\"introspectable\"] extends true ? (In: i) => To> : (In: i) => Out> : Brand;\n /** @ts-ignore cast variance */\n interface Any extends Type {\n }\n}\ntype type = Type$1;\ndeclare const match: MatchParser<{}>;\ndeclare const generic: GenericParser<{}>;\ndeclare const define: DefinitionParser<{}>;\ndeclare const declare: DeclarationParser<{}>;\n\ntype ParameterString = `<${params}>`;\ntype extractParams = s extends ParameterString ? params : never;\ntype validateParameterString = parseGenericParams, $> extends infer e extends ErrorMessage ? e : s;\ntype validateGenericArg = type.infer extends param[1] ? unknown : ErrorType<`Invalid argument for ${param[0]}`, [expected: param[1]]>;\ntype GenericInstantiator, def, $, args$> = params[\"length\"] extends 1 ? {\n >(a: type.validate & validateGenericArg): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 2 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 3 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 4 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 5 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 6 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : (error: ErrorMessage<`You may not define more than 6 positional generic parameters`>) => never;\ntype instantiateGeneric, args, $, args$> = Type$1<[\n def\n] extends [Hkt] ? Hkt.apply;\n}> : inferDefinition>, args$>;\ntype bindGenericArgs, $, args> = {\n [i in keyof params & `${number}` as params[i][0]]: type.infer;\n};\ntype baseGenericResolutions, $> = baseGenericConstraints extends infer baseConstraints ? {\n [k in keyof baseConstraints]: Type$1;\n} : never;\ntype baseGenericConstraints> = {\n [i in keyof params & `${number}` as params[i][0]]: params[i][1];\n};\ntype GenericConstructor = array, bodyDef = unknown, $ = {}, arg$ = {}> = new () => Generic;\ninterface Generic = array, bodyDef = unknown, $ = {}, arg$ = $> extends Callable> {\n [arkKind]: \"generic\";\n t: GenericAst;\n bodyDef: bodyDef;\n params: {\n [i in keyof params]: [params[i][0], Type$1];\n };\n names: genericParamNames;\n constraints: {\n [i in keyof params]: Type$1;\n };\n $: Scope<$>;\n arg$: Scope;\n internal: GenericRoot;\n json: JsonStructure;\n}\ndeclare const Generic: GenericConstructor;\ntype GenericDeclaration = `${name}${params}`;\ntype parseValidGenericParams = conform, $>, array>;\ndeclare const emptyGenericParameterMessage = \"An empty string is not a valid generic parameter name\";\ntype emptyGenericParameterMessage = typeof emptyGenericParameterMessage;\ntype parseGenericParams = parseNextNameChar, \"\", [\n], $>;\ntype ParamsTerminator = WhitespaceChar | \",\";\ntype parseName, $> = parseNextNameChar, \"\", result, $>;\ntype parseNextNameChar, $> = unscanned extends `${infer lookahead}${infer nextUnscanned}` ? lookahead extends ParamsTerminator ? name extends \"\" ? ErrorMessage : lookahead extends \",\" ? parseName : lookahead extends WhitespaceChar ? _parseOptionalConstraint : never : parseNextNameChar : name extends \"\" ? result : [...result, [name, unknown]];\ndeclare const extendsToken = \"extends \";\ntype extendsToken = typeof extendsToken;\ndeclare const _parseOptionalConstraint: (scanner: ArkTypeScanner, name: string, result: GenericParamDef[], ctx: BaseParseContext) => GenericParamDef[];\ntype _parseOptionalConstraint, $> = ArkTypeScanner.skipWhitespace extends (`${extendsToken}${infer nextUnscanned}`) ? parseUntilFinalizer, $, {}> extends (infer finalArgState extends StaticState) ? validateAst extends (infer e extends ErrorMessage) ? e : parseName]\n], $> : never : parseName extends (`,${infer nextUnscanned}`) ? nextUnscanned : unscanned, [\n ...result,\n [name, unknown]\n], $>;\ntype genericParamDefToAst = schema extends string ? [schema, unknown] : schema extends readonly [infer name, infer def] ? [name, type.infer] : never;\ntype genericParamDefsToAst, $> = [\n ...{\n [i in keyof defs]: genericParamDefToAst;\n }\n];\ntype GenericParser<$ = {}> = >(...params: {\n [i in keyof paramsDef]: paramsDef[i] extends (readonly [infer name, infer def]) ? readonly [name, type.validate] : paramsDef[i];\n}) => GenericBodyParser, $>;\ninterface GenericBodyParser, $> {\n (body: type.validate>): Generic;\n (instantiateDef: LazyGenericBody>, hkt: hkt): Generic, $, $>;\n}\n\ndeclare const Module: new <$ extends {}>(exports: exportScope<$>) => Module<$>;\ninterface Module<$ extends {} = {}> extends RootModule> {\n}\ntype exportScope<$> = bindExportsToScope<$, $>;\ndeclare const BoundModule: new (exports: bindExportsToScope, $: $) => BoundModule;\ninterface BoundModule extends RootModule> {\n}\ntype bindExportsToScope = {\n [k in keyof exports]: instantiateExport;\n} & unknown;\ntype Submodule = RootModule;\ntype instantiateExport = [\n t\n] extends [PreparsedNodeResolution] ? [\n t\n] extends [anyOrNever] ? Type$1 : t extends GenericAst ? Generic : t extends Submodule ? BoundModule : never : Type$1;\n\ndeclare class liftFromHkt extends Hkt<[element: unknown]> {\n body: liftArray extends infer lifted ? (In: this[0] | lifted) => To : never;\n}\ndeclare const liftFrom: _ark_schema.GenericRoot;\ndeclare const arkArray: arkArray.module;\ndeclare namespace arkArray {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: unknown[];\n readonly: readonly unknown[];\n index: NonNegativeIntegerString;\n liftFrom: typeof liftFrom.t;\n };\n}\ntype NonNegativeIntegerString = `${Digit}` | (`${Exclude}${string}` & `${bigint}`);\n\ntype FormDataValue = string | File;\ntype ParsedFormData = Record;\ndeclare const arkFormData: arkFormData.module;\ndeclare namespace arkFormData {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: FormData;\n value: FormDataValue;\n parse: (In: FormData) => To;\n parsed: ParsedFormData;\n };\n}\n\ndeclare const TypedArray: TypedArray.module;\ndeclare namespace TypedArray {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n Int8: Int8Array;\n Uint8: Uint8Array;\n Uint8Clamped: Uint8ClampedArray;\n Int16: Int16Array;\n Uint16: Uint16Array;\n Int32: Int32Array;\n Uint32: Uint32Array;\n Float32: Float32Array;\n Float64: Float64Array;\n BigInt64: BigInt64Array;\n BigUint64: BigUint64Array;\n };\n}\n\ndeclare const omittedPrototypes: {\n Boolean: 1;\n Number: 1;\n String: 1;\n};\ndeclare const arkPrototypes: arkPrototypes.module;\ndeclare namespace arkPrototypes {\n type module = Module;\n type submodule = Submodule<$>;\n interface keywords extends ecmascript, platform {\n }\n interface $ extends Omit, wrapped {\n }\n interface wrapped {\n Array: arkArray.submodule;\n TypedArray: TypedArray.submodule;\n FormData: arkFormData.submodule;\n }\n type ecmascript = Omit;\n type platform = PlatformObjects;\n interface instances extends ecmascript, platform {\n }\n type NonDegenerateName = keyof instances extends infer k ? k extends keyof instances ? {} extends instances[k] ? never : k : never : never;\n type instanceOf = instances[name];\n}\n\ntype DateLiteral = `d\"${source}\"` | `d'${source}'`;\ntype LimitLiteral = number | DateLiteral;\ntype distill = finalizeDistillation>;\ndeclare namespace distill {\n type Endpoint = \"in\" | \"out\" | \"out.introspectable\";\n type In = distill;\n type Out = distill;\n namespace introspectable {\n type Out = distill;\n }\n}\ntype finalizeDistillation = equals extends true ? t : distilled;\ntype _distill = t extends undefined ? t : [t] extends [anyOrNever] ? t : unknown extends t ? unknown : t extends Brand ? endpoint extends \"in\" ? base : t : t extends TerminallyInferredObject | Primitive ? t : t extends Function ? t extends (...args: never) => anyOrNever ? t : t extends InferredMorph ? distillIo : t : t extends Default ? _distill : t extends array ? distillArray : isSafelyMappable extends true ? distillMappable : t;\ntype distillMappable = endpoint extends \"in\" ? show<{\n [k in keyof o as k extends inferredDefaultKeyOf ? never : k]: _distill;\n} & {\n [k in inferredDefaultKeyOf]?: _distill;\n}> : {\n [k in keyof o]: _distill;\n};\ntype distillIo = endpoint extends \"out\" ? _distill : endpoint extends \"in\" ? _distill : o extends To ? _distill : unknown;\ntype unwrapInput = t extends InferredMorph ? t extends anyOrNever ? t : i : t;\ntype inferredDefaultKeyOf = keyof o extends infer k ? k extends keyof o ? unwrapInput extends Default ? [\n t\n] extends [anyOrNever] ? never : k : never : never : never;\ntype distillArray = t[number][] extends t ? alignReadonly<_distill[], t> : distillNonArraykeys, t>, endpoint>;\ntype alignReadonly = original extends unknown[] ? result : Readonly;\ntype distillNonArraykeys = keyof originalArray extends keyof distilledArray ? distilledArray : distilledArray & _distill<{\n [k in keyof originalArray as k extends keyof distilledArray ? never : k]: originalArray[k];\n}, endpoint>;\ntype distillArrayFromPrefix = t extends readonly [infer head, ...infer tail] ? distillArrayFromPrefix\n]> : [...prefix, ...distillArrayFromPostfix];\ntype distillArrayFromPostfix = t extends readonly [...infer init, infer last] ? distillArrayFromPostfix,\n ...postfix\n]> : [...{\n [i in keyof t]: _distill;\n}, ...postfix];\ntype BuiltinTerminalObjectKind = Exclude;\n/** Objects we don't want to expand during inference like Date or Promise */\ntype TerminallyInferredObject = arkPrototypes.instanceOf | ArkEnv.prototypes;\ntype inferPredicate = predicate extends (data: any, ...args: any[]) => data is infer narrowed ? narrowed : t;\ntype inferNaryPipe = _inferNaryPipe;\ntype _inferNaryPipe = remaining extends (readonly [infer head extends Morph, ...infer tail extends Morph[]]) ? _inferNaryPipe> : result;\ntype inferNaryIntersection = number extends types[\"length\"] ? _inferNaryIntersection, unknown> : _inferNaryIntersection;\ntype _inferNaryIntersection = remaining extends readonly [infer head, ...infer tail] ? _inferNaryIntersection> : result;\ntype inferNaryMerge = number extends types[\"length\"] ? _inferUnorderedMerge : _inferNaryMerge;\ntype _inferUnorderedMerge, requiredKey extends PropertyKey = Exclude, optionalKey>> = show<{\n [k in requiredKey]: types[number] extends infer v ? v extends unknown ? k extends keyof v ? v[k] : never : never : never;\n} & {\n [k in optionalKey]?: types[number] extends infer v ? v extends unknown ? k extends keyof v ? v[k] : never : never : never;\n}>;\n/** Coalesce keys that exist and are optional on one or more branches of a union */\ntype optionalAtLeastOnceUnionKeyOf = t extends unknown ? optionalKeyOf : never;\ntype _inferNaryMerge = remaining extends (readonly [infer head, ...infer tail extends readonly unknown[]]) ? _inferNaryMerge> : result;\ntype inferMorphOut = Exclude, ArkError | ArkErrors>;\ndeclare const isMorphOutKey: \" isMorphOut\";\ninterface Out {\n [isMorphOutKey]: true;\n t: o;\n introspectable: boolean;\n}\ninterface To extends Out {\n introspectable: true;\n}\ntype InferredMorph = (In: i) => o;\ndeclare const defaultsToKey: \" defaultsTo\";\ntype Default = {\n [defaultsToKey]: [t, v];\n};\ntype withDefault = t extends InferredMorph ? addDefaultToMorph : Default, v>;\ntype addDefaultToMorph = [\n normalizeMorphDistribution\n] extends [InferredMorph] ? (In: Default) => o : never;\ntype normalizeMorphDistribution ? i : never, undistributedOut extends Out = t extends InferredMorph ? [\n o\n] extends [To] ? To : o : never> = (Extract extends anyOrNever ? never : Extract extends InferredMorph ? [\n undistributedOut\n] extends [o] ? (In: undistributedIn) => undistributedOut : [undistributedIn] extends [i] ? (In: undistributedIn) => undistributedOut : t : never) | Exclude extends infer _ ? _ : never;\ntype defaultFor = (Primitive extends t ? Primitive : t extends Primitive ? t : never) | (() => t);\ntype inferIntersection = normalizeMorphDistribution<_inferIntersection>;\ntype inferMorph = morph extends type.cast ? inferPipe : inferMorphOut extends infer out ? (In: distill.In) => Out : never;\ntype inferPipe = normalizeMorphDistribution<_inferIntersection>;\ntype _inferIntersection = [\n l & r\n] extends [infer t extends anyOrNever] ? t : l extends InferredMorph ? r extends InferredMorph ? piped extends true ? (In: lIn) => rOut : never : piped extends true ? (In: lIn) => To : (In: _inferIntersection) => lOut : r extends InferredMorph ? (In: _inferIntersection) => rOut : [l, r] extends [object, object] ? intersectObjects extends infer result ? result : never : l & r;\ninterface MorphableIntersection extends Hkt<[unknown, unknown]> {\n body: _inferIntersection;\n}\ntype intersectObjects = l extends array ? r extends array ? intersectArrays> : // for an intersection with exactly one array operand like { name: string } & string[],\nl & r : r extends array ? l & r : show<{\n [k in keyof l]: k extends keyof r ? _inferIntersection : l[k];\n} & {\n [k in keyof r]: k extends keyof l ? _inferIntersection : r[k];\n}>;\n\nexport { Ark, ArkAmbient, type ArkConfig, type Type as BaseType, BoundModule, Generic, type KeywordConfig, Module, type Out, Scope, type Submodule, Type$1 as Type, ark, type bindThis, configure, declare, define, distill, generic, type inferDefinition, keywords, match, scope, type, type validateDefinition };\n\n}" diff --git a/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts b/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts new file mode 100644 index 0000000000..49f9dc4e8b --- /dev/null +++ b/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts @@ -0,0 +1,4 @@ +// FROM https://github.com/arktypeio/arktype/tree/main/ark/docs/components/dts +/** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ +// prettier-ignore +export const utilDts = "declare module \"@ark/util\" {\n import * as buffer from 'buffer';\n\ntype Fn = (...args: args) => returns;\ndeclare const cached: (thunk: () => t) => (() => t);\ndeclare const isThunk: (value: value) => value is Extract extends never ? value & Thunk : Extract;\ntype Thunk = () => ret;\ntype thunkable = t | Thunk;\ndeclare const tryCatch: (fn: () => returns, onError?: (e: unknown) => onError) => returns | onError;\ndeclare const DynamicFunction: DynamicFunction;\ntype DynamicFunction = new (...args: ConstructorParameters) => fn & {\n apply(thisArg: null, args: Parameters): ReturnType;\n call(thisArg: null, ...args: Parameters): ReturnType;\n};\ntype CallableOptions = {\n attach?: attachments;\n bind?: object;\n};\n/** @ts-ignore required to cast function type */\ninterface Callable extends fn, attachments {\n}\ndeclare class Callable {\n constructor(fn: fn, ...[opts]: {} extends attachments ? [opts?: CallableOptions] : [opts: CallableOptions]);\n}\ntype GuardablePredicate = ((In: input) => In is narrowed) | ((In: input) => boolean);\ntype TypeGuard = (In: input) => In is narrowed;\n/**\n * Checks if the environment has Content Security Policy (CSP) enabled,\n * preventing JIT-optimized code from being compiled via new Function().\n *\n * @returns `true` if a function created using new Function() can be\n * successfully invoked in the environment, `false` otherwise.\n *\n * The result is cached for subsequent invocations.\n */\ndeclare const envHasCsp: () => boolean;\n\ndeclare const ecmascriptConstructors: {\n Array: ArrayConstructor;\n Boolean: BooleanConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Number: NumberConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n String: StringConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype ecmascriptConstructors = typeof ecmascriptConstructors;\ntype EcmascriptObjects = satisfy, {\n Array: Array;\n Boolean: Boolean;\n Date: Date;\n Error: Error;\n Function: Function;\n Map: Map;\n Number: Number;\n RegExp: RegExp;\n Set: Set;\n String: String;\n WeakMap: WeakMap;\n WeakSet: WeakSet;\n Promise: Promise;\n}>;\n/** Node18 */\ndeclare const FileConstructor: typeof buffer.File;\ntype platformConstructors = {\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n};\ndeclare const platformConstructors: platformConstructors;\ntype PlatformObjects = instantiateConstructors;\ndeclare const typedArrayConstructors: {\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n};\ntype typedArrayConstructors = typeof typedArrayConstructors;\ntype TypedArrayObjects = instantiateConstructors;\ndeclare const builtinConstructors: {\n String: StringConstructor;\n Number: NumberConstructor;\n Boolean: BooleanConstructor;\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n Array: ArrayConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype builtinConstructors = typeof builtinConstructors;\ntype BuiltinObjectKind = keyof builtinConstructors;\ntype GlobalName = keyof typeof globalThis;\ntype instantiateConstructors = {\n [k in kind]: k extends GlobalName ? InstanceType<(typeof globalThis)[k]> : `${k}Constructor` extends GlobalName ? InstanceType<(typeof globalThis)[`${k}Constructor`]> : never;\n};\ntype BuiltinObjects = instantiateConstructors;\ntype describeObject = objectKindOf extends string ? [\n opts[\"includeArticles\"]\n] extends [true] ? objectKindDescriptions[objectKindOf] : objectKindOf : [opts[\"includeArticles\"]] extends [true] ? domainDescriptions[\"object\"] : \"object\";\ntype instantiableObjectKind = {\n [kind in keyof builtinConstructors]: data extends (InstanceType) ? kind : never;\n}[keyof builtinConstructors];\ntype objectKindOf = object extends data ? keyof builtinConstructors | undefined : data extends Fn ? \"Function\" : instantiableObjectKind extends never ? undefined : instantiableObjectKind;\ndeclare const objectKindOf: (data: data) => objectKindOf | undefined;\ndeclare const objectKindOrDomainOf: (data: data) => (objectKindOf & {}) | domainOf;\ntype objectKindOrDomainOf = data extends object ? objectKindOf extends undefined ? \"object\" : objectKindOf : domainOf;\ndeclare const hasObjectKind: (data: object, kind: kind) => data is InstanceType;\ndeclare const isArray: (data: unknown) => data is readonly unknown[];\ndeclare const ecmascriptDescriptions: {\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ndeclare const platformDescriptions: {\n ArrayBuffer: string;\n Blob: string;\n File: string;\n FormData: string;\n Headers: string;\n Request: string;\n Response: string;\n URL: string;\n};\ndeclare const typedArrayDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n};\n/** Each defaultObjectKind's completion for the phrase \"must be _____\" */\ndeclare const objectKindDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n readonly ArrayBuffer: string;\n readonly Blob: string;\n readonly File: string;\n readonly FormData: string;\n readonly Headers: string;\n readonly Request: string;\n readonly Response: string;\n readonly URL: string;\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ntype objectKindDescriptions = typeof objectKindDescriptions;\n/**\n * this will only return an object kind if it's the root constructor\n * example TypeError would return null not 'Error'\n **/\ndeclare const getBuiltinNameOfConstructor: (ctor: Function) => BuiltinObjectKind | null;\ntype Constructor = abstract new (...args: never[]) => instance;\ntype instanceOf = constructor extends Constructor ? instance : never;\n/**\n * Returns an array of constructors for all ancestors (i.e., prototypes) of a given object.\n */\ndeclare const ancestorsOf: (o: object) => Function[];\ntype normalizedKeyOf = keyof t extends infer k ? k extends number ? `${k}` : k : never;\ndeclare const constructorExtends: (ctor: Constructor, base: Constructor) => boolean;\n\ntype stringifyUnion = join, delimiter>;\ntype unionToTuple = _unionToTuple extends infer result ? conform : never;\ntype _unionToTuple = getLastBranch extends infer current ? [\n t\n] extends [never] ? result : _unionToTuple, [current, ...result]> : never;\ntype getLastBranch = intersectUnion void : never> extends ((x: infer branch) => void) ? branch : never;\ntype intersectUnion = (t extends unknown ? (_: t) => void : never) extends ((_: infer intersection) => void) ? intersection : never;\ntype intersectOverloadReturns = intersectUnion>>;\ntype overloadOf = Exclude never) & fn, givenArgs, unknown>, fn extends () => never ? never : () => never>;\ntype collectSignatures = result & fn extends (...args: infer args) => infer returns ? result extends fn ? never : collectSignatures & result & ((...args: args) => returns)> | (args extends givenArgs ? (...args: args) => returns : never) : never;\n\ntype DescribeOptions = {\n includeArticles?: boolean;\n branchDelimiter?: string;\n};\ntype typeToString = stringifyUnion<[\n t\n] extends [anyOrNever] ? unknown extends t ? \"any\" : \"never\" : unknown extends t ? \"unknown\" : boolean extends t ? \"boolean\" | ([t] extends [boolean] ? never : typeToString, opts>) : t extends array ? arrayTypeToString : t extends object ? describeObject : t extends Stringifiable ? stringifiableToString : describeDomainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\ntype stringifiableToString = inferDomain> extends t ? describeDomainOf : `${t}`;\ntype describe = typeToString;\ntype arrayTypeToString = typeToString extends infer element extends string ? opts[\"includeArticles\"] extends true ? describeArrayOf : includesDelimiter extends true ? `(${element})[]` : `${element}[]` : never;\ntype describeArrayOf = element extends \"unknown\" ? \"an array\" : `an array of ${element}`;\ntype includesDelimiter = s extends (`${string}${opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]}${string}`) ? true : false;\ntype describeDefaults = satisfy, {\n includeArticles: false;\n branchDelimiter: \" | \";\n}>;\n\ntype JsTypeOf = \"object\" | \"function\" | \"number\" | \"bigint\" | \"boolean\" | \"string\" | \"symbol\" | \"undefined\" | \"null\";\ndeclare const hasDomain: (data: data, kind: domain) => data is data & inferDomain;\ntype TypesByDomain = {\n bigint: bigint;\n boolean: boolean;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n undefined: undefined;\n null: null;\n};\ntype inferDomain = Domain extends kind ? unknown : TypesByDomain[kind];\ntype Domain = show;\ntype NullishDomain = \"undefined\" | \"null\";\ntype NonNullishDomain = Exclude;\ntype PrimitiveDomain = Exclude;\ntype Primitive = inferDomain;\ntype domainOf = unknown extends data ? Domain : data extends object ? \"object\" : data extends string ? \"string\" : data extends number ? \"number\" : data extends boolean ? \"boolean\" : data extends undefined ? \"undefined\" : data extends null ? \"null\" : data extends bigint ? \"bigint\" : data extends symbol ? \"symbol\" : never;\ndeclare const domainOf: (data: data) => domainOf;\ndeclare const jsTypeOfDescriptions: {\n readonly function: \"a function\";\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\n/** Each domain's completion for the phrase \"must be _____\" */\ndeclare const domainDescriptions: {\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\ntype domainDescriptions = typeof domainDescriptions;\ntype describeDomainOf = stringifyUnion] : domainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\n\ndeclare class InternalArktypeError extends Error {\n}\ndeclare const throwInternalError: (message: string) => never;\ndeclare const throwError: (message: string, ctor?: new (message: string) => Error) => never;\ndeclare class ParseError extends Error {\n readonly name = \"ParseError\";\n}\ndeclare const throwParseError: (message: string) => never;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ndeclare const noSuggest: (s: s) => noSuggest;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ntype noSuggest = ` ${s}`;\n/** \"Hair Space\" character, used as a non-rendered sentinel for an error message string:\n * https://www.compart.com/en/unicode/U+200A\n */\ndeclare const zeroWidthSpace = \"\\u200A\";\n/** \"Hair Space\" character, used as a non-rendered sentinel for an error message string:\n * https://www.compart.com/en/unicode/U+200A\n */\ntype ZeroWidthSpace = typeof zeroWidthSpace;\ntype ErrorMessage = `${message}${ZeroWidthSpace}`;\ninterface ErrorType {\n [brand]: \"ErrorType\";\n message: message;\n ctx: ctx;\n}\ntype Completion = `${text}${ZeroWidthSpace}${ZeroWidthSpace}`;\n\ntype Stringifiable = string | boolean | number | bigint | null | undefined;\n/** Force an operation like `{ a: 0 } & { b: 1 }` to be computed so that it displays `{ a: 0; b: 1 }`. */\ntype show = {\n [k in keyof t]: t[k];\n} & unknown;\n/** @deprecated use \"show\" instead */\ntype evaluate = {\n [k in keyof t]: t[k];\n} & unknown;\ntype exact = {\n [k in keyof t]: k extends keyof u ? conform : never;\n};\ntype exactMessageOnError = {\n [k in keyof t]: k extends keyof u ? conform : ErrorMessage<`'${k & string}' is not a valid key`>;\n} & u;\ntype promisable = t | Promise;\ntype leftIfEqual = [l, r] extends [r, l] ? l : r;\ntype UnknownUnion = string | number | symbol | bigint | boolean | object | null | undefined;\n/**\n * Interesection (`&`) that avoids evaluating `unknown` to `{}`\n */\ntype andPreserveUnknown = unknown extends l & r ? unknown : show;\n/** Can be used to test for the universal subtypes, `any` and `never`, e.g.:\n *\n * ```ts\n * type isAnyOrNever = [t] extends [anyOrNever] ? true : false\n * ```\n *\n * The actual value is a string literal, but the only realistic subtypes\n * of that literal are `any` and `never`.\n */\ntype anyOrNever = \" anyOrNever\";\ntype conform = t extends base ? t : base;\ntype equals = [l, r] extends [r, l] ? true : false;\ntype exactEquals = (<_>() => _ extends l ? 1 : 2) extends <_>() => _ extends r ? 1 : 2 ? true : false;\ndeclare const brand: \" brand\";\ntype Brand = t & {\n readonly [brand]: [t, id];\n};\ntype unbrand = t extends Brand ? base : never;\ntype satisfy = t;\ntype defined = t & ({} | null);\ntype autocomplete = suggestions | (string & {});\ntype widen = collectWidenedType>;\ntype collectWidenedType = remaining extends [infer head, ...infer tail] ? collectWidenedType : result;\ntype narrowTuple = t extends readonly [infer head, ...infer tail] ? readonly [head, ...narrowTuple] : [];\ntype narrow = t extends Primitive ? t : t extends readonly unknown[] ? narrowTuple : {\n [k in keyof t]: narrow;\n};\ndeclare const narrow: (t: narrow) => t;\n/** primitive key used to represent an inferred type at compile-time */\ndeclare const inferred: \" arkInferred\";\n/** primitive key used to represent an inferred type at compile-time */\ntype inferred = typeof inferred;\n\ndeclare const args: \" args\";\ntype args = typeof args;\ndeclare abstract class Hkt {\n [args]: unknown[];\n constraints: constraints;\n args: this[args] extends infer args extends unknown[] ? args : never;\n 0: this[args] extends [infer arg, ...any] ? arg : never;\n 1: this[args] extends [any, infer arg, ...any] ? arg : never;\n 2: this[args] extends [any, any, infer arg, ...any] ? arg : never;\n 3: this[args] extends [any, any, any, infer arg, ...any] ? arg : never;\n abstract body: unknown;\n description?: string;\n constructor();\n}\n/** A small set of HKT utility types based on https://github.com/gvergnaud/hotscript\n * See https://github.com/gvergnaud/hotscript/blob/main/src/internals/core/Core.ts\n */\ndeclare namespace Hkt {\n type constructor = new () => Hkt;\n type args = typeof args;\n type apply = (hkt & {\n [args]: args;\n })[\"body\"];\n}\n\ntype Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\ntype NumberLiteral = `${n}`;\ntype BigintLiteral = `${n}n`;\ntype IntegerLiteral = `${n}`;\ntype NonNegativeIntegerLiteral = `${Digit}` | (`${Exclude}${string}` & `${n}`);\n/**\n * Matches a well-formatted numeric expression according to the following rules:\n * 1. Must include an integer portion (i.e. '.321' must be written as '0.321')\n * 2. The first digit of the value must not be 0, unless the entire integer portion is 0\n * 3. If the value includes a decimal, its last digit may not be 0\n * 4. The value may not be \"-0\"\n */\ndeclare const wellFormedNumberMatcher: RegExp;\ndeclare const isWellFormedNumber: RegExp[\"test\"];\n/**\n * Similar to wellFormedNumber but more permissive in the following ways:\n *\n * - Allows numbers without an integer portion like \".5\" (well-formed equivalent is \"0.5\")\n * - Allows decimals with trailing zeroes like \"0.10\" (well-formed equivalent is \"0.1\")\n */\ndeclare const numericStringMatcher: RegExp;\ndeclare const isNumericString: (string: string) => boolean;\ndeclare const numberLikeMatcher: RegExp;\n/**\n * Matches a well-formatted integer according to the following rules:\n * 1. must begin with an integer, the first digit of which cannot be 0 unless the entire value is 0\n * 2. The value may not be \"-0\"\n */\ndeclare const wellFormedIntegerMatcher: RegExp;\ndeclare const isWellFormedInteger: RegExp[\"test\"];\ndeclare const integerLikeMatcher: RegExp;\ntype NumericLiteralKind = \"number\" | \"bigint\" | \"integer\";\ndeclare const numericLiteralDescriptions: {\n readonly number: \"a number\";\n readonly bigint: \"a bigint\";\n readonly integer: \"an integer\";\n};\ntype numericLiteralDescriptions = typeof numericLiteralDescriptions;\ntype writeMalformedNumericLiteralMessage = `'${def}' was parsed as ${numericLiteralDescriptions[kind]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`;\ndeclare const writeMalformedNumericLiteralMessage: (def: def, kind: kind) => writeMalformedNumericLiteralMessage;\ndeclare const tryParseWellFormedNumber: typeof tryParseNumber;\ndeclare const tryParseNumber: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseNumber = token extends `${infer n extends number}` ? number extends n ? writeMalformedNumericLiteralMessage : n : messageOnFail;\ntype parseNumber = token extends `${infer n extends number}` ? n : never;\ndeclare const tryParseInteger: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseInteger = token extends `${infer b extends bigint}` ? bigint extends b ? writeMalformedNumericLiteralMessage : token extends `${infer n extends number}` ? n : never : messageOnFail;\ntype parseInteger = token extends `${bigint}` ? token extends `${infer n extends number}` ? n : never : never;\ntype parseNonNegativeInteger = token extends `-${string}` ? never : parseInteger;\ntype NumericParseOptions = {\n errorOnFail?: errorOnFail;\n strict?: boolean;\n};\ndeclare const tryParseWellFormedBigint: (def: string) => bigint | undefined;\n/**\n * Returns the next or previous representable floating-point number after the given input.\n *\n * @param {\"+\" | \"-\"} [direction=\"+\"] - The direction to find the nearest float. \"+\" for the next float, \"-\" for the previous float.\n * @throws {Error} If the input is not a finite number.\n *\n * @example\n * console.log(nearestFloat(0)); // Smallest positive number\n * console.log(nearestFloat(2)); // 2.0000000000000004\n * console.log(nearestFloat(2.1)); // 2.1000000000000005\n * console.log(nearestFloat(2, \"-\")); // 1.9999999999999998\n * console.log(nearestFloat(2.1, \"-\")); // 2.0999999999999996\n * // as size of input increases, the increments become larger to stay within what\n * // JS can represent in a numeric value\n * console.log(nearestFloat(5555555555555555)); // 5555555555555556\n * console.log(nearestFloat(5555555555555555, \"-\")); // 5555555555555554\n */\ndeclare const nearestFloat: (n: number, direction?: \"+\" | \"-\") => number;\n\ntype Key = string | symbol;\ntype toArkKey = k extends number ? [\n o,\n number\n] extends [array, k] ? NonNegativeIntegerLiteral : `${k}` : k;\ntype arkIndexableOf = arkKeyOf extends infer k ? k extends `${infer index extends number}` ? index | k : k : never;\ntype arkKeyOf = [\n o\n] extends [object] ? [\n o\n] extends [array] ? arkArrayKeyOf : arkObjectLiteralKeyOf : never;\ntype arkArrayKeyOf = number extends a[\"length\"] ? NonNegativeIntegerLiteral : keyof a extends infer i ? i extends `${number}` ? i : never : never;\ntype arkObjectLiteralKeyOf = keyof o extends infer k ? k extends number ? `${k}` : k : never;\ntype arkGet> = o[k extends keyof o ? k : NonNegativeIntegerLiteral extends k ? number & keyof o : k extends number ? `${k}` & keyof o : never];\ntype writeInvalidKeysMessage> = `Key${keys[\"length\"] extends 1 ? \"\" : \"s\"} ${join} ${keys[\"length\"] extends 1 ? \"does\" : \"do\"} not exist on ${o}`;\n\ntype Dict = {\n readonly [_ in k]: v;\n};\ntype dict = {\n [_ in k]: v;\n};\n/** Either:\n * A, with all properties of B undefined\n * OR\n * B, with all properties of A undefined\n **/\ntype propwiseXor = show | show;\ntype unionToPropwiseXor> = props extends infer distributed ? show : never;\ntype requireKeys = o & {\n [requiredKey in key]-?: defined;\n};\ntype require = _require;\ntype _require = depth[\"length\"] extends maxDepth ? o : o extends object ? o extends Fn ? o : {\n [k in keyof o]-?: _require;\n} : o;\ntype PartialRecord = {\n [_ in k]?: v;\n};\n/** Returns true if a type can be homomorphically mapped without losing information.\n * Useful for avoiding e.g. classes with private properties while mapping.\n */\ntype isSafelyMappable = {\n [k in keyof t]: t[k];\n} extends t ? true : false;\ntype KeySet = {\n readonly [_ in key]?: 1;\n};\ntype keySetOf = KeySet>;\ntype mutable = _mutable;\ntype _mutable = depth[\"length\"] extends maxDepth ? o : o extends Primitive ? o : o extends Fn ? o : {\n -readonly [k in keyof o]: _mutable;\n};\n/**\n * extracts entries mimicking Object.entries, accounting for whether the\n * object is an array\n **/\ntype entryOf = {\n [k in keyof o]-?: [k, o[k] & ({} | null)];\n}[o extends readonly unknown[] ? keyof o & number : keyof o] & unknown;\ntype entriesOf = entryOf[];\n/**\n * Object.entries wrapper providing narrowed types for objects with known sets\n * of keys, e.g. those defined internally as configs\n */\ndeclare const entriesOf: (o: o) => entryOf[];\ntype Entry = readonly [key: key, value: value];\ntype fromEntries = show<{\n [entry in entries[number] as entry[0]]: entry[1];\n}>;\ndeclare const fromEntries: (entries: entries) => fromEntries;\n/** Mimics the result of Object.keys(...) */\ntype keyOf = o extends array ? number extends o[\"length\"] ? `${number}` : keyof o & `${number}` : keyof o extends infer k ? k extends string ? k : k extends number ? `${k}` : never : never;\ndeclare const keysOf: (o: o) => keyOf[];\ndeclare const isKeyOf: (k: k, o: o) => k is Extract;\n/** Coalesce keys that exist on one or more branches of a union */\ntype unionKeyOf = t extends unknown ? keyof t : never;\ntype extractKeyed> = Extract;\ndeclare const hasKey: >(o: o, k: k) => o is extractKeyed;\ntype extractDefinedKey> = show & {\n [_ in k]: {} | null;\n}>;\ndeclare const hasDefinedKey: >(o: o, k: k) => o is extractDefinedKey;\ntype requiredKeyOf = keyof o extends infer k ? k extends keyof o ? o extends {\n [_ in k]-?: o[k];\n} ? k : never : never : never;\ntype optionalKeyOf = Exclude>;\ntype merge = base extends unknown ? props extends unknown ? show & props> : never : never;\ntype mergeExact = base extends unknown ? props extends unknown ? show & props> : never : never;\ntype omitMerged = {\n [k in keyof base as excludeExactKeyOf]: base[k];\n};\ntype excludeExactKeyOf = Exclude>;\ntype extractExactKeyOf = keyof {\n [k in keyof base as [key, k] extends [k, key] ? key : never]: 1;\n};\ntype override = merge;\ntype propValueOf = o[keyof o];\ndeclare const InnerDynamicBase: new (base: t) => t;\n/** @ts-ignore (needed to extend `t`) **/\ninterface DynamicBase extends t {\n}\ndeclare class DynamicBase {\n constructor(properties: t);\n}\ndeclare const NoopBase: new () => t;\n/** @ts-ignore (needed to extend `t`) **/\ndeclare class CastableBase extends NoopBase {\n}\ndeclare const splitByKeys: >(o: o, leftKeys: leftKeys) => [show>, show>];\n/** Homomorphic implementation of the builtin Pick.\n *\n * Gives different results for certain union expressions like the following:\n *\n * @example\n * // flattens result to { a?: 1 | 2; b?: 1 | 2 }\n * type PickResult = Pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type pickResult = pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n */\ntype pick = o extends unknown ? {\n [k in keyof o as k extends key ? k : never]: o[k];\n} : never;\ndeclare const pick: >(o: o, keys: keys) => pick;\n/** Homomorphic implementation of the builtin Omit.\n *\n * Gives different results for many union expressions like the following:\n *\n * @example\n * // {}\n * type OmitResult = Omit<{ a: 1 } | { b: 2 }, never>\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type omitResult = omit<{ a: 1 } | { b: 2 }, never>\n */\ntype omit = {\n [k in keyof o as k extends key ? never : k]: o[k];\n};\ndeclare const omit: >(o: o, keys: keys) => omit;\n/** Returns onTrue if the type is exactly `{}` and onFalse otherwise*/\ntype ifEmptyObjectLiteral = [\n unknown,\n t & (null | undefined)\n] extends [t | null | undefined, never] ? onTrue : onFalse;\ntype EmptyObject = Record;\ndeclare const isEmptyObject: (o: object) => o is EmptyObject;\ndeclare const stringAndSymbolicEntriesOf: (o: object) => Entry[];\n/** Like Object.assign, but it will preserve getters instead of evaluating them. */\ndeclare const defineProperties: (base: base, merged: merged) => merge;\n/** Copies enumerable keys of o to a new object in alphabetical order */\ndeclare const withAlphabetizedKeys: (o: o) => o;\ntype invert> = {\n [k in t[keyof t]]: {\n [k2 in keyof t]: t[k2] extends k ? k2 : never;\n }[keyof t];\n} & unknown;\ndeclare const invert: >(t: t) => invert;\ndeclare const unset: \" represents an uninitialized value\";\ntype unset = typeof unset;\n/**\n * For each keyof o that also exists on jsDocSource, add associated JsDoc annotations to o.\n * Does not preserve modifiers on o like optionality.\n */\ntype withJsDoc = show : Pick<_withJsDoc, keyof o & keyof jsDocSource> : Pick<_withJsDoc, keyof o & keyof jsDocSource> & {\n [k in Exclude]: o[k];\n}>;\ntype _withJsDoc = {\n [k in keyof jsDocSource]-?: o[k & keyof o];\n};\ntype propertyDescriptorsOf = {\n [k in keyof o]: TypedPropertyDescriptor;\n};\ntype keyWithValue = keyof t extends infer k ? k extends keyof t ? t[k] extends constraint ? k : never : never : never;\ndeclare const enumValues: (tsEnum: tsEnum) => tsEnum[keyof tsEnum][];\n\ninterface AndPreserveUnknown extends Hkt<[unknown, unknown]> {\n body: andPreserveUnknown;\n}\ntype SequenceIntersectionKind = \"array\" | \"parameters\";\ntype intersectArrays = intersectSequences;\ntype intersectParameters = intersectSequences;\ntype intersectSequences = l extends readonly [] ? kind extends \"array\" ? [\n] extends r ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...r, ...postfix] : r extends readonly [] ? kind extends \"array\" ? [\n] extends l ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...l, ...postfix] : [\n l,\n r\n] extends ([\n readonly [(infer lHead)?, ...infer lTail],\n readonly [(infer rHead)?, ...infer rTail]\n]) ? [\n \"0\",\n lHead,\n rHead\n] extends [keyof l | keyof r, l[0], r[0]] ? intersectSequences?\n] : [...acc, Hkt.apply], postfix, operation, kind> : l extends readonly [...infer lInit, infer lLast] ? r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : intersectSequences,\n ...postfix\n], operation, kind> : r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : [...acc, ...Hkt.apply[], ...postfix] : never;\ntype isDisjoint = overlaps extends true ? false : true;\ntype overlaps = l & r extends never ? false : domainOf & domainOf extends never ? false : [l, r] extends [object, object] ? false extends (propValueOf<{\n [k in Extract | requiredKeyOf>]: overlaps;\n}>) ? false : true : true;\n\ntype DuplicateData = {\n element: val;\n indices: number[];\n};\n/**\n * Extracts duplicated elements and their indices from an array, returning them.\n *\n * Note that given `a === b && b === c`, then `c === a` must be `true` for this to give accurate results.\n *\n * @param arr The array to extract duplicate elements from.\n */ declare const getDuplicatesOf: (arr: arr, opts?: ComparisonOptions) => DuplicateData[];\ntype pathToString = segments extends [] ? \"/\" : join;\ndeclare const join: , delimiter extends string>(segments: segments, delimiter: delimiter) => join;\ntype join, delimiter extends string, result extends string = \"\"> = segments extends (readonly [infer head extends string, ...infer tail extends string[]]) ? join : result;\ndeclare const getPath: (root: unknown, path: string[]) => unknown;\ndeclare const intersectUniqueLists: (l: readonly item[], r: readonly item[]) => item[];\ntype filter = t extends readonly [infer head, ...infer tail] ? filter : result;\ntype array = readonly t[];\ntype listable = t | readonly t[];\ntype flattenListable = t extends array ? element : t;\ntype minLengthArray = readonly [\n ...repeat<[t], minLength>,\n ...t[]\n];\ntype repeat = _repeat;\ntype _repeat = depth[\"length\"] extends maxDepth ? result : _repeat;\ntype CollapsingList = readonly [] | t | readonly [t, t, ...t[]];\ntype headOf = t[0];\ntype tailOf = t extends readonly [unknown, ...infer tail] ? tail : never;\ntype lastIndexOf = tailOf[\"length\"];\ntype lastOf = t[lastIndexOf];\ntype initOf = t extends readonly [...infer init, unknown] ? init : never;\ntype numericStringKeyOf = Extract;\ntype arrayIndexOf = keyof a extends infer k ? parseNonNegativeInteger : never;\ntype liftArray = t extends array ? [\n t\n] extends [anyOrNever] ? t[] : t : t[];\ndeclare const liftArray: (data: t) => liftArray;\n/**\n * Splits an array into two arrays based on the result of a predicate\n *\n * @param predicate - The guard function used to determine which items to include.\n * @returns A tuple containing two arrays:\n * \t\t\t\t- the first includes items for which `predicate` returns true\n * \t\t\t\t- the second includes items for which `predicate` returns false\n *\n * @example\n * const list = [1, \"2\", \"3\", 4, 5];\n * const [numbers, strings] = spliterate(list, (x) => typeof x === \"number\");\n * // Type: number[]\n * // Output: [1, 4, 5]\n * console.log(evens);\n * // Type: string[]\n * // Output: [\"2\", \"3\"]\n * console.log(odds);\n */\ndeclare const spliterate: (arr: readonly item[], predicate: GuardablePredicate) => [included: included[], excluded: [item] extends [included] ? item[] : Exclude[]];\ndeclare const ReadonlyArray: new (...args: ConstructorParameters>) => ReadonlyArray;\ndeclare const includes: (array: a, element: unknown) => element is a[number];\ndeclare const range: (length: number, offset?: number) => number[];\ntype AppendOptions = {\n /** If true, adds the element to the beginning of the array instead of the end */\n prepend?: boolean;\n};\n/**\n * Adds a value or array to an array, returning the concatenated result\n */\ndeclare const append: >(to: to, value: value, opts?: AppendOptions) => to & {};\ntype appendableValue = to extends array ? element extends array ? array : listable : never;\n/**\n * Concatenates an element or list with a readonly list\n */\ndeclare const conflatenate: (to: readonly element[] | undefined | null, elementOrList: appendableValue | undefined | null) => readonly element[];\n/**\n * Concatenates a variadic list of elements or lists with a readonly list\n */\ndeclare const conflatenateAll: (...elementsOrLists: (listable | undefined | null)[]) => readonly element[];\ninterface ComparisonOptions {\n isEqual?: (l: t, r: t) => boolean;\n}\n/**\n * Appends a value or concatenates an array to an array if it is not already included, returning the array\n */\ndeclare const appendUnique: (to: to | undefined, value: NoInfer | to[number]>, opts?: ComparisonOptions) => to;\ntype groupableKeyOf = keyof o extends infer k ? k extends keyof o ? o[k] extends PropertyKey ? k : never : never : never;\ntype groupBy> = {\n [k in element[discriminant] & PropertyKey]?: (element extends unknown ? isDisjoint extends true ? never : element : never)[];\n} & unknown;\ndeclare const groupBy: >(array: readonly element[], discriminant: discriminant) => groupBy;\ndeclare const arrayEquals: (l: array, r: array, opts?: ComparisonOptions) => boolean;\ntype validateExhaustiveKeys = keys extends readonly [infer head, ...infer tail extends PropertyKey[]] ? readonly [\n conform,\n ...validateExhaustiveKeys>\n] : [expectedKey] extends [never] ? [] : [expectedKey];\n\n/** Shallowly copy the properties of the object. */\ndeclare const shallowClone: (input: input) => input;\n/** Deeply copy the properties of the a non-subclassed Object, Array or Date.*/\ndeclare const deepClone: (input: input) => input;\n\ntype objectFromListableEntries = show>>;\ntype fromGroupableEntries = {\n [entry in entries[number] as entry extends GroupedEntry ? entry[0][\"group\"] : conform]: entry extends GroupedEntry ? entry[1][] : entry[1];\n};\ntype arrayFromListableEntries = Entry extends transformed ? transformed[1][] : _arrayFromListableEntries;\ntype _arrayFromListableEntries = [\n transformed\n] extends [never] ? result : Extract> extends (infer next extends Entry) ? Exclude extends infer remaining extends Entry ? [\n transformed\n] extends [remaining] ? [\n ...result,\n ...transformed[1][]\n] : _arrayFromListableEntries : never : [...result, ...transformed[1][]];\ntype extractEntrySets> = e extends readonly GroupableEntry[] ? e : [e];\ntype extractEntries> = e extends readonly Entry[] ? e[number] : e;\ntype entryArgsWithIndex = {\n [k in keyof o]-?: [k: k, v: Exclude, i: number];\n}[keyof o];\ntype numericArrayEntry = number extends a[\"length\"] ? [number, a[number]] : {\n [i in keyof a]: i extends `${infer n extends number}` ? [n, a[i]] : never;\n}[number];\ntype GroupedEntry = readonly [key: {\n group: Key;\n}, value: unknown];\ntype GroupableEntry = Entry | Entry | GroupedEntry;\ntype ListableEntry = listable;\ntype fromMappedEntries = [\n transformed\n] extends [listable>] ? arrayFromListableEntries> : objectFromListableEntries>;\ntype FlatMorph = {\n (o: o, flatMapEntry: (...args: numericArrayEntry) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryOf) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryArgsWithIndex) => transformed): fromMappedEntries;\n};\ndeclare const flatMorph: FlatMorph;\n\ndeclare const isomorphic: {\n fileName: () => string;\n env: Record, string | undefined>;\n};\n\ndeclare const lazily: (thunk: () => t) => t;\n\ntype SerializationOptions = {\n onCycle?: (value: object) => string;\n onSymbol?: (value: symbol) => string;\n onFunction?: (value: Function) => string;\n onUndefined?: string;\n onBigInt?: (value: bigint) => string;\n};\ntype JsonStructure = JsonObject | JsonArray;\ninterface JsonObject {\n [k: string]: Json;\n}\ntype JsonArray = Json[];\ntype JsonPrimitive = string | boolean | number | null;\ntype Json = JsonStructure | JsonPrimitive;\ndeclare const snapshot: (data: t, opts?: SerializationOptions) => snapshot;\ntype snapshot = unknown extends t ? unknown : t extends Primitive ? snapshotPrimitive : t extends {\n toJSON: () => infer serialized;\n} ? serialized : t extends Function ? `Function(${string})` : t extends Date ? string : depth[\"length\"] extends 10 ? unknown : t extends array ? array> : {\n [k in keyof t as snapshotPrimitive]: snapshot;\n};\ntype snapshotPrimitive = t extends symbol ? `Symbol(${string})` : t;\ntype PrintableOptions = {\n indent?: number;\n quoteKeys?: boolean;\n};\ndeclare const print: (data: unknown, opts?: PrintableOptions) => void;\ndeclare const printable: (data: unknown, opts?: PrintableOptions) => string;\n/**\n * Converts a Date instance to a human-readable description relative to its precision\n */\ndeclare const describeCollapsibleDate: (date: Date) => string;\n\ntype StringifyPathOptions = requireKeys<{\n stringifySymbol?: (s: symbol) => string;\n stringifyNonKey?: (o: Exclude) => string;\n}, stringifiable extends PropertyKey ? never : \"stringifyNonKey\">;\ntype StringifyPathFn = (path: array, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ntype AppendStringifiedKeyFn = (path: string, prop: stringifiable, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ndeclare const appendStringifiedKey: AppendStringifiedKeyFn;\ndeclare const stringifyPath: StringifyPathFn;\ndeclare class ReadonlyPath extends ReadonlyArray {\n private cache;\n constructor(...items: array);\n toJSON(): JsonArray;\n stringify(): string;\n stringifyAncestors(): readonly string[];\n}\n\ntype SerializedString = `\"${value}\"`;\ntype SerializedPrimitives = {\n string: SerializedString;\n number: `${number}`;\n bigint: BigintLiteral;\n boolean: \"true\" | \"false\";\n null: \"null\";\n undefined: \"undefined\";\n};\ntype SerializedPrimitive = SerializedPrimitives[keyof SerializedPrimitives];\ntype SerializablePrimitive = inferDomain;\ndeclare const serializePrimitive: (value: value) => serializePrimitive;\ntype serializePrimitive = value extends string ? `\"${value}\"` : value extends bigint ? `${value}n` : `${value}`;\n\ndeclare const arkUtilVersion = \"0.45.10\";\ndeclare const initialRegistryContents: {\n version: string;\n filename: string;\n FileConstructor: typeof buffer.File;\n};\ntype InitialRegistryContents = typeof initialRegistryContents;\ninterface ArkRegistry extends InitialRegistryContents {\n [k: string]: unknown;\n}\ndeclare const registry: ArkRegistry;\ndeclare global {\n export interface ArkEnv {\n prototypes(): never;\n }\n export namespace ArkEnv {\n type prototypes = ReturnType;\n }\n}\ndeclare const register: (value: object | symbol) => string;\ndeclare const isDotAccessible: (keyName: string) => boolean;\n\ndeclare class Scanner {\n chars: string[];\n i: number;\n def: string;\n constructor(def: string);\n /** Get lookahead and advance scanner by one */\n shift(): this[\"lookahead\"];\n get lookahead(): lookahead;\n get nextLookahead(): string;\n get length(): number;\n shiftUntil(condition: Scanner.UntilCondition): string;\n shiftUntilLookahead(charOrSet: string | KeySet): string;\n shiftUntilNonWhitespace(): string;\n jumpToIndex(i: number): void;\n jumpForward(count: number): void;\n get location(): number;\n get unscanned(): string;\n get scanned(): string;\n sliceChars(start: number, end?: number): string;\n lookaheadIs(char: char): this is Scanner;\n lookaheadIsIn(tokens: keySet): this is Scanner>;\n}\ndeclare namespace Scanner {\n type UntilCondition = (scanner: Scanner, shifted: string) => boolean;\n}\n\ndeclare const capitalize: (s: s) => Capitalize;\ndeclare const uncapitalize: (s: s) => Uncapitalize;\ntype firstChar = s extends `${infer head}${string}` ? head : \"\";\ntype charsAfterFirst = s extends `${string}${infer tail}` ? tail : \"\";\ntype lastChar = s extends `${infer head}${infer tail}` ? tail extends \"\" ? head : lastChar : s;\ntype charsBeforeLast = s extends `${infer head}${infer tail}` ? tail extends \"\" ? \"\" : `${head}${charsBeforeLast}` : \"\";\ndeclare const anchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const deanchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const anchoredSource: (regex: RegExp | string) => string;\ndeclare const deanchoredSource: (regex: RegExp | string) => string;\ndeclare const RegexPatterns: {\n negativeLookahead: (pattern: string) => `(?!${string})`;\n nonCapturingGroup: (pattern: string) => `(?:${string})`;\n};\ndeclare const escapeChar = \"\\\\\";\ntype EscapeChar = typeof escapeChar;\ndeclare const whitespaceChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n};\ntype WhitespaceChar = keyof typeof whitespaceChars;\ntype trim = trimEnd>;\ntype trimStart = s extends `${WhitespaceChar}${infer tail}` ? trimEnd : s;\ntype trimEnd = s extends `${infer init}${WhitespaceChar}` ? trimEnd : s;\ntype isStringLiteral = [\n t\n] extends [string] ? [\n string\n] extends [t] ? false : Uppercase extends Uppercase> ? Lowercase extends Lowercase> ? true : false : false : false;\ndeclare const emojiToUnicode: (emoji: string) => string;\n\ntype TraitImplementation = , s extends CompositionState = composeTraits<[\n ...traits,\n implementation\n], \"implementation\">, cls extends TraitConstructor = TraitConstructor>(...args: [...traits, implementation & ThisType>]) => cls;\ntype TraitComposition = >(...traits: conform) => TraitConstructor;\ndeclare const hasTrait: (traitClass: Constructor) => (o: unknown) => boolean;\ntype TraitDeclaration = {\n abstractMethods?: object;\n abstractProps?: object;\n abstractStatics?: object;\n dynamicBase?: object;\n};\n/** @ts-ignore required to extend NoopBase */\ndeclare abstract class Trait extends NoopBase {\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatic: abstractStatics;\n static get [Symbol.hasInstance](): (o: unknown) => boolean;\n traitsOf(): readonly TraitConstructor[];\n}\ndeclare const compose: TraitComposition;\ndeclare const implement: TraitImplementation;\ntype TraitConstructor = statics & (new (...args: params) => Trait<{\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatics: abstractStatics;\n}> & instance);\ntype CompositionState = {\n validated: array;\n remaining: array;\n params: array;\n kind: TraitCompositionKind;\n implemented: object;\n abstractMethods: object;\n abstractProps: object;\n abstractStatics: object;\n statics: object;\n};\ntype TraitCompositionKind = \"abstract\" | \"implementation\";\ntype composeTraits = _compose<{\n validated: [];\n remaining: traits;\n kind: kind;\n params: [];\n implemented: {};\n abstractMethods: {};\n abstractProps: {};\n abstractStatics: {};\n statics: {};\n}>;\ntype intersectImplementations = {\n [k in keyof l]: k extends keyof r ? l[k] extends (...args: infer lArgs) => infer lReturn ? r[k] extends (...args: infer rArgs) => infer rReturn ? (...args: intersectParameters) => lReturn & rReturn : l[k] & r[k] : l[k] & r[k] : l[k];\n} & Omit;\ntype _compose = s[\"remaining\"] extends (readonly [\n TraitConstructor,\n ...infer tail\n]) ? _compose<{\n validated: [...s[\"validated\"], s[\"remaining\"][0]];\n remaining: tail;\n kind: s[\"kind\"];\n params: intersectParameters;\n implemented: intersectImplementations>;\n statics: intersectImplementations>;\n abstractMethods: intersectImplementations;\n abstractProps: intersectImplementations;\n abstractStatics: intersectImplementations;\n}> : finalizeState;\ntype finalizeState = satisfy;\n statics: show>;\n abstractMethods: show>;\n abstractProps: show>;\n abstractStatics: show>;\n}>;\ntype implementationOf = s[\"abstractMethods\"] & ({} extends s[\"abstractProps\"] ? {} : {\n construct: (...args: s[\"params\"]) => s[\"abstractProps\"];\n}) & ({} extends s[\"abstractStatics\"] ? {} : {\n statics: s[\"abstractStatics\"];\n});\n\nexport { type AndPreserveUnknown, type AppendOptions, type AppendStringifiedKeyFn, type ArkRegistry, type BigintLiteral, type Brand, type BuiltinObjectKind, type BuiltinObjects, Callable, type CallableOptions, CastableBase, type CollapsingList, type ComparisonOptions, type Completion, type Constructor, type DescribeOptions, type Dict, type Digit, type Domain, DynamicBase, DynamicFunction, type EcmascriptObjects, type EmptyObject, type Entry, type ErrorMessage, type ErrorType, type EscapeChar, FileConstructor, type FlatMorph, type Fn, type GlobalName, type GroupableEntry, type GroupedEntry, type GuardablePredicate, Hkt, type InitialRegistryContents, InnerDynamicBase, type IntegerLiteral, InternalArktypeError, type JsTypeOf, type Json, type JsonArray, type JsonObject, type JsonPrimitive, type JsonStructure, type Key, type KeySet, type ListableEntry, type NonNegativeIntegerLiteral, type NonNullishDomain, NoopBase, type NullishDomain, type NumberLiteral, type NumericParseOptions, ParseError, type PartialRecord, type PlatformObjects, type Primitive, type PrimitiveDomain, type PrintableOptions, ReadonlyArray, ReadonlyPath, RegexPatterns, Scanner, type SerializablePrimitive, type SerializationOptions, type SerializedPrimitive, type SerializedPrimitives, type Stringifiable, type StringifyPathFn, type StringifyPathOptions, type Thunk, Trait, type TraitComposition, type TraitCompositionKind, type TraitConstructor, type TraitDeclaration, type TraitImplementation, type TypeGuard, type TypedArrayObjects, type UnknownUnion, type WhitespaceChar, type ZeroWidthSpace, ancestorsOf, anchoredRegex, anchoredSource, type andPreserveUnknown, type anyOrNever, append, appendStringifiedKey, appendUnique, type appendableValue, type arkGet, type arkIndexableOf, type arkKeyOf, arkUtilVersion, type array, arrayEquals, type arrayIndexOf, type autocomplete, brand, builtinConstructors, cached, capitalize, type charsAfterFirst, type charsBeforeLast, compose, type composeTraits, conflatenate, conflatenateAll, type conform, constructorExtends, deanchoredRegex, deanchoredSource, deepClone, defineProperties, type defined, type describe, describeCollapsibleDate, type describeDefaults, type describeDomainOf, type describeObject, type dict, domainDescriptions, domainOf, ecmascriptConstructors, ecmascriptDescriptions, emojiToUnicode, entriesOf, type entryOf, enumValues, envHasCsp, type equals, escapeChar, type evaluate, type exact, type exactEquals, type exactMessageOnError, type extractDefinedKey, type extractKeyed, type filter, type firstChar, flatMorph, type flattenListable, fromEntries, type fromMappedEntries, getBuiltinNameOfConstructor, getDuplicatesOf, getPath, groupBy, type groupableKeyOf, hasDefinedKey, hasDomain, hasKey, hasObjectKind, hasTrait, type headOf, type ifEmptyObjectLiteral, implement, type implementationOf, includes, type inferDomain, inferred, type initOf, initialRegistryContents, type instanceOf, integerLikeMatcher, type intersectArrays, type intersectOverloadReturns, type intersectParameters, type intersectUnion, intersectUniqueLists, invert, isArray, type isDisjoint, isDotAccessible, isEmptyObject, isKeyOf, isNumericString, type isSafelyMappable, type isStringLiteral, isThunk, isWellFormedInteger, isWellFormedNumber, isomorphic, join, jsTypeOfDescriptions, type keyOf, type keySetOf, type keyWithValue, keysOf, type lastChar, type lastIndexOf, type lastOf, lazily, type leftIfEqual, liftArray, type listable, type merge, type mergeExact, type minLengthArray, type mutable, narrow, nearestFloat, noSuggest, type normalizedKeyOf, numberLikeMatcher, type numericStringKeyOf, numericStringMatcher, objectKindDescriptions, objectKindOf, objectKindOrDomainOf, omit, type optionalKeyOf, type overlaps, type overloadOf, type override, type parseInteger, type parseNonNegativeInteger, type parseNumber, type pathToString, pick, platformConstructors, platformDescriptions, print, printable, type promisable, type propValueOf, type propertyDescriptorsOf, type propwiseXor, range, register, registry, type repeat, type require, type requireKeys, type requiredKeyOf, type satisfy, serializePrimitive, shallowClone, type show, snapshot, splitByKeys, spliterate, stringAndSymbolicEntriesOf, stringifyPath, type stringifyUnion, type tailOf, throwError, throwInternalError, throwParseError, type thunkable, type toArkKey, type trim, type trimEnd, type trimStart, tryCatch, tryParseInteger, tryParseNumber, tryParseWellFormedBigint, tryParseWellFormedNumber, type typeToString, typedArrayConstructors, typedArrayDescriptions, type unbrand, uncapitalize, type unionKeyOf, type unionToPropwiseXor, type unionToTuple, unset, type validateExhaustiveKeys, wellFormedIntegerMatcher, wellFormedNumberMatcher, whitespaceChars, type widen, withAlphabetizedKeys, type withJsDoc, type writeInvalidKeysMessage, writeMalformedNumericLiteralMessage, zeroWidthSpace };\n\n}" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dcc2c183f9..49ba5e1f28 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -311,8 +311,8 @@ importers: specifier: ^3.3.4 version: 3.6.0(react-hook-form@7.53.1(react@19.0.0)) '@monaco-editor/react': - specifier: 4.7.0-rc.0 - version: 4.7.0-rc.0(monaco-editor@0.52.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + specifier: 4.7.0 + version: 4.7.0(monaco-editor@0.52.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@next/bundle-analyzer': specifier: 15.2.3 version: 15.2.3 @@ -4240,13 +4240,11 @@ packages: resolution: {integrity: sha512-IYPe/FLpvF3IZrd/f5p5ffmWhMc3aEMuM2wGJASDqC2Ge7qatVCdbfPx3n/5xFeb19xN0j/911M2AaFuircsWA==} engines: {node: '>=18'} - '@monaco-editor/loader@1.4.0': - resolution: {integrity: sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==} - peerDependencies: - monaco-editor: '>= 0.21.0 < 1' + '@monaco-editor/loader@1.5.0': + resolution: {integrity: sha512-hKoGSM+7aAc7eRTRjpqAZucPmoNOC4UUbknb/VNoTkEIkCPhqV8LfbsgM1webRM7S/z21eHEx9Fkwx8Z/C/+Xw==} - '@monaco-editor/react@4.7.0-rc.0': - resolution: {integrity: sha512-YfjXkDK0bcwS0zo8PXptvQdCQfOPPtzGsAzmIv7PnoUGFdIohsR+NVDyjbajMddF+3cWUm/3q9NzP/DUke9a+w==} + '@monaco-editor/react@4.7.0': + resolution: {integrity: sha512-cyzXQCtO47ydzxpQtCGSQGOC8Gk3ZUeBXFAxD+CWXYFo5OqZyZUonFl0DwUlTyAfRHntBfw2p3w4s9R6oe1eCA==} peerDependencies: monaco-editor: '>= 0.25.0 < 1' react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -17868,14 +17866,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@monaco-editor/loader@1.4.0(monaco-editor@0.52.2)': + '@monaco-editor/loader@1.5.0': dependencies: - monaco-editor: 0.52.2 state-local: 1.0.7 - '@monaco-editor/react@4.7.0-rc.0(monaco-editor@0.52.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + '@monaco-editor/react@4.7.0(monaco-editor@0.52.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@monaco-editor/loader': 1.4.0(monaco-editor@0.52.2) + '@monaco-editor/loader': 1.5.0 monaco-editor: 0.52.2 react: 19.0.0 react-dom: 19.0.0(react@19.0.0) From d2a04795015c417c80b23ef59d98a23754f63f21 Mon Sep 17 00:00:00 2001 From: Bilal Godil Date: Wed, 23 Jul 2025 16:45:53 -0700 Subject: [PATCH 2/2] lint --- apps/dashboard/src/components/vibe-coding/dts/index.ts | 8 ++++---- .../src/components/vibe-coding/dts/schema-dts.ts | 2 +- apps/dashboard/src/components/vibe-coding/dts/type-dts.ts | 2 +- apps/dashboard/src/components/vibe-coding/dts/util-dts.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dashboard/src/components/vibe-coding/dts/index.ts b/apps/dashboard/src/components/vibe-coding/dts/index.ts index 3b44c18197..dde616877b 100644 --- a/apps/dashboard/src/components/vibe-coding/dts/index.ts +++ b/apps/dashboard/src/components/vibe-coding/dts/index.ts @@ -1,9 +1,9 @@ -import { typeDts } from "./type-dts" -import { schemaDts } from "./schema-dts" -import { utilDts } from "./util-dts" +import { typeDts } from "./type-dts"; +import { schemaDts } from "./schema-dts"; +import { utilDts } from "./util-dts"; export const dtsBundles = { arkSchema: schemaDts, arkType: typeDts, arkUtil: utilDts, -} +}; diff --git a/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts b/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts index e1ba745f94..4f0d39481d 100644 --- a/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts +++ b/apps/dashboard/src/components/vibe-coding/dts/schema-dts.ts @@ -1,4 +1,4 @@ // FROM https://github.com/arktypeio/arktype/tree/main/ark/docs/components/dts /** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ // prettier-ignore -export const schemaDts = "declare module \"@ark/schema\" {\n import { DynamicBase, anyOrNever, ReadonlyArray as ReadonlyArray$1, array, propwiseXor, merge, show, CastableBase, ReadonlyPath, JsonObject, JsonArray, mutable, Thunk, Callable, Hkt, JsonStructure, autocomplete, listable, satisfy, Domain as Domain$1, Constructor, Json, requireKeys, NonNegativeIntegerLiteral, flattenListable, noSuggest, intersectUnion, conform, ParseError, Key, propValueOf, Entry, KeySet, keySetOf, arrayIndexOf, JsonPrimitive, SerializedPrimitive, inferred, Fn, BuiltinObjectKind, describe, GuardablePredicate, Brand, dict, ArkRegistry } from '@ark/util';\nexport { ParseError } from '@ark/util';\n\ndeclare const intrinsic: {\n emptyStructure: StructureNode;\n jsonPrimitive: BaseRoot;\n jsonObject: BaseRoot;\n jsonData: BaseRoot;\n integer: BaseRoot;\n key: BaseRoot;\n lengthBoundable: BaseRoot;\n nonNegativeIntegerString: BaseRoot;\n string: BaseRoot;\n number: BaseRoot;\n bigint: BaseRoot;\n boolean: BaseRoot;\n symbol: BaseRoot;\n undefined: BaseRoot;\n object: BaseRoot;\n null: BaseRoot;\n Array: BaseRoot;\n Date: BaseRoot;\n never: BaseRoot;\n unknown: BaseRoot;\n true: BaseRoot;\n false: BaseRoot;\n};\n\ntype PreparsedNodeResolution = {\n [arkKind]: \"generic\" | \"module\";\n};\ndeclare class RootModule extends DynamicBase {\n get [arkKind](): \"module\";\n}\ninterface InternalModule extends RootModule {\n root?: BaseRoot;\n}\ndeclare const bindModule: (module: InternalModule, $: BaseScope) => InternalModule;\ntype exportSchemaScope<$> = {\n [k in keyof $]: instantiateRoot<$[k]>;\n};\ntype instantiateRoot = t extends InternalResolution ? [\n t\n] extends [anyOrNever] ? BaseRoot : t : BaseRoot;\ndeclare const SchemaModule: new <$ = {}>(types: exportSchemaScope<$>) => SchemaModule<$>;\ninterface SchemaModule<$ = {}> extends RootModule> {\n}\n\n/** From https://github.com/standard-schema/standard-schema */\n/**\n * The Standard Schema interface.\n */\ntype StandardSchemaV1 = {\n /**\n * The Standard Schema properties.\n */\n readonly \"~standard\": StandardSchemaV1.Props;\n};\ndeclare namespace StandardSchemaV1 {\n /**\n * The Standard Schema properties interface.\n */\n export interface Props {\n /**\n * The version number of the standard.\n */\n readonly version: 1;\n /**\n * The vendor name of the schema library.\n */\n readonly vendor: string;\n /**\n * Validates unknown input values.\n */\n readonly validate: (value: unknown) => Result | Promise>;\n /**\n * Inferred types associated with the schema.\n */\n readonly types?: Types | undefined;\n }\n export interface ArkTypeProps extends Props {\n readonly vendor: \"arktype\";\n }\n /**\n * The result interface of the validate function.\n */\n export type Result = SuccessResult | FailureResult;\n /**\n * The result interface if validation succeeds.\n */\n export interface SuccessResult {\n /**\n * The typed output value.\n */\n readonly value: Output;\n /**\n * The non-existent issues.\n */\n readonly issues?: undefined;\n }\n /**\n * The result interface if validation fails.\n */\n export interface FailureResult {\n /**\n * The issues of failed validation.\n */\n readonly issues: ReadonlyArray;\n }\n /**\n * The issue interface of the failure output.\n */\n export interface Issue {\n /**\n * The error message of the issue.\n */\n readonly message: string;\n /**\n * The path of the issue, if any.\n */\n readonly path?: ReadonlyArray | undefined;\n }\n /**\n * The path segment interface of the issue.\n */\n export interface PathSegment {\n /**\n * The key representing a path segment.\n */\n readonly key: PropertyKey;\n }\n /**\n * The Standard Schema types interface.\n */\n export interface Types {\n /**\n * The input type of the schema.\n */\n readonly input: Input;\n /**\n * The output type of the schema.\n */\n readonly output: Output;\n }\n /**\n * Infers the input type of a Standard Schema.\n */\n export type InferInput = NonNullable[\"input\"];\n /**\n * Infers the output type of a Standard Schema.\n */\n export type InferOutput = NonNullable[\"output\"];\n export { };\n}\n\ntype ArkErrorResult = ArkError | ArkErrors;\ndeclare class ArkError extends CastableBase> {\n readonly [arkKind] = \"error\";\n path: ReadonlyPath;\n data: Prerequisite;\n private nodeConfig;\n protected input: ArkErrorContextInput;\n protected ctx: Traversal;\n constructor(input: ArkErrorContextInput, ctx: Traversal);\n transform(f: (input: ArkErrorContextInput) => ArkErrorContextInput): ArkError;\n hasCode(code: code): this is ArkError;\n get propString(): string;\n get expected(): string;\n get actual(): string;\n get problem(): string;\n get message(): string;\n get flat(): ArkError[];\n toJSON(): JsonObject;\n toString(): string;\n throw(): never;\n}\ndeclare namespace ArkErrors {\n type Handler = (errors: ArkErrors) => returns;\n}\n/**\n * A ReadonlyArray of `ArkError`s returned by a Type on invalid input.\n *\n * Subsequent errors added at an existing path are merged into an\n * ArkError intersection.\n */\ndeclare class ArkErrors extends ReadonlyArray$1 implements StandardSchemaV1.FailureResult {\n readonly [arkKind] = \"errors\";\n protected ctx: Traversal;\n constructor(ctx: Traversal);\n /**\n * Errors by a pathString representing their location.\n */\n byPath: Record;\n /**\n * {@link byPath} flattened so that each value is an array of ArkError instances at that path.\n *\n * ✅ Since \"intersection\" errors will be flattened to their constituent `.errors`,\n * they will never be directly present in this representation.\n */\n get flatByPath(): Record;\n /**\n * {@link byPath} flattened so that each value is an array of problem strings at that path.\n */\n get flatProblemsByPath(): Record;\n /**\n * All pathStrings at which errors are present mapped to the errors occuring\n * at that path or any nested path within it.\n */\n byAncestorPath: Record;\n count: number;\n private mutable;\n /**\n * Throw a TraversalError based on these errors.\n */\n throw(): never;\n /**\n * Converts ArkErrors to TraversalError, a subclass of `Error` suitable for throwing with nice\n * formatting.\n */\n toTraversalError(): TraversalError;\n /**\n * Append an ArkError to this array, ignoring duplicates.\n */\n add(error: ArkError): void;\n transform(f: (e: ArkError) => ArkError): ArkErrors;\n /**\n * Add all errors from an ArkErrors instance, ignoring duplicates and\n * prefixing their paths with that of the current Traversal.\n */\n merge(errors: ArkErrors): void;\n /**\n * A human-readable summary of all errors.\n */\n get summary(): string;\n /**\n * Alias of this ArkErrors instance for StandardSchema compatibility.\n */\n get issues(): this;\n toJSON(): JsonArray;\n toString(): string;\n private _add;\n private addAncestorPaths;\n}\ndeclare class TraversalError extends Error {\n readonly name = \"TraversalError\";\n arkErrors: ArkErrors;\n constructor(errors: ArkErrors);\n}\ninterface DerivableErrorContext {\n expected: string;\n actual: string;\n problem: string;\n message: string;\n data: Prerequisite;\n path: array;\n propString: string;\n}\ntype DerivableErrorContextInput = Partial> & propwiseXor<{\n path?: array;\n}, {\n relativePath?: array;\n prefixPath?: array;\n}>;\ntype ArkErrorCode = {\n [kind in NodeKind]: errorContext extends null ? never : kind;\n}[NodeKind];\ntype ArkErrorContextInputsByCode = {\n [code in ArkErrorCode]: errorContext & DerivableErrorContextInput;\n};\ntype ArkErrorContextInput = merge;\ntype NodeErrorContextInput = ArkErrorContextInputsByCode[code] & {\n meta: NodeMeta;\n};\ntype MessageContext = Omit, \"message\">;\ntype ProblemContext = Omit, \"problem\">;\ntype CustomErrorInput = show<{\n code?: undefined;\n} & DerivableErrorContextInput>;\ntype ArkErrorInput = string | ArkErrorContextInput | CustomErrorInput;\ntype ProblemConfig = string | ProblemWriter;\ntype ProblemWriter = (context: ProblemContext) => string;\ntype MessageConfig = string | MessageWriter;\ntype MessageWriter = (context: MessageContext) => string;\ntype getAssociatedDataForError = code extends NodeKind ? Prerequisite : unknown;\ntype ExpectedConfig = string | ExpectedWriter;\ntype ExpectedWriter = (source: errorContext) => string;\ntype ActualConfig = string | ActualWriter;\ntype ActualWriter = (data: getAssociatedDataForError) => string;\n\ndeclare const makeRootAndArrayPropertiesMutable: (o: o) => makeRootAndArrayPropertiesMutable;\ntype makeRootAndArrayPropertiesMutable = {\n -readonly [k in keyof inner]: inner[k] extends array | undefined ? mutable : inner[k];\n} & unknown;\ntype internalImplementationOf = {\n [k in Exclude]: external[k] extends ((...args: infer args) => unknown) ? (...args: {\n [i in keyof args]: never;\n }) => unknown : unknown;\n};\ntype arkKind = typeof arkKind;\ndeclare const arkKind: \" arkKind\";\ninterface ArkKinds {\n constraint: BaseConstraint;\n root: BaseRoot;\n scope: BaseScope;\n generic: GenericRoot;\n module: InternalModule;\n error: ArkError;\n errors: ArkErrors;\n context: BaseParseContext;\n}\ntype ArkKind = show;\ndeclare const hasArkKind: (value: unknown, kind: kind) => value is ArkKinds[kind];\ndeclare const isNode: (value: unknown) => value is BaseNode;\ntype unwrapDefault = thunkableValue extends Thunk ? returnValue : thunkableValue;\n\ntype GenericParamAst = [name: name, constraint: constraint];\ntype GenericParamDef = name | readonly [name, unknown];\ndeclare const parseGeneric: (paramDefs: array, bodyDef: unknown, $: BaseScope) => GenericRoot;\ntype genericParamNames> = {\n [i in keyof params]: params[i][0];\n};\ntype genericParamConstraints> = {\n [i in keyof params]: params[i][1];\n};\ntype GenericArgResolutions = array> = {\n [i in keyof params as params[i & `${number}`][0]]: BaseRoot;\n};\ndeclare class LazyGenericBody extends Callable<(args: argResolutions) => returns> {\n}\ninterface GenericAst = array, bodyDef = unknown, $ = unknown, arg$ = $> {\n [arkKind]: \"generic\";\n paramsAst: params;\n bodyDef: bodyDef;\n $: $;\n arg$: arg$;\n names: genericParamNames;\n t: this;\n}\ndeclare class GenericRoot = array, bodyDef = unknown> extends Callable<(...args: {\n [i in keyof params]: BaseRoot;\n}) => BaseRoot> {\n readonly [arkKind] = \"generic\";\n readonly paramsAst: params;\n readonly t: GenericAst;\n paramDefs: array;\n bodyDef: bodyDef;\n $: BaseScope;\n arg$: BaseScope;\n baseInstantiation: BaseRoot;\n hkt: Hkt.constructor | null;\n description: string;\n constructor(paramDefs: array, bodyDef: bodyDef, $: BaseScope, arg$: BaseScope, hkt: Hkt.constructor | null);\n defIsLazy(): this is GenericRoot;\n protected cacheGetter(name: name, value: this[name]): this[name];\n get json(): JsonStructure;\n get params(): {\n [i in keyof params]: [params[i][0], BaseRoot];\n };\n get names(): genericParamNames;\n get constraints(): {\n [i in keyof params]: BaseRoot;\n };\n get internal(): this;\n get referencesById(): Record;\n get references(): BaseNode[];\n}\ntype genericParamSchemasToAst = {\n [i in keyof schemas]: schemas[i] extends GenericParamDef ? [\n name,\n unknown\n ] : never;\n};\ntype genericHktToConstraints Hkt> = InstanceType[\"constraints\"];\ntype GenericRootParser = (...params: paramsDef) => GenericRootBodyParser>;\ntype GenericRootBodyParser> = {\n (body: RootSchema): GenericRoot;\n (instantiateDef: LazyGenericBody>, hkt: hkt): GenericRoot<{\n [i in keyof params]: [params[i][0], genericHktToConstraints[i]];\n }, InstanceType>;\n};\ndeclare const writeUnsatisfiedParameterConstraintMessage: (name: name, constraint: constraint, arg: arg) => writeUnsatisfiedParameterConstraintMessage;\ntype writeUnsatisfiedParameterConstraintMessage = `${name} must be assignable to ${constraint} (was ${arg})`;\n\ntype ListableJsonSchema = listable;\ntype JsonSchemaOrBoolean = listable;\ntype JsonSchema = JsonSchema.NonBooleanBranch;\ndeclare namespace JsonSchema {\n type TypeName = \"string\" | \"integer\" | \"number\" | \"object\" | \"array\" | \"boolean\" | \"null\";\n /**\n * a subset of JSON Schema's annotations, see:\n * https://json-schema.org/understanding-json-schema/reference/annotations\n **/\n interface Meta extends UniversalMeta {\n $schema?: string;\n $defs?: Record;\n }\n type Format = autocomplete<\"date-time\" | \"date\" | \"time\" | \"email\" | \"ipv4\" | \"ipv6\" | \"uri\" | \"uuid\" | \"regex\">;\n /**\n * doesn't include root-only keys like $schema\n */\n interface UniversalMeta {\n title?: string;\n description?: string;\n format?: Format;\n deprecated?: true;\n default?: t;\n examples?: readonly t[];\n }\n type Composition = Union | OneOf | Intersection | Not;\n type NonBooleanBranch = Constrainable | Const | Composition | Enum | String | Numeric | Object | Array | Ref;\n type Branch = boolean | JsonSchema;\n type RefString = `#/$defs/${string}`;\n interface Ref extends Meta {\n $ref: RefString;\n type?: never;\n }\n interface Constrainable extends Meta {\n type?: listable;\n }\n interface Intersection extends Meta {\n allOf: readonly JsonSchema[];\n }\n interface Not extends Meta {\n not: JsonSchema;\n }\n interface OneOf extends Meta {\n oneOf: readonly JsonSchema[];\n }\n interface Union extends Meta {\n anyOf: readonly JsonSchema[];\n }\n interface Const extends Meta {\n const: unknown;\n }\n interface Enum extends Meta {\n enum: array;\n }\n interface String extends Meta {\n type: \"string\";\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n format?: string;\n }\n interface Numeric extends Meta {\n type: \"number\" | \"integer\";\n multipleOf?: number;\n minimum?: number;\n exclusiveMinimum?: number;\n maximum?: number;\n exclusiveMaximum?: number;\n }\n interface Object extends Meta {\n type: \"object\";\n properties?: Record;\n required?: string[];\n patternProperties?: Record;\n additionalProperties?: JsonSchemaOrBoolean;\n maxProperties?: number;\n minProperties?: number;\n propertyNames?: String;\n }\n interface Array extends Meta {\n type: \"array\";\n additionalItems?: JsonSchemaOrBoolean;\n contains?: JsonSchemaOrBoolean;\n uniqueItems?: boolean;\n minItems?: number;\n maxItems?: number;\n items?: JsonSchemaOrBoolean;\n prefixItems?: readonly Branch[];\n }\n type LengthBoundable = String | Array;\n type Structure = Object | Array;\n}\n\ndeclare class ToJsonSchemaError extends Error {\n readonly name = \"ToJsonSchemaError\";\n readonly code: code;\n readonly context: ToJsonSchema.ContextByCode[code];\n constructor(code: code, context: ToJsonSchema.ContextByCode[code]);\n hasCode(code: code): this is ToJsonSchemaError;\n}\ndeclare const ToJsonSchema: {\n Error: typeof ToJsonSchemaError;\n throw: (code: keyof ToJsonSchema.ContextByCode, context: ToJsonSchema.MorphContext | ToJsonSchema.UnitContext | ToJsonSchema.ProtoContext | ToJsonSchema.DomainContext | ToJsonSchema.PredicateContext | ToJsonSchema.DateContext | ToJsonSchema.ArrayObjectContext | ToJsonSchema.ArrayPostfixContext | ToJsonSchema.DefaultValueContext | ToJsonSchema.PatternIntersectionContext | ToJsonSchema.SymbolKeyContext) => never;\n throwInternalOperandError: (kind: ConstraintKind, schema: JsonSchema) => never;\n defaultConfig: ToJsonSchema.Context;\n};\ndeclare namespace ToJsonSchema {\n type Unjsonifiable = object | symbol | bigint | undefined;\n type Error = InstanceType;\n interface BaseContext {\n code: code;\n base: base;\n }\n interface ArrayObjectContext extends BaseContext<\"arrayObject\", JsonSchema.Array> {\n object: JsonSchema.Object;\n }\n interface ArrayPostfixContext extends BaseContext<\"arrayPostfix\", VariadicArraySchema> {\n elements: readonly JsonSchema[];\n }\n interface DefaultValueContext extends BaseContext<\"defaultValue\", JsonSchema> {\n value: Unjsonifiable;\n }\n interface DomainContext extends BaseContext<\"domain\", JsonSchema> {\n domain: satisfy;\n }\n interface MorphContext extends BaseContext<\"morph\", JsonSchema> {\n out: JsonSchema | null;\n }\n interface PatternIntersectionContext extends BaseContext<\"patternIntersection\", StringSchemaWithPattern> {\n pattern: string;\n }\n interface PredicateContext extends BaseContext<\"predicate\", JsonSchema> {\n predicate: Predicate;\n }\n interface ProtoContext extends BaseContext<\"proto\", JsonSchema> {\n proto: Constructor;\n }\n type SymbolKeyContext = IndexSymbolKeyContext | RequiredSymbolKeyContext | OptionalSymbolKeyContext;\n interface IndexSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: null;\n value: JsonSchema;\n optional: false;\n }\n interface RequiredSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: symbol;\n value: JsonSchema;\n optional: false;\n }\n interface OptionalSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: symbol;\n value: JsonSchema;\n optional: true;\n default?: Json;\n }\n interface UnitContext extends BaseContext<\"unit\", JsonSchema> {\n unit: Unjsonifiable;\n }\n interface DateContext extends BaseContext<\"date\", JsonSchema> {\n before?: Date;\n after?: Date;\n }\n interface ContextByCode {\n arrayObject: ArrayObjectContext;\n arrayPostfix: ArrayPostfixContext;\n defaultValue: DefaultValueContext;\n domain: DomainContext;\n morph: MorphContext;\n patternIntersection: PatternIntersectionContext;\n predicate: PredicateContext;\n proto: ProtoContext;\n symbolKey: SymbolKeyContext;\n unit: UnitContext;\n date: DateContext;\n }\n type Code = keyof ContextByCode;\n type FallbackContext = ContextByCode[Code];\n type HandlerByCode = satisfy<{\n [code in Code]: (ctx: ContextByCode[code]) => unknown;\n }, {\n arrayObject: (ctx: ArrayObjectContext) => JsonSchema.Structure;\n arrayPostfix: (ctx: ArrayPostfixContext) => VariadicArraySchema;\n defaultValue: (ctx: DefaultValueContext) => JsonSchema;\n domain: (ctx: DomainContext) => JsonSchema;\n morph: (ctx: MorphContext) => JsonSchema;\n patternIntersection: (ctx: PatternIntersectionContext) => JsonSchema.String;\n predicate: (ctx: PredicateContext) => JsonSchema;\n proto: (ctx: ProtoContext) => JsonSchema;\n symbolKey: (ctx: SymbolKeyContext) => JsonSchema.Object;\n unit: (ctx: UnitContext) => JsonSchema;\n date: (ctx: DateContext) => JsonSchema;\n }>;\n type VariadicArraySchema = requireKeys;\n type StringSchemaWithPattern = requireKeys;\n type UniversalFallback = (ctx: FallbackContext) => JsonSchema;\n interface FallbackObject extends Partial {\n default?: UniversalFallback;\n }\n type FallbackOption = UniversalFallback | FallbackObject;\n interface Options {\n /** value to assign to the generated $schema key\n *\n * - set to `null` to omit the `$schema` key\n * - does not affect the contents of the generated schema\n *\n * @default \"https://json-schema.org/draft/2020-12/schema\"\n */\n dialect?: string | null;\n useRefs?: boolean;\n fallback?: FallbackOption;\n }\n interface Context extends Required {\n fallback: HandlerByCode;\n }\n}\n\ndeclare class AliasNode extends BaseRoot {\n readonly expression: string;\n readonly structure: undefined;\n get resolution(): BaseRoot;\n protected _resolve(): BaseRoot;\n get resolutionId(): NodeId;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare namespace Alias {\n type Schema = `$${alias}` | NormalizedSchema;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly reference: alias;\n readonly resolve?: () => BaseRoot;\n }\n interface Inner {\n readonly reference: alias;\n readonly resolve?: () => BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"alias\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n }> {\n }\n type Node = AliasNode;\n}\ndeclare const Alias: {\n implementation: nodeImplementationOf;\n Node: typeof AliasNode;\n};\n\ndeclare const registryName: string;\ndeclare const $ark: ArkSchemaRegistry;\ndeclare const reference: (name: string) => RegisteredReference;\ndeclare const registeredReference: (value: object | symbol) => RegisteredReference;\ntype RegisteredReference = `$ark${\"\" | NonNegativeIntegerLiteral}.${to}`;\n\ntype InternalResolutions = Record;\ntype exportedNameOf<$> = Exclude;\ntype resolvableReferenceIn<$> = {\n [k in keyof $]: k extends string ? k extends PrivateDeclaration ? alias : k extends noSuggest | \"root\" ? never : k : never;\n}[keyof $];\ntype resolveReference, $> = reference extends keyof $ ? $[reference] : $[`#${reference}` & keyof $];\ntype flatResolutionsOf<$> = show extends infer k ? k extends keyof $ & string ? resolutionsOfReference : unknown : unknown>>;\ntype resolutionsOfReference = [\n v\n] extends [{\n [arkKind]: \"module\";\n}] ? [\n v\n] extends [anyOrNever] ? {\n [_ in k]: v;\n} : prefixKeys, k> & {\n [innerKey in keyof v as innerKey extends \"root\" ? k : never]: v[innerKey];\n} : {\n [_ in k]: v;\n};\ntype prefixKeys = {\n [k in keyof o & string as `${prefix}.${k}`]: o[k];\n} & unknown;\ntype PrivateDeclaration = `#${key}`;\ntype InternalResolution = BaseRoot | GenericRoot | InternalModule;\ntype toInternalScope<$> = BaseScope<{\n [k in keyof $]: $[k] extends {\n [arkKind]: infer kind;\n } ? [\n $[k]\n ] extends [anyOrNever] ? BaseRoot : kind extends \"generic\" ? GenericRoot : kind extends \"module\" ? InternalModule : never : BaseRoot;\n}>;\ntype CachedResolution = NodeId | BaseRoot | GenericRoot;\ndeclare const writeDuplicateAliasError: (alias: alias) => writeDuplicateAliasError;\ntype writeDuplicateAliasError = `#${alias} duplicates public alias ${alias}`;\ntype AliasDefEntry = [name: string, defValue: unknown];\ntype GlobalOnlyConfigOptionName = satisfy;\ninterface ScopeOnlyConfigOptions {\n name?: string;\n prereducedAliases?: boolean;\n}\ninterface ArkSchemaScopeConfig extends Omit, ScopeOnlyConfigOptions {\n}\ninterface ResolvedScopeConfig extends ResolvedConfig, ScopeOnlyConfigOptions {\n}\ntype PrecompiledReferences = {\n [k: `${string}Allows`]: TraverseAllows;\n [k: `${string}Apply`]: TraverseApply;\n [k: `${string}Optimistic`]: (data: unknown) => unknown;\n};\ndeclare abstract class BaseScope<$ extends {} = {}> {\n readonly config: ArkSchemaScopeConfig;\n readonly resolvedConfig: ResolvedScopeConfig;\n readonly name: string;\n get [arkKind](): \"scope\";\n readonly referencesById: {\n [id: string]: BaseNode;\n };\n references: readonly BaseNode[];\n readonly resolutions: {\n [alias: string]: CachedResolution | undefined;\n };\n exportedNames: string[];\n readonly aliases: Record;\n protected resolved: boolean;\n readonly nodesByHash: Record;\n readonly intrinsic: Omit;\n constructor(\n /** The set of names defined at the root-level of the scope mapped to their\n * corresponding definitions.**/\n def: Record, config?: ArkSchemaScopeConfig);\n protected cacheGetter(name: name, value: this[name]): this[name];\n get internal(): this;\n private _json;\n get json(): JsonStructure;\n defineSchema(def: def): def;\n generic: GenericRootParser;\n units: (values: array, opts?: BaseParseOptions) => BaseRoot;\n protected lazyResolutions: Alias.Node[];\n lazilyResolve(resolve: () => BaseRoot, syntheticAlias?: string): Alias.Node;\n schema: InternalSchemaParser;\n parseSchema: InternalSchemaParser;\n protected preparseNode(kinds: NodeKind | listable, schema: unknown, opts: BaseParseOptions): BaseNode | NodeParseContextInput;\n bindReference(reference: reference): reference;\n resolveRoot(name: string): BaseRoot;\n maybeResolveRoot(name: string): BaseRoot | undefined;\n /** If name is a valid reference to a submodule alias, return its resolution */\n protected maybeResolveSubalias(name: string): BaseRoot | GenericRoot | undefined;\n get ambient(): InternalModule;\n maybeResolve(name: string): Exclude | undefined;\n protected createParseContext(input: input): input & AttachedParseContext;\n traversal(root: unknown): Traversal;\n import(): SchemaModule<{\n [k in exportedNameOf<$> as PrivateDeclaration]: $[k];\n }>;\n import[]>(...names: names): SchemaModule<{\n [k in names[number] as PrivateDeclaration]: $[k];\n } & unknown>;\n precompilation: string | undefined;\n private _exportedResolutions;\n private _exports;\n export(): SchemaModule<{\n [k in exportedNameOf<$>]: $[k];\n }>;\n export[]>(...names: names): SchemaModule<{\n [k in names[number]]: $[k];\n } & unknown>;\n resolve>(name: name): instantiateRoot<$[name]>;\n node: , prereduced extends boolean = false>(kinds: kinds, nodeSchema: NodeSchema>, opts?: BaseParseOptions) => nodeOfKind : reducibleKindOf>>;\n parse: (def: unknown, opts?: BaseParseOptions) => BaseRoot;\n parseDefinition(def: unknown, opts?: BaseParseOptions): BaseRoot;\n finalize(node: node): node;\n protected abstract preparseOwnDefinitionFormat(def: unknown, opts: BaseParseOptions): BaseRoot | BaseParseContextInput;\n abstract parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot;\n protected abstract preparseOwnAliasEntry(k: string, v: unknown): AliasDefEntry;\n protected abstract normalizeRootScopeValue(resolution: unknown): unknown;\n}\ndeclare class SchemaScope<$ extends {} = {}> extends BaseScope<$> {\n parseOwnDefinitionFormat(def: unknown, ctx: NodeParseContext): BaseRoot;\n protected preparseOwnDefinitionFormat(schema: RootSchema, opts: BaseParseOptions): BaseRoot | NodeParseContextInput;\n protected preparseOwnAliasEntry(k: string, v: unknown): AliasDefEntry;\n protected normalizeRootScopeValue(v: unknown): unknown;\n}\ntype instantiateAliases = {\n [k in keyof aliases]: aliases[k] extends InternalResolution ? aliases[k] : BaseRoot;\n} & unknown;\ntype SchemaScopeParser = (aliases: {\n [k in keyof aliases]: conform;\n}, config?: ArkSchemaScopeConfig) => BaseScope>;\ndeclare const schemaScope: SchemaScopeParser;\ntype InternalSchemaParser = (schema: RootSchema, opts?: BaseParseOptions) => BaseRoot;\ndeclare const rootSchemaScope: SchemaScope;\ndeclare const parseAsSchema: (def: unknown, opts?: BaseParseOptions) => BaseRoot | ParseError;\ntype RootExportCache = Record;\ndeclare const writeUnresolvableMessage: (token: token) => writeUnresolvableMessage;\ntype writeUnresolvableMessage = `'${token}' is unresolvable`;\ndeclare const writeNonSubmoduleDotMessage: (name: name) => writeNonSubmoduleDotMessage;\ntype writeNonSubmoduleDotMessage = `'${name}' must reference a module to be accessed using dot syntax`;\ndeclare const writeMissingSubmoduleAccessMessage: (name: name) => writeMissingSubmoduleAccessMessage;\ntype writeMissingSubmoduleAccessMessage = `Reference to submodule '${name}' must specify an alias`;\ndeclare const rootSchema: BaseScope[\"schema\"];\ndeclare const node: BaseScope[\"node\"];\ndeclare const defineSchema: BaseScope[\"defineSchema\"];\ndeclare const genericNode: BaseScope[\"generic\"];\n\ndeclare class IndexNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n expression: string;\n flatRefs: FlatRef>[];\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n compile(): void;\n}\ndeclare namespace Index {\n type KeyKind = Exclude;\n type KeyNode = nodeOfKind;\n interface Schema extends BaseNormalizedSchema {\n readonly signature: RootSchema;\n readonly value: RootSchema;\n }\n interface Inner {\n readonly signature: KeyNode;\n readonly value: BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"index\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n }> {\n }\n type Node = IndexNode;\n}\ndeclare const Index: {\n implementation: nodeImplementationOf;\n Node: typeof IndexNode;\n};\ndeclare const writeEnumerableIndexBranches: (keys: string[]) => string;\ndeclare const writeInvalidPropertyKeyMessage: (indexSchema: indexSchema) => writeInvalidPropertyKeyMessage;\ntype writeInvalidPropertyKeyMessage = `Indexed key definition '${indexSchema}' must be a string or symbol`;\n\ndeclare class RequiredNode extends BaseProp<\"required\"> {\n expression: string;\n errorContext: NodeErrorContextInput<\"required\">;\n compiledErrorContext: string;\n}\ndeclare namespace Required$1 {\n interface ErrorContext extends BaseErrorContext<\"required\"> {\n missingValueDescription: string;\n }\n interface Schema extends Prop.Schema {\n }\n interface Inner extends Prop.Inner {\n }\n type Declaration = declareNode & {\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n errorContext: ErrorContext;\n }>;\n type Node = RequiredNode;\n}\ndeclare const Required$1: {\n implementation: nodeImplementationOf<{\n reducibleTo: \"required\";\n kind: \"required\";\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n schema: Required$1.Schema;\n normalizedSchema: Required$1.Schema;\n inner: Required$1.Inner;\n errorContext: Required$1.ErrorContext;\n }>;\n Node: typeof RequiredNode;\n};\n\ndeclare namespace Prop {\n type Kind = \"required\" | \"optional\";\n type Node = nodeOfKind;\n interface Schema extends BaseNormalizedSchema {\n readonly key: Key;\n readonly value: RootSchema;\n }\n interface Inner {\n readonly key: Key;\n readonly value: BaseRoot;\n }\n interface Declaration {\n kind: kind;\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n }\n}\ndeclare const intersectProps: (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => nodeOfKind | Disjoint | null;\ndeclare abstract class BaseProp extends BaseConstraint {\n required: boolean;\n optional: boolean;\n impliedBasis: BaseRoot;\n serializedKey: string;\n compiledKey: string;\n flatRefs: FlatRef[];\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n hasDefault(): this is Optional.Node.withDefault;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare const writeDefaultIntersectionMessage: (lValue: unknown, rValue: unknown) => string;\n\ndeclare class OptionalNode extends BaseProp<\"optional\"> {\n constructor(...args: ConstructorParameters);\n get outProp(): Prop.Node;\n expression: string;\n defaultValueMorph: Morph | undefined;\n defaultValueMorphRef: string | undefined;\n}\ndeclare namespace Optional {\n interface Schema extends Prop.Schema {\n default?: unknown;\n }\n interface Inner extends Prop.Inner {\n default?: unknown;\n }\n type Declaration = declareNode & {\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n }>;\n type Node = OptionalNode;\n namespace Node {\n type withDefault = requireKeys;\n }\n}\ndeclare const Optional: {\n implementation: nodeImplementationOf<{\n reducibleTo: \"optional\";\n errorContext: null;\n kind: \"optional\";\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n schema: Optional.Schema;\n normalizedSchema: Optional.Schema;\n inner: Optional.Inner;\n }>;\n Node: typeof OptionalNode;\n};\ndeclare const computeDefaultValueMorph: (key: PropertyKey, value: BaseRoot, defaultInput: unknown) => Morph;\ndeclare const assertDefaultValueAssignability: (node: BaseRoot, value: unknown, key: PropertyKey | null) => unknown;\ntype writeUnassignableDefaultValueMessage = `Default value ${defaultValue} must be assignable to ${baseDef}`;\ndeclare const writeNonPrimitiveNonFunctionDefaultValueMessage: (key: PropertyKey | null) => string;\n\ninterface BaseRangeDeclaration extends BaseNodeDeclaration {\n kind: RangeKind;\n inner: BaseRangeInner;\n normalizedSchema: UnknownExpandedRangeSchema;\n}\ndeclare abstract class BaseRange extends InternalPrimitiveConstraint {\n readonly exclusive?: true;\n readonly boundOperandKind: OperandKindsByBoundKind[d[\"kind\"]];\n readonly compiledActual: string;\n readonly comparator: RelativeComparator;\n readonly numericLimit: number;\n readonly expression: string;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly stringLimit: string;\n readonly limitKind: LimitKind;\n isStricterThan(r: nodeOfKind>): boolean;\n overlapsRange(r: nodeOfKind>): boolean;\n overlapIsUnit(r: nodeOfKind>): boolean;\n}\ninterface BaseRangeInner {\n readonly rule: LimitValue;\n}\ntype LimitValue = Date | number;\ntype LimitSchemaValue = Date | number | string;\ntype LimitInnerValue = kind extends \"before\" | \"after\" ? Date : number;\ninterface UnknownExpandedRangeSchema extends BaseNormalizedSchema {\n readonly rule: LimitSchemaValue;\n readonly exclusive?: boolean;\n}\ninterface UnknownNormalizedRangeSchema extends BaseNormalizedSchema {\n readonly rule: LimitSchemaValue;\n}\ntype UnknownRangeSchema = LimitSchemaValue | UnknownExpandedRangeSchema;\ninterface ExclusiveExpandedDateRangeSchema extends BaseNormalizedSchema {\n rule: LimitSchemaValue;\n exclusive?: true;\n}\ntype ExclusiveDateRangeSchema = LimitSchemaValue | ExclusiveExpandedDateRangeSchema;\ninterface InclusiveExpandedDateRangeSchema extends BaseNormalizedSchema {\n rule: LimitSchemaValue;\n exclusive?: false;\n}\ntype InclusiveDateRangeSchema = LimitSchemaValue | InclusiveExpandedDateRangeSchema;\ninterface ExclusiveNormalizedNumericRangeSchema extends BaseNormalizedSchema {\n rule: number;\n exclusive?: true;\n}\ntype ExclusiveNumericRangeSchema = number | ExclusiveNormalizedNumericRangeSchema;\ninterface InclusiveNormalizedNumericRangeSchema extends BaseNormalizedSchema {\n rule: number;\n exclusive?: false;\n}\ntype InclusiveNumericRangeSchema = number | InclusiveNormalizedNumericRangeSchema;\ntype LimitKind = \"lower\" | \"upper\";\ntype RelativeComparator = {\n lower: \">\" | \">=\";\n upper: \"<\" | \"<=\";\n}[kind];\ndeclare const boundKindPairsByLower: BoundKindPairsByLower;\ntype BoundKindPairsByLower = {\n min: \"max\";\n minLength: \"maxLength\";\n after: \"before\";\n};\ntype BoundKindPairsByUpper = {\n max: \"min\";\n maxLength: \"minLength\";\n before: \"after\";\n};\ntype pairedRangeKind = kind extends LowerBoundKind ? BoundKindPairsByLower[kind] : BoundKindPairsByUpper[kind & UpperBoundKind];\ntype LowerBoundKind = keyof typeof boundKindPairsByLower;\ntype LowerNode = nodeOfKind;\ntype UpperBoundKind = propValueOf;\ntype UpperNode = nodeOfKind;\ntype NumericallyBoundable = string | number | array;\ntype Boundable = NumericallyBoundable | Date;\ndeclare const parseExclusiveKey: keySchemaDefinitions>[\"exclusive\"];\ndeclare const createLengthSchemaNormalizer: (kind: kind) => (schema: NodeSchema) => NormalizedSchema;\ndeclare const createDateSchemaNormalizer: (kind: kind) => (schema: NodeSchema) => NormalizedSchema;\ndeclare const parseDateLimit: (limit: LimitSchemaValue) => Date;\ntype LengthBoundKind = \"minLength\" | \"maxLength\" | \"exactLength\";\ndeclare const writeInvalidLengthBoundMessage: (kind: LengthBoundKind, limit: number) => string;\ndeclare const createLengthRuleParser: (kind: LengthBoundKind) => (limit: number) => number | undefined;\ntype OperandKindsByBoundKind = satisfy, {\n min: \"value\";\n max: \"value\";\n minLength: \"length\";\n maxLength: \"length\";\n after: \"date\";\n before: \"date\";\n}>;\ndeclare const compileComparator: (kind: RangeKind, exclusive: boolean | undefined) => RelativeComparator;\ntype BoundOperandKind = \"value\" | \"length\" | \"date\";\ntype LengthBoundableData = string | array;\ntype DateRangeKind = \"before\" | \"after\";\ndeclare const dateLimitToString: (limit: LimitSchemaValue) => string;\ndeclare const writeUnboundableMessage: (root: root) => writeUnboundableMessage;\ntype writeUnboundableMessage = `Bounded expression ${root} must be exactly one of number, string, Array, or Date`;\n\ndeclare class ExactLengthNode extends InternalPrimitiveConstraint {\n traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n readonly expression: string;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace ExactLength {\n interface Inner {\n readonly rule: number;\n }\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"exactLength\">, Inner {\n }\n type Declaration = declareNode<{\n kind: \"exactLength\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n errorContext: ErrorContext;\n }>;\n type Node = ExactLengthNode;\n}\ndeclare const ExactLength: {\n implementation: nodeImplementationOf<{\n intersectionIsOpen: false;\n childKind: never;\n reducibleTo: \"exactLength\";\n kind: \"exactLength\";\n schema: ExactLength.Schema;\n normalizedSchema: ExactLength.NormalizedSchema;\n inner: ExactLength.Inner;\n prerequisite: LengthBoundableData;\n errorContext: ExactLength.ErrorContext;\n }>;\n Node: typeof ExactLengthNode;\n};\n\ndeclare class MaxLengthNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace MaxLength {\n interface Inner extends BaseRangeInner {\n rule: number;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: number;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = ExpandedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"maxLength\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"maxLength\";\n schema: Schema;\n reducibleTo: \"exactLength\";\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MaxLengthNode;\n}\ndeclare const MaxLength: {\n implementation: nodeImplementationOf;\n Node: typeof MaxLengthNode;\n};\n\ndeclare class MinLengthNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace MinLength {\n interface Inner extends BaseRangeInner {\n rule: number;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: number;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = ExpandedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"minLength\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"minLength\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n reducibleTo: \"intersection\";\n errorContext: ErrorContext;\n }> {\n }\n type Node = MinLengthNode;\n}\ndeclare const MinLength: {\n implementation: nodeImplementationOf;\n Node: typeof MinLengthNode;\n};\n\ndeclare class SequenceNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n tuple: SequenceTuple;\n prefixLength: number;\n defaultablesLength: number;\n optionalsLength: number;\n postfixLength: number;\n defaultablesAndOptionals: BaseRoot[];\n prevariadic: array;\n variadicOrPostfix: array;\n flatRefs: FlatRef[];\n protected addFlatRefs(): FlatRef[];\n isVariadicOnly: boolean;\n minVariadicLength: number;\n minLength: number;\n minLengthNode: MinLengthNode | null;\n maxLength: number | null;\n maxLengthNode: MaxLengthNode | ExactLengthNode | null;\n impliedSiblings: array;\n defaultValueMorphs: Morph[];\n defaultValueMorphsReference: `$ark.${string}` | `$ark0.${string}` | `$ark${`1${string}` & `${bigint}`}.${string}` | `$ark${`4${string}` & `${bigint}`}.${string}` | `$ark${`2${string}` & `${bigint}`}.${string}` | `$ark${`3${string}` & `${bigint}`}.${string}` | `$ark${`5${string}` & `${bigint}`}.${string}` | `$ark${`6${string}` & `${bigint}`}.${string}` | `$ark${`7${string}` & `${bigint}`}.${string}` | `$ark${`8${string}` & `${bigint}`}.${string}` | `$ark${`9${string}` & `${bigint}`}.${string}` | undefined;\n protected elementAtIndex(data: array, index: number): SequenceElement;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n get element(): BaseRoot;\n compile(js: NodeCompiler): void;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n expression: string;\n reduceJsonSchema(schema: JsonSchema.Array, ctx: ToJsonSchema.Context): JsonSchema.Array;\n}\ndeclare namespace Sequence {\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly prefix?: array;\n readonly defaultables?: array;\n readonly optionals?: array;\n readonly variadic?: RootSchema;\n readonly minVariadicLength?: number;\n readonly postfix?: array;\n }\n type Schema = NormalizedSchema | RootSchema;\n type DefaultableSchema = [schema: RootSchema, defaultValue: unknown];\n type DefaultableElement = [node: BaseRoot, defaultValue: unknown];\n interface Inner {\n readonly prefix?: array;\n readonly defaultables?: array;\n readonly optionals?: array;\n readonly variadic?: BaseRoot;\n readonly minVariadicLength?: number;\n readonly postfix?: array;\n }\n interface Declaration extends declareNode<{\n kind: \"sequence\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: array;\n reducibleTo: \"sequence\";\n childKind: RootKind;\n }> {\n }\n type Node = SequenceNode;\n}\ndeclare const Sequence: {\n implementation: nodeImplementationOf;\n Node: typeof SequenceNode;\n};\ndeclare const postfixAfterOptionalOrDefaultableMessage = \"A postfix required element cannot follow an optional or defaultable element\";\ntype postfixAfterOptionalOrDefaultableMessage = typeof postfixAfterOptionalOrDefaultableMessage;\ndeclare const postfixWithoutVariadicMessage = \"A postfix element requires a variadic element\";\ntype postfixWithoutVariadicMessage = typeof postfixWithoutVariadicMessage;\ntype SequenceElement = PrevariadicSequenceElement | VariadicSequenceElement | PostfixSequenceElement;\ntype SequenceElementKind = satisfy;\ntype PrevariadicSequenceElement = PrefixSequenceElement | DefaultableSequenceElement | OptionalSequenceElement;\ntype PrefixSequenceElement = {\n kind: \"prefix\";\n node: BaseRoot;\n};\ntype OptionalSequenceElement = {\n kind: \"optionals\";\n node: BaseRoot;\n};\ntype PostfixSequenceElement = {\n kind: \"postfix\";\n node: BaseRoot;\n};\ntype VariadicSequenceElement = {\n kind: \"variadic\";\n node: BaseRoot;\n};\ntype DefaultableSequenceElement = {\n kind: \"defaultables\";\n node: BaseRoot;\n default: unknown;\n};\ntype SequenceTuple = array;\n\n/**\n * - `\"ignore\"` (default) - allow and preserve extra properties\n * - `\"reject\"` - disallow extra properties\n * - `\"delete\"` - clone and remove extra properties from output\n */\ntype UndeclaredKeyBehavior = \"ignore\" | UndeclaredKeyHandling;\ntype UndeclaredKeyHandling = \"reject\" | \"delete\";\ndeclare class StructureNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n impliedSiblings: BaseConstraint[];\n props: array;\n propsByKey: Record;\n propsByKeyReference: RegisteredReference;\n expression: string;\n requiredKeys: Key[];\n optionalKeys: Key[];\n literalKeys: Key[];\n _keyof: BaseRoot | undefined;\n keyof(): BaseRoot;\n map(flatMapProp: PropFlatMapper): StructureNode;\n assertHasKeys(keys: array): void;\n get(indexer: GettableKeyOrNode, ...path: array): BaseRoot;\n pick(...keys: KeyOrKeyNode[]): StructureNode;\n omit(...keys: KeyOrKeyNode[]): StructureNode;\n optionalize(): StructureNode;\n require(): StructureNode;\n merge(r: StructureNode): StructureNode;\n private filterKeys;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n protected _traverse: (traversalKind: TraversalKind, data: object, ctx: InternalTraversal) => boolean;\n get defaultable(): Optional.Node.withDefault[];\n declaresKey: (k: Key) => boolean;\n _compileDeclaresKey(js: NodeCompiler): string;\n get structuralMorph(): Morph | undefined;\n structuralMorphRef: RegisteredReference | undefined;\n compile(js: NodeCompiler): unknown;\n protected compileExhaustiveEntry(js: NodeCompiler): NodeCompiler;\n reduceJsonSchema(schema: JsonSchema.Structure, ctx: ToJsonSchema.Context): JsonSchema.Structure;\n reduceObjectJsonSchema(schema: JsonSchema.Object, ctx: ToJsonSchema.Context): JsonSchema.Object;\n}\ntype PropFlatMapper = (entry: Prop.Node) => listable;\ntype MappedPropInner = BaseMappedPropInner | OptionalMappedPropInner;\ninterface BaseMappedPropInner extends Required$1.Schema {\n kind?: \"required\" | \"optional\";\n}\ninterface OptionalMappedPropInner extends Optional.Schema {\n kind: \"optional\";\n}\ndeclare namespace Structure {\n interface Schema extends BaseNormalizedSchema {\n readonly optional?: readonly Optional.Schema[];\n readonly required?: readonly Required$1.Schema[];\n readonly index?: readonly Index.Schema[];\n readonly sequence?: Sequence.Schema;\n readonly undeclared?: UndeclaredKeyBehavior;\n }\n interface Inner {\n readonly optional?: readonly Optional.Node[];\n readonly required?: readonly Required$1.Node[];\n readonly index?: readonly Index.Node[];\n readonly sequence?: Sequence.Node;\n readonly undeclared?: UndeclaredKeyHandling;\n }\n namespace Inner {\n type mutable = makeRootAndArrayPropertiesMutable;\n }\n interface Declaration extends declareNode<{\n kind: \"structure\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n prerequisite: object;\n childKind: StructuralKind;\n }> {\n }\n type Node = StructureNode;\n}\ndeclare const Structure: {\n implementation: nodeImplementationOf;\n Node: typeof StructureNode;\n};\ndeclare const writeNumberIndexMessage: (indexExpression: string, sequenceExpression: string) => string;\ntype NormalizedIndex = {\n index?: Index.Node;\n required?: Required$1.Node[];\n optional?: Optional.Node[];\n};\n/** extract enumerable named props from an index signature */\ndeclare const normalizeIndex: (signature: BaseRoot, value: BaseRoot, $: BaseScope) => NormalizedIndex;\ndeclare const typeKeyToString: (k: KeyOrKeyNode) => string;\ndeclare const writeInvalidKeysMessage: >(o: o, keys: keys) => string;\n\ndeclare const basisKinds: readonly [\"unit\", \"proto\", \"domain\"];\ntype BasisKind = (typeof basisKinds)[number];\ndeclare const structuralKinds: readonly [\"required\", \"optional\", \"index\", \"sequence\"];\ntype StructuralKind = (typeof structuralKinds)[number];\ntype RangeKind = Exclude;\ntype BoundKind = Exclude;\ndeclare const refinementKinds: readonly [\"pattern\", \"divisor\", \"exactLength\", \"max\", \"min\", \"maxLength\", \"minLength\", \"before\", \"after\"];\ntype RefinementKind = (typeof refinementKinds)[number];\ntype orderedConstraintKinds = [\n ...typeof refinementKinds,\n ...typeof structuralKinds,\n \"structure\",\n \"predicate\"\n];\ndeclare const constraintKinds: orderedConstraintKinds;\ntype ConstraintKind = (typeof constraintKinds)[number];\ndeclare const rootKinds: readonly [\"alias\", \"union\", \"morph\", \"unit\", \"intersection\", \"proto\", \"domain\"];\ntype RootKind = (typeof rootKinds)[number];\ntype NodeKind = RootKind | ConstraintKind;\ntype orderedNodeKinds = [...typeof rootKinds, ...typeof constraintKinds];\ndeclare const nodeKinds: orderedNodeKinds;\ntype OpenNodeKind = {\n [k in NodeKind]: Declaration[\"intersectionIsOpen\"] extends true ? k : never;\n}[NodeKind];\ntype ClosedNodeKind = Exclude;\ntype PrimitiveKind = RefinementKind | BasisKind | \"predicate\";\ntype CompositeKind = Exclude;\ntype OrderedNodeKinds = typeof nodeKinds;\ndeclare const constraintKeys: KeySet;\ndeclare const structureKeys: keySetOf;\ntype RightsByKind = accumulateRightKinds;\ntype kindOrRightOf = kind | kindRightOf;\ntype kindLeftOf = Exclude>;\ntype kindOrLeftOf = kind | kindLeftOf;\ntype accumulateRightKinds = remaining extends (readonly [infer head extends NodeKind, ...infer tail extends NodeKind[]]) ? accumulateRightKinds : result;\ninterface InternalIntersectionOptions {\n pipe: boolean;\n}\ninterface IntersectionContext extends InternalIntersectionOptions {\n $: BaseScope;\n invert: boolean;\n}\ntype ConstraintIntersection> = (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => BaseNode | Disjoint | null;\ntype ConstraintIntersectionMap = show<{\n [_ in kind]: ConstraintIntersection;\n} & {\n [rKind in kindRightOf]?: ConstraintIntersection;\n}>;\ntype RootIntersection> = (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => BaseRoot | Disjoint;\ntype TypeIntersectionMap = {\n [rKind in schemaKindOrRightOf]: RootIntersection;\n};\ntype IntersectionMap = kind extends RootKind ? TypeIntersectionMap : ConstraintIntersectionMap;\ntype UnknownIntersectionMap = {\n [k in NodeKind]?: (l: BaseNode, r: BaseNode, ctx: IntersectionContext) => UnknownIntersectionResult;\n};\ntype UnknownIntersectionResult = BaseNode | Disjoint | null;\ntype PrecedenceByKind = {\n [i in arrayIndexOf as OrderedNodeKinds[i]]: i;\n};\ndeclare const precedenceByKind: PrecedenceByKind;\ndeclare const isNodeKind: (value: unknown) => value is NodeKind;\ndeclare function assertNodeKind(value: BaseNode, kind: kind): asserts value is nodeOfKind;\ntype precedenceOfKind = PrecedenceByKind[kind];\ndeclare const precedenceOfKind: (kind: kind) => precedenceOfKind;\ntype kindRightOf = RightsByKind[kind];\ndeclare const schemaKindsRightOf: (kind: kind) => schemaKindRightOf[];\ndeclare const unionChildKinds: readonly [...(\"intersection\" | \"morph\" | \"unit\" | \"proto\" | \"domain\")[], \"alias\"];\ntype UnionChildKind = (typeof unionChildKinds)[number];\ndeclare const morphChildKinds: readonly [...(\"intersection\" | \"unit\" | \"proto\" | \"domain\")[], \"alias\"];\ntype MorphChildKind = (typeof morphChildKinds)[number];\ntype keySchemaDefinitions = {\n [k in keyRequiringSchemaDefinition]: NodeKeyImplementation;\n};\ntype keyRequiringSchemaDefinition = Exclude;\ndeclare const defaultValueSerializer: (v: unknown) => Json;\ntype NodeKeyImplementation : never> = requireKeys<{\n preserveUndefined?: true;\n child?: boolean | ((value: instantiated) => BaseNode[]);\n serialize?: (schema: instantiated) => Json;\n reduceIo?: (ioKind: \"in\" | \"out\", inner: makeRootAndArrayPropertiesMutable, value: d[\"inner\"][k]) => void;\n parse?: (schema: Exclude, ctx: NodeParseContext) => instantiated | undefined;\n}, (d[\"normalizedSchema\"][k] extends instantiated | undefined ? never : \"parse\") | ([instantiated] extends [listable] ? \"child\" : never)>;\ninterface CommonNodeImplementationInput {\n kind: d[\"kind\"];\n keys: keySchemaDefinitions;\n normalize: (schema: d[\"schema\"], $: BaseScope) => d[\"normalizedSchema\"];\n applyConfig?: (schema: d[\"normalizedSchema\"], config: ResolvedScopeConfig) => d[\"normalizedSchema\"];\n hasAssociatedError: d[\"errorContext\"] extends null ? false : true;\n finalizeInnerJson?: (json: {\n [k in keyof d[\"inner\"]]: Json;\n }) => JsonStructure;\n collapsibleKey?: keyof d[\"inner\"];\n reduce?: (inner: d[\"inner\"], $: BaseScope) => nodeOfKind | Disjoint | undefined;\n obviatesBasisDescription?: d[\"kind\"] extends RefinementKind ? true : never;\n obviatesBasisExpression?: d[\"kind\"] extends RefinementKind ? true : never;\n}\ninterface UnknownNodeImplementation extends CommonNodeImplementationInput {\n defaults: ResolvedUnknownNodeConfig;\n intersectionIsOpen: boolean;\n intersections: UnknownIntersectionMap;\n keys: Record>;\n}\ndeclare const compileObjectLiteral: (ctx: object) => string;\ntype nodeImplementationOf = nodeImplementationInputOf & {\n intersections: IntersectionMap;\n intersectionIsOpen: d[\"intersectionIsOpen\"];\n defaults: Required>;\n};\ntype nodeImplementationInputOf = CommonNodeImplementationInput & {\n intersections: IntersectionMap;\n defaults: nodeSchemaaultsImplementationInputFor;\n} & (d[\"intersectionIsOpen\"] extends true ? {\n intersectionIsOpen: true;\n} : {}) & (d[\"reducibleTo\"] extends d[\"kind\"] ? {} : {\n reduce: {};\n});\ntype nodeSchemaaultsImplementationInputFor = requireKeys, \"description\" | (Inner extends (Omit, keyof BaseErrorContext | \"description\">) ? never : \"expected\" & keyof NodeConfig)>;\ntype DescriptionWriter = (node: nodeOfKind) => string;\ninterface UnknownAttachments {\n readonly kind: NodeKind;\n readonly impl: UnknownNodeImplementation;\n readonly id: NodeId;\n readonly inner: Record;\n readonly innerEntries: readonly Entry[];\n readonly innerJson: object;\n readonly innerHash: string;\n readonly meta: NodeMeta;\n readonly metaJson: object;\n readonly json: object;\n readonly hash: string;\n readonly collapsibleJson: Json;\n readonly children: BaseNode[];\n}\ninterface NarrowedAttachments extends UnknownAttachments {\n kind: d[\"kind\"];\n inner: d[\"inner\"];\n json: JsonStructure;\n innerJson: JsonStructure;\n collapsibleJson: Json;\n children: nodeOfKind[];\n}\ndeclare const implementNode: (_: nodeImplementationInputOf) => nodeImplementationOf;\n\ndeclare abstract class InternalBasis extends BaseRoot {\n abstract compiledCondition: string;\n abstract compiledNegation: string;\n structure: undefined;\n traverseApply: TraverseApply;\n get errorContext(): d[\"errorContext\"];\n get compiledErrorContext(): string;\n compile(js: NodeCompiler): void;\n}\n\ndeclare class DomainNode extends InternalBasis {\n private readonly requiresNaNCheck;\n readonly traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly expression: string;\n get nestableExpression(): string;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema.Constrainable;\n}\ntype Domain = Domain$1;\ndeclare namespace Domain {\n type Enumerable = \"undefined\" | \"null\" | \"boolean\";\n type NonEnumerable = Exclude;\n interface Inner {\n readonly domain: domain;\n readonly numberAllowsNaN?: boolean;\n }\n interface NormalizedSchema extends BaseNormalizedSchema, Inner {\n }\n type Schema = domain | NormalizedSchema;\n interface ErrorContext extends BaseErrorContext<\"domain\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"domain\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = DomainNode;\n}\ndeclare const Domain: {\n implementation: nodeImplementationOf;\n Node: typeof DomainNode;\n writeBadAllowNanMessage: (actual: Exclude) => string;\n};\n\ninterface DisjointEntry {\n kind: kind;\n l: OperandsByDisjointKind[kind];\n r: OperandsByDisjointKind[kind];\n path: Key[];\n optional: boolean;\n}\ntype OperandsByDisjointKind = {\n domain: nodeOfKind<\"domain\"> | Domain.Enumerable;\n unit: nodeOfKind<\"unit\">;\n proto: nodeOfKind<\"proto\">;\n presence: BaseRoot;\n range: nodeOfKind;\n assignability: BaseNode;\n union: readonly BaseRoot[];\n};\ntype DisjointEntryContext = {\n path?: Key[];\n optional?: true;\n};\ndeclare class Disjoint extends Array {\n static init(kind: kind, l: OperandsByDisjointKind[kind], r: OperandsByDisjointKind[kind], ctx?: DisjointEntryContext): Disjoint;\n add(kind: kind, l: OperandsByDisjointKind[kind], r: OperandsByDisjointKind[kind], ctx?: DisjointEntryContext): Disjoint;\n get summary(): string;\n describeReasons(): string;\n throw(): never;\n invert(): Disjoint;\n withPrefixKey(key: PropertyKey, kind: Prop.Kind): Disjoint;\n toNeverIfDisjoint(): BaseRoot;\n}\ntype DisjointKind = keyof OperandsByDisjointKind;\ndeclare const writeUnsatisfiableExpressionError: (expression: expression) => writeUnsatisfiableExpressionError;\ntype writeUnsatisfiableExpressionError = `${expression} results in an unsatisfiable type`;\n\ntype withMetaPrefixedKeys = {\n [k in keyof o as k extends string ? `meta.${k}` : never]: o[k];\n};\ninterface DefaultArkEnv {\n meta(): {};\n onFail(errors: ArkErrors): ArkErrors;\n}\ninterface NodeMeta extends JsonSchema.UniversalMeta, UnknownErrorConfigs {\n alias?: string;\n onFail?: ArkErrors.Handler;\n}\ndeclare global {\n export interface ArkEnv extends DefaultArkEnv {\n }\n export namespace ArkEnv {\n type meta = show>;\n type onFail = ReturnType;\n }\n}\ntype TypeMeta = Omit;\ndeclare namespace TypeMeta {\n type Collapsible = meta | string;\n type Mapper = (existing: Readonly) => meta;\n type MappableInput = Collapsible | Mapper;\n namespace MappableInput {\n type Internal = MappableInput;\n }\n}\ninterface BaseNormalizedSchema extends withMetaPrefixedKeys {\n readonly meta?: ArkEnv.meta | string;\n}\ninterface DeclarationInput {\n kind: NodeKind;\n schema: unknown;\n normalizedSchema: BaseNormalizedSchema;\n inner: object;\n errorContext?: BaseErrorContext;\n reducibleTo?: NodeKind;\n intersectionIsOpen?: true;\n prerequisite?: unknown;\n childKind?: NodeKind;\n}\ninterface BaseErrorContext {\n readonly description?: string;\n readonly code: kind;\n readonly meta: NodeMeta;\n}\ntype defaultErrorContext = show & d[\"inner\"]>;\ntype declareNode = merge<{\n intersectionIsOpen: false;\n prerequisite: prerequisiteOf;\n childKind: never;\n reducibleTo: d[\"kind\"];\n errorContext: null;\n}, d>;\ntype prerequisiteOf = \"prerequisite\" extends keyof d ? d[\"prerequisite\"] : unknown;\ntype attachmentsOf = NarrowedAttachments & attachedInner;\ntype attachedInner = \"intersection\" & d[\"kind\"] extends never ? d[\"inner\"] : {};\ninterface BaseNodeDeclaration {\n kind: NodeKind;\n schema: unknown;\n normalizedSchema: BaseNormalizedSchema;\n inner: {};\n reducibleTo: NodeKind;\n prerequisite: any;\n intersectionIsOpen: boolean;\n childKind: NodeKind;\n errorContext: BaseErrorContext | null;\n}\ntype ownIntersectionResult = nodeOfKind> | Disjoint;\n\ndeclare class DivisorNode extends InternalPrimitiveConstraint {\n traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n readonly expression: string;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Divisor {\n interface Inner {\n readonly rule: number;\n }\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"divisor\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"divisor\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = DivisorNode;\n}\ndeclare const Divisor: {\n implementation: nodeImplementationOf;\n Node: typeof DivisorNode;\n};\ndeclare const writeIndivisibleMessage: (t: BaseRoot) => string;\ntype writeIndivisibleMessage = writeInvalidOperandMessage<\"divisor\", actual>;\ndeclare const writeNonIntegerDivisorMessage: (divisor: divisor) => writeNonIntegerDivisorMessage;\ntype writeNonIntegerDivisorMessage = `divisor must be an integer (was ${divisor})`;\n\ndeclare class PatternNode extends InternalPrimitiveConstraint {\n readonly instance: RegExp;\n readonly expression: string;\n traverseAllows: (string: string) => boolean;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n reduceJsonSchema(base: JsonSchema.String, ctx: ToJsonSchema.Context): JsonSchema.String;\n}\ndeclare namespace Pattern {\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: string;\n readonly flags?: string;\n }\n interface Inner {\n readonly rule: string;\n readonly flags?: string;\n }\n type Schema = NormalizedSchema | string | RegExp;\n interface ErrorContext extends BaseErrorContext<\"pattern\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"pattern\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n intersectionIsOpen: true;\n prerequisite: string;\n errorContext: ErrorContext;\n }> {\n }\n type Node = PatternNode;\n}\ndeclare const Pattern: {\n implementation: nodeImplementationOf;\n Node: typeof PatternNode;\n};\n\ndeclare class UnitNode extends InternalBasis {\n compiledValue: JsonPrimitive;\n serializedValue: string;\n compiledCondition: string;\n compiledNegation: string;\n expression: string;\n domain: Domain$1;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n}\ndeclare namespace Unit {\n interface Schema extends BaseNormalizedSchema {\n readonly unit: value;\n }\n interface Inner {\n readonly unit: value;\n }\n interface ErrorContext extends BaseErrorContext<\"unit\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"unit\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = UnitNode;\n}\ndeclare const Unit: {\n implementation: nodeImplementationOf;\n Node: typeof UnitNode;\n};\n\ndeclare class UnionNode extends BaseRoot {\n isBoolean: boolean;\n get branchGroups(): BaseRoot[];\n unitBranches: (MorphNode | UnitNode)[];\n discriminant: Discriminant | null;\n discriminantJson: JsonStructure | null;\n expression: string;\n createBranchedOptimisticRootApply(): BaseNode[\"rootApply\"];\n get shallowMorphs(): array;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n traverseOptimistic: (data: unknown) => unknown;\n compile(js: NodeCompiler): void;\n private compileIndiscriminable;\n get nestableExpression(): string;\n discriminate(): Discriminant | null;\n}\ndeclare namespace Union {\n type ChildKind = UnionChildKind;\n type ChildSchema = NodeSchema;\n type ChildNode = nodeOfKind;\n type Schema = NormalizedSchema | readonly RootSchema[];\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly branches: array;\n readonly ordered?: true;\n }\n interface Inner {\n readonly branches: readonly ChildNode[];\n readonly ordered?: true;\n }\n interface ErrorContext extends BaseErrorContext<\"union\"> {\n errors: readonly ArkError[];\n }\n interface Declaration extends declareNode<{\n kind: \"union\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n reducibleTo: RootKind;\n childKind: UnionChildKind;\n }> {\n }\n type Node = UnionNode;\n}\ndeclare const Union: {\n implementation: nodeImplementationOf;\n Node: typeof UnionNode;\n};\ntype DescribeBranchesOptions = {\n delimiter?: string;\n finalDelimiter?: string;\n};\ndeclare const describeBranches: (descriptions: string[], opts?: DescribeBranchesOptions) => string;\ndeclare const intersectBranches: (l: readonly Union.ChildNode[], r: readonly Union.ChildNode[], ctx: IntersectionContext) => readonly Union.ChildNode[] | Disjoint;\ndeclare const reduceBranches: ({ branches, ordered }: Union.Inner) => readonly Union.ChildNode[];\ntype CaseKey = DiscriminantKind extends kind ? string : DiscriminantKinds[kind] | \"default\";\ntype DiscriminantLocation = {\n path: PropertyKey[];\n optionallyChainedPropString: string;\n kind: kind;\n};\ninterface Discriminant extends DiscriminantLocation {\n cases: DiscriminatedCases;\n}\ntype CaseContext = {\n branchIndices: number[];\n condition: nodeOfKind | Domain.Enumerable;\n};\ntype CaseDiscriminant = nodeOfKind | Domain.Enumerable;\ntype DiscriminatedCases = {\n [caseKey in CaseKey]: BaseRoot | true;\n};\ntype DiscriminantKinds = {\n domain: Domain;\n unit: SerializedPrimitive | RegisteredReference;\n};\ntype DiscriminantKind = show;\ndeclare const pruneDiscriminant: (discriminantBranch: BaseRoot, discriminantCtx: DiscriminantLocation) => BaseRoot | null;\ndeclare const writeIndiscriminableMorphMessage: (lDescription: string, rDescription: string) => string;\ndeclare const writeOrderedIntersectionMessage: (lDescription: string, rDescription: string) => string;\n\ninterface InternalRootDeclaration extends BaseNodeDeclaration {\n kind: RootKind;\n}\ndeclare abstract class BaseRoot<\n/** @ts-ignore cast variance */\nout d extends InternalRootDeclaration = InternalRootDeclaration> extends BaseNode implements StandardSchemaV1 {\n readonly [arkKind]: \"root\";\n readonly [inferred]: unknown;\n constructor(attachments: UnknownAttachments, $: BaseScope);\n get internal(): this;\n get \"~standard\"(): StandardSchemaV1.ArkTypeProps;\n as(): this;\n brand(name: string): this;\n readonly(): this;\n readonly branches: readonly nodeOfKind[];\n distribute(mapBranch: (branch: nodeOfKind, i: number, branches: array>) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut;\n abstract get defaultShortDescription(): string;\n get shortDescription(): string;\n toJsonSchema(opts?: ToJsonSchema.Options): JsonSchema;\n toJsonSchemaRecurse(ctx: ToJsonSchema.Context): JsonSchema;\n get alwaysExpandJsonSchema(): boolean;\n protected toResolvedJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n protected abstract innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n intersect(r: unknown): BaseRoot | Disjoint;\n rawIntersect(r: BaseRoot): BaseRoot;\n toNeverIfDisjoint(): BaseRoot;\n and(r: unknown): BaseRoot;\n rawAnd(r: BaseRoot): BaseRoot;\n or(r: unknown): BaseRoot;\n rawOr(r: BaseRoot): BaseRoot;\n map(flatMapEntry: PropFlatMapper): BaseRoot;\n pick(...keys: KeyOrKeyNode[]): BaseRoot;\n omit(...keys: KeyOrKeyNode[]): BaseRoot;\n required(): BaseRoot;\n partial(): BaseRoot;\n private _keyof?;\n keyof(): BaseRoot;\n get props(): Prop.Node[];\n merge(r: unknown): BaseRoot;\n private applyStructuralOperation;\n get(...path: GettableKeyOrNode[]): BaseRoot;\n extract(r: unknown): BaseRoot;\n exclude(r: unknown): BaseRoot;\n array(): BaseRoot;\n overlaps(r: unknown): boolean;\n extends(r: unknown): boolean;\n ifExtends(r: unknown): BaseRoot | undefined;\n subsumes(r: unknown): boolean;\n configure(meta: TypeMeta.MappableInput, selector?: NodeSelector): this;\n describe(description: string, selector?: NodeSelector): this;\n optional(): [this, \"?\"];\n default(thunkableValue: unknown): [this, \"=\", unknown];\n from(input: unknown): unknown;\n protected _pipe(...morphs: Morph[]): BaseRoot;\n protected tryPipe(...morphs: Morph[]): BaseRoot;\n pipe: ((...morphs: Morph[]) => BaseRoot) & {\n try: (...morphs: Morph[]) => BaseRoot;\n };\n to(def: unknown): BaseRoot;\n private toNode;\n rawPipeOnce(morph: Morph): BaseRoot;\n narrow(predicate: Predicate): BaseRoot;\n constrain(kind: kind, schema: NodeSchema): BaseRoot;\n constrainIn(kind: kind, schema: NodeSchema): BaseRoot;\n constrainOut(kind: kind, schema: NodeSchema): BaseRoot;\n private _constrain;\n onUndeclaredKey(cfg: UndeclaredKeyBehavior | UndeclaredKeyConfig): BaseRoot;\n hasEqualMorphs(r: BaseRoot): boolean;\n onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): BaseRoot;\n filter(predicate: Predicate): BaseRoot;\n divisibleBy(schema: Divisor.Schema): BaseRoot;\n matching(schema: Pattern.Schema): BaseRoot;\n atLeast(schema: InclusiveNumericRangeSchema): BaseRoot;\n atMost(schema: InclusiveNumericRangeSchema): BaseRoot;\n moreThan(schema: ExclusiveNumericRangeSchema): BaseRoot;\n lessThan(schema: ExclusiveNumericRangeSchema): BaseRoot;\n atLeastLength(schema: InclusiveNumericRangeSchema): BaseRoot;\n atMostLength(schema: InclusiveNumericRangeSchema): BaseRoot;\n moreThanLength(schema: ExclusiveNumericRangeSchema): BaseRoot;\n lessThanLength(schema: ExclusiveNumericRangeSchema): BaseRoot;\n exactlyLength(schema: ExactLength.Schema): BaseRoot;\n atOrAfter(schema: InclusiveDateRangeSchema): BaseRoot;\n atOrBefore(schema: InclusiveDateRangeSchema): BaseRoot;\n laterThan(schema: ExclusiveDateRangeSchema): BaseRoot;\n earlierThan(schema: ExclusiveDateRangeSchema): BaseRoot;\n}\ntype UndeclaredKeyConfig = {\n rule: UndeclaredKeyBehavior;\n deep?: boolean;\n};\ndeclare const emptyBrandNameMessage = \"Expected a non-empty brand name after #\";\ntype emptyBrandNameMessage = typeof emptyBrandNameMessage;\ndeclare const exclusivizeRangeSchema: (schema: schema) => schema;\ntype exclusivizeRangeSchema = schema extends LimitSchemaValue ? {\n rule: schema;\n exclusive: true;\n} : schema;\ndeclare const typeOrTermExtends: (t: unknown, base: unknown) => boolean;\ntype intersectRoot = [\n l,\n r\n] extends [r, l] ? l : asymmetricIntersectionOf | asymmetricIntersectionOf;\ntype asymmetricIntersectionOf = l extends unknown ? r extends kindRightOf ? l | reducibleKindOf : never : never;\ntype schemaKindRightOf = Extract, RootKind>;\ntype schemaKindOrRightOf = kind | schemaKindRightOf;\ntype StructuralOperationBranchResultByName = {\n keyof: Union.ChildNode;\n pick: Union.ChildNode;\n omit: Union.ChildNode;\n get: Union.ChildNode;\n map: Union.ChildNode;\n required: Union.ChildNode;\n partial: Union.ChildNode;\n merge: Union.ChildNode;\n props: array;\n};\ntype StructuralOperationName = keyof StructuralOperationBranchResultByName;\ndeclare const writeLiteralUnionEntriesMessage: (expression: string) => string;\ndeclare const writeNonStructuralOperandMessage: (operation: operation, operand: operand) => writeNonStructuralOperandMessage;\ntype writeNonStructuralOperandMessage = `${operation} operand must be an object (was ${operand})`;\n\ndeclare class MorphNode extends BaseRoot {\n serializedMorphs: string[];\n compiledMorphs: string;\n lastMorph: BaseRoot | Morph | undefined;\n lastMorphIfNode: BaseRoot | undefined;\n introspectableIn: BaseRoot | undefined;\n introspectableOut: BaseRoot | undefined;\n get shallowMorphs(): array;\n get in(): BaseRoot;\n get out(): BaseRoot;\n declareIn(declaredIn: BaseRoot): MorphNode;\n declareOut(declaredOut: BaseRoot): MorphNode;\n expression: string;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n compile(js: NodeCompiler): void;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n /** Check if the morphs of r are equal to those of this node */\n hasEqualMorphs(r: MorphNode): boolean;\n}\ndeclare namespace Morph {\n interface Inner {\n readonly in?: BaseRoot;\n readonly morphs: array;\n readonly declaredIn?: BaseRoot;\n readonly declaredOut?: BaseRoot;\n }\n interface Schema extends BaseNormalizedSchema {\n readonly in?: RootSchema;\n readonly morphs: listable;\n readonly declaredIn?: BaseRoot;\n readonly declaredOut?: BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"morph\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n childKind: RootKind;\n }> {\n }\n type Node = MorphNode;\n type In = morph extends Morph ? i : never;\n type Out = morph extends Morph ? o : never;\n type ContextFree = (In: i) => o;\n}\ntype Morph = (In: i, ctx: Traversal) => o;\ndeclare const Morph: {\n implementation: nodeImplementationOf;\n Node: typeof MorphNode;\n};\ndeclare const writeMorphIntersectionMessage: (lDescription: string, rDescription: string) => string;\n\ntype MorphsAtPath = {\n path: ReadonlyPath;\n morphs: array;\n};\ntype BranchTraversal = {\n error: ArkError | undefined;\n queuedMorphs: MorphsAtPath[];\n};\ntype InternalTraversal = Omit;\ndeclare class Traversal {\n /**\n * #### the path being validated or morphed\n *\n * ✅ array indices represented as numbers\n * ⚠️ mutated during traversal - use `path.slice(0)` to snapshot\n * 🔗 use {@link propString} for a stringified version\n */\n path: PropertyKey[];\n /**\n * #### {@link ArkErrors} that will be part of this traversal's finalized result\n *\n * ✅ will always be an empty array for a valid traversal\n */\n errors: ArkErrors;\n /**\n * #### the original value being traversed\n */\n root: unknown;\n /**\n * #### configuration for this traversal\n *\n * ✅ options can affect traversal results and error messages\n * ✅ defaults < global config < scope config\n * ✅ does not include options configured on individual types\n */\n config: ResolvedConfig;\n queuedMorphs: MorphsAtPath[];\n branches: BranchTraversal[];\n seen: {\n [id in string]?: unknown[];\n };\n constructor(root: unknown, config: ResolvedConfig);\n /**\n * #### the data being validated or morphed\n *\n * ✅ extracted from {@link root} at {@link path}\n */\n get data(): unknown;\n /**\n * #### a string representing {@link path}\n *\n * @propString\n */\n get propString(): string;\n /**\n * #### add an {@link ArkError} and return `false`\n *\n * ✅ useful for predicates like `.narrow`\n */\n reject(input: ArkErrorInput): false;\n /**\n * #### add an {@link ArkError} from a description and return `false`\n *\n * ✅ useful for predicates like `.narrow`\n * 🔗 equivalent to {@link reject}({ expected })\n */\n mustBe(expected: string): false;\n /**\n * #### add and return an {@link ArkError}\n *\n * ✅ useful for morphs like `.pipe`\n */\n error(input: input): ArkError;\n /**\n * #### whether {@link currentBranch} (or the traversal root, outside a union) has one or more errors\n */\n hasError(): boolean;\n get currentBranch(): BranchTraversal | undefined;\n queueMorphs(morphs: array): void;\n finalize(onFail?: ArkErrors.Handler | null): unknown;\n get currentErrorCount(): number;\n get failFast(): boolean;\n pushBranch(): void;\n popBranch(): BranchTraversal | undefined;\n private errorFromContext;\n private applyQueuedMorphs;\n private applyMorphsAtPath;\n}\ndeclare const traverseKey: (key: PropertyKey, fn: () => result, ctx: InternalTraversal | undefined) => result;\ntype TraversalMethodsByKind = {\n Allows: TraverseAllows;\n Apply: TraverseApply;\n};\ntype TraversalKind = keyof TraversalMethodsByKind;\ntype TraverseAllows = (data: data, ctx: InternalTraversal) => boolean;\ntype TraverseApply = (data: data, ctx: InternalTraversal) => void;\n\ntype CoercibleValue = string | number | boolean | null | undefined;\ndeclare class CompiledFunction unknown, args extends readonly string[] = readonly string[]> extends CastableBase<{\n [k in args[number]]: k;\n}> {\n readonly argNames: args;\n readonly body = \"\";\n constructor(...args: args);\n indentation: number;\n indent(): this;\n dedent(): this;\n prop(key: PropertyKey, optional?: boolean): string;\n index(key: string | number, optional?: boolean): string;\n line(statement: string): this;\n const(identifier: string, expression: CoercibleValue): this;\n let(identifier: string, expression: CoercibleValue): this;\n set(identifier: string, expression: CoercibleValue): this;\n if(condition: string, then: (self: this) => this): this;\n elseIf(condition: string, then: (self: this) => this): this;\n else(then: (self: this) => this): this;\n /** Current index is \"i\" */\n for(until: string, body: (self: this) => this, initialValue?: CoercibleValue): this;\n /** Current key is \"k\" */\n forIn(object: string, body: (self: this) => this): this;\n block(prefix: string, contents: (self: this) => this, suffix?: string): this;\n return(expression?: CoercibleValue): this;\n write(name?: string, indent?: number): string;\n compile(): compiledSignature;\n}\ndeclare const compileSerializedValue: (value: unknown) => string;\ndeclare const compileLiteralPropAccess: (key: PropertyKey, optional?: boolean) => string;\ndeclare const serializeLiteralKey: (key: PropertyKey) => string;\ndeclare const indexPropAccess: (key: string, optional?: boolean) => string;\ninterface InvokeOptions extends ReferenceOptions {\n arg?: string;\n}\ninterface ReferenceOptions {\n kind?: TraversalKind;\n bind?: string;\n}\ndeclare namespace NodeCompiler {\n interface Context {\n kind: TraversalKind;\n optimistic?: true;\n }\n}\ndeclare class NodeCompiler extends CompiledFunction {\n traversalKind: TraversalKind;\n optimistic: boolean;\n constructor(ctx: NodeCompiler.Context);\n invoke(node: BaseNode | NodeId, opts?: InvokeOptions): string;\n referenceToId(id: NodeId, opts?: ReferenceOptions): string;\n requiresContextFor(node: BaseNode): boolean;\n initializeErrorCount(): this;\n returnIfFail(): this;\n returnIfFailFast(): this;\n traverseKey(keyExpression: string, accessExpression: string, node: BaseNode): this;\n check(node: BaseNode, opts?: InvokeOptions): this;\n}\n\ndeclare class PredicateNode extends BaseConstraint {\n serializedPredicate: RegisteredReference;\n compiledCondition: string;\n compiledNegation: string;\n impliedBasis: null;\n expression: string;\n traverseAllows: TraverseAllows;\n errorContext: Predicate.ErrorContext;\n compiledErrorContext: string;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n reduceJsonSchema(base: JsonSchema.Constrainable, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace Predicate {\n type Schema = NormalizedSchema | predicate;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly predicate: predicate;\n }\n interface Inner {\n readonly predicate: predicate;\n }\n interface ErrorContext extends BaseErrorContext<\"predicate\"> {\n readonly predicate?: Predicate;\n }\n interface Declaration extends declareNode<{\n kind: \"predicate\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n intersectionIsOpen: true;\n errorContext: ErrorContext;\n }> {\n }\n type Node = PredicateNode;\n}\ndeclare const Predicate: {\n implementation: nodeImplementationOf;\n Node: typeof PredicateNode;\n};\ntype Predicate = (data: data, ctx: Traversal) => boolean;\ndeclare namespace Predicate {\n type Casted = (input: input, ctx: Traversal) => input is narrowed;\n type Castable = Predicate | Casted;\n}\n\ndeclare class ProtoNode extends InternalBasis {\n builtinName: BuiltinObjectKind | null;\n serializedConstructor: string;\n private readonly requiresInvalidDateCheck;\n traverseAllows: TraverseAllows;\n compiledCondition: string;\n compiledNegation: string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n expression: string;\n get nestableExpression(): string;\n readonly domain = \"object\";\n get defaultShortDescription(): string;\n}\ndeclare namespace Proto {\n type Reference = Constructor | BuiltinObjectKind;\n type Schema = proto | ExpandedSchema;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface ExpandedSchema {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface Inner {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface ErrorContext extends BaseErrorContext<\"proto\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"proto\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = ProtoNode;\n}\ndeclare const Proto: {\n implementation: nodeImplementationOf;\n Node: typeof ProtoNode;\n writeBadInvalidDateMessage: (actual: Constructor) => string;\n writeInvalidSchemaMessage: (actual: unknown) => string;\n};\n\ndeclare class IntersectionNode extends BaseRoot {\n basis: nodeOfKind | null;\n refinements: array>;\n structure: Structure.Node | undefined;\n expression: string;\n get shallowMorphs(): array;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare namespace Intersection {\n type BasisKind = \"domain\" | \"proto\";\n type ChildKind = BasisKind | RefinementKind | \"predicate\" | \"structure\";\n type FlattenedChildKind = ChildKind | StructuralKind;\n type RefinementsInner = {\n [k in RefinementKind]?: intersectionChildInnerValueOf;\n };\n interface Inner extends RefinementsInner {\n domain?: Domain.Node;\n proto?: Proto.Node;\n structure?: Structure.Node;\n predicate?: array;\n }\n namespace Inner {\n type mutable = makeRootAndArrayPropertiesMutable;\n }\n type ConstraintsSchema = show>;\n type NormalizedSchema = Omit;\n type Schema = ConstraintsSchema;\n interface AstSchema extends BaseNormalizedSchema {\n intersection: readonly RootSchema[];\n }\n interface ErrorContext extends BaseErrorContext<\"intersection\">, Inner {\n errors: readonly ArkError[];\n }\n type Declaration = declareNode<{\n kind: \"intersection\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n reducibleTo: \"intersection\" | BasisKind;\n errorContext: ErrorContext;\n childKind: ChildKind;\n }>;\n type Node = IntersectionNode;\n}\ndeclare const Intersection: {\n implementation: nodeImplementationOf<{\n intersectionIsOpen: false;\n prerequisite: unknown;\n kind: \"intersection\";\n schema: Intersection.Schema;\n normalizedSchema: Intersection.NormalizedSchema;\n inner: Intersection.Inner;\n reducibleTo: \"intersection\" | Intersection.BasisKind;\n errorContext: Intersection.ErrorContext;\n childKind: Intersection.ChildKind;\n }>;\n Node: typeof IntersectionNode;\n};\ntype ConditionalTerminalIntersectionRoot = {\n undeclared?: UndeclaredKeyBehavior;\n};\ntype ConditionalTerminalIntersectionKey = keyof ConditionalTerminalIntersectionRoot;\ntype ConditionalIntersectionKey = ConstraintKind | ConditionalTerminalIntersectionKey;\ntype constraintKindOf = {\n [k in ConstraintKind]: t extends Prerequisite ? k : never;\n}[ConstraintKind];\ntype conditionalIntersectionKeyOf = constraintKindOf | (t extends object ? \"undeclared\" : never);\ntype intersectionChildSchemaValueOf = k extends OpenNodeKind ? listable> : NodeSchema;\ntype conditionalSchemaValueOfKey = k extends Intersection.FlattenedChildKind ? intersectionChildSchemaValueOf : ConditionalTerminalIntersectionRoot[k & ConditionalTerminalIntersectionKey];\ntype intersectionChildInnerValueOf = k extends OpenNodeKind ? readonly nodeOfKind[] : nodeOfKind;\ntype conditionalRootOf = {\n [k in conditionalIntersectionKeyOf]?: conditionalSchemaValueOfKey;\n};\n\ndeclare namespace Constraint {\n interface Declaration extends BaseNodeDeclaration {\n kind: ConstraintKind;\n }\n type ReductionResult = BaseRoot | Disjoint | Intersection.Inner.mutable;\n interface Attachments {\n impliedBasis: BaseRoot | null;\n impliedSiblings?: array | null;\n }\n type PrimitiveKind = Exclude;\n}\ndeclare abstract class BaseConstraint<\n/** @ts-ignore allow instantiation assignment to the base type */\nout d extends Constraint.Declaration = Constraint.Declaration> extends BaseNode {\n readonly [arkKind]: \"constraint\";\n constructor(attachments: UnknownAttachments, $: BaseScope);\n abstract readonly impliedBasis: BaseRoot | null;\n readonly impliedSiblings?: array;\n intersect(r: r): intersectConstraintKinds;\n}\ndeclare abstract class InternalPrimitiveConstraint extends BaseConstraint {\n abstract traverseAllows: TraverseAllows;\n abstract readonly compiledCondition: string;\n abstract readonly compiledNegation: string;\n abstract reduceJsonSchema(base: JsonSchema.Constrainable, ctx: ToJsonSchema.Context): JsonSchema.Constrainable;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n get errorContext(): d[\"errorContext\"];\n get compiledErrorContext(): string;\n}\ndeclare const constraintKeyParser: (kind: kind) => (schema: listable>, ctx: NodeParseContext) => innerAttachedAs | undefined;\ntype ConstraintGroupKind = satisfy;\ninterface ConstraintIntersectionState {\n kind: kind;\n baseInner: Record;\n l: BaseConstraint[];\n r: BaseConstraint[];\n roots: BaseRoot[];\n ctx: IntersectionContext;\n}\ndeclare const intersectConstraints: (s: ConstraintIntersectionState) => nodeOfKind> | Disjoint;\ndeclare const flattenConstraints: (inner: object) => BaseConstraint[];\ntype FlatIntersectionInner = Intersection.Inner & Structure.Inner;\ndeclare const unflattenConstraints: (constraints: array) => FlatIntersectionInner;\ntype constraintKindLeftOf = ConstraintKind & kindLeftOf;\ntype constraintKindOrLeftOf = kind | constraintKindLeftOf;\ntype intersectConstraintKinds = nodeOfKind | Disjoint | null;\ndeclare const throwInvalidOperandError: (...args: Parameters) => never;\ndeclare const writeInvalidOperandMessage: (kind: kind, expected: expected, actual: actual) => string;\ntype writeInvalidOperandMessage = `${Capitalize} operand must be ${describe>} (was ${describe>>})`;\n\ndeclare abstract class BaseNode<\n/** @ts-ignore allow instantiation assignment to the base type */\nout d extends BaseNodeDeclaration = BaseNodeDeclaration> extends Callable<(data: d[\"prerequisite\"], ctx?: Traversal, onFail?: ArkErrors.Handler | null) => unknown, attachmentsOf> {\n attachments: UnknownAttachments;\n $: BaseScope;\n onFail: ArkErrors.Handler | null;\n includesTransform: boolean;\n includesContextualPredicate: boolean;\n isCyclic: boolean;\n allowsRequiresContext: boolean;\n rootApplyStrategy: \"allows\" | \"contextual\" | \"optimistic\" | \"branchedOptimistic\";\n contextFreeMorph: ((data: unknown) => unknown) | undefined;\n rootApply: (data: unknown, onFail: ArkErrors.Handler | null) => unknown;\n referencesById: Record;\n shallowReferences: BaseNode[];\n flatRefs: FlatRef[];\n flatMorphs: FlatRef[];\n allows: (data: d[\"prerequisite\"]) => boolean;\n get shallowMorphs(): array;\n constructor(attachments: UnknownAttachments, $: BaseScope);\n protected createRootApply(): this[\"rootApply\"];\n abstract traverseAllows: TraverseAllows;\n abstract traverseApply: TraverseApply;\n abstract expression: string;\n abstract compile(js: NodeCompiler): void;\n readonly compiledMeta: string;\n protected cacheGetter(name: name, value: this[name]): this[name];\n get description(): string;\n get references(): BaseNode[];\n readonly precedence: number;\n precompilation: string | undefined;\n assert: (data: d[\"prerequisite\"], pipedFromCtx?: Traversal) => unknown;\n traverse(data: d[\"prerequisite\"], pipedFromCtx?: Traversal): ArkErrors | {} | null | undefined;\n get in(): this extends {\n [arkKind]: \"root\";\n } ? BaseRoot : BaseNode;\n get out(): this extends {\n [arkKind]: \"root\";\n } ? BaseRoot : BaseNode;\n getIo(ioKind: \"in\" | \"out\"): BaseNode;\n toJSON(): JsonStructure;\n toString(): string;\n equals(r: unknown): boolean;\n ifEquals(r: unknown): BaseNode | undefined;\n hasKind(kind: kind): this is nodeOfKind;\n assertHasKind(kind: kind): nodeOfKind;\n hasKindIn(...kinds: kinds): this is nodeOfKind;\n assertHasKindIn(...kinds: kinds): nodeOfKind;\n isBasis(): this is nodeOfKind;\n isConstraint(): this is BaseConstraint;\n isStructural(): this is nodeOfKind;\n isRefinement(): this is nodeOfKind;\n isRoot(): this is BaseRoot;\n isUnknown(): boolean;\n isNever(): boolean;\n hasUnit(value: unknown): this is Unit.Node & {\n unit: value;\n };\n hasOpenIntersection(): this is nodeOfKind;\n get nestableExpression(): string;\n select>>(selector: NodeSelector.validateComposite): NodeSelector.infer;\n select(selector: selector): NodeSelector.infer;\n private _select;\n transform(mapper: mapper, opts?: DeepNodeTransformOptions): nodeOfKind> | Extract, null>;\n protected _createTransformContext(opts: DeepNodeTransformOptions | undefined): DeepNodeTransformContext;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n configureReferences(meta: TypeMeta.MappableInput.Internal, selector?: NodeSelector): this;\n}\n/** a literal key (named property) or a node (index signatures) representing part of a type structure */\ntype KeyOrKeyNode = Key | BaseRoot;\ntype GettableKeyOrNode = KeyOrKeyNode | number;\ntype FlatRef = {\n path: array;\n node: root;\n propString: string;\n};\ntype NodeSelector = NodeSelector.Single | NodeSelector.Composite;\ndeclare namespace NodeSelector {\n type SelectableFn = {\n >>(input: input, selector?: NodeSelector.validateComposite): returns;\n (input: input, selector?: selector): returns;\n };\n type Single = NodeSelector.Boundary | NodeSelector.Kind | GuardablePredicate;\n type Boundary = \"self\" | \"child\" | \"shallow\" | \"references\";\n type Kind = NodeKind;\n type Method = \"filter\" | \"assertFilter\" | \"find\" | \"assertFind\";\n interface Composite {\n method?: Method;\n boundary?: Boundary;\n kind?: Kind;\n where?: GuardablePredicate;\n }\n type Normalized = requireKeys;\n type CompositeInput = Omit;\n type BaseResult = BaseNode | BaseNode[] | undefined;\n type validateComposite = {\n [k in keyof selector]: k extends \"where\" ? predicate : conform;\n };\n type infer = applyMethod ? narrowed : NodeSelector.inferSelectKind, selector>;\n type BoundaryInput = b | {\n boundary: b;\n };\n type KindInput = k | {\n kind: k;\n };\n type WhereCastInput = ((In: kindNode) => In is narrowed) | {\n where: (In: kindNode) => In is narrowed;\n };\n type inferSelectKind = selectKind extends infer kind extends NodeKind ? NodeKind extends kind ? BaseNode : nodeOfKind : never;\n type selectKind = selector extends BoundaryInput<\"self\"> ? selfKind : selector extends KindInput ? kind : selector extends BoundaryInput<\"child\"> ? selfKind | childKindOf : NodeKind;\n type applyMethod = selector extends {\n method: infer method extends Method;\n } ? method extends \"filter\" ? t[] : method extends \"assertFilter\" ? [t, ...t[]] : method extends \"find\" ? t | undefined : method extends \"assertFind\" ? t : never : t[];\n}\ndeclare const typePathToPropString: (path: array) => string;\ndeclare const flatRef: (path: array, node: node) => FlatRef;\ndeclare const flatRefsAreEqual: (l: FlatRef, r: FlatRef) => boolean;\ndeclare const appendUniqueFlatRefs: (existing: FlatRef[] | undefined, refs: listable>) => FlatRef[];\ndeclare const appendUniqueNodes: (existing: node[] | undefined, refs: listable) => node[];\ntype DeepNodeTransformOptions = {\n shouldTransform?: ShouldTransformFn;\n bindScope?: BaseScope;\n prereduced?: boolean;\n selected?: readonly BaseNode[] | undefined;\n};\ntype ShouldTransformFn = (node: BaseNode, ctx: DeepNodeTransformContext) => boolean;\ninterface DeepNodeTransformContext extends DeepNodeTransformOptions {\n root: BaseNode;\n selected: readonly BaseNode[] | undefined;\n path: mutable>;\n seen: {\n [originalId: string]: (() => BaseNode | undefined) | undefined;\n };\n parseOptions: BaseParseOptions;\n undeclaredKeyHandling: UndeclaredKeyHandling | undefined;\n}\ntype DeepNodeTransformation = (kind: kind, innerWithMeta: Inner & {\n meta: NodeMeta;\n}, ctx: DeepNodeTransformContext) => NormalizedSchema | null;\n\ndeclare class AfterNode extends BaseRange {\n impliedBasis: BaseRoot;\n collapsibleLimitString: string;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(base: JsonSchema, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace After {\n interface Inner extends BaseRangeInner {\n rule: Date;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: LimitSchemaValue;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: LimitSchemaValue;\n }\n type Schema = ExpandedSchema | LimitSchemaValue;\n interface ErrorContext extends BaseErrorContext<\"after\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"after\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: Date;\n errorContext: ErrorContext;\n }> {\n }\n type Node = AfterNode;\n}\ndeclare const After: {\n implementation: nodeImplementationOf;\n Node: typeof AfterNode;\n};\n\ndeclare class BeforeNode extends BaseRange {\n collapsibleLimitString: string;\n traverseAllows: TraverseAllows;\n impliedBasis: BaseRoot;\n reduceJsonSchema(base: JsonSchema, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace Before {\n interface Inner extends BaseRangeInner {\n rule: Date;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: LimitSchemaValue;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: LimitSchemaValue;\n }\n type Schema = ExpandedSchema | LimitSchemaValue;\n interface ErrorContext extends BaseErrorContext<\"before\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"before\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: Date;\n errorContext: ErrorContext;\n }> {\n }\n type Node = BeforeNode;\n}\ndeclare const Before: {\n implementation: nodeImplementationOf;\n Node: typeof BeforeNode;\n};\n\ndeclare class MaxNode extends BaseRange {\n impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Max {\n interface Inner extends BaseRangeInner {\n rule: number;\n exclusive?: true;\n }\n interface NormalizedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"max\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"max\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MaxNode;\n}\ndeclare const Max: {\n implementation: nodeImplementationOf;\n Node: typeof MaxNode;\n};\n\ndeclare class MinNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Min {\n interface Inner extends BaseRangeInner {\n rule: number;\n exclusive?: true;\n }\n interface NormalizedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"min\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"min\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MinNode;\n}\ndeclare const Min: {\n implementation: nodeImplementationOf;\n Node: typeof MinNode;\n};\n\ninterface BoundDeclarations {\n min: Min.Declaration;\n max: Max.Declaration;\n minLength: MinLength.Declaration;\n maxLength: MaxLength.Declaration;\n exactLength: ExactLength.Declaration;\n after: After.Declaration;\n before: Before.Declaration;\n}\ninterface BoundNodesByKind {\n min: Min.Node;\n max: Max.Node;\n minLength: MinLength.Node;\n maxLength: MaxLength.Node;\n exactLength: ExactLength.Node;\n after: After.Node;\n before: Before.Node;\n}\n\ninterface NodeDeclarationsByKind extends BoundDeclarations {\n alias: Alias.Declaration;\n domain: Domain.Declaration;\n unit: Unit.Declaration;\n proto: Proto.Declaration;\n union: Union.Declaration;\n morph: Morph.Declaration;\n intersection: Intersection.Declaration;\n sequence: Sequence.Declaration;\n divisor: Divisor.Declaration;\n required: Required$1.Declaration;\n optional: Optional.Declaration;\n index: Index.Declaration;\n pattern: Pattern.Declaration;\n predicate: Predicate.Declaration;\n structure: Structure.Declaration;\n}\ndeclare const nodeImplementationsByKind: Record;\ndeclare const nodeClassesByKind: Record BaseNode>;\ninterface NodesByKind extends BoundNodesByKind {\n alias: Alias.Node;\n union: Union.Node;\n morph: Morph.Node;\n intersection: Intersection.Node;\n unit: Unit.Node;\n proto: Proto.Node;\n domain: Domain.Node;\n divisor: Divisor.Node;\n pattern: Pattern.Node;\n predicate: Predicate.Node;\n required: Required$1.Node;\n optional: Optional.Node;\n index: Index.Node;\n sequence: Sequence.Node;\n structure: Structure.Node;\n}\ntype nodeOfKind = NodesByKind[kind];\ntype Declaration = NodeDeclarationsByKind[kind];\ntype NodeSchema = Declaration[\"schema\"];\ntype RootSchema = NodeSchema;\ntype NormalizedSchema = Declaration[\"normalizedSchema\"];\ntype childKindOf = Declaration[\"childKind\"];\ntype Prerequisite = Declaration[\"prerequisite\"];\ntype reducibleKindOf = Declaration[\"reducibleTo\"] extends NodeKind ? Declaration[\"reducibleTo\"] : kind;\ntype Inner = Declaration[\"inner\"];\ntype defAttachedAs = kind extends OpenNodeKind ? listable> : NodeSchema;\ntype innerAttachedAs = kind extends OpenNodeKind ? array> : nodeOfKind;\n/** make nested arrays mutable while keeping nested nodes immutable */\ntype mutableInnerOfKind = makeRootAndArrayPropertiesMutable>;\ntype mutableNormalizedRootOfKind = makeRootAndArrayPropertiesMutable>;\ntype errorContext = Declaration[\"errorContext\"];\n\ntype ContextualArgs = Record;\ntype BaseParseOptions = {\n alias?: string;\n prereduced?: prereduced;\n args?: ContextualArgs;\n id?: NodeId;\n};\ninterface BaseParseContextInput extends BaseParseOptions {\n prefix: string;\n def: unknown;\n}\ninterface AttachedParseContext {\n [arkKind]: \"context\";\n $: BaseScope;\n id: NodeId;\n phase: \"unresolved\" | \"resolving\" | \"resolved\";\n}\ninterface BaseParseContext extends BaseParseContextInput, AttachedParseContext {\n id: NodeId;\n}\ninterface NodeParseContextInput extends BaseParseContextInput {\n kind: kind;\n def: NormalizedSchema;\n}\ninterface NodeParseContext extends NodeParseContextInput, AttachedParseContext {\n id: NodeId;\n}\ndeclare const schemaKindOf: (schema: unknown, allowedKinds?: readonly kind[]) => kind;\ndeclare const writeInvalidSchemaMessage: (schema: unknown) => string;\ntype NodeId = Brand;\ntype NodeResolver = (id: NodeId) => BaseNode;\ndeclare const nodesByRegisteredId: Record;\ndeclare const registerNodeId: (prefix: string) => NodeId;\ndeclare const parseNode: (ctx: NodeParseContext) => BaseNode;\ntype CreateNodeInput = {\n id: NodeId;\n kind: NodeKind;\n inner: dict;\n meta: NodeMeta;\n $: BaseScope;\n ignoreCache?: true;\n};\ndeclare const createNode: ({ id, kind, inner, meta, $, ignoreCache }: CreateNodeInput) => BaseNode;\ndeclare const withId: (node: node, id: NodeId) => node;\ndeclare const withMeta: (node: node, meta: ArkEnv.meta, id?: NodeId) => node;\n\ninterface ArkSchemaRegistry extends ArkRegistry {\n intrinsic: typeof intrinsic;\n config: ArkSchemaConfig;\n defaultConfig: ResolvedConfig;\n resolvedConfig: ResolvedConfig;\n nodesByRegisteredId: typeof nodesByRegisteredId;\n}\ntype nodeConfigForKind = Readonly;\n} & (kind extends ArkErrorCode ? {\n expected?: ExpectedConfig;\n actual?: ActualConfig;\n problem?: ProblemConfig;\n message?: MessageConfig;\n} : {})>>;\ntype NodeConfigsByKind = {\n [kind in NodeKind]: nodeConfigForKind;\n};\ntype NodeConfig = NodeConfigsByKind[kind];\ninterface UnknownErrorConfigs {\n expected?: ExpectedConfig;\n actual?: ActualConfig;\n problem?: ProblemConfig;\n message?: MessageConfig;\n}\ninterface UnknownNodeConfig extends UnknownErrorConfigs {\n description?: DescriptionWriter;\n}\ntype ResolvedUnknownNodeConfig = requireKeys;\ndeclare const configureSchema: (config: ArkSchemaConfig) => ArkSchemaConfig;\ndeclare const mergeConfigs: (base: base, merged: ArkSchemaConfig | undefined) => base;\ntype MergeToJsonSchemaConfigs = (baseConfig: base, mergedConfig: ToJsonSchema.Options | undefined) => base extends ToJsonSchema.Context ? ToJsonSchema.Context : ToJsonSchema.Options;\ndeclare const mergeToJsonSchemaConfigs: MergeToJsonSchemaConfigs;\ntype CloneImplementation = (original: original) => original;\ninterface ArkSchemaConfig extends Partial> {\n readonly jitless?: boolean;\n readonly clone?: boolean | CloneImplementation;\n readonly onUndeclaredKey?: UndeclaredKeyBehavior;\n readonly numberAllowsNaN?: boolean;\n readonly dateAllowsInvalid?: boolean;\n readonly exactOptionalPropertyTypes?: boolean;\n readonly onFail?: ArkErrors.Handler | null;\n readonly keywords?: Record;\n readonly toJsonSchema?: ToJsonSchema.Options;\n}\ntype resolveConfig = show<{\n [k in keyof ArkSchemaConfig]-?: k extends NodeKind ? Required : k extends \"clone\" ? CloneImplementation | false : k extends \"keywords\" ? Record : k extends \"toJsonSchema\" ? ToJsonSchema.Context : config[k];\n} & Omit>;\ntype ResolvedConfig = resolveConfig;\n\ntype InternalNodeIntersection = (l: l, r: r, ctx: ctx) => l[\"kind\"] | r[\"kind\"] extends RootKind ? BaseRoot | Disjoint : BaseNode | Disjoint | null;\ndeclare const intersectNodesRoot: InternalNodeIntersection;\ndeclare const pipeNodesRoot: InternalNodeIntersection;\ndeclare const intersectOrPipeNodes: InternalNodeIntersection;\n\nexport { $ark, type ActualConfig, type ActualWriter, After, AfterNode, type AliasDefEntry, ArkError, type ArkErrorCode, type ArkErrorContextInput, type ArkErrorInput, type ArkErrorResult, ArkErrors, type ArkKind, type ArkKinds, type ArkSchemaConfig, type ArkSchemaRegistry, type ArkSchemaScopeConfig, type AttachedParseContext, BaseConstraint, type BaseErrorContext, type BaseMappedPropInner, BaseNode, type BaseNodeDeclaration, type BaseNormalizedSchema, type BaseParseContext, type BaseParseContextInput, type BaseParseOptions, BaseProp, BaseRange, type BaseRangeDeclaration, type BaseRangeInner, BaseRoot, BaseScope, type BasisKind, Before, BeforeNode, type BoundKind, type BoundOperandKind, type Boundable, type BranchTraversal, type CaseContext, type CaseDiscriminant, type CaseKey, type CloneImplementation, type ClosedNodeKind, type CoercibleValue, CompiledFunction, type CompositeKind, type ConditionalTerminalIntersectionRoot, Constraint, type ConstraintIntersection, type ConstraintIntersectionMap, type ConstraintKind, type ContextualArgs, type CreateNodeInput, type CustomErrorInput, type DateRangeKind, type Declaration, type DeepNodeTransformContext, type DeepNodeTransformOptions, type DeepNodeTransformation, type DefaultArkEnv, type DefaultableSequenceElement, type DerivableErrorContext, type DerivableErrorContextInput, type DescriptionWriter, type Discriminant, type DiscriminantKind, type DiscriminantKinds, type DiscriminatedCases, Disjoint, type DisjointEntry, type DisjointEntryContext, type DisjointKind, Divisor, DivisorNode, Domain, DomainNode, ExactLength, ExactLengthNode, type ExclusiveDateRangeSchema, type ExclusiveExpandedDateRangeSchema, type ExclusiveNormalizedNumericRangeSchema, type ExclusiveNumericRangeSchema, type ExpectedConfig, type ExpectedWriter, type FlatRef, type GenericArgResolutions, type GenericAst, type GenericParamAst, type GenericParamDef, GenericRoot, type GenericRootBodyParser, type GenericRootParser, type GettableKeyOrNode, type GlobalOnlyConfigOptionName, type InclusiveDateRangeSchema, type InclusiveExpandedDateRangeSchema, type InclusiveNormalizedNumericRangeSchema, type InclusiveNumericRangeSchema, Index, IndexNode, Inner, type InternalIntersectionOptions, type InternalModule, InternalPrimitiveConstraint, type InternalResolution, type InternalResolutions, type InternalRootDeclaration, type InternalSchemaParser, type InternalTraversal, Intersection, type IntersectionContext, type IntersectionMap, IntersectionNode, type InvokeOptions, JsonSchema, type JsonSchemaOrBoolean, type KeyOrKeyNode, LazyGenericBody, type LengthBoundKind, type LengthBoundableData, type LimitInnerValue, type LimitKind, type LimitSchemaValue, type LimitValue, type ListableJsonSchema, type LowerBoundKind, type LowerNode, type MappedPropInner, Max, MaxLength, MaxLengthNode, MaxNode, type MessageConfig, type MessageContext, type MessageWriter, Min, MinLength, MinLengthNode, MinNode, Morph, type MorphChildKind, MorphNode, type MorphsAtPath, type NarrowedAttachments, NodeCompiler, type NodeConfig, type NodeDeclarationsByKind, type NodeErrorContextInput, type NodeId, type NodeKeyImplementation, type NodeKind, type NodeMeta, type NodeParseContext, type NodeParseContextInput, type NodeResolver, type NodeSchema, NodeSelector, type NormalizedIndex, type NormalizedSchema, type NumericallyBoundable, type OpenNodeKind, Optional, type OptionalMappedPropInner, OptionalNode, type OptionalSequenceElement, type OrderedNodeKinds, Pattern, PatternNode, type PostfixSequenceElement, type PrecompiledReferences, Predicate, PredicateNode, type PrefixSequenceElement, type PreparsedNodeResolution, type Prerequisite, type PrevariadicSequenceElement, type PrimitiveKind, type PrivateDeclaration, type ProblemConfig, type ProblemContext, type ProblemWriter, Prop, type PropFlatMapper, Proto, ProtoNode, type RangeKind, type ReferenceOptions, type RefinementKind, type RegisteredReference, type RelativeComparator, Required$1 as Required, RequiredNode, type ResolvedConfig, type ResolvedScopeConfig, type ResolvedUnknownNodeConfig, type RootExportCache, type RootIntersection, type RootKind, RootModule, type RootSchema, SchemaModule, SchemaScope, type SchemaScopeParser, type ScopeOnlyConfigOptions, Sequence, type SequenceElement, type SequenceElementKind, SequenceNode, type SequenceTuple, type ShouldTransformFn, StandardSchemaV1, type StructuralKind, type StructuralOperationBranchResultByName, type StructuralOperationName, Structure, StructureNode, ToJsonSchema, Traversal, TraversalError, type TraversalKind, type TraversalMethodsByKind, type TraverseAllows, type TraverseApply, type TypeIntersectionMap, TypeMeta, type UndeclaredKeyBehavior, type UndeclaredKeyConfig, type UndeclaredKeyHandling, Union, type UnionChildKind, UnionNode, Unit, UnitNode, type UnknownAttachments, type UnknownErrorConfigs, type UnknownExpandedRangeSchema, type UnknownIntersectionMap, type UnknownIntersectionResult, type UnknownNodeImplementation, type UnknownNormalizedRangeSchema, type UnknownRangeSchema, type UpperBoundKind, type UpperNode, type VariadicSequenceElement, appendUniqueFlatRefs, appendUniqueNodes, arkKind, assertDefaultValueAssignability, assertNodeKind, type attachmentsOf, basisKinds, bindModule, boundKindPairsByLower, type childKindOf, compileComparator, compileLiteralPropAccess, compileObjectLiteral, compileSerializedValue, computeDefaultValueMorph, type conditionalRootOf, configureSchema, constraintKeyParser, constraintKeys, type constraintKindLeftOf, type constraintKindOf, type constraintKindOrLeftOf, constraintKinds, createDateSchemaNormalizer, createLengthRuleParser, createLengthSchemaNormalizer, createNode, dateLimitToString, type declareNode, type defAttachedAs, type defaultErrorContext, defaultValueSerializer, defineSchema, describeBranches, emptyBrandNameMessage, type errorContext, exclusivizeRangeSchema, type exportedNameOf, flatRef, flatRefsAreEqual, type flatResolutionsOf, flattenConstraints, type genericHktToConstraints, genericNode, type genericParamConstraints, type genericParamNames, type genericParamSchemasToAst, type getAssociatedDataForError, hasArkKind, implementNode, indexPropAccess, type innerAttachedAs, type instantiateRoot, type internalImplementationOf, intersectBranches, type intersectConstraintKinds, intersectConstraints, intersectNodesRoot, intersectOrPipeNodes, intersectProps, type intersectRoot, intrinsic, isNode, isNodeKind, type keySchemaDefinitions, type kindLeftOf, type kindOrLeftOf, type kindOrRightOf, type kindRightOf, makeRootAndArrayPropertiesMutable, mergeConfigs, mergeToJsonSchemaConfigs, morphChildKinds, type mutableInnerOfKind, type mutableNormalizedRootOfKind, node, nodeClassesByKind, type nodeImplementationInputOf, type nodeImplementationOf, nodeImplementationsByKind, nodeKinds, type nodeOfKind, nodesByRegisteredId, normalizeIndex, type ownIntersectionResult, type pairedRangeKind, parseAsSchema, parseDateLimit, parseExclusiveKey, parseGeneric, parseNode, pipeNodesRoot, postfixAfterOptionalOrDefaultableMessage, postfixWithoutVariadicMessage, precedenceByKind, precedenceOfKind, pruneDiscriminant, reduceBranches, type reducibleKindOf, reference, refinementKinds, registerNodeId, registeredReference, registryName, type resolvableReferenceIn, type resolveConfig, type resolveReference, rootKinds, rootSchema, rootSchemaScope, schemaKindOf, type schemaKindOrRightOf, type schemaKindRightOf, schemaKindsRightOf, schemaScope, serializeLiteralKey, structuralKinds, structureKeys, throwInvalidOperandError, type toInternalScope, traverseKey, typeKeyToString, typeOrTermExtends, typePathToPropString, unflattenConstraints, unionChildKinds, type unwrapDefault, withId, withMeta, writeDefaultIntersectionMessage, writeDuplicateAliasError, writeEnumerableIndexBranches, writeIndiscriminableMorphMessage, writeIndivisibleMessage, writeInvalidKeysMessage, writeInvalidLengthBoundMessage, writeInvalidOperandMessage, writeInvalidPropertyKeyMessage, writeInvalidSchemaMessage, writeLiteralUnionEntriesMessage, writeMissingSubmoduleAccessMessage, writeMorphIntersectionMessage, writeNonIntegerDivisorMessage, writeNonPrimitiveNonFunctionDefaultValueMessage, writeNonStructuralOperandMessage, writeNonSubmoduleDotMessage, writeNumberIndexMessage, writeOrderedIntersectionMessage, type writeUnassignableDefaultValueMessage, writeUnboundableMessage, writeUnresolvableMessage, writeUnsatisfiableExpressionError, writeUnsatisfiedParameterConstraintMessage };\n\n}" +export const schemaDts = "declare module \"@ark/schema\" {\n import { DynamicBase, anyOrNever, ReadonlyArray as ReadonlyArray$1, array, propwiseXor, merge, show, CastableBase, ReadonlyPath, JsonObject, JsonArray, mutable, Thunk, Callable, Hkt, JsonStructure, autocomplete, listable, satisfy, Domain as Domain$1, Constructor, Json, requireKeys, NonNegativeIntegerLiteral, flattenListable, noSuggest, intersectUnion, conform, ParseError, Key, propValueOf, Entry, KeySet, keySetOf, arrayIndexOf, JsonPrimitive, SerializedPrimitive, inferred, Fn, BuiltinObjectKind, describe, GuardablePredicate, Brand, dict, ArkRegistry } from '@ark/util';\nexport { ParseError } from '@ark/util';\n\ndeclare const intrinsic: {\n emptyStructure: StructureNode;\n jsonPrimitive: BaseRoot;\n jsonObject: BaseRoot;\n jsonData: BaseRoot;\n integer: BaseRoot;\n key: BaseRoot;\n lengthBoundable: BaseRoot;\n nonNegativeIntegerString: BaseRoot;\n string: BaseRoot;\n number: BaseRoot;\n bigint: BaseRoot;\n boolean: BaseRoot;\n symbol: BaseRoot;\n undefined: BaseRoot;\n object: BaseRoot;\n null: BaseRoot;\n Array: BaseRoot;\n Date: BaseRoot;\n never: BaseRoot;\n unknown: BaseRoot;\n true: BaseRoot;\n false: BaseRoot;\n};\n\ntype PreparsedNodeResolution = {\n [arkKind]: \"generic\" | \"module\";\n};\ndeclare class RootModule extends DynamicBase {\n get [arkKind](): \"module\";\n}\ninterface InternalModule extends RootModule {\n root?: BaseRoot;\n}\ndeclare const bindModule: (module: InternalModule, $: BaseScope) => InternalModule;\ntype exportSchemaScope<$> = {\n [k in keyof $]: instantiateRoot<$[k]>;\n};\ntype instantiateRoot = t extends InternalResolution ? [\n t\n] extends [anyOrNever] ? BaseRoot : t : BaseRoot;\ndeclare const SchemaModule: new <$ = {}>(types: exportSchemaScope<$>) => SchemaModule<$>;\ninterface SchemaModule<$ = {}> extends RootModule> {\n}\n\n/** From https://github.com/standard-schema/standard-schema */\n/**\n * The Standard Schema interface.\n */\ntype StandardSchemaV1 = {\n /**\n * The Standard Schema properties.\n */\n readonly \"~standard\": StandardSchemaV1.Props;\n};\ndeclare namespace StandardSchemaV1 {\n /**\n * The Standard Schema properties interface.\n */\n export interface Props {\n /**\n * The version number of the standard.\n */\n readonly version: 1;\n /**\n * The vendor name of the schema library.\n */\n readonly vendor: string;\n /**\n * Validates unknown input values.\n */\n readonly validate: (value: unknown) => Result | Promise>;\n /**\n * Inferred types associated with the schema.\n */\n readonly types?: Types | undefined;\n }\n export interface ArkTypeProps extends Props {\n readonly vendor: \"arktype\";\n }\n /**\n * The result interface of the validate function.\n */\n export type Result = SuccessResult | FailureResult;\n /**\n * The result interface if validation succeeds.\n */\n export interface SuccessResult {\n /**\n * The typed output value.\n */\n readonly value: Output;\n /**\n * The non-existent issues.\n */\n readonly issues?: undefined;\n }\n /**\n * The result interface if validation fails.\n */\n export interface FailureResult {\n /**\n * The issues of failed validation.\n */\n readonly issues: ReadonlyArray;\n }\n /**\n * The issue interface of the failure output.\n */\n export interface Issue {\n /**\n * The error message of the issue.\n */\n readonly message: string;\n /**\n * The path of the issue, if any.\n */\n readonly path?: ReadonlyArray | undefined;\n }\n /**\n * The path segment interface of the issue.\n */\n export interface PathSegment {\n /**\n * The key representing a path segment.\n */\n readonly key: PropertyKey;\n }\n /**\n * The Standard Schema types interface.\n */\n export interface Types {\n /**\n * The input type of the schema.\n */\n readonly input: Input;\n /**\n * The output type of the schema.\n */\n readonly output: Output;\n }\n /**\n * Infers the input type of a Standard Schema.\n */\n export type InferInput = NonNullable[\"input\"];\n /**\n * Infers the output type of a Standard Schema.\n */\n export type InferOutput = NonNullable[\"output\"];\n export { };\n}\n\ntype ArkErrorResult = ArkError | ArkErrors;\ndeclare class ArkError extends CastableBase> {\n readonly [arkKind] = \"error\";\n path: ReadonlyPath;\n data: Prerequisite;\n private nodeConfig;\n protected input: ArkErrorContextInput;\n protected ctx: Traversal;\n constructor(input: ArkErrorContextInput, ctx: Traversal);\n transform(f: (input: ArkErrorContextInput) => ArkErrorContextInput): ArkError;\n hasCode(code: code): this is ArkError;\n get propString(): string;\n get expected(): string;\n get actual(): string;\n get problem(): string;\n get message(): string;\n get flat(): ArkError[];\n toJSON(): JsonObject;\n toString(): string;\n throw(): never;\n}\ndeclare namespace ArkErrors {\n type Handler = (errors: ArkErrors) => returns;\n}\n/**\n * A ReadonlyArray of `ArkError`s returned by a Type on invalid input.\n *\n * Subsequent errors added at an existing path are merged into an\n * ArkError intersection.\n */\ndeclare class ArkErrors extends ReadonlyArray$1 implements StandardSchemaV1.FailureResult {\n readonly [arkKind] = \"errors\";\n protected ctx: Traversal;\n constructor(ctx: Traversal);\n /**\n * Errors by a pathString representing their location.\n */\n byPath: Record;\n /**\n * {@link byPath} flattened so that each value is an array of ArkError instances at that path.\n *\n * ✅ Since \"intersection\" errors will be flattened to their constituent `.errors`,\n * they will never be directly present in this representation.\n */\n get flatByPath(): Record;\n /**\n * {@link byPath} flattened so that each value is an array of problem strings at that path.\n */\n get flatProblemsByPath(): Record;\n /**\n * All pathStrings at which errors are present mapped to the errors occuring\n * at that path or any nested path within it.\n */\n byAncestorPath: Record;\n count: number;\n private mutable;\n /**\n * Throw a TraversalError based on these errors.\n */\n throw(): never;\n /**\n * Converts ArkErrors to TraversalError, a subclass of `Error` suitable for throwing with nice\n * formatting.\n */\n toTraversalError(): TraversalError;\n /**\n * Append an ArkError to this array, ignoring duplicates.\n */\n add(error: ArkError): void;\n transform(f: (e: ArkError) => ArkError): ArkErrors;\n /**\n * Add all errors from an ArkErrors instance, ignoring duplicates and\n * prefixing their paths with that of the current Traversal.\n */\n merge(errors: ArkErrors): void;\n /**\n * A human-readable summary of all errors.\n */\n get summary(): string;\n /**\n * Alias of this ArkErrors instance for StandardSchema compatibility.\n */\n get issues(): this;\n toJSON(): JsonArray;\n toString(): string;\n private _add;\n private addAncestorPaths;\n}\ndeclare class TraversalError extends Error {\n readonly name = \"TraversalError\";\n arkErrors: ArkErrors;\n constructor(errors: ArkErrors);\n}\ninterface DerivableErrorContext {\n expected: string;\n actual: string;\n problem: string;\n message: string;\n data: Prerequisite;\n path: array;\n propString: string;\n}\ntype DerivableErrorContextInput = Partial> & propwiseXor<{\n path?: array;\n}, {\n relativePath?: array;\n prefixPath?: array;\n}>;\ntype ArkErrorCode = {\n [kind in NodeKind]: errorContext extends null ? never : kind;\n}[NodeKind];\ntype ArkErrorContextInputsByCode = {\n [code in ArkErrorCode]: errorContext & DerivableErrorContextInput;\n};\ntype ArkErrorContextInput = merge;\ntype NodeErrorContextInput = ArkErrorContextInputsByCode[code] & {\n meta: NodeMeta;\n};\ntype MessageContext = Omit, \"message\">;\ntype ProblemContext = Omit, \"problem\">;\ntype CustomErrorInput = show<{\n code?: undefined;\n} & DerivableErrorContextInput>;\ntype ArkErrorInput = string | ArkErrorContextInput | CustomErrorInput;\ntype ProblemConfig = string | ProblemWriter;\ntype ProblemWriter = (context: ProblemContext) => string;\ntype MessageConfig = string | MessageWriter;\ntype MessageWriter = (context: MessageContext) => string;\ntype getAssociatedDataForError = code extends NodeKind ? Prerequisite : unknown;\ntype ExpectedConfig = string | ExpectedWriter;\ntype ExpectedWriter = (source: errorContext) => string;\ntype ActualConfig = string | ActualWriter;\ntype ActualWriter = (data: getAssociatedDataForError) => string;\n\ndeclare const makeRootAndArrayPropertiesMutable: (o: o) => makeRootAndArrayPropertiesMutable;\ntype makeRootAndArrayPropertiesMutable = {\n -readonly [k in keyof inner]: inner[k] extends array | undefined ? mutable : inner[k];\n} & unknown;\ntype internalImplementationOf = {\n [k in Exclude]: external[k] extends ((...args: infer args) => unknown) ? (...args: {\n [i in keyof args]: never;\n }) => unknown : unknown;\n};\ntype arkKind = typeof arkKind;\ndeclare const arkKind: \" arkKind\";\ninterface ArkKinds {\n constraint: BaseConstraint;\n root: BaseRoot;\n scope: BaseScope;\n generic: GenericRoot;\n module: InternalModule;\n error: ArkError;\n errors: ArkErrors;\n context: BaseParseContext;\n}\ntype ArkKind = show;\ndeclare const hasArkKind: (value: unknown, kind: kind) => value is ArkKinds[kind];\ndeclare const isNode: (value: unknown) => value is BaseNode;\ntype unwrapDefault = thunkableValue extends Thunk ? returnValue : thunkableValue;\n\ntype GenericParamAst = [name: name, constraint: constraint];\ntype GenericParamDef = name | readonly [name, unknown];\ndeclare const parseGeneric: (paramDefs: array, bodyDef: unknown, $: BaseScope) => GenericRoot;\ntype genericParamNames> = {\n [i in keyof params]: params[i][0];\n};\ntype genericParamConstraints> = {\n [i in keyof params]: params[i][1];\n};\ntype GenericArgResolutions = array> = {\n [i in keyof params as params[i & `${number}`][0]]: BaseRoot;\n};\ndeclare class LazyGenericBody extends Callable<(args: argResolutions) => returns> {\n}\ninterface GenericAst = array, bodyDef = unknown, $ = unknown, arg$ = $> {\n [arkKind]: \"generic\";\n paramsAst: params;\n bodyDef: bodyDef;\n $: $;\n arg$: arg$;\n names: genericParamNames;\n t: this;\n}\ndeclare class GenericRoot = array, bodyDef = unknown> extends Callable<(...args: {\n [i in keyof params]: BaseRoot;\n}) => BaseRoot> {\n readonly [arkKind] = \"generic\";\n readonly paramsAst: params;\n readonly t: GenericAst;\n paramDefs: array;\n bodyDef: bodyDef;\n $: BaseScope;\n arg$: BaseScope;\n baseInstantiation: BaseRoot;\n hkt: Hkt.constructor | null;\n description: string;\n constructor(paramDefs: array, bodyDef: bodyDef, $: BaseScope, arg$: BaseScope, hkt: Hkt.constructor | null);\n defIsLazy(): this is GenericRoot;\n protected cacheGetter(name: name, value: this[name]): this[name];\n get json(): JsonStructure;\n get params(): {\n [i in keyof params]: [params[i][0], BaseRoot];\n };\n get names(): genericParamNames;\n get constraints(): {\n [i in keyof params]: BaseRoot;\n };\n get internal(): this;\n get referencesById(): Record;\n get references(): BaseNode[];\n}\ntype genericParamSchemasToAst = {\n [i in keyof schemas]: schemas[i] extends GenericParamDef ? [\n name,\n unknown\n ] : never;\n};\ntype genericHktToConstraints Hkt> = InstanceType[\"constraints\"];\ntype GenericRootParser = (...params: paramsDef) => GenericRootBodyParser>;\ntype GenericRootBodyParser> = {\n (body: RootSchema): GenericRoot;\n (instantiateDef: LazyGenericBody>, hkt: hkt): GenericRoot<{\n [i in keyof params]: [params[i][0], genericHktToConstraints[i]];\n }, InstanceType>;\n};\ndeclare const writeUnsatisfiedParameterConstraintMessage: (name: name, constraint: constraint, arg: arg) => writeUnsatisfiedParameterConstraintMessage;\ntype writeUnsatisfiedParameterConstraintMessage = `${name} must be assignable to ${constraint} (was ${arg})`;\n\ntype ListableJsonSchema = listable;\ntype JsonSchemaOrBoolean = listable;\ntype JsonSchema = JsonSchema.NonBooleanBranch;\ndeclare namespace JsonSchema {\n type TypeName = \"string\" | \"integer\" | \"number\" | \"object\" | \"array\" | \"boolean\" | \"null\";\n /**\n * a subset of JSON Schema's annotations, see:\n * https://json-schema.org/understanding-json-schema/reference/annotations\n **/\n interface Meta extends UniversalMeta {\n $schema?: string;\n $defs?: Record;\n }\n type Format = autocomplete<\"date-time\" | \"date\" | \"time\" | \"email\" | \"ipv4\" | \"ipv6\" | \"uri\" | \"uuid\" | \"regex\">;\n /**\n * doesn't include root-only keys like $schema\n */\n interface UniversalMeta {\n title?: string;\n description?: string;\n format?: Format;\n deprecated?: true;\n default?: t;\n examples?: readonly t[];\n }\n type Composition = Union | OneOf | Intersection | Not;\n type NonBooleanBranch = Constrainable | Const | Composition | Enum | String | Numeric | Object | Array | Ref;\n type Branch = boolean | JsonSchema;\n type RefString = `#/$defs/${string}`;\n interface Ref extends Meta {\n $ref: RefString;\n type?: never;\n }\n interface Constrainable extends Meta {\n type?: listable;\n }\n interface Intersection extends Meta {\n allOf: readonly JsonSchema[];\n }\n interface Not extends Meta {\n not: JsonSchema;\n }\n interface OneOf extends Meta {\n oneOf: readonly JsonSchema[];\n }\n interface Union extends Meta {\n anyOf: readonly JsonSchema[];\n }\n interface Const extends Meta {\n const: unknown;\n }\n interface Enum extends Meta {\n enum: array;\n }\n interface String extends Meta {\n type: \"string\";\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n format?: string;\n }\n interface Numeric extends Meta {\n type: \"number\" | \"integer\";\n multipleOf?: number;\n minimum?: number;\n exclusiveMinimum?: number;\n maximum?: number;\n exclusiveMaximum?: number;\n }\n interface Object extends Meta {\n type: \"object\";\n properties?: Record;\n required?: string[];\n patternProperties?: Record;\n additionalProperties?: JsonSchemaOrBoolean;\n maxProperties?: number;\n minProperties?: number;\n propertyNames?: String;\n }\n interface Array extends Meta {\n type: \"array\";\n additionalItems?: JsonSchemaOrBoolean;\n contains?: JsonSchemaOrBoolean;\n uniqueItems?: boolean;\n minItems?: number;\n maxItems?: number;\n items?: JsonSchemaOrBoolean;\n prefixItems?: readonly Branch[];\n }\n type LengthBoundable = String | Array;\n type Structure = Object | Array;\n}\n\ndeclare class ToJsonSchemaError extends Error {\n readonly name = \"ToJsonSchemaError\";\n readonly code: code;\n readonly context: ToJsonSchema.ContextByCode[code];\n constructor(code: code, context: ToJsonSchema.ContextByCode[code]);\n hasCode(code: code): this is ToJsonSchemaError;\n}\ndeclare const ToJsonSchema: {\n Error: typeof ToJsonSchemaError;\n throw: (code: keyof ToJsonSchema.ContextByCode, context: ToJsonSchema.MorphContext | ToJsonSchema.UnitContext | ToJsonSchema.ProtoContext | ToJsonSchema.DomainContext | ToJsonSchema.PredicateContext | ToJsonSchema.DateContext | ToJsonSchema.ArrayObjectContext | ToJsonSchema.ArrayPostfixContext | ToJsonSchema.DefaultValueContext | ToJsonSchema.PatternIntersectionContext | ToJsonSchema.SymbolKeyContext) => never;\n throwInternalOperandError: (kind: ConstraintKind, schema: JsonSchema) => never;\n defaultConfig: ToJsonSchema.Context;\n};\ndeclare namespace ToJsonSchema {\n type Unjsonifiable = object | symbol | bigint | undefined;\n type Error = InstanceType;\n interface BaseContext {\n code: code;\n base: base;\n }\n interface ArrayObjectContext extends BaseContext<\"arrayObject\", JsonSchema.Array> {\n object: JsonSchema.Object;\n }\n interface ArrayPostfixContext extends BaseContext<\"arrayPostfix\", VariadicArraySchema> {\n elements: readonly JsonSchema[];\n }\n interface DefaultValueContext extends BaseContext<\"defaultValue\", JsonSchema> {\n value: Unjsonifiable;\n }\n interface DomainContext extends BaseContext<\"domain\", JsonSchema> {\n domain: satisfy;\n }\n interface MorphContext extends BaseContext<\"morph\", JsonSchema> {\n out: JsonSchema | null;\n }\n interface PatternIntersectionContext extends BaseContext<\"patternIntersection\", StringSchemaWithPattern> {\n pattern: string;\n }\n interface PredicateContext extends BaseContext<\"predicate\", JsonSchema> {\n predicate: Predicate;\n }\n interface ProtoContext extends BaseContext<\"proto\", JsonSchema> {\n proto: Constructor;\n }\n type SymbolKeyContext = IndexSymbolKeyContext | RequiredSymbolKeyContext | OptionalSymbolKeyContext;\n interface IndexSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: null;\n value: JsonSchema;\n optional: false;\n }\n interface RequiredSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: symbol;\n value: JsonSchema;\n optional: false;\n }\n interface OptionalSymbolKeyContext extends BaseContext<\"symbolKey\", JsonSchema.Object> {\n key: symbol;\n value: JsonSchema;\n optional: true;\n default?: Json;\n }\n interface UnitContext extends BaseContext<\"unit\", JsonSchema> {\n unit: Unjsonifiable;\n }\n interface DateContext extends BaseContext<\"date\", JsonSchema> {\n before?: Date;\n after?: Date;\n }\n interface ContextByCode {\n arrayObject: ArrayObjectContext;\n arrayPostfix: ArrayPostfixContext;\n defaultValue: DefaultValueContext;\n domain: DomainContext;\n morph: MorphContext;\n patternIntersection: PatternIntersectionContext;\n predicate: PredicateContext;\n proto: ProtoContext;\n symbolKey: SymbolKeyContext;\n unit: UnitContext;\n date: DateContext;\n }\n type Code = keyof ContextByCode;\n type FallbackContext = ContextByCode[Code];\n type HandlerByCode = satisfy<{\n [code in Code]: (ctx: ContextByCode[code]) => unknown;\n }, {\n arrayObject: (ctx: ArrayObjectContext) => JsonSchema.Structure;\n arrayPostfix: (ctx: ArrayPostfixContext) => VariadicArraySchema;\n defaultValue: (ctx: DefaultValueContext) => JsonSchema;\n domain: (ctx: DomainContext) => JsonSchema;\n morph: (ctx: MorphContext) => JsonSchema;\n patternIntersection: (ctx: PatternIntersectionContext) => JsonSchema.String;\n predicate: (ctx: PredicateContext) => JsonSchema;\n proto: (ctx: ProtoContext) => JsonSchema;\n symbolKey: (ctx: SymbolKeyContext) => JsonSchema.Object;\n unit: (ctx: UnitContext) => JsonSchema;\n date: (ctx: DateContext) => JsonSchema;\n }>;\n type VariadicArraySchema = requireKeys;\n type StringSchemaWithPattern = requireKeys;\n type UniversalFallback = (ctx: FallbackContext) => JsonSchema;\n interface FallbackObject extends Partial {\n default?: UniversalFallback;\n }\n type FallbackOption = UniversalFallback | FallbackObject;\n interface Options {\n /** value to assign to the generated $schema key\n *\n * - set to `null` to omit the `$schema` key\n * - does not affect the contents of the generated schema\n *\n * @default \"https://json-schema.org/draft/2020-12/schema\"\n */\n dialect?: string | null;\n useRefs?: boolean;\n fallback?: FallbackOption;\n }\n interface Context extends Required {\n fallback: HandlerByCode;\n }\n}\n\ndeclare class AliasNode extends BaseRoot {\n readonly expression: string;\n readonly structure: undefined;\n get resolution(): BaseRoot;\n protected _resolve(): BaseRoot;\n get resolutionId(): NodeId;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare namespace Alias {\n type Schema = `$${alias}` | NormalizedSchema;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly reference: alias;\n readonly resolve?: () => BaseRoot;\n }\n interface Inner {\n readonly reference: alias;\n readonly resolve?: () => BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"alias\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n }> {\n }\n type Node = AliasNode;\n}\ndeclare const Alias: {\n implementation: nodeImplementationOf;\n Node: typeof AliasNode;\n};\n\ndeclare const registryName: string;\ndeclare const $ark: ArkSchemaRegistry;\ndeclare const reference: (name: string) => RegisteredReference;\ndeclare const registeredReference: (value: object | symbol) => RegisteredReference;\ntype RegisteredReference = `$ark${\"\" | NonNegativeIntegerLiteral}.${to}`;\n\ntype InternalResolutions = Record;\ntype exportedNameOf<$> = Exclude;\ntype resolvableReferenceIn<$> = {\n [k in keyof $]: k extends string ? k extends PrivateDeclaration ? alias : k extends noSuggest | \"root\" ? never : k : never;\n}[keyof $];\ntype resolveReference, $> = reference extends keyof $ ? $[reference] : $[`#${reference}` & keyof $];\ntype flatResolutionsOf<$> = show extends infer k ? k extends keyof $ & string ? resolutionsOfReference : unknown : unknown>>;\ntype resolutionsOfReference = [\n v\n] extends [{\n [arkKind]: \"module\";\n}] ? [\n v\n] extends [anyOrNever] ? {\n [_ in k]: v;\n} : prefixKeys, k> & {\n [innerKey in keyof v as innerKey extends \"root\" ? k : never]: v[innerKey];\n} : {\n [_ in k]: v;\n};\ntype prefixKeys = {\n [k in keyof o & string as `${prefix}.${k}`]: o[k];\n} & unknown;\ntype PrivateDeclaration = `#${key}`;\ntype InternalResolution = BaseRoot | GenericRoot | InternalModule;\ntype toInternalScope<$> = BaseScope<{\n [k in keyof $]: $[k] extends {\n [arkKind]: infer kind;\n } ? [\n $[k]\n ] extends [anyOrNever] ? BaseRoot : kind extends \"generic\" ? GenericRoot : kind extends \"module\" ? InternalModule : never : BaseRoot;\n}>;\ntype CachedResolution = NodeId | BaseRoot | GenericRoot;\ndeclare const writeDuplicateAliasError: (alias: alias) => writeDuplicateAliasError;\ntype writeDuplicateAliasError = `#${alias} duplicates public alias ${alias}`;\ntype AliasDefEntry = [name: string, defValue: unknown];\ntype GlobalOnlyConfigOptionName = satisfy;\ninterface ScopeOnlyConfigOptions {\n name?: string;\n prereducedAliases?: boolean;\n}\ninterface ArkSchemaScopeConfig extends Omit, ScopeOnlyConfigOptions {\n}\ninterface ResolvedScopeConfig extends ResolvedConfig, ScopeOnlyConfigOptions {\n}\ntype PrecompiledReferences = {\n [k: `${string}Allows`]: TraverseAllows;\n [k: `${string}Apply`]: TraverseApply;\n [k: `${string}Optimistic`]: (data: unknown) => unknown;\n};\ndeclare abstract class BaseScope<$ extends {} = {}> {\n readonly config: ArkSchemaScopeConfig;\n readonly resolvedConfig: ResolvedScopeConfig;\n readonly name: string;\n get [arkKind](): \"scope\";\n readonly referencesById: {\n [id: string]: BaseNode;\n };\n references: readonly BaseNode[];\n readonly resolutions: {\n [alias: string]: CachedResolution | undefined;\n };\n exportedNames: string[];\n readonly aliases: Record;\n protected resolved: boolean;\n readonly nodesByHash: Record;\n readonly intrinsic: Omit;\n constructor(\n /** The set of names defined at the root-level of the scope mapped to their\n * corresponding definitions.**/\n def: Record, config?: ArkSchemaScopeConfig);\n protected cacheGetter(name: name, value: this[name]): this[name];\n get internal(): this;\n private _json;\n get json(): JsonStructure;\n defineSchema(def: def): def;\n generic: GenericRootParser;\n units: (values: array, opts?: BaseParseOptions) => BaseRoot;\n protected lazyResolutions: Alias.Node[];\n lazilyResolve(resolve: () => BaseRoot, syntheticAlias?: string): Alias.Node;\n schema: InternalSchemaParser;\n parseSchema: InternalSchemaParser;\n protected preparseNode(kinds: NodeKind | listable, schema: unknown, opts: BaseParseOptions): BaseNode | NodeParseContextInput;\n bindReference(reference: reference): reference;\n resolveRoot(name: string): BaseRoot;\n maybeResolveRoot(name: string): BaseRoot | undefined;\n /** If name is a valid reference to a submodule alias, return its resolution */\n protected maybeResolveSubalias(name: string): BaseRoot | GenericRoot | undefined;\n get ambient(): InternalModule;\n maybeResolve(name: string): Exclude | undefined;\n protected createParseContext(input: input): input & AttachedParseContext;\n traversal(root: unknown): Traversal;\n import(): SchemaModule<{\n [k in exportedNameOf<$> as PrivateDeclaration]: $[k];\n }>;\n import[]>(...names: names): SchemaModule<{\n [k in names[number] as PrivateDeclaration]: $[k];\n } & unknown>;\n precompilation: string | undefined;\n private _exportedResolutions;\n private _exports;\n export(): SchemaModule<{\n [k in exportedNameOf<$>]: $[k];\n }>;\n export[]>(...names: names): SchemaModule<{\n [k in names[number]]: $[k];\n } & unknown>;\n resolve>(name: name): instantiateRoot<$[name]>;\n node: , prereduced extends boolean = false>(kinds: kinds, nodeSchema: NodeSchema>, opts?: BaseParseOptions) => nodeOfKind : reducibleKindOf>>;\n parse: (def: unknown, opts?: BaseParseOptions) => BaseRoot;\n parseDefinition(def: unknown, opts?: BaseParseOptions): BaseRoot;\n finalize(node: node): node;\n protected abstract preparseOwnDefinitionFormat(def: unknown, opts: BaseParseOptions): BaseRoot | BaseParseContextInput;\n abstract parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot;\n protected abstract preparseOwnAliasEntry(k: string, v: unknown): AliasDefEntry;\n protected abstract normalizeRootScopeValue(resolution: unknown): unknown;\n}\ndeclare class SchemaScope<$ extends {} = {}> extends BaseScope<$> {\n parseOwnDefinitionFormat(def: unknown, ctx: NodeParseContext): BaseRoot;\n protected preparseOwnDefinitionFormat(schema: RootSchema, opts: BaseParseOptions): BaseRoot | NodeParseContextInput;\n protected preparseOwnAliasEntry(k: string, v: unknown): AliasDefEntry;\n protected normalizeRootScopeValue(v: unknown): unknown;\n}\ntype instantiateAliases = {\n [k in keyof aliases]: aliases[k] extends InternalResolution ? aliases[k] : BaseRoot;\n} & unknown;\ntype SchemaScopeParser = (aliases: {\n [k in keyof aliases]: conform;\n}, config?: ArkSchemaScopeConfig) => BaseScope>;\ndeclare const schemaScope: SchemaScopeParser;\ntype InternalSchemaParser = (schema: RootSchema, opts?: BaseParseOptions) => BaseRoot;\ndeclare const rootSchemaScope: SchemaScope;\ndeclare const parseAsSchema: (def: unknown, opts?: BaseParseOptions) => BaseRoot | ParseError;\ntype RootExportCache = Record;\ndeclare const writeUnresolvableMessage: (token: token) => writeUnresolvableMessage;\ntype writeUnresolvableMessage = `'${token}' is unresolvable`;\ndeclare const writeNonSubmoduleDotMessage: (name: name) => writeNonSubmoduleDotMessage;\ntype writeNonSubmoduleDotMessage = `'${name}' must reference a module to be accessed using dot syntax`;\ndeclare const writeMissingSubmoduleAccessMessage: (name: name) => writeMissingSubmoduleAccessMessage;\ntype writeMissingSubmoduleAccessMessage = `Reference to submodule '${name}' must specify an alias`;\ndeclare const rootSchema: BaseScope[\"schema\"];\ndeclare const node: BaseScope[\"node\"];\ndeclare const defineSchema: BaseScope[\"defineSchema\"];\ndeclare const genericNode: BaseScope[\"generic\"];\n\ndeclare class IndexNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n expression: string;\n flatRefs: FlatRef>[];\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n compile(): void;\n}\ndeclare namespace Index {\n type KeyKind = Exclude;\n type KeyNode = nodeOfKind;\n interface Schema extends BaseNormalizedSchema {\n readonly signature: RootSchema;\n readonly value: RootSchema;\n }\n interface Inner {\n readonly signature: KeyNode;\n readonly value: BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"index\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n }> {\n }\n type Node = IndexNode;\n}\ndeclare const Index: {\n implementation: nodeImplementationOf;\n Node: typeof IndexNode;\n};\ndeclare const writeEnumerableIndexBranches: (keys: string[]) => string;\ndeclare const writeInvalidPropertyKeyMessage: (indexSchema: indexSchema) => writeInvalidPropertyKeyMessage;\ntype writeInvalidPropertyKeyMessage = `Indexed key definition '${indexSchema}' must be a string or symbol`;\n\ndeclare class RequiredNode extends BaseProp<\"required\"> {\n expression: string;\n errorContext: NodeErrorContextInput<\"required\">;\n compiledErrorContext: string;\n}\ndeclare namespace Required$1 {\n interface ErrorContext extends BaseErrorContext<\"required\"> {\n missingValueDescription: string;\n }\n interface Schema extends Prop.Schema {\n }\n interface Inner extends Prop.Inner {\n }\n type Declaration = declareNode & {\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n errorContext: ErrorContext;\n }>;\n type Node = RequiredNode;\n}\ndeclare const Required$1: {\n implementation: nodeImplementationOf<{\n reducibleTo: \"required\";\n kind: \"required\";\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n schema: Required$1.Schema;\n normalizedSchema: Required$1.Schema;\n inner: Required$1.Inner;\n errorContext: Required$1.ErrorContext;\n }>;\n Node: typeof RequiredNode;\n};\n\ndeclare namespace Prop {\n type Kind = \"required\" | \"optional\";\n type Node = nodeOfKind;\n interface Schema extends BaseNormalizedSchema {\n readonly key: Key;\n readonly value: RootSchema;\n }\n interface Inner {\n readonly key: Key;\n readonly value: BaseRoot;\n }\n interface Declaration {\n kind: kind;\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n }\n}\ndeclare const intersectProps: (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => nodeOfKind | Disjoint | null;\ndeclare abstract class BaseProp extends BaseConstraint {\n required: boolean;\n optional: boolean;\n impliedBasis: BaseRoot;\n serializedKey: string;\n compiledKey: string;\n flatRefs: FlatRef[];\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n hasDefault(): this is Optional.Node.withDefault;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare const writeDefaultIntersectionMessage: (lValue: unknown, rValue: unknown) => string;\n\ndeclare class OptionalNode extends BaseProp<\"optional\"> {\n constructor(...args: ConstructorParameters);\n get outProp(): Prop.Node;\n expression: string;\n defaultValueMorph: Morph | undefined;\n defaultValueMorphRef: string | undefined;\n}\ndeclare namespace Optional {\n interface Schema extends Prop.Schema {\n default?: unknown;\n }\n interface Inner extends Prop.Inner {\n default?: unknown;\n }\n type Declaration = declareNode & {\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n }>;\n type Node = OptionalNode;\n namespace Node {\n type withDefault = requireKeys;\n }\n}\ndeclare const Optional: {\n implementation: nodeImplementationOf<{\n reducibleTo: \"optional\";\n errorContext: null;\n kind: \"optional\";\n prerequisite: object;\n intersectionIsOpen: true;\n childKind: RootKind;\n schema: Optional.Schema;\n normalizedSchema: Optional.Schema;\n inner: Optional.Inner;\n }>;\n Node: typeof OptionalNode;\n};\ndeclare const computeDefaultValueMorph: (key: PropertyKey, value: BaseRoot, defaultInput: unknown) => Morph;\ndeclare const assertDefaultValueAssignability: (node: BaseRoot, value: unknown, key: PropertyKey | null) => unknown;\ntype writeUnassignableDefaultValueMessage = `Default value ${defaultValue} must be assignable to ${baseDef}`;\ndeclare const writeNonPrimitiveNonFunctionDefaultValueMessage: (key: PropertyKey | null) => string;\n\ninterface BaseRangeDeclaration extends BaseNodeDeclaration {\n kind: RangeKind;\n inner: BaseRangeInner;\n normalizedSchema: UnknownExpandedRangeSchema;\n}\ndeclare abstract class BaseRange extends InternalPrimitiveConstraint {\n readonly exclusive?: true;\n readonly boundOperandKind: OperandKindsByBoundKind[d[\"kind\"]];\n readonly compiledActual: string;\n readonly comparator: RelativeComparator;\n readonly numericLimit: number;\n readonly expression: string;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly stringLimit: string;\n readonly limitKind: LimitKind;\n isStricterThan(r: nodeOfKind>): boolean;\n overlapsRange(r: nodeOfKind>): boolean;\n overlapIsUnit(r: nodeOfKind>): boolean;\n}\ninterface BaseRangeInner {\n readonly rule: LimitValue;\n}\ntype LimitValue = Date | number;\ntype LimitSchemaValue = Date | number | string;\ntype LimitInnerValue = kind extends \"before\" | \"after\" ? Date : number;\ninterface UnknownExpandedRangeSchema extends BaseNormalizedSchema {\n readonly rule: LimitSchemaValue;\n readonly exclusive?: boolean;\n}\ninterface UnknownNormalizedRangeSchema extends BaseNormalizedSchema {\n readonly rule: LimitSchemaValue;\n}\ntype UnknownRangeSchema = LimitSchemaValue | UnknownExpandedRangeSchema;\ninterface ExclusiveExpandedDateRangeSchema extends BaseNormalizedSchema {\n rule: LimitSchemaValue;\n exclusive?: true;\n}\ntype ExclusiveDateRangeSchema = LimitSchemaValue | ExclusiveExpandedDateRangeSchema;\ninterface InclusiveExpandedDateRangeSchema extends BaseNormalizedSchema {\n rule: LimitSchemaValue;\n exclusive?: false;\n}\ntype InclusiveDateRangeSchema = LimitSchemaValue | InclusiveExpandedDateRangeSchema;\ninterface ExclusiveNormalizedNumericRangeSchema extends BaseNormalizedSchema {\n rule: number;\n exclusive?: true;\n}\ntype ExclusiveNumericRangeSchema = number | ExclusiveNormalizedNumericRangeSchema;\ninterface InclusiveNormalizedNumericRangeSchema extends BaseNormalizedSchema {\n rule: number;\n exclusive?: false;\n}\ntype InclusiveNumericRangeSchema = number | InclusiveNormalizedNumericRangeSchema;\ntype LimitKind = \"lower\" | \"upper\";\ntype RelativeComparator = {\n lower: \">\" | \">=\";\n upper: \"<\" | \"<=\";\n}[kind];\ndeclare const boundKindPairsByLower: BoundKindPairsByLower;\ntype BoundKindPairsByLower = {\n min: \"max\";\n minLength: \"maxLength\";\n after: \"before\";\n};\ntype BoundKindPairsByUpper = {\n max: \"min\";\n maxLength: \"minLength\";\n before: \"after\";\n};\ntype pairedRangeKind = kind extends LowerBoundKind ? BoundKindPairsByLower[kind] : BoundKindPairsByUpper[kind & UpperBoundKind];\ntype LowerBoundKind = keyof typeof boundKindPairsByLower;\ntype LowerNode = nodeOfKind;\ntype UpperBoundKind = propValueOf;\ntype UpperNode = nodeOfKind;\ntype NumericallyBoundable = string | number | array;\ntype Boundable = NumericallyBoundable | Date;\ndeclare const parseExclusiveKey: keySchemaDefinitions>[\"exclusive\"];\ndeclare const createLengthSchemaNormalizer: (kind: kind) => (schema: NodeSchema) => NormalizedSchema;\ndeclare const createDateSchemaNormalizer: (kind: kind) => (schema: NodeSchema) => NormalizedSchema;\ndeclare const parseDateLimit: (limit: LimitSchemaValue) => Date;\ntype LengthBoundKind = \"minLength\" | \"maxLength\" | \"exactLength\";\ndeclare const writeInvalidLengthBoundMessage: (kind: LengthBoundKind, limit: number) => string;\ndeclare const createLengthRuleParser: (kind: LengthBoundKind) => (limit: number) => number | undefined;\ntype OperandKindsByBoundKind = satisfy, {\n min: \"value\";\n max: \"value\";\n minLength: \"length\";\n maxLength: \"length\";\n after: \"date\";\n before: \"date\";\n}>;\ndeclare const compileComparator: (kind: RangeKind, exclusive: boolean | undefined) => RelativeComparator;\ntype BoundOperandKind = \"value\" | \"length\" | \"date\";\ntype LengthBoundableData = string | array;\ntype DateRangeKind = \"before\" | \"after\";\ndeclare const dateLimitToString: (limit: LimitSchemaValue) => string;\ndeclare const writeUnboundableMessage: (root: root) => writeUnboundableMessage;\ntype writeUnboundableMessage = `Bounded expression ${root} must be exactly one of number, string, Array, or Date`;\n\ndeclare class ExactLengthNode extends InternalPrimitiveConstraint {\n traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n readonly expression: string;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace ExactLength {\n interface Inner {\n readonly rule: number;\n }\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"exactLength\">, Inner {\n }\n type Declaration = declareNode<{\n kind: \"exactLength\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n errorContext: ErrorContext;\n }>;\n type Node = ExactLengthNode;\n}\ndeclare const ExactLength: {\n implementation: nodeImplementationOf<{\n intersectionIsOpen: false;\n childKind: never;\n reducibleTo: \"exactLength\";\n kind: \"exactLength\";\n schema: ExactLength.Schema;\n normalizedSchema: ExactLength.NormalizedSchema;\n inner: ExactLength.Inner;\n prerequisite: LengthBoundableData;\n errorContext: ExactLength.ErrorContext;\n }>;\n Node: typeof ExactLengthNode;\n};\n\ndeclare class MaxLengthNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace MaxLength {\n interface Inner extends BaseRangeInner {\n rule: number;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: number;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = ExpandedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"maxLength\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"maxLength\";\n schema: Schema;\n reducibleTo: \"exactLength\";\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MaxLengthNode;\n}\ndeclare const MaxLength: {\n implementation: nodeImplementationOf;\n Node: typeof MaxLengthNode;\n};\n\ndeclare class MinLengthNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.LengthBoundable): JsonSchema.LengthBoundable;\n}\ndeclare namespace MinLength {\n interface Inner extends BaseRangeInner {\n rule: number;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: number;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = ExpandedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"minLength\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"minLength\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: LengthBoundableData;\n reducibleTo: \"intersection\";\n errorContext: ErrorContext;\n }> {\n }\n type Node = MinLengthNode;\n}\ndeclare const MinLength: {\n implementation: nodeImplementationOf;\n Node: typeof MinLengthNode;\n};\n\ndeclare class SequenceNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n tuple: SequenceTuple;\n prefixLength: number;\n defaultablesLength: number;\n optionalsLength: number;\n postfixLength: number;\n defaultablesAndOptionals: BaseRoot[];\n prevariadic: array;\n variadicOrPostfix: array;\n flatRefs: FlatRef[];\n protected addFlatRefs(): FlatRef[];\n isVariadicOnly: boolean;\n minVariadicLength: number;\n minLength: number;\n minLengthNode: MinLengthNode | null;\n maxLength: number | null;\n maxLengthNode: MaxLengthNode | ExactLengthNode | null;\n impliedSiblings: array;\n defaultValueMorphs: Morph[];\n defaultValueMorphsReference: `$ark.${string}` | `$ark0.${string}` | `$ark${`1${string}` & `${bigint}`}.${string}` | `$ark${`4${string}` & `${bigint}`}.${string}` | `$ark${`2${string}` & `${bigint}`}.${string}` | `$ark${`3${string}` & `${bigint}`}.${string}` | `$ark${`5${string}` & `${bigint}`}.${string}` | `$ark${`6${string}` & `${bigint}`}.${string}` | `$ark${`7${string}` & `${bigint}`}.${string}` | `$ark${`8${string}` & `${bigint}`}.${string}` | `$ark${`9${string}` & `${bigint}`}.${string}` | undefined;\n protected elementAtIndex(data: array, index: number): SequenceElement;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n get element(): BaseRoot;\n compile(js: NodeCompiler): void;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n expression: string;\n reduceJsonSchema(schema: JsonSchema.Array, ctx: ToJsonSchema.Context): JsonSchema.Array;\n}\ndeclare namespace Sequence {\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly prefix?: array;\n readonly defaultables?: array;\n readonly optionals?: array;\n readonly variadic?: RootSchema;\n readonly minVariadicLength?: number;\n readonly postfix?: array;\n }\n type Schema = NormalizedSchema | RootSchema;\n type DefaultableSchema = [schema: RootSchema, defaultValue: unknown];\n type DefaultableElement = [node: BaseRoot, defaultValue: unknown];\n interface Inner {\n readonly prefix?: array;\n readonly defaultables?: array;\n readonly optionals?: array;\n readonly variadic?: BaseRoot;\n readonly minVariadicLength?: number;\n readonly postfix?: array;\n }\n interface Declaration extends declareNode<{\n kind: \"sequence\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: array;\n reducibleTo: \"sequence\";\n childKind: RootKind;\n }> {\n }\n type Node = SequenceNode;\n}\ndeclare const Sequence: {\n implementation: nodeImplementationOf;\n Node: typeof SequenceNode;\n};\ndeclare const postfixAfterOptionalOrDefaultableMessage = \"A postfix required element cannot follow an optional or defaultable element\";\ntype postfixAfterOptionalOrDefaultableMessage = typeof postfixAfterOptionalOrDefaultableMessage;\ndeclare const postfixWithoutVariadicMessage = \"A postfix element requires a variadic element\";\ntype postfixWithoutVariadicMessage = typeof postfixWithoutVariadicMessage;\ntype SequenceElement = PrevariadicSequenceElement | VariadicSequenceElement | PostfixSequenceElement;\ntype SequenceElementKind = satisfy;\ntype PrevariadicSequenceElement = PrefixSequenceElement | DefaultableSequenceElement | OptionalSequenceElement;\ntype PrefixSequenceElement = {\n kind: \"prefix\";\n node: BaseRoot;\n};\ntype OptionalSequenceElement = {\n kind: \"optionals\";\n node: BaseRoot;\n};\ntype PostfixSequenceElement = {\n kind: \"postfix\";\n node: BaseRoot;\n};\ntype VariadicSequenceElement = {\n kind: \"variadic\";\n node: BaseRoot;\n};\ntype DefaultableSequenceElement = {\n kind: \"defaultables\";\n node: BaseRoot;\n default: unknown;\n};\ntype SequenceTuple = array;\n\n/**\n * - `\"ignore\"` (default) - allow and preserve extra properties\n * - `\"reject\"` - disallow extra properties\n * - `\"delete\"` - clone and remove extra properties from output\n */\ntype UndeclaredKeyBehavior = \"ignore\" | UndeclaredKeyHandling;\ntype UndeclaredKeyHandling = \"reject\" | \"delete\";\ndeclare class StructureNode extends BaseConstraint {\n impliedBasis: BaseRoot;\n impliedSiblings: BaseConstraint[];\n props: array;\n propsByKey: Record;\n propsByKeyReference: RegisteredReference;\n expression: string;\n requiredKeys: Key[];\n optionalKeys: Key[];\n literalKeys: Key[];\n _keyof: BaseRoot | undefined;\n keyof(): BaseRoot;\n map(flatMapProp: PropFlatMapper): StructureNode;\n assertHasKeys(keys: array): void;\n get(indexer: GettableKeyOrNode, ...path: array): BaseRoot;\n pick(...keys: KeyOrKeyNode[]): StructureNode;\n omit(...keys: KeyOrKeyNode[]): StructureNode;\n optionalize(): StructureNode;\n require(): StructureNode;\n merge(r: StructureNode): StructureNode;\n private filterKeys;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n protected _traverse: (traversalKind: TraversalKind, data: object, ctx: InternalTraversal) => boolean;\n get defaultable(): Optional.Node.withDefault[];\n declaresKey: (k: Key) => boolean;\n _compileDeclaresKey(js: NodeCompiler): string;\n get structuralMorph(): Morph | undefined;\n structuralMorphRef: RegisteredReference | undefined;\n compile(js: NodeCompiler): unknown;\n protected compileExhaustiveEntry(js: NodeCompiler): NodeCompiler;\n reduceJsonSchema(schema: JsonSchema.Structure, ctx: ToJsonSchema.Context): JsonSchema.Structure;\n reduceObjectJsonSchema(schema: JsonSchema.Object, ctx: ToJsonSchema.Context): JsonSchema.Object;\n}\ntype PropFlatMapper = (entry: Prop.Node) => listable;\ntype MappedPropInner = BaseMappedPropInner | OptionalMappedPropInner;\ninterface BaseMappedPropInner extends Required$1.Schema {\n kind?: \"required\" | \"optional\";\n}\ninterface OptionalMappedPropInner extends Optional.Schema {\n kind: \"optional\";\n}\ndeclare namespace Structure {\n interface Schema extends BaseNormalizedSchema {\n readonly optional?: readonly Optional.Schema[];\n readonly required?: readonly Required$1.Schema[];\n readonly index?: readonly Index.Schema[];\n readonly sequence?: Sequence.Schema;\n readonly undeclared?: UndeclaredKeyBehavior;\n }\n interface Inner {\n readonly optional?: readonly Optional.Node[];\n readonly required?: readonly Required$1.Node[];\n readonly index?: readonly Index.Node[];\n readonly sequence?: Sequence.Node;\n readonly undeclared?: UndeclaredKeyHandling;\n }\n namespace Inner {\n type mutable = makeRootAndArrayPropertiesMutable;\n }\n interface Declaration extends declareNode<{\n kind: \"structure\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n prerequisite: object;\n childKind: StructuralKind;\n }> {\n }\n type Node = StructureNode;\n}\ndeclare const Structure: {\n implementation: nodeImplementationOf;\n Node: typeof StructureNode;\n};\ndeclare const writeNumberIndexMessage: (indexExpression: string, sequenceExpression: string) => string;\ntype NormalizedIndex = {\n index?: Index.Node;\n required?: Required$1.Node[];\n optional?: Optional.Node[];\n};\n/** extract enumerable named props from an index signature */\ndeclare const normalizeIndex: (signature: BaseRoot, value: BaseRoot, $: BaseScope) => NormalizedIndex;\ndeclare const typeKeyToString: (k: KeyOrKeyNode) => string;\ndeclare const writeInvalidKeysMessage: >(o: o, keys: keys) => string;\n\ndeclare const basisKinds: readonly [\"unit\", \"proto\", \"domain\"];\ntype BasisKind = (typeof basisKinds)[number];\ndeclare const structuralKinds: readonly [\"required\", \"optional\", \"index\", \"sequence\"];\ntype StructuralKind = (typeof structuralKinds)[number];\ntype RangeKind = Exclude;\ntype BoundKind = Exclude;\ndeclare const refinementKinds: readonly [\"pattern\", \"divisor\", \"exactLength\", \"max\", \"min\", \"maxLength\", \"minLength\", \"before\", \"after\"];\ntype RefinementKind = (typeof refinementKinds)[number];\ntype orderedConstraintKinds = [\n ...typeof refinementKinds,\n ...typeof structuralKinds,\n \"structure\",\n \"predicate\"\n];\ndeclare const constraintKinds: orderedConstraintKinds;\ntype ConstraintKind = (typeof constraintKinds)[number];\ndeclare const rootKinds: readonly [\"alias\", \"union\", \"morph\", \"unit\", \"intersection\", \"proto\", \"domain\"];\ntype RootKind = (typeof rootKinds)[number];\ntype NodeKind = RootKind | ConstraintKind;\ntype orderedNodeKinds = [...typeof rootKinds, ...typeof constraintKinds];\ndeclare const nodeKinds: orderedNodeKinds;\ntype OpenNodeKind = {\n [k in NodeKind]: Declaration[\"intersectionIsOpen\"] extends true ? k : never;\n}[NodeKind];\ntype ClosedNodeKind = Exclude;\ntype PrimitiveKind = RefinementKind | BasisKind | \"predicate\";\ntype CompositeKind = Exclude;\ntype OrderedNodeKinds = typeof nodeKinds;\ndeclare const constraintKeys: KeySet;\ndeclare const structureKeys: keySetOf;\ntype RightsByKind = accumulateRightKinds;\ntype kindOrRightOf = kind | kindRightOf;\ntype kindLeftOf = Exclude>;\ntype kindOrLeftOf = kind | kindLeftOf;\ntype accumulateRightKinds = remaining extends (readonly [infer head extends NodeKind, ...infer tail extends NodeKind[]]) ? accumulateRightKinds : result;\ninterface InternalIntersectionOptions {\n pipe: boolean;\n}\ninterface IntersectionContext extends InternalIntersectionOptions {\n $: BaseScope;\n invert: boolean;\n}\ntype ConstraintIntersection> = (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => BaseNode | Disjoint | null;\ntype ConstraintIntersectionMap = show<{\n [_ in kind]: ConstraintIntersection;\n} & {\n [rKind in kindRightOf]?: ConstraintIntersection;\n}>;\ntype RootIntersection> = (l: nodeOfKind, r: nodeOfKind, ctx: IntersectionContext) => BaseRoot | Disjoint;\ntype TypeIntersectionMap = {\n [rKind in schemaKindOrRightOf]: RootIntersection;\n};\ntype IntersectionMap = kind extends RootKind ? TypeIntersectionMap : ConstraintIntersectionMap;\ntype UnknownIntersectionMap = {\n [k in NodeKind]?: (l: BaseNode, r: BaseNode, ctx: IntersectionContext) => UnknownIntersectionResult;\n};\ntype UnknownIntersectionResult = BaseNode | Disjoint | null;\ntype PrecedenceByKind = {\n [i in arrayIndexOf as OrderedNodeKinds[i]]: i;\n};\ndeclare const precedenceByKind: PrecedenceByKind;\ndeclare const isNodeKind: (value: unknown) => value is NodeKind;\ndeclare function assertNodeKind(value: BaseNode, kind: kind): asserts value is nodeOfKind;\ntype precedenceOfKind = PrecedenceByKind[kind];\ndeclare const precedenceOfKind: (kind: kind) => precedenceOfKind;\ntype kindRightOf = RightsByKind[kind];\ndeclare const schemaKindsRightOf: (kind: kind) => schemaKindRightOf[];\ndeclare const unionChildKinds: readonly [...(\"intersection\" | \"morph\" | \"unit\" | \"proto\" | \"domain\")[], \"alias\"];\ntype UnionChildKind = (typeof unionChildKinds)[number];\ndeclare const morphChildKinds: readonly [...(\"intersection\" | \"unit\" | \"proto\" | \"domain\")[], \"alias\"];\ntype MorphChildKind = (typeof morphChildKinds)[number];\ntype keySchemaDefinitions = {\n [k in keyRequiringSchemaDefinition]: NodeKeyImplementation;\n};\ntype keyRequiringSchemaDefinition = Exclude;\ndeclare const defaultValueSerializer: (v: unknown) => Json;\ntype NodeKeyImplementation : never> = requireKeys<{\n preserveUndefined?: true;\n child?: boolean | ((value: instantiated) => BaseNode[]);\n serialize?: (schema: instantiated) => Json;\n reduceIo?: (ioKind: \"in\" | \"out\", inner: makeRootAndArrayPropertiesMutable, value: d[\"inner\"][k]) => void;\n parse?: (schema: Exclude, ctx: NodeParseContext) => instantiated | undefined;\n}, (d[\"normalizedSchema\"][k] extends instantiated | undefined ? never : \"parse\") | ([instantiated] extends [listable] ? \"child\" : never)>;\ninterface CommonNodeImplementationInput {\n kind: d[\"kind\"];\n keys: keySchemaDefinitions;\n normalize: (schema: d[\"schema\"], $: BaseScope) => d[\"normalizedSchema\"];\n applyConfig?: (schema: d[\"normalizedSchema\"], config: ResolvedScopeConfig) => d[\"normalizedSchema\"];\n hasAssociatedError: d[\"errorContext\"] extends null ? false : true;\n finalizeInnerJson?: (json: {\n [k in keyof d[\"inner\"]]: Json;\n }) => JsonStructure;\n collapsibleKey?: keyof d[\"inner\"];\n reduce?: (inner: d[\"inner\"], $: BaseScope) => nodeOfKind | Disjoint | undefined;\n obviatesBasisDescription?: d[\"kind\"] extends RefinementKind ? true : never;\n obviatesBasisExpression?: d[\"kind\"] extends RefinementKind ? true : never;\n}\ninterface UnknownNodeImplementation extends CommonNodeImplementationInput {\n defaults: ResolvedUnknownNodeConfig;\n intersectionIsOpen: boolean;\n intersections: UnknownIntersectionMap;\n keys: Record>;\n}\ndeclare const compileObjectLiteral: (ctx: object) => string;\ntype nodeImplementationOf = nodeImplementationInputOf & {\n intersections: IntersectionMap;\n intersectionIsOpen: d[\"intersectionIsOpen\"];\n defaults: Required>;\n};\ntype nodeImplementationInputOf = CommonNodeImplementationInput & {\n intersections: IntersectionMap;\n defaults: nodeSchemaaultsImplementationInputFor;\n} & (d[\"intersectionIsOpen\"] extends true ? {\n intersectionIsOpen: true;\n} : {}) & (d[\"reducibleTo\"] extends d[\"kind\"] ? {} : {\n reduce: {};\n});\ntype nodeSchemaaultsImplementationInputFor = requireKeys, \"description\" | (Inner extends (Omit, keyof BaseErrorContext | \"description\">) ? never : \"expected\" & keyof NodeConfig)>;\ntype DescriptionWriter = (node: nodeOfKind) => string;\ninterface UnknownAttachments {\n readonly kind: NodeKind;\n readonly impl: UnknownNodeImplementation;\n readonly id: NodeId;\n readonly inner: Record;\n readonly innerEntries: readonly Entry[];\n readonly innerJson: object;\n readonly innerHash: string;\n readonly meta: NodeMeta;\n readonly metaJson: object;\n readonly json: object;\n readonly hash: string;\n readonly collapsibleJson: Json;\n readonly children: BaseNode[];\n}\ninterface NarrowedAttachments extends UnknownAttachments {\n kind: d[\"kind\"];\n inner: d[\"inner\"];\n json: JsonStructure;\n innerJson: JsonStructure;\n collapsibleJson: Json;\n children: nodeOfKind[];\n}\ndeclare const implementNode: (_: nodeImplementationInputOf) => nodeImplementationOf;\n\ndeclare abstract class InternalBasis extends BaseRoot {\n abstract compiledCondition: string;\n abstract compiledNegation: string;\n structure: undefined;\n traverseApply: TraverseApply;\n get errorContext(): d[\"errorContext\"];\n get compiledErrorContext(): string;\n compile(js: NodeCompiler): void;\n}\n\ndeclare class DomainNode extends InternalBasis {\n private readonly requiresNaNCheck;\n readonly traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly expression: string;\n get nestableExpression(): string;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema.Constrainable;\n}\ntype Domain = Domain$1;\ndeclare namespace Domain {\n type Enumerable = \"undefined\" | \"null\" | \"boolean\";\n type NonEnumerable = Exclude;\n interface Inner {\n readonly domain: domain;\n readonly numberAllowsNaN?: boolean;\n }\n interface NormalizedSchema extends BaseNormalizedSchema, Inner {\n }\n type Schema = domain | NormalizedSchema;\n interface ErrorContext extends BaseErrorContext<\"domain\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"domain\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = DomainNode;\n}\ndeclare const Domain: {\n implementation: nodeImplementationOf;\n Node: typeof DomainNode;\n writeBadAllowNanMessage: (actual: Exclude) => string;\n};\n\ninterface DisjointEntry {\n kind: kind;\n l: OperandsByDisjointKind[kind];\n r: OperandsByDisjointKind[kind];\n path: Key[];\n optional: boolean;\n}\ntype OperandsByDisjointKind = {\n domain: nodeOfKind<\"domain\"> | Domain.Enumerable;\n unit: nodeOfKind<\"unit\">;\n proto: nodeOfKind<\"proto\">;\n presence: BaseRoot;\n range: nodeOfKind;\n assignability: BaseNode;\n union: readonly BaseRoot[];\n};\ntype DisjointEntryContext = {\n path?: Key[];\n optional?: true;\n};\ndeclare class Disjoint extends Array {\n static init(kind: kind, l: OperandsByDisjointKind[kind], r: OperandsByDisjointKind[kind], ctx?: DisjointEntryContext): Disjoint;\n add(kind: kind, l: OperandsByDisjointKind[kind], r: OperandsByDisjointKind[kind], ctx?: DisjointEntryContext): Disjoint;\n get summary(): string;\n describeReasons(): string;\n throw(): never;\n invert(): Disjoint;\n withPrefixKey(key: PropertyKey, kind: Prop.Kind): Disjoint;\n toNeverIfDisjoint(): BaseRoot;\n}\ntype DisjointKind = keyof OperandsByDisjointKind;\ndeclare const writeUnsatisfiableExpressionError: (expression: expression) => writeUnsatisfiableExpressionError;\ntype writeUnsatisfiableExpressionError = `${expression} results in an unsatisfiable type`;\n\ntype withMetaPrefixedKeys = {\n [k in keyof o as k extends string ? `meta.${k}` : never]: o[k];\n};\ninterface DefaultArkEnv {\n meta(): {};\n onFail(errors: ArkErrors): ArkErrors;\n}\ninterface NodeMeta extends JsonSchema.UniversalMeta, UnknownErrorConfigs {\n alias?: string;\n onFail?: ArkErrors.Handler;\n}\ndeclare global {\n export interface ArkEnv extends DefaultArkEnv {\n }\n export namespace ArkEnv {\n type meta = show>;\n type onFail = ReturnType;\n }\n}\ntype TypeMeta = Omit;\ndeclare namespace TypeMeta {\n type Collapsible = meta | string;\n type Mapper = (existing: Readonly) => meta;\n type MappableInput = Collapsible | Mapper;\n namespace MappableInput {\n type Internal = MappableInput;\n }\n}\ninterface BaseNormalizedSchema extends withMetaPrefixedKeys {\n readonly meta?: ArkEnv.meta | string;\n}\ninterface DeclarationInput {\n kind: NodeKind;\n schema: unknown;\n normalizedSchema: BaseNormalizedSchema;\n inner: object;\n errorContext?: BaseErrorContext;\n reducibleTo?: NodeKind;\n intersectionIsOpen?: true;\n prerequisite?: unknown;\n childKind?: NodeKind;\n}\ninterface BaseErrorContext {\n readonly description?: string;\n readonly code: kind;\n readonly meta: NodeMeta;\n}\ntype defaultErrorContext = show & d[\"inner\"]>;\ntype declareNode = merge<{\n intersectionIsOpen: false;\n prerequisite: prerequisiteOf;\n childKind: never;\n reducibleTo: d[\"kind\"];\n errorContext: null;\n}, d>;\ntype prerequisiteOf = \"prerequisite\" extends keyof d ? d[\"prerequisite\"] : unknown;\ntype attachmentsOf = NarrowedAttachments & attachedInner;\ntype attachedInner = \"intersection\" & d[\"kind\"] extends never ? d[\"inner\"] : {};\ninterface BaseNodeDeclaration {\n kind: NodeKind;\n schema: unknown;\n normalizedSchema: BaseNormalizedSchema;\n inner: {};\n reducibleTo: NodeKind;\n prerequisite: any;\n intersectionIsOpen: boolean;\n childKind: NodeKind;\n errorContext: BaseErrorContext | null;\n}\ntype ownIntersectionResult = nodeOfKind> | Disjoint;\n\ndeclare class DivisorNode extends InternalPrimitiveConstraint {\n traverseAllows: TraverseAllows;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n readonly expression: string;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Divisor {\n interface Inner {\n readonly rule: number;\n }\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"divisor\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"divisor\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = DivisorNode;\n}\ndeclare const Divisor: {\n implementation: nodeImplementationOf;\n Node: typeof DivisorNode;\n};\ndeclare const writeIndivisibleMessage: (t: BaseRoot) => string;\ntype writeIndivisibleMessage = writeInvalidOperandMessage<\"divisor\", actual>;\ndeclare const writeNonIntegerDivisorMessage: (divisor: divisor) => writeNonIntegerDivisorMessage;\ntype writeNonIntegerDivisorMessage = `divisor must be an integer (was ${divisor})`;\n\ndeclare class PatternNode extends InternalPrimitiveConstraint {\n readonly instance: RegExp;\n readonly expression: string;\n traverseAllows: (string: string) => boolean;\n readonly compiledCondition: string;\n readonly compiledNegation: string;\n readonly impliedBasis: BaseRoot;\n reduceJsonSchema(base: JsonSchema.String, ctx: ToJsonSchema.Context): JsonSchema.String;\n}\ndeclare namespace Pattern {\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly rule: string;\n readonly flags?: string;\n }\n interface Inner {\n readonly rule: string;\n readonly flags?: string;\n }\n type Schema = NormalizedSchema | string | RegExp;\n interface ErrorContext extends BaseErrorContext<\"pattern\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"pattern\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n intersectionIsOpen: true;\n prerequisite: string;\n errorContext: ErrorContext;\n }> {\n }\n type Node = PatternNode;\n}\ndeclare const Pattern: {\n implementation: nodeImplementationOf;\n Node: typeof PatternNode;\n};\n\ndeclare class UnitNode extends InternalBasis {\n compiledValue: JsonPrimitive;\n serializedValue: string;\n compiledCondition: string;\n compiledNegation: string;\n expression: string;\n domain: Domain$1;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n}\ndeclare namespace Unit {\n interface Schema extends BaseNormalizedSchema {\n readonly unit: value;\n }\n interface Inner {\n readonly unit: value;\n }\n interface ErrorContext extends BaseErrorContext<\"unit\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"unit\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = UnitNode;\n}\ndeclare const Unit: {\n implementation: nodeImplementationOf;\n Node: typeof UnitNode;\n};\n\ndeclare class UnionNode extends BaseRoot {\n isBoolean: boolean;\n get branchGroups(): BaseRoot[];\n unitBranches: (MorphNode | UnitNode)[];\n discriminant: Discriminant | null;\n discriminantJson: JsonStructure | null;\n expression: string;\n createBranchedOptimisticRootApply(): BaseNode[\"rootApply\"];\n get shallowMorphs(): array;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n traverseOptimistic: (data: unknown) => unknown;\n compile(js: NodeCompiler): void;\n private compileIndiscriminable;\n get nestableExpression(): string;\n discriminate(): Discriminant | null;\n}\ndeclare namespace Union {\n type ChildKind = UnionChildKind;\n type ChildSchema = NodeSchema;\n type ChildNode = nodeOfKind;\n type Schema = NormalizedSchema | readonly RootSchema[];\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly branches: array;\n readonly ordered?: true;\n }\n interface Inner {\n readonly branches: readonly ChildNode[];\n readonly ordered?: true;\n }\n interface ErrorContext extends BaseErrorContext<\"union\"> {\n errors: readonly ArkError[];\n }\n interface Declaration extends declareNode<{\n kind: \"union\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n reducibleTo: RootKind;\n childKind: UnionChildKind;\n }> {\n }\n type Node = UnionNode;\n}\ndeclare const Union: {\n implementation: nodeImplementationOf;\n Node: typeof UnionNode;\n};\ntype DescribeBranchesOptions = {\n delimiter?: string;\n finalDelimiter?: string;\n};\ndeclare const describeBranches: (descriptions: string[], opts?: DescribeBranchesOptions) => string;\ndeclare const intersectBranches: (l: readonly Union.ChildNode[], r: readonly Union.ChildNode[], ctx: IntersectionContext) => readonly Union.ChildNode[] | Disjoint;\ndeclare const reduceBranches: ({ branches, ordered }: Union.Inner) => readonly Union.ChildNode[];\ntype CaseKey = DiscriminantKind extends kind ? string : DiscriminantKinds[kind] | \"default\";\ntype DiscriminantLocation = {\n path: PropertyKey[];\n optionallyChainedPropString: string;\n kind: kind;\n};\ninterface Discriminant extends DiscriminantLocation {\n cases: DiscriminatedCases;\n}\ntype CaseContext = {\n branchIndices: number[];\n condition: nodeOfKind | Domain.Enumerable;\n};\ntype CaseDiscriminant = nodeOfKind | Domain.Enumerable;\ntype DiscriminatedCases = {\n [caseKey in CaseKey]: BaseRoot | true;\n};\ntype DiscriminantKinds = {\n domain: Domain;\n unit: SerializedPrimitive | RegisteredReference;\n};\ntype DiscriminantKind = show;\ndeclare const pruneDiscriminant: (discriminantBranch: BaseRoot, discriminantCtx: DiscriminantLocation) => BaseRoot | null;\ndeclare const writeIndiscriminableMorphMessage: (lDescription: string, rDescription: string) => string;\ndeclare const writeOrderedIntersectionMessage: (lDescription: string, rDescription: string) => string;\n\ninterface InternalRootDeclaration extends BaseNodeDeclaration {\n kind: RootKind;\n}\ndeclare abstract class BaseRoot<\n/** @ts-ignore cast variance */\nout d extends InternalRootDeclaration = InternalRootDeclaration> extends BaseNode implements StandardSchemaV1 {\n readonly [arkKind]: \"root\";\n readonly [inferred]: unknown;\n constructor(attachments: UnknownAttachments, $: BaseScope);\n get internal(): this;\n get \"~standard\"(): StandardSchemaV1.ArkTypeProps;\n as(): this;\n brand(name: string): this;\n readonly(): this;\n readonly branches: readonly nodeOfKind[];\n distribute(mapBranch: (branch: nodeOfKind, i: number, branches: array>) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut;\n abstract get defaultShortDescription(): string;\n get shortDescription(): string;\n toJsonSchema(opts?: ToJsonSchema.Options): JsonSchema;\n toJsonSchemaRecurse(ctx: ToJsonSchema.Context): JsonSchema;\n get alwaysExpandJsonSchema(): boolean;\n protected toResolvedJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n protected abstract innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n intersect(r: unknown): BaseRoot | Disjoint;\n rawIntersect(r: BaseRoot): BaseRoot;\n toNeverIfDisjoint(): BaseRoot;\n and(r: unknown): BaseRoot;\n rawAnd(r: BaseRoot): BaseRoot;\n or(r: unknown): BaseRoot;\n rawOr(r: BaseRoot): BaseRoot;\n map(flatMapEntry: PropFlatMapper): BaseRoot;\n pick(...keys: KeyOrKeyNode[]): BaseRoot;\n omit(...keys: KeyOrKeyNode[]): BaseRoot;\n required(): BaseRoot;\n partial(): BaseRoot;\n private _keyof?;\n keyof(): BaseRoot;\n get props(): Prop.Node[];\n merge(r: unknown): BaseRoot;\n private applyStructuralOperation;\n get(...path: GettableKeyOrNode[]): BaseRoot;\n extract(r: unknown): BaseRoot;\n exclude(r: unknown): BaseRoot;\n array(): BaseRoot;\n overlaps(r: unknown): boolean;\n extends(r: unknown): boolean;\n ifExtends(r: unknown): BaseRoot | undefined;\n subsumes(r: unknown): boolean;\n configure(meta: TypeMeta.MappableInput, selector?: NodeSelector): this;\n describe(description: string, selector?: NodeSelector): this;\n optional(): [this, \"?\"];\n default(thunkableValue: unknown): [this, \"=\", unknown];\n from(input: unknown): unknown;\n protected _pipe(...morphs: Morph[]): BaseRoot;\n protected tryPipe(...morphs: Morph[]): BaseRoot;\n pipe: ((...morphs: Morph[]) => BaseRoot) & {\n try: (...morphs: Morph[]) => BaseRoot;\n };\n to(def: unknown): BaseRoot;\n private toNode;\n rawPipeOnce(morph: Morph): BaseRoot;\n narrow(predicate: Predicate): BaseRoot;\n constrain(kind: kind, schema: NodeSchema): BaseRoot;\n constrainIn(kind: kind, schema: NodeSchema): BaseRoot;\n constrainOut(kind: kind, schema: NodeSchema): BaseRoot;\n private _constrain;\n onUndeclaredKey(cfg: UndeclaredKeyBehavior | UndeclaredKeyConfig): BaseRoot;\n hasEqualMorphs(r: BaseRoot): boolean;\n onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): BaseRoot;\n filter(predicate: Predicate): BaseRoot;\n divisibleBy(schema: Divisor.Schema): BaseRoot;\n matching(schema: Pattern.Schema): BaseRoot;\n atLeast(schema: InclusiveNumericRangeSchema): BaseRoot;\n atMost(schema: InclusiveNumericRangeSchema): BaseRoot;\n moreThan(schema: ExclusiveNumericRangeSchema): BaseRoot;\n lessThan(schema: ExclusiveNumericRangeSchema): BaseRoot;\n atLeastLength(schema: InclusiveNumericRangeSchema): BaseRoot;\n atMostLength(schema: InclusiveNumericRangeSchema): BaseRoot;\n moreThanLength(schema: ExclusiveNumericRangeSchema): BaseRoot;\n lessThanLength(schema: ExclusiveNumericRangeSchema): BaseRoot;\n exactlyLength(schema: ExactLength.Schema): BaseRoot;\n atOrAfter(schema: InclusiveDateRangeSchema): BaseRoot;\n atOrBefore(schema: InclusiveDateRangeSchema): BaseRoot;\n laterThan(schema: ExclusiveDateRangeSchema): BaseRoot;\n earlierThan(schema: ExclusiveDateRangeSchema): BaseRoot;\n}\ntype UndeclaredKeyConfig = {\n rule: UndeclaredKeyBehavior;\n deep?: boolean;\n};\ndeclare const emptyBrandNameMessage = \"Expected a non-empty brand name after #\";\ntype emptyBrandNameMessage = typeof emptyBrandNameMessage;\ndeclare const exclusivizeRangeSchema: (schema: schema) => schema;\ntype exclusivizeRangeSchema = schema extends LimitSchemaValue ? {\n rule: schema;\n exclusive: true;\n} : schema;\ndeclare const typeOrTermExtends: (t: unknown, base: unknown) => boolean;\ntype intersectRoot = [\n l,\n r\n] extends [r, l] ? l : asymmetricIntersectionOf | asymmetricIntersectionOf;\ntype asymmetricIntersectionOf = l extends unknown ? r extends kindRightOf ? l | reducibleKindOf : never : never;\ntype schemaKindRightOf = Extract, RootKind>;\ntype schemaKindOrRightOf = kind | schemaKindRightOf;\ntype StructuralOperationBranchResultByName = {\n keyof: Union.ChildNode;\n pick: Union.ChildNode;\n omit: Union.ChildNode;\n get: Union.ChildNode;\n map: Union.ChildNode;\n required: Union.ChildNode;\n partial: Union.ChildNode;\n merge: Union.ChildNode;\n props: array;\n};\ntype StructuralOperationName = keyof StructuralOperationBranchResultByName;\ndeclare const writeLiteralUnionEntriesMessage: (expression: string) => string;\ndeclare const writeNonStructuralOperandMessage: (operation: operation, operand: operand) => writeNonStructuralOperandMessage;\ntype writeNonStructuralOperandMessage = `${operation} operand must be an object (was ${operand})`;\n\ndeclare class MorphNode extends BaseRoot {\n serializedMorphs: string[];\n compiledMorphs: string;\n lastMorph: BaseRoot | Morph | undefined;\n lastMorphIfNode: BaseRoot | undefined;\n introspectableIn: BaseRoot | undefined;\n introspectableOut: BaseRoot | undefined;\n get shallowMorphs(): array;\n get in(): BaseRoot;\n get out(): BaseRoot;\n declareIn(declaredIn: BaseRoot): MorphNode;\n declareOut(declaredOut: BaseRoot): MorphNode;\n expression: string;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n compile(js: NodeCompiler): void;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n /** Check if the morphs of r are equal to those of this node */\n hasEqualMorphs(r: MorphNode): boolean;\n}\ndeclare namespace Morph {\n interface Inner {\n readonly in?: BaseRoot;\n readonly morphs: array;\n readonly declaredIn?: BaseRoot;\n readonly declaredOut?: BaseRoot;\n }\n interface Schema extends BaseNormalizedSchema {\n readonly in?: RootSchema;\n readonly morphs: listable;\n readonly declaredIn?: BaseRoot;\n readonly declaredOut?: BaseRoot;\n }\n interface Declaration extends declareNode<{\n kind: \"morph\";\n schema: Schema;\n normalizedSchema: Schema;\n inner: Inner;\n childKind: RootKind;\n }> {\n }\n type Node = MorphNode;\n type In = morph extends Morph ? i : never;\n type Out = morph extends Morph ? o : never;\n type ContextFree = (In: i) => o;\n}\ntype Morph = (In: i, ctx: Traversal) => o;\ndeclare const Morph: {\n implementation: nodeImplementationOf;\n Node: typeof MorphNode;\n};\ndeclare const writeMorphIntersectionMessage: (lDescription: string, rDescription: string) => string;\n\ntype MorphsAtPath = {\n path: ReadonlyPath;\n morphs: array;\n};\ntype BranchTraversal = {\n error: ArkError | undefined;\n queuedMorphs: MorphsAtPath[];\n};\ntype InternalTraversal = Omit;\ndeclare class Traversal {\n /**\n * #### the path being validated or morphed\n *\n * ✅ array indices represented as numbers\n * ⚠️ mutated during traversal - use `path.slice(0)` to snapshot\n * 🔗 use {@link propString} for a stringified version\n */\n path: PropertyKey[];\n /**\n * #### {@link ArkErrors} that will be part of this traversal's finalized result\n *\n * ✅ will always be an empty array for a valid traversal\n */\n errors: ArkErrors;\n /**\n * #### the original value being traversed\n */\n root: unknown;\n /**\n * #### configuration for this traversal\n *\n * ✅ options can affect traversal results and error messages\n * ✅ defaults < global config < scope config\n * ✅ does not include options configured on individual types\n */\n config: ResolvedConfig;\n queuedMorphs: MorphsAtPath[];\n branches: BranchTraversal[];\n seen: {\n [id in string]?: unknown[];\n };\n constructor(root: unknown, config: ResolvedConfig);\n /**\n * #### the data being validated or morphed\n *\n * ✅ extracted from {@link root} at {@link path}\n */\n get data(): unknown;\n /**\n * #### a string representing {@link path}\n *\n * @propString\n */\n get propString(): string;\n /**\n * #### add an {@link ArkError} and return `false`\n *\n * ✅ useful for predicates like `.narrow`\n */\n reject(input: ArkErrorInput): false;\n /**\n * #### add an {@link ArkError} from a description and return `false`\n *\n * ✅ useful for predicates like `.narrow`\n * 🔗 equivalent to {@link reject}({ expected })\n */\n mustBe(expected: string): false;\n /**\n * #### add and return an {@link ArkError}\n *\n * ✅ useful for morphs like `.pipe`\n */\n error(input: input): ArkError;\n /**\n * #### whether {@link currentBranch} (or the traversal root, outside a union) has one or more errors\n */\n hasError(): boolean;\n get currentBranch(): BranchTraversal | undefined;\n queueMorphs(morphs: array): void;\n finalize(onFail?: ArkErrors.Handler | null): unknown;\n get currentErrorCount(): number;\n get failFast(): boolean;\n pushBranch(): void;\n popBranch(): BranchTraversal | undefined;\n private errorFromContext;\n private applyQueuedMorphs;\n private applyMorphsAtPath;\n}\ndeclare const traverseKey: (key: PropertyKey, fn: () => result, ctx: InternalTraversal | undefined) => result;\ntype TraversalMethodsByKind = {\n Allows: TraverseAllows;\n Apply: TraverseApply;\n};\ntype TraversalKind = keyof TraversalMethodsByKind;\ntype TraverseAllows = (data: data, ctx: InternalTraversal) => boolean;\ntype TraverseApply = (data: data, ctx: InternalTraversal) => void;\n\ntype CoercibleValue = string | number | boolean | null | undefined;\ndeclare class CompiledFunction unknown, args extends readonly string[] = readonly string[]> extends CastableBase<{\n [k in args[number]]: k;\n}> {\n readonly argNames: args;\n readonly body = \"\";\n constructor(...args: args);\n indentation: number;\n indent(): this;\n dedent(): this;\n prop(key: PropertyKey, optional?: boolean): string;\n index(key: string | number, optional?: boolean): string;\n line(statement: string): this;\n const(identifier: string, expression: CoercibleValue): this;\n let(identifier: string, expression: CoercibleValue): this;\n set(identifier: string, expression: CoercibleValue): this;\n if(condition: string, then: (self: this) => this): this;\n elseIf(condition: string, then: (self: this) => this): this;\n else(then: (self: this) => this): this;\n /** Current index is \"i\" */\n for(until: string, body: (self: this) => this, initialValue?: CoercibleValue): this;\n /** Current key is \"k\" */\n forIn(object: string, body: (self: this) => this): this;\n block(prefix: string, contents: (self: this) => this, suffix?: string): this;\n return(expression?: CoercibleValue): this;\n write(name?: string, indent?: number): string;\n compile(): compiledSignature;\n}\ndeclare const compileSerializedValue: (value: unknown) => string;\ndeclare const compileLiteralPropAccess: (key: PropertyKey, optional?: boolean) => string;\ndeclare const serializeLiteralKey: (key: PropertyKey) => string;\ndeclare const indexPropAccess: (key: string, optional?: boolean) => string;\ninterface InvokeOptions extends ReferenceOptions {\n arg?: string;\n}\ninterface ReferenceOptions {\n kind?: TraversalKind;\n bind?: string;\n}\ndeclare namespace NodeCompiler {\n interface Context {\n kind: TraversalKind;\n optimistic?: true;\n }\n}\ndeclare class NodeCompiler extends CompiledFunction {\n traversalKind: TraversalKind;\n optimistic: boolean;\n constructor(ctx: NodeCompiler.Context);\n invoke(node: BaseNode | NodeId, opts?: InvokeOptions): string;\n referenceToId(id: NodeId, opts?: ReferenceOptions): string;\n requiresContextFor(node: BaseNode): boolean;\n initializeErrorCount(): this;\n returnIfFail(): this;\n returnIfFailFast(): this;\n traverseKey(keyExpression: string, accessExpression: string, node: BaseNode): this;\n check(node: BaseNode, opts?: InvokeOptions): this;\n}\n\ndeclare class PredicateNode extends BaseConstraint {\n serializedPredicate: RegisteredReference;\n compiledCondition: string;\n compiledNegation: string;\n impliedBasis: null;\n expression: string;\n traverseAllows: TraverseAllows;\n errorContext: Predicate.ErrorContext;\n compiledErrorContext: string;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n reduceJsonSchema(base: JsonSchema.Constrainable, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace Predicate {\n type Schema = NormalizedSchema | predicate;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly predicate: predicate;\n }\n interface Inner {\n readonly predicate: predicate;\n }\n interface ErrorContext extends BaseErrorContext<\"predicate\"> {\n readonly predicate?: Predicate;\n }\n interface Declaration extends declareNode<{\n kind: \"predicate\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n intersectionIsOpen: true;\n errorContext: ErrorContext;\n }> {\n }\n type Node = PredicateNode;\n}\ndeclare const Predicate: {\n implementation: nodeImplementationOf;\n Node: typeof PredicateNode;\n};\ntype Predicate = (data: data, ctx: Traversal) => boolean;\ndeclare namespace Predicate {\n type Casted = (input: input, ctx: Traversal) => input is narrowed;\n type Castable = Predicate | Casted;\n}\n\ndeclare class ProtoNode extends InternalBasis {\n builtinName: BuiltinObjectKind | null;\n serializedConstructor: string;\n private readonly requiresInvalidDateCheck;\n traverseAllows: TraverseAllows;\n compiledCondition: string;\n compiledNegation: string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n expression: string;\n get nestableExpression(): string;\n readonly domain = \"object\";\n get defaultShortDescription(): string;\n}\ndeclare namespace Proto {\n type Reference = Constructor | BuiltinObjectKind;\n type Schema = proto | ExpandedSchema;\n interface NormalizedSchema extends BaseNormalizedSchema {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface ExpandedSchema {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface Inner {\n readonly proto: proto;\n readonly dateAllowsInvalid?: boolean;\n }\n interface ErrorContext extends BaseErrorContext<\"proto\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"proto\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n errorContext: ErrorContext;\n }> {\n }\n type Node = ProtoNode;\n}\ndeclare const Proto: {\n implementation: nodeImplementationOf;\n Node: typeof ProtoNode;\n writeBadInvalidDateMessage: (actual: Constructor) => string;\n writeInvalidSchemaMessage: (actual: unknown) => string;\n};\n\ndeclare class IntersectionNode extends BaseRoot {\n basis: nodeOfKind | null;\n refinements: array>;\n structure: Structure.Node | undefined;\n expression: string;\n get shallowMorphs(): array;\n get defaultShortDescription(): string;\n protected innerToJsonSchema(ctx: ToJsonSchema.Context): JsonSchema;\n traverseAllows: TraverseAllows;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n}\ndeclare namespace Intersection {\n type BasisKind = \"domain\" | \"proto\";\n type ChildKind = BasisKind | RefinementKind | \"predicate\" | \"structure\";\n type FlattenedChildKind = ChildKind | StructuralKind;\n type RefinementsInner = {\n [k in RefinementKind]?: intersectionChildInnerValueOf;\n };\n interface Inner extends RefinementsInner {\n domain?: Domain.Node;\n proto?: Proto.Node;\n structure?: Structure.Node;\n predicate?: array;\n }\n namespace Inner {\n type mutable = makeRootAndArrayPropertiesMutable;\n }\n type ConstraintsSchema = show>;\n type NormalizedSchema = Omit;\n type Schema = ConstraintsSchema;\n interface AstSchema extends BaseNormalizedSchema {\n intersection: readonly RootSchema[];\n }\n interface ErrorContext extends BaseErrorContext<\"intersection\">, Inner {\n errors: readonly ArkError[];\n }\n type Declaration = declareNode<{\n kind: \"intersection\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n reducibleTo: \"intersection\" | BasisKind;\n errorContext: ErrorContext;\n childKind: ChildKind;\n }>;\n type Node = IntersectionNode;\n}\ndeclare const Intersection: {\n implementation: nodeImplementationOf<{\n intersectionIsOpen: false;\n prerequisite: unknown;\n kind: \"intersection\";\n schema: Intersection.Schema;\n normalizedSchema: Intersection.NormalizedSchema;\n inner: Intersection.Inner;\n reducibleTo: \"intersection\" | Intersection.BasisKind;\n errorContext: Intersection.ErrorContext;\n childKind: Intersection.ChildKind;\n }>;\n Node: typeof IntersectionNode;\n};\ntype ConditionalTerminalIntersectionRoot = {\n undeclared?: UndeclaredKeyBehavior;\n};\ntype ConditionalTerminalIntersectionKey = keyof ConditionalTerminalIntersectionRoot;\ntype ConditionalIntersectionKey = ConstraintKind | ConditionalTerminalIntersectionKey;\ntype constraintKindOf = {\n [k in ConstraintKind]: t extends Prerequisite ? k : never;\n}[ConstraintKind];\ntype conditionalIntersectionKeyOf = constraintKindOf | (t extends object ? \"undeclared\" : never);\ntype intersectionChildSchemaValueOf = k extends OpenNodeKind ? listable> : NodeSchema;\ntype conditionalSchemaValueOfKey = k extends Intersection.FlattenedChildKind ? intersectionChildSchemaValueOf : ConditionalTerminalIntersectionRoot[k & ConditionalTerminalIntersectionKey];\ntype intersectionChildInnerValueOf = k extends OpenNodeKind ? readonly nodeOfKind[] : nodeOfKind;\ntype conditionalRootOf = {\n [k in conditionalIntersectionKeyOf]?: conditionalSchemaValueOfKey;\n};\n\ndeclare namespace Constraint {\n interface Declaration extends BaseNodeDeclaration {\n kind: ConstraintKind;\n }\n type ReductionResult = BaseRoot | Disjoint | Intersection.Inner.mutable;\n interface Attachments {\n impliedBasis: BaseRoot | null;\n impliedSiblings?: array | null;\n }\n type PrimitiveKind = Exclude;\n}\ndeclare abstract class BaseConstraint<\n/** @ts-ignore allow instantiation assignment to the base type */\nout d extends Constraint.Declaration = Constraint.Declaration> extends BaseNode {\n readonly [arkKind]: \"constraint\";\n constructor(attachments: UnknownAttachments, $: BaseScope);\n abstract readonly impliedBasis: BaseRoot | null;\n readonly impliedSiblings?: array;\n intersect(r: r): intersectConstraintKinds;\n}\ndeclare abstract class InternalPrimitiveConstraint extends BaseConstraint {\n abstract traverseAllows: TraverseAllows;\n abstract readonly compiledCondition: string;\n abstract readonly compiledNegation: string;\n abstract reduceJsonSchema(base: JsonSchema.Constrainable, ctx: ToJsonSchema.Context): JsonSchema.Constrainable;\n traverseApply: TraverseApply;\n compile(js: NodeCompiler): void;\n get errorContext(): d[\"errorContext\"];\n get compiledErrorContext(): string;\n}\ndeclare const constraintKeyParser: (kind: kind) => (schema: listable>, ctx: NodeParseContext) => innerAttachedAs | undefined;\ntype ConstraintGroupKind = satisfy;\ninterface ConstraintIntersectionState {\n kind: kind;\n baseInner: Record;\n l: BaseConstraint[];\n r: BaseConstraint[];\n roots: BaseRoot[];\n ctx: IntersectionContext;\n}\ndeclare const intersectConstraints: (s: ConstraintIntersectionState) => nodeOfKind> | Disjoint;\ndeclare const flattenConstraints: (inner: object) => BaseConstraint[];\ntype FlatIntersectionInner = Intersection.Inner & Structure.Inner;\ndeclare const unflattenConstraints: (constraints: array) => FlatIntersectionInner;\ntype constraintKindLeftOf = ConstraintKind & kindLeftOf;\ntype constraintKindOrLeftOf = kind | constraintKindLeftOf;\ntype intersectConstraintKinds = nodeOfKind | Disjoint | null;\ndeclare const throwInvalidOperandError: (...args: Parameters) => never;\ndeclare const writeInvalidOperandMessage: (kind: kind, expected: expected, actual: actual) => string;\ntype writeInvalidOperandMessage = `${Capitalize} operand must be ${describe>} (was ${describe>>})`;\n\ndeclare abstract class BaseNode<\n/** @ts-ignore allow instantiation assignment to the base type */\nout d extends BaseNodeDeclaration = BaseNodeDeclaration> extends Callable<(data: d[\"prerequisite\"], ctx?: Traversal, onFail?: ArkErrors.Handler | null) => unknown, attachmentsOf> {\n attachments: UnknownAttachments;\n $: BaseScope;\n onFail: ArkErrors.Handler | null;\n includesTransform: boolean;\n includesContextualPredicate: boolean;\n isCyclic: boolean;\n allowsRequiresContext: boolean;\n rootApplyStrategy: \"allows\" | \"contextual\" | \"optimistic\" | \"branchedOptimistic\";\n contextFreeMorph: ((data: unknown) => unknown) | undefined;\n rootApply: (data: unknown, onFail: ArkErrors.Handler | null) => unknown;\n referencesById: Record;\n shallowReferences: BaseNode[];\n flatRefs: FlatRef[];\n flatMorphs: FlatRef[];\n allows: (data: d[\"prerequisite\"]) => boolean;\n get shallowMorphs(): array;\n constructor(attachments: UnknownAttachments, $: BaseScope);\n protected createRootApply(): this[\"rootApply\"];\n abstract traverseAllows: TraverseAllows;\n abstract traverseApply: TraverseApply;\n abstract expression: string;\n abstract compile(js: NodeCompiler): void;\n readonly compiledMeta: string;\n protected cacheGetter(name: name, value: this[name]): this[name];\n get description(): string;\n get references(): BaseNode[];\n readonly precedence: number;\n precompilation: string | undefined;\n assert: (data: d[\"prerequisite\"], pipedFromCtx?: Traversal) => unknown;\n traverse(data: d[\"prerequisite\"], pipedFromCtx?: Traversal): ArkErrors | {} | null | undefined;\n get in(): this extends {\n [arkKind]: \"root\";\n } ? BaseRoot : BaseNode;\n get out(): this extends {\n [arkKind]: \"root\";\n } ? BaseRoot : BaseNode;\n getIo(ioKind: \"in\" | \"out\"): BaseNode;\n toJSON(): JsonStructure;\n toString(): string;\n equals(r: unknown): boolean;\n ifEquals(r: unknown): BaseNode | undefined;\n hasKind(kind: kind): this is nodeOfKind;\n assertHasKind(kind: kind): nodeOfKind;\n hasKindIn(...kinds: kinds): this is nodeOfKind;\n assertHasKindIn(...kinds: kinds): nodeOfKind;\n isBasis(): this is nodeOfKind;\n isConstraint(): this is BaseConstraint;\n isStructural(): this is nodeOfKind;\n isRefinement(): this is nodeOfKind;\n isRoot(): this is BaseRoot;\n isUnknown(): boolean;\n isNever(): boolean;\n hasUnit(value: unknown): this is Unit.Node & {\n unit: value;\n };\n hasOpenIntersection(): this is nodeOfKind;\n get nestableExpression(): string;\n select>>(selector: NodeSelector.validateComposite): NodeSelector.infer;\n select(selector: selector): NodeSelector.infer;\n private _select;\n transform(mapper: mapper, opts?: DeepNodeTransformOptions): nodeOfKind> | Extract, null>;\n protected _createTransformContext(opts: DeepNodeTransformOptions | undefined): DeepNodeTransformContext;\n protected _transform(mapper: DeepNodeTransformation, ctx: DeepNodeTransformContext): BaseNode | null;\n configureReferences(meta: TypeMeta.MappableInput.Internal, selector?: NodeSelector): this;\n}\n/** a literal key (named property) or a node (index signatures) representing part of a type structure */\ntype KeyOrKeyNode = Key | BaseRoot;\ntype GettableKeyOrNode = KeyOrKeyNode | number;\ntype FlatRef = {\n path: array;\n node: root;\n propString: string;\n};\ntype NodeSelector = NodeSelector.Single | NodeSelector.Composite;\ndeclare namespace NodeSelector {\n type SelectableFn = {\n >>(input: input, selector?: NodeSelector.validateComposite): returns;\n (input: input, selector?: selector): returns;\n };\n type Single = NodeSelector.Boundary | NodeSelector.Kind | GuardablePredicate;\n type Boundary = \"self\" | \"child\" | \"shallow\" | \"references\";\n type Kind = NodeKind;\n type Method = \"filter\" | \"assertFilter\" | \"find\" | \"assertFind\";\n interface Composite {\n method?: Method;\n boundary?: Boundary;\n kind?: Kind;\n where?: GuardablePredicate;\n }\n type Normalized = requireKeys;\n type CompositeInput = Omit;\n type BaseResult = BaseNode | BaseNode[] | undefined;\n type validateComposite = {\n [k in keyof selector]: k extends \"where\" ? predicate : conform;\n };\n type infer = applyMethod ? narrowed : NodeSelector.inferSelectKind, selector>;\n type BoundaryInput = b | {\n boundary: b;\n };\n type KindInput = k | {\n kind: k;\n };\n type WhereCastInput = ((In: kindNode) => In is narrowed) | {\n where: (In: kindNode) => In is narrowed;\n };\n type inferSelectKind = selectKind extends infer kind extends NodeKind ? NodeKind extends kind ? BaseNode : nodeOfKind : never;\n type selectKind = selector extends BoundaryInput<\"self\"> ? selfKind : selector extends KindInput ? kind : selector extends BoundaryInput<\"child\"> ? selfKind | childKindOf : NodeKind;\n type applyMethod = selector extends {\n method: infer method extends Method;\n } ? method extends \"filter\" ? t[] : method extends \"assertFilter\" ? [t, ...t[]] : method extends \"find\" ? t | undefined : method extends \"assertFind\" ? t : never : t[];\n}\ndeclare const typePathToPropString: (path: array) => string;\ndeclare const flatRef: (path: array, node: node) => FlatRef;\ndeclare const flatRefsAreEqual: (l: FlatRef, r: FlatRef) => boolean;\ndeclare const appendUniqueFlatRefs: (existing: FlatRef[] | undefined, refs: listable>) => FlatRef[];\ndeclare const appendUniqueNodes: (existing: node[] | undefined, refs: listable) => node[];\ntype DeepNodeTransformOptions = {\n shouldTransform?: ShouldTransformFn;\n bindScope?: BaseScope;\n prereduced?: boolean;\n selected?: readonly BaseNode[] | undefined;\n};\ntype ShouldTransformFn = (node: BaseNode, ctx: DeepNodeTransformContext) => boolean;\ninterface DeepNodeTransformContext extends DeepNodeTransformOptions {\n root: BaseNode;\n selected: readonly BaseNode[] | undefined;\n path: mutable>;\n seen: {\n [originalId: string]: (() => BaseNode | undefined) | undefined;\n };\n parseOptions: BaseParseOptions;\n undeclaredKeyHandling: UndeclaredKeyHandling | undefined;\n}\ntype DeepNodeTransformation = (kind: kind, innerWithMeta: Inner & {\n meta: NodeMeta;\n}, ctx: DeepNodeTransformContext) => NormalizedSchema | null;\n\ndeclare class AfterNode extends BaseRange {\n impliedBasis: BaseRoot;\n collapsibleLimitString: string;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(base: JsonSchema, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace After {\n interface Inner extends BaseRangeInner {\n rule: Date;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: LimitSchemaValue;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: LimitSchemaValue;\n }\n type Schema = ExpandedSchema | LimitSchemaValue;\n interface ErrorContext extends BaseErrorContext<\"after\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"after\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: Date;\n errorContext: ErrorContext;\n }> {\n }\n type Node = AfterNode;\n}\ndeclare const After: {\n implementation: nodeImplementationOf;\n Node: typeof AfterNode;\n};\n\ndeclare class BeforeNode extends BaseRange {\n collapsibleLimitString: string;\n traverseAllows: TraverseAllows;\n impliedBasis: BaseRoot;\n reduceJsonSchema(base: JsonSchema, ctx: ToJsonSchema.Context): JsonSchema;\n}\ndeclare namespace Before {\n interface Inner extends BaseRangeInner {\n rule: Date;\n }\n interface NormalizedSchema extends UnknownNormalizedRangeSchema {\n rule: LimitSchemaValue;\n }\n interface ExpandedSchema extends UnknownExpandedRangeSchema {\n rule: LimitSchemaValue;\n }\n type Schema = ExpandedSchema | LimitSchemaValue;\n interface ErrorContext extends BaseErrorContext<\"before\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"before\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: Date;\n errorContext: ErrorContext;\n }> {\n }\n type Node = BeforeNode;\n}\ndeclare const Before: {\n implementation: nodeImplementationOf;\n Node: typeof BeforeNode;\n};\n\ndeclare class MaxNode extends BaseRange {\n impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Max {\n interface Inner extends BaseRangeInner {\n rule: number;\n exclusive?: true;\n }\n interface NormalizedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"max\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"max\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MaxNode;\n}\ndeclare const Max: {\n implementation: nodeImplementationOf;\n Node: typeof MaxNode;\n};\n\ndeclare class MinNode extends BaseRange {\n readonly impliedBasis: BaseRoot;\n traverseAllows: TraverseAllows;\n reduceJsonSchema(schema: JsonSchema.Numeric): JsonSchema.Numeric;\n}\ndeclare namespace Min {\n interface Inner extends BaseRangeInner {\n rule: number;\n exclusive?: true;\n }\n interface NormalizedSchema extends UnknownExpandedRangeSchema {\n rule: number;\n }\n type Schema = NormalizedSchema | number;\n interface ErrorContext extends BaseErrorContext<\"min\">, Inner {\n }\n interface Declaration extends declareNode<{\n kind: \"min\";\n schema: Schema;\n normalizedSchema: NormalizedSchema;\n inner: Inner;\n prerequisite: number;\n errorContext: ErrorContext;\n }> {\n }\n type Node = MinNode;\n}\ndeclare const Min: {\n implementation: nodeImplementationOf;\n Node: typeof MinNode;\n};\n\ninterface BoundDeclarations {\n min: Min.Declaration;\n max: Max.Declaration;\n minLength: MinLength.Declaration;\n maxLength: MaxLength.Declaration;\n exactLength: ExactLength.Declaration;\n after: After.Declaration;\n before: Before.Declaration;\n}\ninterface BoundNodesByKind {\n min: Min.Node;\n max: Max.Node;\n minLength: MinLength.Node;\n maxLength: MaxLength.Node;\n exactLength: ExactLength.Node;\n after: After.Node;\n before: Before.Node;\n}\n\ninterface NodeDeclarationsByKind extends BoundDeclarations {\n alias: Alias.Declaration;\n domain: Domain.Declaration;\n unit: Unit.Declaration;\n proto: Proto.Declaration;\n union: Union.Declaration;\n morph: Morph.Declaration;\n intersection: Intersection.Declaration;\n sequence: Sequence.Declaration;\n divisor: Divisor.Declaration;\n required: Required$1.Declaration;\n optional: Optional.Declaration;\n index: Index.Declaration;\n pattern: Pattern.Declaration;\n predicate: Predicate.Declaration;\n structure: Structure.Declaration;\n}\ndeclare const nodeImplementationsByKind: Record;\ndeclare const nodeClassesByKind: Record BaseNode>;\ninterface NodesByKind extends BoundNodesByKind {\n alias: Alias.Node;\n union: Union.Node;\n morph: Morph.Node;\n intersection: Intersection.Node;\n unit: Unit.Node;\n proto: Proto.Node;\n domain: Domain.Node;\n divisor: Divisor.Node;\n pattern: Pattern.Node;\n predicate: Predicate.Node;\n required: Required$1.Node;\n optional: Optional.Node;\n index: Index.Node;\n sequence: Sequence.Node;\n structure: Structure.Node;\n}\ntype nodeOfKind = NodesByKind[kind];\ntype Declaration = NodeDeclarationsByKind[kind];\ntype NodeSchema = Declaration[\"schema\"];\ntype RootSchema = NodeSchema;\ntype NormalizedSchema = Declaration[\"normalizedSchema\"];\ntype childKindOf = Declaration[\"childKind\"];\ntype Prerequisite = Declaration[\"prerequisite\"];\ntype reducibleKindOf = Declaration[\"reducibleTo\"] extends NodeKind ? Declaration[\"reducibleTo\"] : kind;\ntype Inner = Declaration[\"inner\"];\ntype defAttachedAs = kind extends OpenNodeKind ? listable> : NodeSchema;\ntype innerAttachedAs = kind extends OpenNodeKind ? array> : nodeOfKind;\n/** make nested arrays mutable while keeping nested nodes immutable */\ntype mutableInnerOfKind = makeRootAndArrayPropertiesMutable>;\ntype mutableNormalizedRootOfKind = makeRootAndArrayPropertiesMutable>;\ntype errorContext = Declaration[\"errorContext\"];\n\ntype ContextualArgs = Record;\ntype BaseParseOptions = {\n alias?: string;\n prereduced?: prereduced;\n args?: ContextualArgs;\n id?: NodeId;\n};\ninterface BaseParseContextInput extends BaseParseOptions {\n prefix: string;\n def: unknown;\n}\ninterface AttachedParseContext {\n [arkKind]: \"context\";\n $: BaseScope;\n id: NodeId;\n phase: \"unresolved\" | \"resolving\" | \"resolved\";\n}\ninterface BaseParseContext extends BaseParseContextInput, AttachedParseContext {\n id: NodeId;\n}\ninterface NodeParseContextInput extends BaseParseContextInput {\n kind: kind;\n def: NormalizedSchema;\n}\ninterface NodeParseContext extends NodeParseContextInput, AttachedParseContext {\n id: NodeId;\n}\ndeclare const schemaKindOf: (schema: unknown, allowedKinds?: readonly kind[]) => kind;\ndeclare const writeInvalidSchemaMessage: (schema: unknown) => string;\ntype NodeId = Brand;\ntype NodeResolver = (id: NodeId) => BaseNode;\ndeclare const nodesByRegisteredId: Record;\ndeclare const registerNodeId: (prefix: string) => NodeId;\ndeclare const parseNode: (ctx: NodeParseContext) => BaseNode;\ntype CreateNodeInput = {\n id: NodeId;\n kind: NodeKind;\n inner: dict;\n meta: NodeMeta;\n $: BaseScope;\n ignoreCache?: true;\n};\ndeclare const createNode: ({ id, kind, inner, meta, $, ignoreCache }: CreateNodeInput) => BaseNode;\ndeclare const withId: (node: node, id: NodeId) => node;\ndeclare const withMeta: (node: node, meta: ArkEnv.meta, id?: NodeId) => node;\n\ninterface ArkSchemaRegistry extends ArkRegistry {\n intrinsic: typeof intrinsic;\n config: ArkSchemaConfig;\n defaultConfig: ResolvedConfig;\n resolvedConfig: ResolvedConfig;\n nodesByRegisteredId: typeof nodesByRegisteredId;\n}\ntype nodeConfigForKind = Readonly;\n} & (kind extends ArkErrorCode ? {\n expected?: ExpectedConfig;\n actual?: ActualConfig;\n problem?: ProblemConfig;\n message?: MessageConfig;\n} : {})>>;\ntype NodeConfigsByKind = {\n [kind in NodeKind]: nodeConfigForKind;\n};\ntype NodeConfig = NodeConfigsByKind[kind];\ninterface UnknownErrorConfigs {\n expected?: ExpectedConfig;\n actual?: ActualConfig;\n problem?: ProblemConfig;\n message?: MessageConfig;\n}\ninterface UnknownNodeConfig extends UnknownErrorConfigs {\n description?: DescriptionWriter;\n}\ntype ResolvedUnknownNodeConfig = requireKeys;\ndeclare const configureSchema: (config: ArkSchemaConfig) => ArkSchemaConfig;\ndeclare const mergeConfigs: (base: base, merged: ArkSchemaConfig | undefined) => base;\ntype MergeToJsonSchemaConfigs = (baseConfig: base, mergedConfig: ToJsonSchema.Options | undefined) => base extends ToJsonSchema.Context ? ToJsonSchema.Context : ToJsonSchema.Options;\ndeclare const mergeToJsonSchemaConfigs: MergeToJsonSchemaConfigs;\ntype CloneImplementation = (original: original) => original;\ninterface ArkSchemaConfig extends Partial> {\n readonly jitless?: boolean;\n readonly clone?: boolean | CloneImplementation;\n readonly onUndeclaredKey?: UndeclaredKeyBehavior;\n readonly numberAllowsNaN?: boolean;\n readonly dateAllowsInvalid?: boolean;\n readonly exactOptionalPropertyTypes?: boolean;\n readonly onFail?: ArkErrors.Handler | null;\n readonly keywords?: Record;\n readonly toJsonSchema?: ToJsonSchema.Options;\n}\ntype resolveConfig = show<{\n [k in keyof ArkSchemaConfig]-?: k extends NodeKind ? Required : k extends \"clone\" ? CloneImplementation | false : k extends \"keywords\" ? Record : k extends \"toJsonSchema\" ? ToJsonSchema.Context : config[k];\n} & Omit>;\ntype ResolvedConfig = resolveConfig;\n\ntype InternalNodeIntersection = (l: l, r: r, ctx: ctx) => l[\"kind\"] | r[\"kind\"] extends RootKind ? BaseRoot | Disjoint : BaseNode | Disjoint | null;\ndeclare const intersectNodesRoot: InternalNodeIntersection;\ndeclare const pipeNodesRoot: InternalNodeIntersection;\ndeclare const intersectOrPipeNodes: InternalNodeIntersection;\n\nexport { $ark, type ActualConfig, type ActualWriter, After, AfterNode, type AliasDefEntry, ArkError, type ArkErrorCode, type ArkErrorContextInput, type ArkErrorInput, type ArkErrorResult, ArkErrors, type ArkKind, type ArkKinds, type ArkSchemaConfig, type ArkSchemaRegistry, type ArkSchemaScopeConfig, type AttachedParseContext, BaseConstraint, type BaseErrorContext, type BaseMappedPropInner, BaseNode, type BaseNodeDeclaration, type BaseNormalizedSchema, type BaseParseContext, type BaseParseContextInput, type BaseParseOptions, BaseProp, BaseRange, type BaseRangeDeclaration, type BaseRangeInner, BaseRoot, BaseScope, type BasisKind, Before, BeforeNode, type BoundKind, type BoundOperandKind, type Boundable, type BranchTraversal, type CaseContext, type CaseDiscriminant, type CaseKey, type CloneImplementation, type ClosedNodeKind, type CoercibleValue, CompiledFunction, type CompositeKind, type ConditionalTerminalIntersectionRoot, Constraint, type ConstraintIntersection, type ConstraintIntersectionMap, type ConstraintKind, type ContextualArgs, type CreateNodeInput, type CustomErrorInput, type DateRangeKind, type Declaration, type DeepNodeTransformContext, type DeepNodeTransformOptions, type DeepNodeTransformation, type DefaultArkEnv, type DefaultableSequenceElement, type DerivableErrorContext, type DerivableErrorContextInput, type DescriptionWriter, type Discriminant, type DiscriminantKind, type DiscriminantKinds, type DiscriminatedCases, Disjoint, type DisjointEntry, type DisjointEntryContext, type DisjointKind, Divisor, DivisorNode, Domain, DomainNode, ExactLength, ExactLengthNode, type ExclusiveDateRangeSchema, type ExclusiveExpandedDateRangeSchema, type ExclusiveNormalizedNumericRangeSchema, type ExclusiveNumericRangeSchema, type ExpectedConfig, type ExpectedWriter, type FlatRef, type GenericArgResolutions, type GenericAst, type GenericParamAst, type GenericParamDef, GenericRoot, type GenericRootBodyParser, type GenericRootParser, type GettableKeyOrNode, type GlobalOnlyConfigOptionName, type InclusiveDateRangeSchema, type InclusiveExpandedDateRangeSchema, type InclusiveNormalizedNumericRangeSchema, type InclusiveNumericRangeSchema, Index, IndexNode, Inner, type InternalIntersectionOptions, type InternalModule, InternalPrimitiveConstraint, type InternalResolution, type InternalResolutions, type InternalRootDeclaration, type InternalSchemaParser, type InternalTraversal, Intersection, type IntersectionContext, type IntersectionMap, IntersectionNode, type InvokeOptions, JsonSchema, type JsonSchemaOrBoolean, type KeyOrKeyNode, LazyGenericBody, type LengthBoundKind, type LengthBoundableData, type LimitInnerValue, type LimitKind, type LimitSchemaValue, type LimitValue, type ListableJsonSchema, type LowerBoundKind, type LowerNode, type MappedPropInner, Max, MaxLength, MaxLengthNode, MaxNode, type MessageConfig, type MessageContext, type MessageWriter, Min, MinLength, MinLengthNode, MinNode, Morph, type MorphChildKind, MorphNode, type MorphsAtPath, type NarrowedAttachments, NodeCompiler, type NodeConfig, type NodeDeclarationsByKind, type NodeErrorContextInput, type NodeId, type NodeKeyImplementation, type NodeKind, type NodeMeta, type NodeParseContext, type NodeParseContextInput, type NodeResolver, type NodeSchema, NodeSelector, type NormalizedIndex, type NormalizedSchema, type NumericallyBoundable, type OpenNodeKind, Optional, type OptionalMappedPropInner, OptionalNode, type OptionalSequenceElement, type OrderedNodeKinds, Pattern, PatternNode, type PostfixSequenceElement, type PrecompiledReferences, Predicate, PredicateNode, type PrefixSequenceElement, type PreparsedNodeResolution, type Prerequisite, type PrevariadicSequenceElement, type PrimitiveKind, type PrivateDeclaration, type ProblemConfig, type ProblemContext, type ProblemWriter, Prop, type PropFlatMapper, Proto, ProtoNode, type RangeKind, type ReferenceOptions, type RefinementKind, type RegisteredReference, type RelativeComparator, Required$1 as Required, RequiredNode, type ResolvedConfig, type ResolvedScopeConfig, type ResolvedUnknownNodeConfig, type RootExportCache, type RootIntersection, type RootKind, RootModule, type RootSchema, SchemaModule, SchemaScope, type SchemaScopeParser, type ScopeOnlyConfigOptions, Sequence, type SequenceElement, type SequenceElementKind, SequenceNode, type SequenceTuple, type ShouldTransformFn, StandardSchemaV1, type StructuralKind, type StructuralOperationBranchResultByName, type StructuralOperationName, Structure, StructureNode, ToJsonSchema, Traversal, TraversalError, type TraversalKind, type TraversalMethodsByKind, type TraverseAllows, type TraverseApply, type TypeIntersectionMap, TypeMeta, type UndeclaredKeyBehavior, type UndeclaredKeyConfig, type UndeclaredKeyHandling, Union, type UnionChildKind, UnionNode, Unit, UnitNode, type UnknownAttachments, type UnknownErrorConfigs, type UnknownExpandedRangeSchema, type UnknownIntersectionMap, type UnknownIntersectionResult, type UnknownNodeImplementation, type UnknownNormalizedRangeSchema, type UnknownRangeSchema, type UpperBoundKind, type UpperNode, type VariadicSequenceElement, appendUniqueFlatRefs, appendUniqueNodes, arkKind, assertDefaultValueAssignability, assertNodeKind, type attachmentsOf, basisKinds, bindModule, boundKindPairsByLower, type childKindOf, compileComparator, compileLiteralPropAccess, compileObjectLiteral, compileSerializedValue, computeDefaultValueMorph, type conditionalRootOf, configureSchema, constraintKeyParser, constraintKeys, type constraintKindLeftOf, type constraintKindOf, type constraintKindOrLeftOf, constraintKinds, createDateSchemaNormalizer, createLengthRuleParser, createLengthSchemaNormalizer, createNode, dateLimitToString, type declareNode, type defAttachedAs, type defaultErrorContext, defaultValueSerializer, defineSchema, describeBranches, emptyBrandNameMessage, type errorContext, exclusivizeRangeSchema, type exportedNameOf, flatRef, flatRefsAreEqual, type flatResolutionsOf, flattenConstraints, type genericHktToConstraints, genericNode, type genericParamConstraints, type genericParamNames, type genericParamSchemasToAst, type getAssociatedDataForError, hasArkKind, implementNode, indexPropAccess, type innerAttachedAs, type instantiateRoot, type internalImplementationOf, intersectBranches, type intersectConstraintKinds, intersectConstraints, intersectNodesRoot, intersectOrPipeNodes, intersectProps, type intersectRoot, intrinsic, isNode, isNodeKind, type keySchemaDefinitions, type kindLeftOf, type kindOrLeftOf, type kindOrRightOf, type kindRightOf, makeRootAndArrayPropertiesMutable, mergeConfigs, mergeToJsonSchemaConfigs, morphChildKinds, type mutableInnerOfKind, type mutableNormalizedRootOfKind, node, nodeClassesByKind, type nodeImplementationInputOf, type nodeImplementationOf, nodeImplementationsByKind, nodeKinds, type nodeOfKind, nodesByRegisteredId, normalizeIndex, type ownIntersectionResult, type pairedRangeKind, parseAsSchema, parseDateLimit, parseExclusiveKey, parseGeneric, parseNode, pipeNodesRoot, postfixAfterOptionalOrDefaultableMessage, postfixWithoutVariadicMessage, precedenceByKind, precedenceOfKind, pruneDiscriminant, reduceBranches, type reducibleKindOf, reference, refinementKinds, registerNodeId, registeredReference, registryName, type resolvableReferenceIn, type resolveConfig, type resolveReference, rootKinds, rootSchema, rootSchemaScope, schemaKindOf, type schemaKindOrRightOf, type schemaKindRightOf, schemaKindsRightOf, schemaScope, serializeLiteralKey, structuralKinds, structureKeys, throwInvalidOperandError, type toInternalScope, traverseKey, typeKeyToString, typeOrTermExtends, typePathToPropString, unflattenConstraints, unionChildKinds, type unwrapDefault, withId, withMeta, writeDefaultIntersectionMessage, writeDuplicateAliasError, writeEnumerableIndexBranches, writeIndiscriminableMorphMessage, writeIndivisibleMessage, writeInvalidKeysMessage, writeInvalidLengthBoundMessage, writeInvalidOperandMessage, writeInvalidPropertyKeyMessage, writeInvalidSchemaMessage, writeLiteralUnionEntriesMessage, writeMissingSubmoduleAccessMessage, writeMorphIntersectionMessage, writeNonIntegerDivisorMessage, writeNonPrimitiveNonFunctionDefaultValueMessage, writeNonStructuralOperandMessage, writeNonSubmoduleDotMessage, writeNumberIndexMessage, writeOrderedIntersectionMessage, type writeUnassignableDefaultValueMessage, writeUnboundableMessage, writeUnresolvableMessage, writeUnsatisfiableExpressionError, writeUnsatisfiedParameterConstraintMessage };\n\n}"; diff --git a/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts b/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts index 3c68ff5ed8..f167963a41 100644 --- a/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts +++ b/apps/dashboard/src/components/vibe-coding/dts/type-dts.ts @@ -1,4 +1,4 @@ // FROM https://github.com/arktypeio/arktype/tree/main/ark/docs/components/dts /** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ // prettier-ignore -export const typeDts = "declare module \"arktype\" {\n import * as _ark_schema from '@ark/schema';\nimport { TypeMeta, arkKind, BaseMappedPropInner, OptionalMappedPropInner, Prop, InclusiveNumericRangeSchema, ExclusiveNumericRangeSchema, ExactLength, InclusiveDateRangeSchema, ExclusiveDateRangeSchema, Divisor, Pattern, BaseRoot, BaseParseContext, GenericAst, GenericRoot, genericParamNames, resolvableReferenceIn, writeUnresolvableMessage, writeNonSubmoduleDotMessage, emptyBrandNameMessage, writeUnboundableMessage, writeUnassignableDefaultValueMessage, writeIndivisibleMessage, writeNonStructuralOperandMessage, PrivateDeclaration, writeMissingSubmoduleAccessMessage, GenericParamAst, writeUnsatisfiedParameterConstraintMessage, writeInvalidPropertyKeyMessage, UndeclaredKeyBehavior, ArkSchemaScopeConfig, BaseNode, exportedNameOf, toInternalScope, RootSchema, NodeKind, RootKind, NodeSchema, BaseParseOptions, nodeOfKind, reducibleKindOf, PreparsedNodeResolution, writeDuplicateAliasError, BaseScope, AliasDefEntry, GenericParamDef, BaseParseContextInput, Morph, unwrapDefault, Predicate, Sequence, postfixAfterOptionalOrDefaultableMessage, ArkErrors, ToJsonSchema, JsonSchema, NodeSelector, Disjoint, StandardSchemaV1, flatResolutionsOf, LazyGenericBody, RootModule, ArkError } from '@ark/schema';\nexport { ArkError, ArkErrors, ArkSchemaConfig, ArkSchemaScopeConfig, JsonSchema, Traversal, TraversalError } from '@ark/schema';\nimport * as util from '@ark/util';\nimport { anyOrNever, array, arkKeyOf, arkIndexableOf, arkGet, toArkKey, merge, ErrorType, listable, Key, show, intersectUnion, inferred, optionalKeyOf, JsonStructure, Scanner, EscapeChar, WhitespaceChar, Stringifiable, requireKeys, ErrorMessage, Completion, defined, NumberLiteral, join, lastOf, BigintLiteral, trim as trim$1, typeToString, writeMalformedNumericLiteralMessage, Hkt, flattenListable, Brand, noSuggest, Constructor, satisfy, conform, Fn, ifEmptyObjectLiteral, Primitive, objectKindOrDomainOf, equals, requiredKeyOf, Callable, unset, numericStringKeyOf, isDisjoint, unionToTuple, propValueOf, Json, omit, pick, Digit, liftArray, EcmascriptObjects, PlatformObjects, isSafelyMappable, intersectArrays, unionKeyOf } from '@ark/util';\nexport { Hkt, ParseError, inferred } from '@ark/util';\nimport { ArkSchemaConfig } from '@ark/schema/config';\n\ntype KeywordConfig = {\n [k in keyof Ark.flat as parseConfigurableFlatAlias]?: TypeMeta.Collapsible;\n};\ntype parseConfigurableFlatAlias = [\n v\n] extends [anyOrNever] ? k : v extends {\n [arkKind]: \"generic\" | \"module\";\n} ? never : k extends `${infer prefix}.root` ? prefix : k;\ninterface ArkConfig extends ArkSchemaConfig {\n keywords?: KeywordConfig;\n}\ndeclare const configure: (config: config) => config;\ndeclare global {\n export interface ArkEnv {\n $(): Ark;\n }\n}\n/**\n * This mirrors the global ArkEnv namespace as a local export. We use it instead\n * of the global internally due to a bug in twoslash that prevents `ark/docs`\n * from building if we refer to the global directly.\n *\n * If, in the future, docs can build while arktype refers to `ArkEnv.$` directly,\n * this can be removed.\n */\ndeclare namespace ArkAmbient {\n type $ = ReturnType;\n type meta = ArkEnv.meta;\n type prototypes = ArkEnv.prototypes;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$6 extends Type {\n readonly(): t extends array ? Type$5<{\n readonly [i in keyof t]: t[i];\n }, $> : Type$6<{\n readonly [k in keyof t]: t[k];\n }, $>;\n keyof(): instantiateType, $>;\n /**\n * Get the `Type` of a property of this `Type`.\n * @example type({ foo: \"string\" }).get(\"foo\") // Type\n */\n get, r = instantiateType, $>>(k1: k1 | type.cast): r extends infer _ ? _ : never;\n get, const k2 extends arkIndexableOf>, r = instantiateType, k2>, $>>(k1: k1 | type.cast, k2: k2 | type.cast): r extends infer _ ? _ : never;\n get, const k2 extends arkIndexableOf>, const k3 extends arkIndexableOf, k2>>, r = instantiateType, k2>, k3>, $>>(k1: k1 | type.cast, k2: k2 | type.cast, k3: k3 | type.cast): r extends infer _ ? _ : never;\n /**\n * Create a copy of this `Type` with only the specified properties.\n * @example type({ foo: \"string\", bar: \"number\" }).pick(\"foo\") // Type<{ foo: string }>\n */\n pick = never>(...keys: (key | type.cast)[]): Type$6<{\n [k in keyof t as Extract, key>]: t[k];\n }, $>;\n /**\n * Create a copy of this `Type` with all properties except the specified ones.\n * @example type({ foo: \"string\", bar: \"number\" }).omit(\"foo\") // Type<{ bar: number }>\n */\n omit = never>(...keys: (key | type.cast)[]): Type$6<{\n [k in keyof t as Exclude, key>]: t[k];\n }, $>;\n /**\n * Merge another `Type` definition, overriding properties of this `Type` with the duplicate keys.\n * @example type({ a: \"1\", b: \"2\" }).merge({ b: \"3\", c: \"4\" }) // Type<{ a: 1, b: 3, c: 4 }>\n */\n merge, r = Type$6, $>>(def: type.validate & (inferredDef extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n /**\n * Create a copy of this `Type` with all properties required.\n * @example const T = type({ \"foo?\"\": \"string\" }).required() // Type<{ foo: string }>\n */\n required(): Type$6<{\n [k in keyof t]-?: t[k];\n }, $>;\n /**\n * Create a copy of this `Type` with all properties optional.\n * @example: const T = type({ foo: \"string\" }).optional() // Type<{ foo?: string }>\n */\n partial(): Type$6<{\n [k in keyof t]?: t[k];\n }, $>;\n map, r = Type$6, $>>(flatMapEntry: (entry: typePropOf) => transformed): r extends infer _ ? _ : never;\n /**\n * List of property info of this `Type`.\n * @example type({ foo: \"string = \"\" }).props // [{ kind: \"required\", key: \"foo\", value: Type, default: \"\" }]\n */\n props: array>;\n}\ntype typePropOf = keyof o extends infer k ? k extends keyof o ? typeProp : never : never;\ntype typeProp = t extends Default ? DefaultedTypeProp : BaseTypeProp ? \"optional\" : \"required\", k & Key, t, $>;\ninterface BaseTypeProp {\n kind: kind;\n key: k;\n value: instantiateType;\n meta: ArkEnv.meta;\n toJSON: () => JsonStructure;\n}\ninterface DefaultedTypeProp extends BaseTypeProp<\"optional\", k, v, $> {\n default: defaultValue;\n}\ntype MappedTypeProp = BaseMappedTypeProp | OptionalMappedTypeProp;\ntype BaseMappedTypeProp = merge;\n}>;\ntype OptionalMappedTypeProp = merge;\n default?: v;\n}>;\ntype constructMapped> = show>>;\ntype fromTypeProps> = show<{\n [prop in props[number] as Extract, {\n kind: \"required\";\n }>[\"key\"]]: prop[\"value\"][inferred];\n} & {\n [prop in props[number] as Extract, {\n kind: \"optional\";\n default?: never;\n }>[\"key\"]]?: prop[\"value\"][inferred];\n} & {\n [prop in props[number] as Extract, {\n kind: \"optional\";\n default: unknown;\n }>[\"key\"]]: withDefault;\n}>;\ntype NonObjectMergeErrorMessage = \"Merged type must be an object\";\ntype applyHomomorphicOptionality = prop[\"kind\"] extends string ? prop : prop & {\n kind: prop[\"key\"] extends optionalKeyOf ? \"optional\" : \"required\";\n};\n\ninterface Type$5<\n/** @ts-ignore cast variance */\nout t extends readonly unknown[] = readonly unknown[], $ = {}> extends Type$6 {\n atLeastLength(schema: InclusiveNumericRangeSchema): this;\n atMostLength(schema: InclusiveNumericRangeSchema): this;\n moreThanLength(schema: ExclusiveNumericRangeSchema): this;\n lessThanLength(schema: ExclusiveNumericRangeSchema): this;\n exactlyLength(schema: ExactLength.Schema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$4 extends Type$6 {\n atOrAfter(schema: InclusiveDateRangeSchema): this;\n atOrBefore(schema: InclusiveDateRangeSchema): this;\n laterThan(schema: ExclusiveDateRangeSchema): this;\n earlierThan(schema: ExclusiveDateRangeSchema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$3 extends Type {\n divisibleBy(schema: Divisor.Schema): this;\n atLeast(schema: InclusiveNumericRangeSchema): this;\n atMost(schema: InclusiveNumericRangeSchema): this;\n moreThan(schema: ExclusiveNumericRangeSchema): this;\n lessThan(schema: ExclusiveNumericRangeSchema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$2 extends Type {\n matching(schema: Pattern.Schema): this;\n atLeastLength(schema: InclusiveNumericRangeSchema): this;\n atMostLength(schema: InclusiveNumericRangeSchema): this;\n moreThanLength(schema: ExclusiveNumericRangeSchema): this;\n lessThanLength(schema: ExclusiveNumericRangeSchema): this;\n exactlyLength(schema: ExactLength.Schema): this;\n}\n\ntype instantiateType = [\n t\n] extends [anyOrNever] ? Type : [t] extends [object] ? [\n t\n] extends [array] ? Type$5 : [t] extends [Date] ? Type$4 : Type$6 : [t] extends [string] ? Type$2 : [t] extends [number] ? Type$3 : Type;\n\ntype StringifiablePrefixOperator = \"keyof\";\ndeclare const minComparators: {\n readonly \">\": true;\n readonly \">=\": true;\n};\ntype MinComparator = keyof typeof minComparators;\ndeclare const maxComparators: {\n readonly \"<\": true;\n readonly \"<=\": true;\n};\ntype MaxComparator = keyof typeof maxComparators;\ndeclare const comparators: {\n \">\": boolean;\n \">=\": boolean;\n \"<\": boolean;\n \"<=\": boolean;\n \"==\": boolean;\n};\ntype Comparator = keyof typeof comparators;\ntype InvertedComparators = {\n \"<\": \">\";\n \">\": \"<\";\n \"<=\": \">=\";\n \">=\": \"<=\";\n \"==\": \"==\";\n};\ntype BranchOperator = \"&\" | \"|\" | \"|>\";\ntype OpenLeftBound = {\n limit: LimitLiteral;\n comparator: MinComparator;\n};\ndeclare const writeUnmatchedGroupCloseMessage: (unscanned: unscanned) => writeUnmatchedGroupCloseMessage;\ntype writeUnmatchedGroupCloseMessage = `Unmatched )${unscanned extends \"\" ? \"\" : ` before ${unscanned}`}`;\ndeclare const writeUnclosedGroupMessage: (missingChar: missingChar) => writeUnclosedGroupMessage;\ntype writeUnclosedGroupMessage = `Missing ${missingChar}`;\ndeclare const writeOpenRangeMessage: (min: min, comparator: comparator) => writeOpenRangeMessage;\ntype writeOpenRangeMessage = `Left bounds are only valid when paired with right bounds (try ...${comparator}${min})`;\ntype writeUnpairableComparatorMessage = `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`;\ndeclare const writeUnpairableComparatorMessage: (comparator: comparator) => writeUnpairableComparatorMessage;\ndeclare const writeMultipleLeftBoundsMessage: (openLimit: openLimit, openComparator: openComparator, limit: limit, comparator: comparator) => writeMultipleLeftBoundsMessage;\ntype writeMultipleLeftBoundsMessage = `An expression may have at most one left bound (parsed ${openLimit}${InvertedComparators[openComparator]}, ${limit}${InvertedComparators[comparator]})`;\n\ndeclare class ArkTypeScanner extends Scanner {\n shiftUntilNextTerminator(): string;\n static terminatingChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n readonly \"<\": 1;\n readonly \">\": 1;\n readonly \"=\": 1;\n readonly \"|\": 1;\n readonly \"&\": 1;\n readonly \")\": 1;\n readonly \"[\": 1;\n readonly \"%\": 1;\n readonly \",\": 1;\n readonly \":\": 1;\n readonly \"?\": 1;\n readonly \"#\": 1;\n };\n static finalizingLookaheads: {\n readonly \">\": 1;\n readonly \",\": 1;\n readonly \"\": 1;\n readonly \"=\": 1;\n readonly \"?\": 1;\n };\n static lookaheadIsFinalizing: (lookahead: string, unscanned: string) => lookahead is \">\" | \",\" | \"=\" | \"?\";\n}\ndeclare namespace ArkTypeScanner {\n type lookaheadIsFinalizing = lookahead extends \">\" ? unscanned extends `=${infer nextUnscanned}` ? nextUnscanned extends `=${string}` ? true : false : ArkTypeScanner.skipWhitespace extends (\"\" | `${TerminatingChar}${string}`) ? true : false : lookahead extends \"=\" ? unscanned extends `=${string}` ? false : true : lookahead extends \",\" | \"?\" ? true : false;\n type TerminatingChar = keyof typeof ArkTypeScanner.terminatingChars;\n type FinalizingLookahead = keyof typeof ArkTypeScanner.finalizingLookaheads;\n type InfixToken = Comparator | \"|\" | \"&\" | \"%\" | \":\" | \"=>\" | \"|>\" | \"#\" | \"@\" | \"=\";\n type PostfixToken = \"[]\" | \"?\";\n type OperatorToken = InfixToken | PostfixToken;\n type shift = `${lookahead}${unscanned}`;\n type shiftUntil = unscanned extends shift ? lookahead extends terminator ? scanned extends `${infer base}${EscapeChar}` ? shiftUntil : [scanned, unscanned] : shiftUntil : [scanned, \"\"];\n type shiftUntilNot = unscanned extends shift ? lookahead extends nonTerminator ? shiftUntilNot : [scanned, unscanned] : [scanned, \"\"];\n type shiftUntilNextTerminator = shiftUntil;\n type skipWhitespace = shiftUntilNot[1];\n type shiftResult = [\n scanned,\n unscanned\n ];\n}\n\ntype astToString = ast extends InferredAst | DefAst ? ast[2] : ast extends PostfixExpression ? operator extends \"[]\" ? `${astToString}[]` : never : ast extends InfixExpression ? operator extends \"&\" | \"|\" | \"%\" | Comparator ? `${astToString} ${operator} ${astToString}` : never : ast extends Stringifiable ? `${ast extends bigint ? `${ast}n` : ast}` : \"...\";\ntype writeConstrainedMorphMessage = `To constrain the output of ${astToString}, pipe like myMorph.to('number > 0').\nTo constrain the input, intersect like myMorph.and('number > 0').`;\n\ntype BranchState$1 = {\n prefixes: StringifiablePrefixOperator[];\n leftBound: OpenLeftBound | null;\n intersection: BaseRoot | null;\n union: BaseRoot | null;\n pipe: BaseRoot | null;\n};\ntype DynamicStateWithRoot = requireKeys;\ndeclare class DynamicState {\n root: BaseRoot | undefined;\n branches: BranchState$1;\n finalizer: ArkTypeScanner.FinalizingLookahead | undefined;\n groups: BranchState$1[];\n scanner: ArkTypeScanner;\n ctx: BaseParseContext;\n constructor(scanner: ArkTypeScanner, ctx: BaseParseContext);\n error(message: string): never;\n hasRoot(): this is DynamicStateWithRoot;\n setRoot(root: BaseRoot): void;\n unsetRoot(): this[\"root\"];\n constrainRoot(...args: Parameters[\"constrain\"]>): void;\n finalize(finalizer: ArkTypeScanner.FinalizingLookahead): void;\n reduceLeftBound(limit: LimitLiteral, comparator: Comparator): void;\n finalizeBranches(): void;\n finalizeGroup(): void;\n addPrefix(prefix: StringifiablePrefixOperator): void;\n applyPrefixes(): void;\n pushRootToBranch(token: BranchOperator): void;\n parseUntilFinalizer(): DynamicStateWithRoot;\n parseOperator(this: DynamicStateWithRoot): void;\n parseOperand(): void;\n private assertRangeUnset;\n reduceGroupOpen(): void;\n previousOperator(): MinComparator | StringifiablePrefixOperator | ArkTypeScanner.InfixToken | undefined;\n shiftedByOne(): this;\n}\n\ntype StaticState = {\n root: unknown;\n branches: BranchState;\n groups: BranchState[];\n finalizer: ArkTypeScanner.FinalizingLookahead | ErrorMessage | undefined;\n scanned: string;\n unscanned: string;\n};\ntype BranchState = {\n prefixes: StringifiablePrefixOperator[];\n leftBound: OpenLeftBound | undefined;\n intersection: unknown;\n pipe: unknown;\n union: unknown;\n};\ndeclare namespace state {\n type initialize = from<{\n root: undefined;\n branches: initialBranches;\n groups: [];\n finalizer: undefined;\n scanned: \"\";\n unscanned: def;\n }>;\n type error = from<{\n root: ErrorMessage;\n branches: initialBranches;\n groups: [];\n finalizer: ErrorMessage;\n scanned: \"\";\n unscanned: \"\";\n }>;\n type completion = from<{\n root: Completion;\n branches: initialBranches;\n groups: [];\n finalizer: Completion;\n scanned: \"\";\n unscanned: \"\";\n }>;\n type initialBranches = branchesFrom<{\n prefixes: [];\n leftBound: undefined;\n intersection: undefined;\n pipe: undefined;\n union: undefined;\n }>;\n type updateScanned = previousUnscanned extends `${infer justScanned}${updatedUnscanned}` ? `${previousScanned}${justScanned}` : previousScanned;\n type setRoot = from<{\n root: root;\n branches: s[\"branches\"];\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type addPrefix = from<{\n root: s[\"root\"];\n branches: {\n prefixes: [...s[\"branches\"][\"prefixes\"], prefix];\n leftBound: s[\"branches\"][\"leftBound\"];\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceBranch = s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : from<{\n root: undefined;\n branches: {\n prefixes: [];\n leftBound: undefined;\n intersection: token extends \"&\" ? mergeToIntersection : undefined;\n union: token extends \"|\" ? mergeToUnion : token extends \"|>\" ? undefined : s[\"branches\"][\"union\"];\n pipe: token extends \"|>\" ? mergeToPipe : s[\"branches\"][\"pipe\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceLeftBound = comparator extends \"<\" | \"<=\" ? s[\"branches\"][\"leftBound\"] extends {} ? state.error> : from<{\n root: undefined;\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: {\n limit: limit;\n comparator: InvertedComparators[comparator];\n };\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }> : state.error>;\n type reduceRange = state.from<{\n root: [minLimit, minComparator, [s[\"root\"], maxComparator, maxLimit]];\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: undefined;\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceSingleBound = state.from<{\n root: [s[\"root\"], comparator, limit];\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: undefined;\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type mergeToIntersection = s[\"branches\"][\"intersection\"] extends undefined ? mergePrefixes : [s[\"branches\"][\"intersection\"], \"&\", mergePrefixes];\n type mergeToUnion = s[\"branches\"][\"union\"] extends undefined ? mergeToIntersection : [s[\"branches\"][\"union\"], \"|\", mergeToIntersection];\n type mergeToPipe = s[\"branches\"][\"pipe\"] extends undefined ? mergeToUnion : [s[\"branches\"][\"pipe\"], \"|>\", mergeToUnion];\n type mergePrefixes = remaining extends [infer head, ...infer tail] ? [\n head,\n mergePrefixes\n ] : s[\"root\"];\n type popGroup = [\n ...stack,\n top\n ];\n type finalizeGroup = s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : s[\"groups\"] extends popGroup ? from<{\n groups: stack;\n branches: top;\n root: mergeToPipe;\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }> : state.error>;\n type reduceGroupOpen = from<{\n groups: [...s[\"groups\"], s[\"branches\"]];\n branches: initialBranches;\n root: undefined;\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type finalize = s[\"groups\"] extends [] ? s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : from<{\n root: mergeToPipe;\n groups: s[\"groups\"];\n branches: initialBranches;\n finalizer: finalizer;\n scanned: s[\"scanned\"];\n unscanned: s[\"unscanned\"];\n }> : state.error>;\n type openRangeError> = state.error>;\n type previousOperator = s[\"branches\"][\"leftBound\"] extends {} ? s[\"branches\"][\"leftBound\"][\"comparator\"] : s[\"branches\"][\"prefixes\"] extends ([\n ...unknown[],\n infer tail extends string\n ]) ? tail : s[\"branches\"][\"intersection\"] extends {} ? \"&\" : s[\"branches\"][\"union\"] extends {} ? \"|\" : undefined;\n type scanTo = from<{\n root: s[\"root\"];\n branches: s[\"branches\"];\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type from = s;\n type branchesFrom = b;\n}\n\ntype StringLiteral = DoubleQuotedStringLiteral | SingleQuotedStringLiteral;\ntype DoubleQuotedStringLiteral = `\"${Text}\"`;\ntype SingleQuotedStringLiteral = `'${Text}'`;\ndeclare const parseEnclosed: (s: DynamicState, enclosing: EnclosingStartToken) => void;\ntype parseEnclosed = ArkTypeScanner.shiftUntil extends ArkTypeScanner.shiftResult ? nextUnscanned extends \"\" ? state.error> : state.setRoot, nextUnscanned extends ArkTypeScanner.shift ? unscanned : \"\"> : never;\ndeclare const enclosingQuote: {\n readonly \"'\": 1;\n readonly '\"': 1;\n};\ntype EnclosingQuote = keyof typeof enclosingQuote;\ndeclare const enclosingTokens: {\n readonly \"d'\": \"'\";\n readonly 'd\"': \"\\\"\";\n readonly \"'\": \"'\";\n readonly '\"': \"\\\"\";\n readonly \"/\": \"/\";\n};\ntype EnclosingTokens = typeof enclosingTokens;\ntype EnclosingStartToken = keyof EnclosingTokens;\ndeclare const enclosingCharDescriptions: {\n readonly '\"': \"double-quote\";\n readonly \"'\": \"single-quote\";\n readonly \"/\": \"forward slash\";\n};\ntype enclosingCharDescriptions = typeof enclosingCharDescriptions;\ndeclare const writeUnterminatedEnclosedMessage: (fragment: fragment, enclosingStart: enclosingStart) => writeUnterminatedEnclosedMessage;\ntype writeUnterminatedEnclosedMessage = `${enclosingStart}${fragment} requires a closing ${enclosingCharDescriptions[EnclosingTokens[enclosingStart]]}`;\n\ndeclare const parseUnenclosed: (s: DynamicState) => void;\ntype parseUnenclosed = ArkTypeScanner.shiftUntilNextTerminator extends (ArkTypeScanner.shiftResult) ? tryResolve extends state.from ? s : never : never;\ntype parseResolution = resolutionToAst extends infer ast ? ast extends GenericAst ? parseGenericInstantiation, $, args> : state.setRoot : never;\ndeclare const parseGenericInstantiation: (name: string, g: GenericRoot, s: DynamicState) => BaseRoot;\ntype parseGenericInstantiation = ArkTypeScanner.skipWhitespace extends `<${infer unscanned}` ? parseGenericArgs extends infer result ? result extends ParsedArgs ? state.setRoot, nextUnscanned> : result : never : state.error, [\n]>>;\ntype tryResolve = token extends keyof args ? parseResolution : token extends keyof $ ? parseResolution : `#${token}` extends keyof $ ? parseResolution : token extends keyof ArkAmbient.$ ? parseResolution : token extends NumberLiteral ? state.setRoot, unscanned> : token extends (`${infer submodule extends keyof $ & string}.${infer reference}`) ? tryResolveSubmodule : token extends (`${infer submodule extends keyof ArkAmbient.$ & string}.${infer reference}`) ? tryResolveSubmodule : token extends BigintLiteral ? state.setRoot, unscanned> : token extends \"keyof\" ? state.addPrefix : unresolvableState;\ntype tryResolveSubmodule = resolution extends {\n [arkKind]: \"module\";\n} ? reference extends keyof resolution ? parseResolution : reference extends (`${infer nestedSubmodule extends keyof resolution & string}.${infer nestedReference}`) ? tryResolveSubmodule : unresolvableState : state.error>>;\n/** Provide valid completions for the current token, or fallback to an\n * unresolvable error if there are none */\ntype unresolvableState = [\n token,\n s[\"unscanned\"]\n] extends ([\n \"\",\n ArkTypeScanner.shift<\"#\", infer unscanned>\n]) ? ArkTypeScanner.shiftUntilNextTerminator extends (ArkTypeScanner.shiftResult) ? state.error> : never : validReferenceFromToken extends (never) ? state.error>> : state.completion<`${s[\"scanned\"]}${qualifiedReference, submodulePath>}`>;\ntype qualifiedReference = join<[...submodulePath, reference], \".\">;\ntype validReferenceFromToken = Extract : resolvableReferenceIn<$>, `${token}${string}`>;\ntype writeMissingRightOperandMessage = `Token '${token}' requires a right operand${unscanned extends \"\" ? \"\" : ` before '${unscanned}'`}`;\ndeclare const writeMissingRightOperandMessage: (token: token, unscanned?: unscanned) => writeMissingRightOperandMessage;\n\ndeclare const parseOperand: (s: DynamicState) => void;\ntype parseOperand = s[\"unscanned\"] extends (ArkTypeScanner.shift) ? lookahead extends \"(\" ? state.reduceGroupOpen : lookahead extends EnclosingStartToken ? parseEnclosed : lookahead extends WhitespaceChar ? parseOperand, $, args> : lookahead extends \"d\" ? unscanned extends (ArkTypeScanner.shift) ? parseEnclosed : parseUnenclosed : parseUnenclosed : state.completion<`${s[\"scanned\"]}${BaseCompletions<$, args>}`>;\n\ntype UnitLiteralKeyword = \"null\" | \"undefined\" | \"true\" | \"false\";\ntype UnitLiteral = StringLiteral | BigintLiteral | NumberLiteral | DateLiteral | UnitLiteralKeyword;\ntype ParsedDefaultableProperty = readonly [BaseRoot, \"=\", unknown];\ndeclare const parseDefault: (s: DynamicStateWithRoot) => ParsedDefaultableProperty;\ntype parseDefault = trim$1 extends infer defaultValue extends UnitLiteral ? [\n root,\n \"=\",\n defaultValue\n] : ErrorMessage>>;\ndeclare const writeNonLiteralDefaultMessage: (defaultDef: defaultDef) => writeNonLiteralDefaultMessage;\ntype writeNonLiteralDefaultMessage = `Default value '${defaultDef}' must a literal value`;\n\ndeclare const parseBound: (s: DynamicStateWithRoot, start: ComparatorStartChar) => void;\ntype parseBound = shiftComparator extends infer shiftResultOrError ? shiftResultOrError extends (ArkTypeScanner.shiftResult) ? s[\"root\"] extends (InferredAst) ? state.reduceLeftBound : parseRightBound, comparator, $, args> : shiftResultOrError : never;\ntype OneCharComparator = \">\" | \"<\";\ntype ComparatorStartChar = Comparator extends `${infer char}${string}` ? char : never;\ndeclare const shiftComparator: (s: DynamicState, start: ComparatorStartChar) => Comparator;\ntype shiftComparator = unscanned extends `=${infer nextUnscanned}` ? [`${start}=`, nextUnscanned] : [start & OneCharComparator, unscanned];\ndeclare const parseRightBound: (s: DynamicStateWithRoot, comparator: Comparator) => void;\ntype parseRightBound = parseOperand extends infer nextState extends StaticState ? nextState[\"root\"] extends (InferredAst) ? s[\"branches\"][\"leftBound\"] extends {} ? comparator extends MaxComparator ? state.reduceRange : state.error> : state.reduceSingleBound : state.error, \"right\">> : never;\ndeclare const writeInvalidLimitMessage: (comparator: comparator, limit: limit, boundKind: boundKind) => writeInvalidLimitMessage;\ntype writeInvalidLimitMessage = `Comparator ${boundKind extends \"left\" ? InvertedComparators[comparator] : comparator} must be ${boundKind extends \"left\" ? \"preceded\" : \"followed\"} by a corresponding literal (was ${limit})`;\ntype BoundExpressionKind = \"left\" | \"right\";\n\ndeclare const parseBrand: (s: DynamicStateWithRoot) => void;\ntype parseBrand = ArkTypeScanner.shiftUntilNextTerminator> extends (ArkTypeScanner.shiftResult<`${infer brandName}`, infer nextUnscanned>) ? brandName extends \"\" ? state.error : state.setRoot : never;\n\ndeclare const parseDivisor: (s: DynamicStateWithRoot) => void;\ntype parseDivisor = ArkTypeScanner.shiftUntilNextTerminator> extends ArkTypeScanner.shiftResult ? scanned extends `${infer divisor extends number}` ? divisor extends 0 ? state.error> : state.setRoot : state.error> : never;\ndeclare const writeInvalidDivisorMessage: (divisor: divisor) => writeInvalidDivisorMessage;\ntype writeInvalidDivisorMessage = `% operator must be followed by a non-zero integer literal (was ${divisor})`;\n\ndeclare const parseOperator: (s: DynamicStateWithRoot) => void;\ntype parseOperator = s[\"unscanned\"] extends (ArkTypeScanner.shift) ? lookahead extends \"[\" ? unscanned extends ArkTypeScanner.shift<\"]\", infer nextUnscanned> ? state.setRoot : state.error : lookahead extends \"|\" ? unscanned extends ArkTypeScanner.shift<\">\", infer nextUnscanned> ? state.reduceBranch\", nextUnscanned> : state.reduceBranch : lookahead extends \"&\" ? state.reduceBranch : lookahead extends \")\" ? state.finalizeGroup : ArkTypeScanner.lookaheadIsFinalizing extends true ? state.finalize, lookahead & ArkTypeScanner.FinalizingLookahead> : lookahead extends ComparatorStartChar ? parseBound : lookahead extends \"%\" ? parseDivisor : lookahead extends \"#\" ? parseBrand : lookahead extends WhitespaceChar ? parseOperator, $, args> : state.error> : state.finalize;\ndeclare const writeUnexpectedCharacterMessage: (char: char, shouldBe?: shouldBe) => writeUnexpectedCharacterMessage;\ntype writeUnexpectedCharacterMessage = `'${char}' is not allowed here${shouldBe extends \"\" ? \"\" : ` (should be ${shouldBe})`}`;\ndeclare const incompleteArrayTokenMessage = \"Missing expected ']'\";\ntype incompleteArrayTokenMessage = typeof incompleteArrayTokenMessage;\n\ndeclare const parseString: (def: string, ctx: BaseParseContext) => InnerParseResult;\n/**\n * Try to parse the definition from right to left using the most common syntax.\n * This can be much more efficient for simple definitions.\n */\ntype parseString = def extends keyof $ ? resolutionToAst : def extends `${infer child}[]` ? child extends keyof $ ? [\n resolutionToAst,\n \"[]\"\n] : fullStringParse, $, args> : fullStringParse, $, args>;\ntype inferString = inferAstRoot, $, args>;\ntype BaseCompletions<$, args, otherSuggestions extends string = never> = resolvableReferenceIn<$> | resolvableReferenceIn | (keyof args & string) | StringifiablePrefixOperator | otherSuggestions;\ndeclare const fullStringParse: (s: DynamicState) => InnerParseResult;\ntype fullStringParse = extractFinalizedResult>;\ndeclare const parseUntilFinalizer: (s: DynamicState) => DynamicStateWithRoot;\ntype parseUntilFinalizer = s[\"finalizer\"] extends undefined ? parseUntilFinalizer, $, args> : s;\ndeclare const next: (s: DynamicState) => void;\ntype next = s[\"root\"] extends undefined ? parseOperand : parseOperator;\ntype extractFinalizedResult = s[\"finalizer\"] extends \"\" ? s[\"root\"] : s[\"finalizer\"] extends ErrorMessage ? s[\"finalizer\"] : s[\"finalizer\"] extends \"?\" ? [s[\"root\"], \"?\"] : s[\"finalizer\"] extends \"=\" ? parseDefault : ErrorMessage>;\n\ndeclare const parseGenericArgs: (name: string, g: GenericRoot, s: DynamicState) => BaseRoot[];\ntype parseGenericArgs = _parseGenericArgs;\ntype ParsedArgs = {\n result: result;\n unscanned: unscanned;\n};\ndeclare const _parseGenericArgs: (name: string, g: GenericRoot, s: DynamicState, argNodes: BaseRoot[]) => BaseRoot[];\ntype _parseGenericArgs = parseUntilFinalizer, $, args> extends (infer finalArgState extends StaticState) ? {\n defs: [\n ...argDefs,\n finalArgState[\"scanned\"] extends `${infer def}${\",\" | \">\"}` ? def : finalArgState[\"scanned\"]\n ];\n asts: [...argAsts, finalArgState[\"root\"]];\n unscanned: finalArgState[\"unscanned\"];\n} extends ({\n defs: infer nextDefs extends string[];\n asts: infer nextAsts extends unknown[];\n unscanned: infer nextUnscanned extends string;\n}) ? finalArgState[\"finalizer\"] extends \">\" ? nextAsts[\"length\"] extends g[\"paramsAst\"][\"length\"] ? ParsedArgs : state.error, nextDefs>> : finalArgState[\"finalizer\"] extends \",\" ? _parseGenericArgs : finalArgState[\"finalizer\"] extends ErrorMessage ? finalArgState : state.error\">> : never : never;\ndeclare const writeInvalidGenericArgCountMessage: , argDefs extends array>(name: name, params: params, argDefs: argDefs) => writeInvalidGenericArgCountMessage;\ntype writeInvalidGenericArgCountMessage, argDefs extends array> = `${name}<${join}> requires exactly ${params[\"length\"]} args (got ${argDefs[\"length\"]}${argDefs[\"length\"] extends (0) ? \"\" : `: ${join}`})`;\n\ntype validateRange = [\n l\n] extends [LimitLiteral] ? validateBound : [l] extends [[infer leftAst, Comparator, unknown]] ? ErrorMessage>> : validateBound;\ntype validateBound = inferAstRoot extends infer bounded ? isNumericallyBoundable extends true ? limit extends number ? validateAst : ErrorMessage> : [bounded] extends [Date] ? validateAst : [bounded] extends [InferredMorph] ? ErrorMessage> : ErrorMessage>> : never;\ntype isNumericallyBoundable = [\n bounded\n] extends [number] ? true : [bounded] extends [string] ? true : [bounded] extends [array] ? true : false;\ndeclare const writeDoubleRightBoundMessage: (root: root) => writeDoubleRightBoundMessage;\ntype writeDoubleRightBoundMessage = `Expression ${root} must have at most one right bound`;\n\ntype validateDefault = validateAst extends infer e extends ErrorMessage ? e : type.infer extends inferAstIn ? undefined : ErrorMessage, unitLiteral>>;\n\ntype validateDivisor = inferAstRoot extends infer data ? [\n data\n] extends [number] ? validateAst : [data] extends [InferredMorph] ? ErrorMessage> : ErrorMessage> : never;\n\ntype validateKeyof = inferAstRoot extends infer data ? [\n data\n] extends [object] ? validateAst : ErrorMessage>> : never;\n\ntype validateAst = ast extends ErrorMessage ? ast : ast extends InferredAst ? validateInferredAst : ast extends DefAst ? ast[2] extends PrivateDeclaration ? ErrorMessage> : undefined : ast extends PostfixExpression<\"[]\" | \"?\", infer operand> ? validateAst : ast extends InfixExpression ? operator extends BranchOperator ? validateInfix : operator extends Comparator ? validateRange : operator extends \"%\" ? validateDivisor : operator extends \"=\" ? validateDefault : operator extends \"#\" ? validateAst : ErrorMessage>> : ast extends [\"keyof\", infer operand] ? validateKeyof : ast extends GenericInstantiationAst ? validateGenericInstantiation : ErrorMessage>> & {\n ast: ast;\n};\ntype writeUnexpectedExpressionMessage = `Failed to parse the expression resulting from ${expression}`;\ndeclare const writePrefixedPrivateReferenceMessage: (name: name) => writePrefixedPrivateReferenceMessage;\ntype writePrefixedPrivateReferenceMessage = `Private type references should not include '#'. Use '${name}' instead.`;\ntype validateInferredAst = def extends NumberLiteral ? number extends inferred ? ErrorMessage> : undefined : def extends BigintLiteral ? bigint extends inferred ? ErrorMessage> : undefined : [inferred] extends [anyOrNever] ? undefined : def extends PrivateDeclaration ? ErrorMessage> : inferred extends Generic ? ErrorMessage> : inferred extends {\n [arkKind]: \"module\";\n} ? \"root\" extends keyof inferred ? undefined : ErrorMessage> : def extends ErrorMessage ? def : undefined;\ntype validateString = parseString extends infer ast ? validateAst extends infer result extends ErrorMessage ? result extends Completion ? text : result : def : never;\ntype validateInfix = validateAst extends infer e extends ErrorMessage ? e : validateAst extends infer e extends ErrorMessage ? e : undefined;\ndeclare const shallowOptionalMessage = \"Optional definitions like 'string?' are only valid as properties in an object or tuple\";\ntype shallowOptionalMessage = typeof shallowOptionalMessage;\ndeclare const shallowDefaultableMessage = \"Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple\";\ntype shallowDefaultableMessage = typeof shallowDefaultableMessage;\n\ntype GenericInstantiationAst = [generic, \"<>\", argAsts];\ntype inferGenericInstantiation = g[\"bodyDef\"] extends Hkt ? Hkt.apply;\n}> : inferDefinition, {\n [i in keyof g[\"names\"] & `${number}` as g[\"names\"][i]]: inferExpression, args>;\n}>;\ntype validateGenericInstantiation = validateGenericArgs;\ntype validateGenericArgs, argAsts extends array, $, args, indices extends 1[]> = argAsts extends readonly [infer arg, ...infer argsTail] ? validateAst extends infer e extends ErrorMessage ? e : inferAstRoot extends params[indices[\"length\"]][1] ? validateGenericArgs : ErrorMessage, astToString>> : undefined;\ntype resolveScope = g$ extends UnparsedScope ? $ : g$;\n\ntype inferAstRoot = ast extends array ? inferExpression : never;\ntype inferAstIn = distill.In>;\ntype DefAst = [\n def,\n \"def\",\n alias\n];\ntype InferredAst = [\n t,\n \"inferred\",\n def\n];\ntype inferExpression = ast extends array ? ast extends InferredAst ? resolution : ast extends DefAst ? inferDefinition : ast extends GenericInstantiationAst ? inferGenericInstantiation : ast[1] extends \"[]\" ? inferExpression[] : ast[1] extends \"|\" ? inferExpression | inferExpression : ast[1] extends \"&\" ? inferIntersection, inferExpression> : ast[1] extends \"|>\" ? inferPipe, inferExpression> : ast[1] extends \"=\" ? type.infer extends infer defaultValue ? withDefault, defaultValue> : never : ast[1] extends \"#\" ? type.brand, ast[2]> : ast[1] extends Comparator ? ast[0] extends LimitLiteral ? inferExpression : inferExpression : ast[1] extends \"%\" ? inferExpression : ast[1] extends \"?\" ? inferExpression : ast[0] extends \"keyof\" ? arkKeyOf> : never : never;\ntype PostfixExpression = readonly [operand, operator];\ntype InfixExpression = [l, operator, r];\n\ntype inferObjectLiteral = show<\"...\" extends keyof def ? merge, _inferObjectLiteral> : _inferObjectLiteral>;\n/**\n * Infers the contents of an object literal, ignoring a spread definition\n */\ntype _inferObjectLiteral = {\n -readonly [k in keyof def as nonOptionalKeyFromEntry]: inferDefinition;\n} & {\n -readonly [k in keyof def as optionalKeyFromEntry]?: def[k] extends OptionalPropertyDefinition ? inferDefinition : inferDefinition;\n};\ntype validateObjectLiteral = {\n [k in keyof def]: preparseKey extends (infer parsedKey extends PreparsedKey) ? parsedKey extends PreparsedEntryKey<\"index\"> ? validateString extends (ErrorMessage) ? ErrorType : inferDefinition extends Key ? validateProperty : ErrorMessage> : validateProperty : never;\n};\ntype nonOptionalKeyFromEntry = preparseKey extends infer parsedKey ? parsedKey extends PreparsedEntryKey<\"required\"> ? [\n v\n] extends [OptionalPropertyDefinition] ? [\n v\n] extends [anyOrNever] ? parsedKey[\"normalized\"] : never : parsedKey[\"normalized\"] : parsedKey extends PreparsedEntryKey<\"index\"> ? inferDefinition & Key : never : never;\ntype optionalKeyFromEntry = preparseKey extends infer parsedKey ? parsedKey extends PreparsedEntryKey<\"optional\"> ? parsedKey[\"normalized\"] : v extends OptionalPropertyDefinition ? k : never : never;\ntype normalizedKeyKind = kind extends \"index\" ? string : Key;\ntype PreparsedEntryKey = normalizedKeyKind> = {\n kind: kind;\n normalized: normalized;\n};\ntype PreparsedSpecialKey = {\n kind: kind;\n};\ntype PreparsedKey = PreparsedEntryKey | PreparsedSpecialKey;\ndeclare namespace PreparsedKey {\n type from = t;\n}\ntype ParsedKeyKind = EntryKeyKind | SpecialKeyKind;\ntype EntryKeyKind = \"required\" | \"optional\" | \"index\";\ntype SpecialKeyKind = \"spread\" | \"undeclared\";\ntype MetaKey = \"...\" | \"+\";\ntype IndexKey = `[${def}]`;\ndeclare const preparseKey: (key: Key) => PreparsedKey;\ntype preparseKey = k extends symbol ? PreparsedKey.from<{\n kind: \"required\";\n normalized: k;\n}> : k extends `${infer inner}?` ? inner extends `${infer baseName}${EscapeChar}` ? PreparsedKey.from<{\n kind: \"required\";\n normalized: `${baseName}?`;\n}> : PreparsedKey.from<{\n kind: \"optional\";\n normalized: inner;\n}> : k extends \"+\" ? {\n kind: \"undeclared\";\n} : k extends \"...\" ? {\n kind: \"spread\";\n} : k extends `${EscapeChar}${infer escapedMeta extends MetaKey}` ? PreparsedKey.from<{\n kind: \"required\";\n normalized: escapedMeta;\n}> : k extends IndexKey ? PreparsedKey.from<{\n kind: \"index\";\n normalized: def;\n}> : PreparsedKey.from<{\n kind: \"required\";\n normalized: k extends (`${EscapeChar}${infer escapedIndexKey extends IndexKey}`) ? escapedIndexKey : k extends Key ? k : `${k & number}`;\n}>;\ndeclare const writeInvalidSpreadTypeMessage: (def: def) => writeInvalidSpreadTypeMessage;\ntype writeInvalidSpreadTypeMessage = `Spread operand must resolve to an object literal type (was ${def})`;\n\ntype ParsedOptionalProperty = readonly [BaseRoot, \"?\"];\ntype validateProperty = [\n def\n] extends [anyOrNever] ? \n/** this extra [anyOrNever] check is required to ensure that nested `type` invocations\n * like the following are not prematurely validated by the outer call:\n *\n * ```ts\n * type({\n * \t\"test?\": type(\"string\").pipe(x => x === \"true\")\n * })\n * ```\n */\ndef : keyKind extends \"spread\" ? def extends validateInnerDefinition ? inferDefinition extends object ? def : ErrorType>>> : validateInnerDefinition : keyKind extends \"undeclared\" ? UndeclaredKeyBehavior : keyKind extends \"required\" ? validateInnerDefinition : def extends OptionalPropertyDefinition ? ErrorMessage : isDefaultable extends true ? ErrorMessage : validateInnerDefinition;\ntype isDefaultable = def extends DefaultablePropertyTuple ? true : def extends PossibleDefaultableStringDefinition ? parseString extends DefaultablePropertyTuple ? true : false : false;\ntype OptionalPropertyDefinition = OptionalPropertyTuple | OptionalPropertyString;\ntype OptionalPropertyString = `${baseDef}?`;\ntype OptionalPropertyTuple = readonly [baseDef, \"?\"];\ntype PossibleDefaultableStringDefinition = `${string}=${string}`;\ntype DefaultablePropertyTuple = readonly [baseDef, \"=\", thunkableProperty];\ndeclare const invalidOptionalKeyKindMessage = \"Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }\";\ntype invalidOptionalKeyKindMessage = typeof invalidOptionalKeyKindMessage;\ndeclare const invalidDefaultableKeyKindMessage = \"Only required keys may specify default values, e.g. { value: 'number = 0' }\";\ntype invalidDefaultableKeyKindMessage = typeof invalidDefaultableKeyKindMessage;\n\ninterface ArkScopeConfig extends ArkSchemaScopeConfig {\n}\ninterface ScopeParser {\n (def: scope.validate, config?: ArkScopeConfig): Scope>;\n define: (def: scope.validate) => def;\n}\ntype ModuleParser = (def: scope.validate, config?: ArkScopeConfig) => scope.infer extends infer $ ? Module<{\n [k in exportedNameOf<$>]: $[k];\n}> : never;\ntype bindThis = {\n this: Def;\n};\n/** nominal type for an unparsed definition used during scope bootstrapping */\ntype Def = Brand;\n/** sentinel indicating a scope that will be associated with a generic has not yet been parsed */\ntype UnparsedScope = \"$\";\n/** These are legal as values of a scope but not as definitions in other contexts */\ntype PreparsedResolution = PreparsedNodeResolution;\ntype bootstrapAliases = {\n [k in Exclude]: def[k] extends (PreparsedResolution) ? def[k] extends {\n t: infer g extends GenericAst;\n } ? g : def[k] extends Module | BoundModule ? Submodule<$> : def[k] : def[k] extends (() => infer thunkReturn extends PreparsedResolution) ? thunkReturn extends {\n t: infer g extends GenericAst;\n } ? g : thunkReturn extends Module | BoundModule ? Submodule<$> : thunkReturn : Def;\n} & {\n [k in keyof def & GenericDeclaration as extractGenericName]: GenericAst, bootstrapAliases>, def[k], UnparsedScope>;\n};\ntype inferBootstrapped<$> = {\n [name in keyof $]: $[name] extends Def ? inferDefinition : $[name] extends {\n t: infer g extends GenericAst;\n } ? bindGenericToScope : $[name];\n} & unknown;\ntype bindGenericToScope = GenericAst;\ntype extractGenericName = k extends GenericDeclaration ? name : never;\ntype extractGenericParameters = k extends `${string}<${infer params}>` ? ParameterString : never;\ntype resolutionToAst = [\n resolution\n] extends [anyOrNever] ? InferredAst : resolution extends Def ? DefAst : resolution extends {\n [arkKind]: \"module\";\n root: infer root;\n} ? InferredAst : resolution extends GenericAst ? resolution : InferredAst;\ninterface InternalScope {\n constructor: typeof InternalScope;\n}\ndeclare class InternalScope<$ extends {} = {}> extends BaseScope<$> {\n get ambientAttachments(): Ark.boundTypeAttachments<$> | undefined;\n protected preparseOwnAliasEntry(alias: string, def: unknown): AliasDefEntry;\n parseGenericParams(def: string, opts: BaseParseOptions): array;\n protected normalizeRootScopeValue(resolution: unknown): unknown;\n protected preparseOwnDefinitionFormat(def: unknown, opts: BaseParseOptions): BaseRoot | BaseParseContextInput;\n parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot;\n unit: UnitTypeParser<$>;\n valueOf: ValueOfTypeParser<$>;\n enumerated: EnumeratedTypeParser<$>;\n instanceOf: InstanceOfTypeParser<$>;\n or: NaryUnionParser<$>;\n and: NaryIntersectionParser<$>;\n merge: NaryMergeParser<$>;\n pipe: NaryPipeParser<$>;\n match: InternalMatchParser;\n declare: () => {\n type: InternalTypeParser;\n };\n define(def: def): def;\n type: InternalTypeParser;\n static scope: ScopeParser;\n static module: ModuleParser;\n}\ndeclare const scope: ScopeParser;\ndeclare namespace scope {\n type validate = {\n [k in keyof def]: k extends noSuggest ? unknown : parseScopeKey[\"params\"] extends infer params ? params extends array ? params[\"length\"] extends 0 ? def[k] extends type.Any | PreparsedResolution ? def[k] : k extends (PrivateDeclaration) ? ErrorType> : type.validate, {}> : type.validate, baseGenericConstraints> : params : never;\n };\n type infer = inferBootstrapped>;\n}\ninterface ScopeConstructor {\n new <$ = {}>(...args: ConstructorParameters): Scope<$>;\n scope: ScopeParser;\n module: ModuleParser;\n}\ninterface Scope<$ = {}> {\n t: $;\n [arkKind]: \"scope\";\n config: ArkScopeConfig;\n references: readonly BaseNode[];\n json: JsonStructure;\n exportedNames: array>;\n /** The set of names defined at the root-level of the scope mapped to their\n * corresponding definitions.**/\n aliases: Record;\n internal: toInternalScope<$>;\n defineSchema(schema: def): def;\n node>(kinds: kinds, schema: NodeSchema>, opts?: BaseParseOptions): nodeOfKind>>;\n unit: UnitTypeParser<$>;\n enumerated: EnumeratedTypeParser<$>;\n valueOf: ValueOfTypeParser<$>;\n instanceOf: InstanceOfTypeParser<$>;\n type: TypeParser<$>;\n match: MatchParser<$>;\n declare: DeclarationParser<$>;\n define: DefinitionParser<$>;\n generic: GenericParser<$>;\n schema: SchemaParser<$>;\n import(): Module<{\n [k in exportedNameOf<$> as PrivateDeclaration]: $[k];\n }>;\n import[]>(...names: names): BoundModule<{\n [k in names[number] as PrivateDeclaration]: $[k];\n } & unknown, $>;\n export(): Module<{\n [k in exportedNameOf<$>]: $[k];\n }>;\n export[]>(...names: names): BoundModule<{\n [k in names[number]]: $[k];\n } & unknown, $>;\n resolve>(name: name): instantiateExport<$[name], $>;\n}\ndeclare const Scope: ScopeConstructor;\ntype parseScopeKey = k extends `${infer name}<${infer params}>` ? parseGenericScopeKey : {\n name: k;\n params: [];\n};\ntype parseGenericScopeKey = {\n name: name;\n params: parseGenericParams>;\n};\ntype InnerParseResult = BaseRoot | ParsedOptionalProperty | ParsedDefaultableProperty;\n\ntype maybeValidateTupleExpression = def extends IndexZeroExpression ? validatePrefixExpression : def extends IndexOneExpression ? validateIndexOneExpression : def extends (readonly [\"\", ...unknown[]] | readonly [unknown, \"\", ...unknown[]]) ? readonly [\n def[0] extends \"\" ? BaseCompletions<$, args, IndexZeroOperator | \"...\"> : def[0],\n def[1] extends \"\" ? BaseCompletions<$, args, IndexOneOperator | \"...\"> : def[1]\n] : null;\ntype inferTupleExpression = def[1] extends \"[]\" ? inferDefinition[] : def[1] extends \"?\" ? inferDefinition : def[1] extends \"&\" ? inferIntersection, inferDefinition> : def[1] extends \"|\" ? inferDefinition | inferDefinition : def[1] extends \":\" ? inferPredicate, def[2]> : def[1] extends \"=>\" ? parseMorph : def[1] extends \"|>\" ? parseTo : def[1] extends \"=\" ? withDefault, unwrapDefault> : def[1] extends \"@\" ? inferDefinition : def extends readonly [\"===\", ...infer values] ? values[number] : def extends (readonly [\"instanceof\", ...infer constructors extends Constructor[]]) ? InstanceType : def[0] extends \"keyof\" ? inferKeyOfExpression : never;\ntype validatePrefixExpression = def[\"length\"] extends 1 ? readonly [writeMissingRightOperandMessage] : def[0] extends \"keyof\" ? readonly [def[0], validateDefinition] : def[0] extends \"===\" ? readonly [def[0], ...unknown[]] : def[0] extends \"instanceof\" ? readonly [def[0], ...Constructor[]] : never;\ntype validateIndexOneExpression = def[1] extends TuplePostfixOperator ? readonly [validateDefinition, def[1]] : readonly [\n validateDefinition,\n def[\"length\"] extends 2 ? writeMissingRightOperandMessage : def[1],\n def[1] extends \"|\" ? validateDefinition : def[1] extends \"&\" ? validateDefinition : def[1] extends \":\" ? Predicate> : def[1] extends \"=>\" ? Morph> : def[1] extends \"|>\" ? validateDefinition : def[1] extends \"=\" ? defaultFor> : def[1] extends \"@\" ? TypeMeta.MappableInput : validateDefinition\n];\ntype inferKeyOfExpression = show>;\ntype TupleExpression = IndexZeroExpression | IndexOneExpression;\ntype ArgTwoOperator = Exclude;\ntype parseTo = inferPipe, inferDefinition>;\ntype parseMorph = morph extends Morph ? inferMorphOut extends infer out ? (In: distill.In>) => Out : never : never;\ntype IndexOneExpression = readonly [unknown, token, ...unknown[]];\ntype IndexOneParser = (def: IndexOneExpression, ctx: BaseParseContext) => BaseRoot;\ndeclare const postfixParsers: {\n \"?\": IndexOneParser<\"?\">;\n \"[]\": IndexOneParser<\"[]\">;\n};\ntype TuplePostfixOperator = keyof typeof postfixParsers;\ndeclare const infixParsers: {\n \"|\": IndexOneParser<\"|\">;\n \"=\": IndexOneParser<\"=\">;\n \"|>\": IndexOneParser<\"|>\">;\n \"&\": IndexOneParser<\"&\">;\n \"=>\": IndexOneParser<\"=>\">;\n \":\": IndexOneParser<\":\">;\n \"@\": IndexOneParser<\"@\">;\n};\ntype TupleInfixOperator = keyof typeof infixParsers;\ndeclare const indexOneParsers: {\n \"|\": IndexOneParser<\"|\">;\n \"=\": IndexOneParser<\"=\">;\n \"|>\": IndexOneParser<\"|>\">;\n \"&\": IndexOneParser<\"&\">;\n \"=>\": IndexOneParser<\"=>\">;\n \":\": IndexOneParser<\":\">;\n \"@\": IndexOneParser<\"@\">;\n \"?\": IndexOneParser<\"?\">;\n \"[]\": IndexOneParser<\"[]\">;\n};\ntype IndexOneOperator = keyof typeof indexOneParsers;\ntype IndexZeroParser = (def: IndexZeroExpression, ctx: BaseParseContext) => BaseRoot;\ntype IndexZeroExpression = readonly [\n token,\n ...unknown[]\n];\ndeclare const indexZeroParsers: {\n keyof: IndexZeroParser<\"keyof\">;\n instanceof: IndexZeroParser<\"instanceof\">;\n \"===\": IndexZeroParser<\"===\">;\n};\ntype IndexZeroOperator = keyof typeof indexZeroParsers;\n\ntype validateTupleLiteral = parseSequence extends infer s extends SequenceParseState ? Readonly : never;\ntype inferTupleLiteral = parseSequence extends infer s extends SequenceParseState ? s[\"inferred\"] : never;\ntype SequencePhase = satisfy;\ndeclare namespace SequencePhase {\n type prefix = \"prefix\";\n type optionals = \"optionals\";\n type defaultables = \"defaultables\";\n type postfix = \"postfix\";\n}\ntype SequenceParseState = {\n unscanned: array;\n inferred: array;\n validated: array;\n phase: SequencePhase;\n};\ntype parseSequence = parseNextElement<{\n unscanned: def;\n inferred: [];\n validated: [];\n phase: SequencePhase.prefix;\n}, $, args>;\ntype PreparsedElementKind = \"required\" | SequencePhase.optionals | SequencePhase.defaultables;\ntype PreparsedElement = {\n head: unknown;\n tail: array;\n inferred: unknown;\n validated: unknown;\n kind: PreparsedElementKind;\n spread: boolean;\n};\ndeclare namespace PreparsedElement {\n type from = result;\n type required = \"required\";\n type optionals = \"optionals\";\n type defaultables = \"defaultables\";\n}\ntype preparseNextState = s[\"unscanned\"] extends readonly [\"...\", infer head, ...infer tail] ? preparseNextElement : s[\"unscanned\"] extends readonly [infer head, ...infer tail] ? preparseNextElement : null;\ntype preparseNextElement = PreparsedElement.from<{\n head: head;\n tail: tail;\n inferred: inferDefinition;\n validated: validateInnerDefinition;\n kind: head extends OptionalPropertyDefinition ? PreparsedElement.optionals : head extends DefaultablePropertyTuple ? PreparsedElement.defaultables : isDefaultable extends true ? PreparsedElement.defaultables : PreparsedElement.required;\n spread: spread;\n}>;\ntype parseNextElement = preparseNextState extends infer next extends PreparsedElement ? parseNextElement<{\n unscanned: next[\"tail\"];\n inferred: nextInferred;\n validated: nextValidated;\n phase: next[\"kind\"] extends (SequencePhase.optionals | SequencePhase.defaultables) ? next[\"kind\"] : number extends nextInferred[\"length\"] ? s[\"phase\"] : SequencePhase.prefix;\n}, $, args> : s;\ntype nextInferred = next[\"spread\"] extends true ? [\n ...s[\"inferred\"],\n ...conform\n] : next[\"kind\"] extends SequencePhase.optionals ? [\n ...s[\"inferred\"],\n next[\"inferred\"]?\n] : [...s[\"inferred\"], next[\"inferred\"]];\ntype nextValidated = [\n ...s[\"validated\"],\n ...nextValidatedSpreadOperatorIfPresent,\n nextValidatedElement\n];\ntype nextValidatedSpreadOperatorIfPresent = next[\"spread\"] extends true ? [\n next[\"inferred\"] extends infer spreadOperand extends array ? [\n number,\n number\n ] extends ([\n s[\"inferred\"][\"length\"],\n spreadOperand[\"length\"]\n ]) ? ErrorMessage : \"...\" : ErrorMessage>\n] : [];\ntype nextValidatedElement = next[\"kind\"] extends SequencePhase.optionals ? next[\"spread\"] extends true ? ErrorMessage : s[\"phase\"] extends SequencePhase.postfix ? ErrorMessage : next[\"validated\"] : next[\"kind\"] extends SequencePhase.defaultables ? next[\"spread\"] extends true ? ErrorMessage : s[\"phase\"] extends SequencePhase.optionals ? ErrorMessage : s[\"phase\"] extends SequencePhase.postfix ? ErrorMessage : next[\"validated\"] : [s[\"phase\"], next[\"spread\"]] extends ([\n SequencePhase.optionals | SequencePhase.defaultables,\n false\n]) ? ErrorMessage : next[\"validated\"];\ndeclare const writeNonArraySpreadMessage: (operand: operand) => writeNonArraySpreadMessage;\ntype writeNonArraySpreadMessage = `Spread element must be an array${operand extends string ? ` (was ${operand})` : \"\"}`;\ndeclare const multipleVariadicMesage = \"A tuple may have at most one variadic element\";\ntype multipleVariadicMessage = typeof multipleVariadicMesage;\ndeclare const optionalOrDefaultableAfterVariadicMessage = \"An optional element may not follow a variadic element\";\ntype optionalOrDefaultableAfterVariadicMessage = typeof optionalOrDefaultableAfterVariadicMessage;\ndeclare const spreadOptionalMessage = \"A spread element cannot be optional\";\ntype spreadOptionalMessage = typeof spreadOptionalMessage;\ndeclare const spreadDefaultableMessage = \"A spread element cannot have a default\";\ntype spreadDefaultableMessage = typeof spreadDefaultableMessage;\ndeclare const defaultablePostOptionalMessage = \"A defaultable element may not follow an optional element without a default\";\ntype defaultablePostOptionalMessage = typeof defaultablePostOptionalMessage;\n\ntype inferDefinition = [\n def\n] extends [anyOrNever] ? def : def extends type.cast ? ifEmptyObjectLiteral : def extends ThunkCast ? t : def extends string ? inferString : def extends array ? inferTuple : def extends RegExp ? string : def extends object ? inferObjectLiteral : never;\ntype validateDefinition = null extends undefined ? ErrorMessage<`'strict' or 'strictNullChecks' must be set to true in your tsconfig's 'compilerOptions'`> : [def] extends [anyOrNever] ? def : def extends OptionalPropertyDefinition ? ErrorMessage : isDefaultable extends true ? ErrorMessage : validateInnerDefinition;\ntype validateInnerDefinition = [\n def\n] extends [Terminal] ? def : def extends string ? validateString : def extends BadDefinitionType ? ErrorMessage>> : unknown extends def ? BaseCompletions<$, args> | {} : def extends readonly unknown[] ? validateTuple : validateObjectLiteral;\ntype validateTuple = maybeValidateTupleExpression extends infer result ? result extends null ? validateTupleLiteral : result : never;\ntype inferTuple = def extends TupleExpression ? inferTupleExpression : inferTupleLiteral;\ntype validateDeclared = def extends type.validate ? validateInference : type.validate;\ntype validateInference = def extends RegExp | type.cast | ThunkCast | TupleExpression ? validateShallowInference : def extends array ? declared extends array ? {\n [i in keyof declared]: i extends keyof def ? validateInference : declared[i];\n} : show> : def extends object ? show<{\n [k in requiredKeyOf]: k extends keyof def ? validateInference : declared[k];\n} & {\n [k in optionalKeyOf & string as `${k}?`]: `${k}?` extends (keyof def) ? validateInference, $, args> : declared[k];\n}> : validateShallowInference;\ntype validateShallowInference = equals, declared> extends true ? def : show>;\ntype declarationMismatch = {\n declared: declared;\n inferred: inferDefinition;\n};\ntype Terminal = type.cast | Fn | RegExp;\ntype ThunkCast = () => type.cast;\ntype BadDefinitionType = Exclude;\ndeclare const writeBadDefinitionTypeMessage: (actual: actual) => writeBadDefinitionTypeMessage;\ntype writeBadDefinitionTypeMessage = `Type definitions must be strings or objects (was ${actual})`;\n\n/** The convenience properties attached to `type` */\ntype TypeParserAttachments = Omit;\ninterface TypeParser<$ = {}> extends Ark.boundTypeAttachments<$> {\n /**\n * Create a {@link Type} from your definition.\n *\n * @example const Person = type({ name: \"string\" })\n */\n >(def: type.validate): r extends infer _ ? _ : never;\n /**\n * Create a {@link Generic} from a parameter string and body definition.\n *\n * @param params A string like \"\" specifying the\n * {@link Generic}'s parameters and any associated constraints via `extends`.\n *\n * @param def The definition for the body of the {@link Generic}. Can reference the\n * parameter names specified in the previous argument in addition to aliases\n * from its {@link Scope}.\n *\n * @example const BoxOf = type(\"\", { contents: \"t\" })\n */\n , def, $>>(params: validateParameterString, def: type.validate>>): r extends infer _ ? _ : never;\n /**\n * Create a {@link Type} from a [tuple expression](http://localhost:3000/docs/expressions)\n * spread as this function's arguments.\n *\n * @example type(\"string\", \"|\", { foo: \"number\" })\n */\n >(_0: zero extends IndexZeroOperator ? zero : type.validate, _1: zero extends \"keyof\" ? type.validate : zero extends \"instanceof\" ? conform : zero extends \"===\" ? conform : conform, ..._2: zero extends \"===\" ? rest : zero extends \"instanceof\" ? conform : one extends TupleInfixOperator ? one extends \":\" ? [Predicate>>] : one extends \"=>\" ? [Morph>, unknown>] : one extends \"|>\" ? [type.validate] : one extends \"@\" ? [TypeMeta.MappableInput] : [type.validate] : []): r extends infer _ ? _ : never;\n /**\n * An alias of the {@link ArkErrors} class, an instance of which is returned when a {@link Type}\n * is invoked with invalid input.\n *\n * @example\n * const out = myType(data)\n *\n * if(out instanceof type.errors) console.log(out.summary)\n *\n */\n errors: typeof ArkErrors;\n hkt: typeof Hkt;\n keywords: typeof keywords;\n /**\n * The {@link Scope} in which definitions passed to this function will be parsed.\n */\n $: Scope<$>;\n /**\n * An alias of `type` with no type-level validation or inference.\n *\n * Useful when wrapping `type` or using it to parse a dynamic definition.\n */\n raw(def: unknown): Type;\n module: ModuleParser;\n scope: ScopeParser;\n define: DefinitionParser<$>;\n generic: GenericParser<$>;\n match: MatchParser<$>;\n schema: SchemaParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value strictly equal (`===`) to the argument passed to this function.\n * @example const foo = type.unit('foo') // {@link Type}<'foo'>\n * @example const sym: unique symbol = Symbol(); type.unit(sym) // {@link Type}\n */\n unit: UnitTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value strictly equal (`===`) to one of the arguments passed to this function.\n * @example const enum = type.enumerated('foo', 'bar', obj) // obj is a by-reference object\n * @example const TupleForm = type(['===', 'foo', 'bar', obj])\n * @example const ArgsForm = type('===', 'foo', 'bar', obj)\n */\n enumerated: EnumeratedTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by one of the Object.values() of the argument passed to this function.\n *\n * ⚠️ For TypeScript enum compatibility, values at numeric keys with corresponding numeric values will not be included.\n * @example const myEnum = type.valueOf(myTsEnum)\n */\n valueOf: ValueOfTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value of a specific class.\n * @example const array = type.instanceOf(Array)\n */\n instanceOf: InstanceOfTypeParser<$>;\n /**\n * Create a {@link Type} from a union of definitions\n * @example const T = type.or(\"string\", \"number\")\n */\n or: NaryUnionParser<$>;\n /**\n * Create a {@link Type} from an intersection of definitions\n * @example const T = type.and({ a: \"1\" }, { b: \"2\" })\n */\n and: NaryIntersectionParser<$>;\n /**\n * Create a {@link Type} by merging object definitions, with later\n * definitions having precedence for overlapping keys\n * @example\n * // Type<{ a: \"3\", b: \"2\", c: \"4\" }>\n * const T = type.merge({ a: \"1\", b: \"2\" }, { a: \"3\", c: \"4\" })\n */\n merge: NaryMergeParser<$>;\n /**\n * Create a {@link Type} from a set of morphs (including Types)\n * @example\n * // Type<(In: string) => To>\n * const T = type.pipe(type.string, s => JSON.parse(s), type.object)\n */\n pipe: NaryPipeParser<$>;\n}\ndeclare class InternalTypeParser extends Callable<(...args: unknown[]) => BaseRoot | Generic, TypeParserAttachments> {\n constructor($: InternalScope);\n}\ntype DeclarationParser<$> = () => {\n type: (def: validateDeclared>) => Type$1;\n};\ntype UnitTypeParser<$> = (value: t) => Type$1;\ntype InstanceOfTypeParser<$> = (ctor: Constructor) => Type$1;\ntype EnumeratedTypeParser<$> = (...values: values) => Type$1;\ntype ValueOfTypeParser<$> = (o: o) => Type$1;\ntype DefinitionParser<$> = (def: type.validate) => def;\ntype SchemaParser<$> = (schema: RootSchema, opts?: BaseParseOptions) => Type$1;\ntype TypeConstructor = new (def: unknown, $: Scope<$>) => Type$1;\ntype Type$1 = instantiateType;\ndeclare const Type$1: TypeConstructor;\n\ntype NaryUnionParser<$> = {\n (): Type$1;\n , $>>(a: type.validate): r extends infer _ ? _ : never;\n | type.infer, $>>(a: type.validate, b: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate, q: type.validate): r extends infer _ ? _ : never;\n , $>>(...defs: {\n [i in keyof defs]: type.validate;\n }): r extends infer _ ? _ : never;\n};\ntype NaryIntersectionParser<$> = {\n (): Type$1;\n , $>>(a: type.validate): r extends infer _ ? _ : never;\n , type.infer>, $>>(a: type.validate, b: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate, q: type.validate): r extends infer _ ? _ : never;\n ;\n }>, $>>(...defs: {\n [i in keyof defs]: type.validate;\n }): r extends infer _ ? _ : never;\n};\ntype NaryMergeParser<$> = {\n (): Type$1;\n , r = Type$1>(a: type.validate & (inferredA extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType<\"Merged type must be an object\", [actual: inferredB]>)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, inferredP = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType), p: type.validate & (inferredP extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, inferredP = type.infer, inferredQ = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType), p: type.validate & (inferredP extends object ? unknown : ErrorType), q: type.validate & (inferredQ extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n ;\n }>, $>>(...defs: {\n [i in keyof defs]: type.validate & (type.infer extends object ? unknown : ErrorType\n ]>);\n }): r extends infer _ ? _ : never;\n};\ntype NaryPipeParser<$, initial = unknown> = {\n (): Type$1;\n >, r = instantiateType, $>>(a: a): r extends infer _ ? _ : never;\n >, b extends Morph>, r = instantiateType, a, b]>, $>>(a: a, b: b): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, r = instantiateType, a, b, c]>, $>>(a: a, b: b, c: c): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, r = instantiateType, a, b, c, d]>, $>>(a: a, b: b, c: c, d: d): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, r = instantiateType, a, b, c, d, e]>, $>>(a: a, b: b, c: c, d: d, e: e): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, r = instantiateType, a, b, c, d, e, f]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, r = instantiateType, a, b, c, d, e, f, g]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l, m]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l, m, n]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, p extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o,\n p\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o, p: p): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, p extends Morph>, q extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o,\n p,\n q\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o, p: p, q: q): r extends infer _ ? _ : never;\n , $>>(...defs: morphs): r extends infer _ ? _ : never;\n};\n\n/** @ts-ignore cast variance */\ninterface Inferred {\n internal: BaseRoot;\n [inferred]: t;\n /**\n * precompiled JS used to optimize validation\n *\n * ⚠️ will be `undefined` in [jitless](https://arktype.io/docs/configuration#jitless) mode\n */\n precompilation: string | undefined;\n /**\n * generic parameter representing this Type\n *\n * @typeonly\n *\n * ⚠️ May contain types representing morphs or default values that would\n * be inaccurate if used directly for runtime values. In those cases,\n * you should use {@link infer} or {@link inferIn} on this object instead.\n */\n t: t;\n /**\n * #### {@link Scope} in which chained methods are parsed\n */\n $: Scope<$>;\n /**\n * #### type of output this returns\n *\n * @typeonly\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type ParsedNumber = typeof parseNumber.infer // number\n */\n infer: this[\"inferOut\"];\n /**\n * type of output this returns\n *\n * 🔗 alias of {@link infer}\n * @typeonly\n *\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type ParsedNumber = typeof parseNumber.infer // number\n */\n inferOut: distill.Out;\n /**\n * type of output that can be introspected at runtime (e.g. via {@link out})\n *\n * ⚠️ If your Type contains morphs, they will be inferred as `unknown` unless\n * they are an ArkType keyword or have an explicitly defined output validator.\n *\n * @typeonly\n *\n * @example\n * const Unmorphed = type(\"string\")\n * // with no morphs, we can introspect the input and output as a single Type\n * type UnmorphedOut = typeof Unmorphed.inferIntrospectableOut // string\n *\n * const Morphed = type(\"string\").pipe(s => s.length)\n * // with a standard user-defined morph, TypeScript can infer a\n * // return type from your function, but we have no way to\n * // know the shape at runtime\n * type MorphOut = typeof Morphed.inferIntrospectableOut // unknown\n *\n * const Validated = type(\"string\").pipe(s => s.length).to(\"number\")\n * // morphs with validated output, including all morph keywords, are introspectable\n * type ValidatedMorphOut = typeof Validated.inferIntrospectableOut\n */\n inferIntrospectableOut: distill.introspectable.Out;\n /**\n * #### type of input this allows\n *\n * @typeonly\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type UnparsedNumber = typeof parseNumber.inferIn // string\n */\n inferIn: distill.In;\n /**\n * #### internal JSON representation\n */\n json: JsonStructure;\n /**\n * alias of {@link json} for `JSON.stringify` compatibility\n */\n toJSON(): JsonStructure;\n /**\n * #### generate a JSON Schema\n *\n * @throws {ToJsonSchema.Error} if this cannot be converted to JSON Schema\n */\n toJsonSchema(options?: ToJsonSchema.Options): JsonSchema;\n /**\n * #### metadata like custom descriptions and error messages\n *\n * ✅ type {@link https://arktype.io/docs/configuration#custom | can be customized} for your project\n */\n meta: ArkAmbient.meta;\n /**\n * #### human-readable English description\n *\n * ✅ works best for primitive values\n *\n * @example\n * const N = type(\"0 < number <= 100\")\n * console.log(N.description) // positive and at most 100\n */\n description: string;\n /**\n * #### syntax string similar to native TypeScript\n *\n * ✅ works well for both primitives and structures\n *\n * @example\n * const Loc = type({ coords: [\"number\", \"number\"] })\n * console.log(Loc.expression) // { coords: [number, number] }\n */\n expression: string;\n /**\n * #### validate and return transformed data or throw\n *\n * ✅ sugar to avoid checking for {@link type.errors} if they are unrecoverable\n *\n * @example\n * const CriticalPayload = type({\n * superImportantValue: \"string\"\n * })\n * // throws TraversalError: superImportantValue must be a string (was missing)\n * const data = CriticalPayload.assert({ irrelevantValue: \"whoops\" })\n * console.log(data.superImportantValue) // valid output can be accessed directly\n *\n * @throws {TraversalError}\n */\n assert(data: unknown): this[\"infer\"];\n /**\n * #### check input without applying morphs\n *\n * ✅ good for stuff like filtering that doesn't benefit from detailed errors\n *\n * @example\n * const Numeric = type(\"number | bigint\")\n * // [0, 2n]\n * const numerics = [0, \"one\", 2n].filter(Numeric.allows)\n */\n allows(data: unknown): data is this[\"inferIn\"];\n /**\n * #### add metadata to shallow references\n *\n * ⚠️ does not affect error messages within properties of an object\n *\n * @example\n * const NotOdd = type(\"number % 2\").configure({ description: \"not odd\" })\n * // all constraints at the root are affected\n * const odd = NotOdd(3) // must be not odd (was 3)\n * const nonNumber = NotOdd(\"two\") // must be not odd (was \"two\")\n *\n * const NotOddBox = type({\n * // we should have referenced notOdd or added meta here\n * notOdd: \"number % 2\",\n * // but instead chained from the root object\n * }).configure({ description: \"not odd\" })\n * // error message at path notOdd is not affected\n * const oddProp = NotOddBox({ notOdd: 3 }) // notOdd must be even (was 3)\n * // error message at root is affected, leading to a misleading description\n * const nonObject = NotOddBox(null) // must be not odd (was null)\n */\n configure: NodeSelector.SelectableFn;\n /**\n * #### add description to shallow references\n *\n * 🔗 equivalent to `.configure({ description })` (see {@link configure})\n * ⚠️ does not affect error messages within properties of an object\n *\n * @example\n * const AToZ = type(/^a.*z$/).describe(\"a string like 'a...z'\")\n * const good = AToZ(\"alcatraz\") // \"alcatraz\"\n * // ArkErrors: must be a string like 'a...z' (was \"albatross\")\n * const badPattern = AToZ(\"albatross\")\n */\n describe: NodeSelector.SelectableFn;\n /**\n * #### apply undeclared key behavior\n *\n * {@inheritDoc UndeclaredKeyBehavior}\n */\n onUndeclaredKey(behavior: UndeclaredKeyBehavior): this;\n /**\n * #### deeply apply undeclared key behavior\n *\n * {@inheritDoc UndeclaredKeyBehavior}\n **/\n onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): this;\n /**\n * #### alias for {@link assert} with typed input\n *\n * @example\n * const T = type({ foo: \"string\" });\n * // TypeScript: foo must be a string (was 5)\n * const data = T.from({ foo: 5 });\n */\n from(literal: this[\"inferIn\"]): this[\"infer\"];\n /**\n * #### deeply extract inputs\n *\n * ✅ will never include morphs\n * ✅ good for generating JSON Schema or other non-transforming formats\n *\n * @example\n * const User = type({\n * age: \"string.numeric.parse\"\n * })\n * // { age: 25 } (age parsed to a number)\n * const out = User({ age: \"25\" })\n * // { age: \"25\" } (age is still a string)\n * const inOut = User.in({ age: \"25\" })\n */\n get in(): instantiateType;\n /**\n * #### deeply extract outputs\n *\n * ✅ will never include morphs\n * ⚠️ if your type includes morphs, their output will likely be unknown unless they\n * were defined with an explicit output validator via `.to(outputDef)` or `.pipe(morph, outputType)`\n *\n * @example\n * const join = type(\"string[]\").pipe(a => a.join(\",\"))\n *\n * const T = type({\n * // all keywords have introspectable output\n * keyword: \"string.numeric.parse\",\n * // TypeScript knows this returns a string, but we can't introspect that at runtime\n * unvalidated: join,\n * // if needed, it can be made introspectable with an output validator\n * validated: join.to(\"string\")\n * })\n *\n * // Type<{ keyword: number; unvalidated: unknown; validated: string }>\n * const baseOut = base.out\n */\n get out(): instantiateType;\n /**\n * #### add a compile-time brand to output\n *\n * @typenoop\n *\n * @example\n * const Palindrome = type(\"string\")\n * .narrow(s => s === [...s].reverse().join(\"\"))\n * .brand(\"palindrome\")\n * // Brand\n * const out = Palindrome.assert(\"racecar\")\n */\n brand, $>>(name: name): r extends infer _ ? _ : never;\n /**\n * #### an array of this\n *\n * @example\n * // Type<{ rebmun: number }[]>\n * const T = type({ rebmun: \"number\" }).array();\n */\n array(): Type$5;\n /**\n * #### {@link https://arktype.io/docs/objects#properties-optional | optional definition}\n *\n * @chainedDefinition\n *\n * @example\n * const Prop = type({ foo: \"number\" })\n * // Type<{ bar?: { foo: number } }>\n * const Obj = type({ bar: Prop.optional() })\n */\n optional(): [this, \"?\"];\n /**\n * #### {@link https://arktype.io/docs/objects#properties-defaultable | defaultable definition}\n *\n * ✅ object defaults can be returned from a function\n * ⚠️ throws if the default value is not allowed\n * @chainedDefinition\n *\n * @example\n * // Type<{ count: Default }>\n * const State = type({ count: type.number.default(0) })\n * const Prop = type({ nested: \"boolean\" })\n * const ForObj = type({\n * key: Prop.default(() => ({ nested: false }))\n * })\n */\n default>(value: value): [this, \"=\", value];\n /**\n * #### apply a predicate function to input\n *\n * ⚠️ the behavior of {@link narrow}, this method's output counterpart, is usually more desirable\n * ✅ most useful for morphs with input types that are re-used externally\n * @predicateCast\n *\n * @example\n * const stringifyUser = type({ name: \"string\" }).pipe(user => JSON.stringify(user))\n * const stringifySafe = stringifyUser.filter(user => user.name !== \"Bobby Tables\")\n * // Type<(In: `${string}Z`) => To>\n * const WithPredicate = type(\"string.date.parse\").filter((s): s is `${string}Z` =>\n * s.endsWith(\"Z\")\n * )\n */\n filter ? (In: narrowed) => o : narrowed, $>>(predicate: Predicate.Castable): r extends infer _ ? _ : never;\n /**\n * #### apply a predicate function to output\n *\n * ✅ go-to fallback for validation not composable via built-in types and operators\n * ✅ runs after all other validators and morphs, if present\n * @predicateCast\n *\n * @example\n * const Palindrome = type(\"string\").narrow(s => s === [...s].reverse().join(\"\"))\n *\n * const PalindromicEmail = type(\"string.date.parse\").narrow((date, ctx) =>\n *\t\tdate.getFullYear() === 2025 || ctx.mustBe(\"the current year\")\n * )\n * // Type<`${string}.tsx`>\n * const WithPredicate = type(\"string\").narrow((s): s is `${string}.tsx` => /\\.tsx?$/.test(s))\n */\n narrow ? o extends To ? (In: i) => To : (In: i) => Out : narrowed, $>>(predicate: Predicate.Castable): r extends infer _ ? _ : never;\n /**\n * #### pipe output through arbitrary transformations or other Types\n *\n * @example\n * const User = type({ name: \"string\" })\n *\n * // parse a string and validate that the result as a user\n * const parseUser = type(\"string\").pipe(s => JSON.parse(s), user)\n */\n pipe: ChainedPipeParser<$, t>;\n /**\n * #### parse a definition as an output validator\n *\n * 🔗 `to({ name: \"string\" })` is equivalent to `.pipe(type({ name: \"string\" }))`\n *\n * @example\n * // parse a string and validate that the result as a user\n * const parseUser = type(\"string\").pipe(s => JSON.parse(s)).to({ name: \"string\" })\n */\n to>, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### query internal node references\n *\n * @experimental filters and returns the Type's internal representation from `@ark/schema`\n *\n * @example\n * // [\"blue\", \"red\"]\n * const values = type(\"'red' | 'blue'\").select(\"unit\").map(u => u.unit)\n */\n select: BaseNode[\"select\"];\n}\n/** @ts-ignore cast variance */\ninterface Type extends Callable<(data: unknown) => distill.Out | ArkEnv.onFail>, Inferred {\n /**\n * #### cast the way this is inferred\n *\n * @typenoop\n *\n * @example\n * // Type<`LEEEEEEEE${string}ROY`>\n * const Leeroy = type(/^LE{8,}ROY$/).as<`LEEEEEEEE${string}ROY`>()\n */\n as(...args: validateChainedAsArgs): instantiateType;\n /**\n * #### intersect the parsed Type, throwing if the result is unsatisfiable\n *\n * @example\n * // Type<{ foo: number; bar: string }>\n * const T = type({ foo: \"number\" }).and({ bar: \"string\" })\n * // ParseError: Intersection at foo of number and string results in an unsatisfiable type\n * const Bad = type({ foo: \"number\" }).and({ foo: \"string\" })\n */\n and>, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### union with the parsed Type\n *\n * ⚠️ a union that could apply different morphs to the same data is a ParseError ({@link https://arktype.io/docs/expressions#union-morphs | docs})\n *\n * @example\n * // Type\n * const T = type(\"string\").or({ box: \"string\" })\n */\n or, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### intersect the parsed Type, returning an introspectable {@link Disjoint} if the result is unsatisfiable\n *\n * @example\n * // Type<{ foo: number; bar: string }>\n * const T = type({ foo: \"number\" }).intersect({ bar: \"string\" })\n * const Bad = type(\"number > 10\").intersect(\"number < 5\")\n * // logs \"Intersection of > 10 and < 5 results in an unsatisfiable type\"\n * if (Bad instanceof Disjoint) console.log(`${bad.summary}`)\n */\n intersect>, $>>(def: type.validate): r extends infer _ ? _ | Disjoint : never;\n /**\n * #### check if the parsed Type's constraints are identical\n *\n * ✅ equal types have identical input and output constraints and transforms\n * @ignoresMeta\n *\n * @example\n * const DivisibleBy6 = type.number.divisibleBy(6).moreThan(0)\n * // false (left side must also be positive)\n * DivisibleBy6.equals(\"number % 6\")\n * // false (right side has an additional <100 constraint)\n * console.log(DivisibleBy6.equals(\"0 < (number % 6) < 100\"))\n * const ThirdTry = type(\"(number % 2) > 0\").divisibleBy(3)\n * // true (types are normalized and reduced)\n * console.log(DivisibleBy6.equals(ThirdTry))\n */\n equals(def: type.validate): boolean;\n /**\n * #### narrow this based on an {@link equals} check\n *\n * @ignoresMeta\n *\n * @example\n * const N = type.raw(`${Math.random()}`)\n * // Type<0.5> | undefined\n * const Ez = N.ifEquals(\"0.5\")\n */\n ifEquals>(def: type.validate): r extends infer _ ? _ | undefined : never;\n /**\n * #### check if this is a subtype of the parsed Type\n *\n * ✅ a subtype must include all constraints from the base type\n * ✅ unlike {@link equals}, additional constraints may be present\n * @ignoresMeta\n *\n * @example\n * type.string.extends(\"unknown\") // true\n * type.string.extends(/^a.*z$/) // false\n */\n extends(other: type.validate): boolean;\n /**\n * #### narrow this based on an {@link extends} check\n *\n * @ignoresMeta\n *\n * @example\n * const N = type(Math.random() > 0.5 ? \"true\" : \"0\") // Type<0 | true>\n * const Ez = N.ifExtends(\"boolean\") // Type | undefined\n */\n ifExtends>(other: type.validate): r extends infer _ ? _ | undefined : never;\n /**\n * #### check if a value could satisfy this and the parsed Type\n *\n * ⚠️ will return true unless a {@link Disjoint} can be proven\n *\n * @example\n * type.string.overlaps(\"string | number\") // true (e.g. \"foo\")\n * type(\"string | number\").overlaps(\"1\") // true (1)\n * type(\"number > 0\").overlaps(\"number < 0\") // false (no values exist)\n *\n * const NoAt = type(\"string\").narrow(s => !s.includes(\"@\"))\n * NoAt.overlaps(\"string.email\") // true (no values exist, but not provable)\n */\n overlaps(r: type.validate): boolean;\n /**\n * #### extract branches {@link extend}ing the parsed Type\n *\n * @example\n * // Type\n * const T = type(\"boolean | 0 | 'one' | 2 | bigint\").extract(\"number | 0n | true\")\n */\n extract ? t : never, $>>(r: type.validate): r extends infer _ extends r ? _ : never;\n /**\n * #### exclude branches {@link extend}ing the parsed Type\n *\n * @example\n *\n * // Type\n * const T = type(\"boolean | 0 | 'one' | 2 | bigint\").exclude(\"number | 0n | true\")\n */\n exclude ? never : t, $>>(r: type.validate): r extends infer _ ? _ : never;\n /**\n * @experimental\n * Map and optionally reduce branches of a union. Types that are not unions\n * are treated as a single branch.\n *\n * @param mapBranch - the mapping function, accepting a branch Type\n * Returning another `Type` is common, but any value can be returned and\n * inferred as part of the output.\n *\n * @param [reduceMapped] - an operation to perform on the mapped branches\n * Can be used to e.g. merge an array of returned Types representing\n * branches back to a single union.\n */\n distribute(mapBranch: (branch: Type, i: number, branches: array) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut;\n /** The Type's [StandardSchema](https://github.com/standard-schema/standard-schema) properties */\n \"~standard\": StandardSchemaV1.ArkTypeProps;\n /** @deprecated */\n apply: Function[\"apply\"];\n /** @deprecated */\n bind: Function[\"bind\"];\n /** @deprecated */\n call: Function[\"call\"];\n /** @deprecated */\n caller: Function;\n /** @deprecated */\n length: number;\n /** @deprecated */\n name: string;\n /** @deprecated */\n prototype: Function[\"prototype\"];\n /** @deprecated */\n arguments: Function[\"arguments\"];\n /** @deprecated */\n Symbol: never;\n}\ninterface ChainedPipeParser<$, t> extends NaryPipeParser<$, t> {\n try: NaryPipeParser<$, t>;\n}\ntype validateChainedAsArgs = [\n t\n] extends [unset] ? [\n t\n] extends [anyOrNever] ? [\n] : [\n ErrorMessage<\"as requires an explicit type parameter like myType.as()\">\n] : [];\n\ntype MatchParserContext = {\n cases: Morph[];\n $: unknown;\n input: input;\n checked: boolean;\n key: PropertyKey | null;\n};\ndeclare namespace ctx {\n type from = ctx;\n type init<$, input = unknown, checked extends boolean = false> = from<{\n cases: [];\n $: $;\n input: input;\n checked: checked;\n key: null;\n }>;\n type atKey = from<{\n cases: ctx[\"cases\"];\n $: ctx[\"$\"];\n input: ctx[\"input\"];\n checked: ctx[\"checked\"];\n key: key;\n }>;\n}\ninterface MatchParser<$> extends CaseMatchParser> {\n in(def: type.validate): ChainableMatchParser, true>>;\n in(...args: [typedInput] extends [never] ? [\n ErrorMessage<\"in requires a definition or type argument (in('string') or in())\">\n ] : []): ChainableMatchParser>;\n in(def: type.validate): ChainableMatchParser, true>>;\n case: CaseParser>;\n at: AtParser>;\n}\ntype addCasesToContext = cases extends Morph[] ? ctx.from<{\n $: ctx[\"$\"];\n input: ctx[\"input\"];\n cases: [...ctx[\"cases\"], ...cases];\n checked: ctx[\"checked\"];\n key: ctx[\"key\"];\n}> : never;\ntype addDefaultToContext> = ctx.from<{\n $: ctx[\"$\"];\n input: defaultCase extends \"never\" ? Morph.In : ctx[\"input\"];\n cases: defaultCase extends \"never\" | \"assert\" ? ctx[\"cases\"] : defaultCase extends Morph ? ctx[\"checked\"] extends true ? [\n (In: unknown) => ArkErrors,\n ...ctx[\"cases\"],\n defaultCase\n ] : [...ctx[\"cases\"], defaultCase] : [\n ...ctx[\"cases\"],\n (In: ctx[\"input\"]) => ArkErrors\n ];\n checked: ctx[\"checked\"];\n key: ctx[\"key\"];\n}>;\ntype CaseKeyKind = \"def\" | \"string\";\ntype casesToMorphTuple = unionToTuple]: cases[def] extends (Morph) ? kind extends \"def\" ? (In: inferCaseArg) => o : (In: maybeLiftToKey) => o : never;\n}>>;\ntype addCasesToParser = cases extends {\n default: infer defaultDef extends DefaultCase;\n} ? finalizeMatchParser>, defaultDef> : ChainableMatchParser>>;\ntype inferCaseArg = _finalizeCaseArg, ctx>, ctx, endpoint>;\ntype maybeLiftToKey = ctx[\"key\"] extends PropertyKey ? {\n [k in ctx[\"key\"]]: t;\n} : t;\ntype _finalizeCaseArg = [\n distill,\n distill\n] extends [infer i, infer result] ? [\n i\n] extends [ctx[\"input\"]] ? result : Extract extends never ? result : Extract : never;\ntype CaseParser = (def: type.validate, resolve: (In: inferCaseArg) => ret) => ChainableMatchParser) => ret]>>;\ntype validateKey = ctx[\"key\"] extends Key ? ErrorMessage : ctx[\"cases\"][\"length\"] extends 0 ? keyof ctx[\"input\"] extends never ? key : conform : ErrorMessage;\ninterface StringsParser {\n (def: cases extends validateStringCases ? cases : validateStringCases): addCasesToParser;\n}\ntype validateStringCases = unknown extends ctx[\"input\"] ? {\n [k in keyof cases]?: k extends \"default\" ? DefaultCase : (In: _finalizeCaseArg, ctx, \"out\">) => unknown;\n} & {\n default?: DefaultCase;\n} : {\n [k in keyof cases]?: k extends \"default\" ? DefaultCase : k extends stringValue ? (In: _finalizeCaseArg, ctx, \"out\">) => unknown : ErrorType<`${k & string} must be a possible string value`>;\n} & {\n [k in stringValue]?: unknown;\n} & {\n default?: DefaultCase;\n};\ntype stringValue = ctx[\"input\"] extends string ? ctx[\"input\"] : ctx[\"key\"] extends keyof ctx[\"input\"] ? ctx[\"input\"][ctx[\"key\"]] extends infer s extends string ? s : never : never;\ninterface AtParser {\n (key: validateKey): ChainableMatchParser>;\n >(key: validateKey, cases: cases extends validateCases ? cases : errorCases): addCasesToParser;\n}\ninterface ChainableMatchParser {\n case: CaseParser;\n match: CaseMatchParser;\n default: DefaultMethod;\n at: AtParser;\n /** @experimental */\n strings: StringsParser;\n}\ntype DefaultCaseKeyword = \"never\" | \"assert\" | \"reject\";\ntype DefaultCase> = DefaultCaseKeyword | Morph;\ntype DefaultMethod = >(def: def) => finalizeMatchParser;\ntype validateCases = {\n [def in keyof cases | BaseCompletions]?: def extends \"default\" ? DefaultCase : def extends number ? (In: inferCaseArg<`${def}`, ctx, \"out\">) => unknown : def extends type.validate ? (In: inferCaseArg) => unknown : type.validate;\n};\ntype errorCases = {\n [def in keyof cases]?: def extends \"default\" ? DefaultCase : def extends number ? (In: inferCaseArg<`${def}`, ctx, \"out\">) => unknown : def extends type.validate ? (In: inferCaseArg) => unknown : ErrorType>;\n} & {\n [k in BaseCompletions]?: (In: inferCaseArg) => unknown;\n} & {\n default?: DefaultCase;\n};\ntype CaseMatchParser = (def: cases extends validateCases ? cases : errorCases) => addCasesToParser;\ntype finalizeMatchParser> = addDefaultToContext extends (infer ctx extends MatchParserContext) ? Match : never;\ninterface Match extends Inferred<(In: Morph.In) => Out>> {\n (data: data): {\n [i in numericStringKeyOf]: isDisjoint> extends true ? never : Morph.Out;\n }[numericStringKeyOf];\n}\ndeclare class InternalMatchParser extends Callable {\n $: InternalScope;\n constructor($: InternalScope);\n in(def?: unknown): InternalChainedMatchParser;\n at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match;\n case(when: unknown, then: Morph): InternalChainedMatchParser;\n}\ntype InternalCases = Record;\ntype InternalCaseParserFn = (cases: InternalCases) => InternalChainedMatchParser | Match;\ntype CaseEntry = [BaseRoot, Morph] | [\"default\", DefaultCase];\ndeclare class InternalChainedMatchParser extends Callable {\n $: InternalScope;\n in: BaseRoot | undefined;\n protected key: Key | undefined;\n protected branches: BaseRoot[];\n constructor($: InternalScope, In?: BaseRoot);\n at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match;\n case(def: unknown, resolver: Morph): InternalChainedMatchParser;\n protected caseEntry(node: BaseRoot, resolver: Morph): InternalChainedMatchParser;\n match(cases: InternalCases): InternalChainedMatchParser | Match;\n strings(cases: InternalCases): InternalChainedMatchParser | Match;\n protected caseEntries(entries: CaseEntry[]): InternalChainedMatchParser | Match;\n default(defaultCase: DefaultCase): Match;\n}\ndeclare const chainedAtMessage = \"A key matcher must be specified before the first case i.e. match.at('foo') or match.in().at('bar')\";\ntype chainedAtMessage = typeof chainedAtMessage;\ndeclare const doubleAtMessage = \"At most one key matcher may be specified per expression\";\ntype doubleAtMessage = typeof doubleAtMessage;\n\ndeclare class MergeHkt extends Hkt<[base: object, props: object]> {\n body: util.merge;\n description: string;\n}\ndeclare const Merge: _ark_schema.GenericRoot;\ndeclare const arkBuiltins: arkBuiltins;\ntype arkBuiltins = Module;\ndeclare namespace arkBuiltins {\n type submodule = Submodule<$>;\n type $ = {\n Key: Key;\n Merge: typeof Merge.t;\n };\n}\n\ndeclare const number: number.module;\ndeclare namespace number {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: number;\n epoch: number;\n integer: number;\n safe: number;\n NaN: number;\n Infinity: number;\n NegativeInfinity: number;\n };\n}\n\ndeclare const stringInteger: stringInteger.module;\ndeclare namespace stringInteger {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare const base64: Module<{\n root: unknown;\n url: unknown;\n}>;\ndeclare namespace base64 {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n url: string;\n };\n}\ndeclare const capitalize: capitalize.module;\ndeclare namespace capitalize {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const stringDate: stringDate.module;\ndeclare namespace stringDate {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n iso: iso.submodule;\n epoch: epoch.submodule;\n };\n namespace iso {\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n }\n namespace epoch {\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n }\n}\ndeclare const ip: ip.module;\ndeclare namespace ip {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n v4: string;\n v6: string;\n };\n}\ndeclare namespace stringJson {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare namespace lower {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const normalize: Module<{\n root: unknown;\n NFC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n}>;\ndeclare namespace normalize {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n NFC: NFC.submodule;\n NFD: NFD.submodule;\n NFKC: NFKC.submodule;\n NFKD: NFKD.submodule;\n };\n namespace NFC {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFD {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFKC {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFKD {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n}\ndeclare const stringNumeric: stringNumeric.module;\ndeclare namespace stringNumeric {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare namespace trim {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const upper: upper.module;\ndeclare namespace upper {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const url: url.module;\ndeclare namespace url {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare const uuid: Module<{\n root: string;\n v1: unknown;\n v2: unknown;\n v3: unknown;\n v4: unknown;\n v5: unknown;\n v6: unknown;\n v7: unknown;\n v8: unknown;\n}>;\ndeclare namespace uuid {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n v1: string;\n v2: string;\n v3: string;\n v4: string;\n v5: string;\n v6: string;\n v7: string;\n v8: string;\n };\n namespace $ {\n type flat = {};\n }\n}\ndeclare const string: Module<{\n integer: Submodule;\n trim: Submodule;\n normalize: Submodule<{\n root: unknown;\n NFC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n }>;\n root: unknown;\n date: Submodule;\n email: unknown;\n uuid: Submodule<{\n root: string;\n v1: unknown;\n v2: unknown;\n v3: unknown;\n v4: unknown;\n v5: unknown;\n v6: unknown;\n v7: unknown;\n v8: unknown;\n }>;\n regex: unknown;\n json: Submodule;\n lower: Submodule;\n upper: Submodule;\n alpha: unknown;\n alphanumeric: unknown;\n hex: unknown;\n base64: Submodule<{\n root: unknown;\n url: unknown;\n }>;\n capitalize: Submodule;\n creditCard: unknown;\n digits: unknown;\n ip: Submodule;\n numeric: Submodule;\n semver: unknown;\n url: Submodule;\n}>;\ndeclare namespace string {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n alpha: string;\n alphanumeric: string;\n hex: string;\n base64: base64.submodule;\n capitalize: capitalize.submodule;\n creditCard: string;\n date: stringDate.submodule;\n digits: string;\n email: string;\n integer: stringInteger.submodule;\n ip: ip.submodule;\n json: stringJson.submodule;\n lower: lower.submodule;\n normalize: normalize.submodule;\n numeric: stringNumeric.submodule;\n regex: string;\n semver: string;\n trim: trim.submodule;\n upper: upper.submodule;\n url: url.submodule;\n uuid: uuid.submodule;\n };\n}\n\ndeclare const arkTsKeywords: arkTsKeywords;\ntype arkTsKeywords = Module;\ndeclare namespace arkTsKeywords {\n type submodule = Submodule<$>;\n type $ = {\n bigint: bigint;\n boolean: boolean;\n false: false;\n never: never;\n null: null;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n true: true;\n unknown: unknown;\n undefined: undefined;\n };\n}\ndeclare const unknown: Module<{\n any: unknown;\n root: unknown;\n}>;\ndeclare namespace unknown {\n type submodule = Submodule<$>;\n type $ = {\n root: unknown;\n any: any;\n };\n}\ndeclare const json: Module<{\n stringify: unknown;\n root: unknown;\n}>;\ndeclare namespace json {\n type submodule = Submodule<$>;\n type $ = {\n root: Json;\n stringify: (In: Json) => To;\n };\n}\ndeclare const object: Module<{\n root: unknown;\n json: Submodule<{\n stringify: unknown;\n root: unknown;\n }>;\n}>;\ndeclare namespace object {\n type submodule = Submodule<$>;\n type $ = {\n root: object;\n json: json.submodule;\n };\n}\ndeclare class RecordHkt extends Hkt<[Key, unknown]> {\n body: Record;\n description: string;\n}\ndeclare const Record: _ark_schema.GenericRoot;\ndeclare class PickHkt extends Hkt<[object, Key]> {\n body: pick;\n description: string;\n}\ndeclare const Pick: _ark_schema.GenericRoot;\ndeclare class OmitHkt extends Hkt<[object, Key]> {\n body: omit;\n description: string;\n}\ndeclare const Omit: _ark_schema.GenericRoot;\ndeclare class PartialHkt extends Hkt<[object]> {\n body: show>;\n description: string;\n}\ndeclare const Partial: _ark_schema.GenericRoot;\ndeclare class RequiredHkt extends Hkt<[object]> {\n body: show>;\n description: string;\n}\ndeclare const Required: _ark_schema.GenericRoot;\ndeclare class ExcludeHkt extends Hkt<[unknown, unknown]> {\n body: Exclude;\n description: string;\n}\ndeclare const Exclude: _ark_schema.GenericRoot;\ndeclare class ExtractHkt extends Hkt<[unknown, unknown]> {\n body: Extract;\n description: string;\n}\ndeclare const Extract: _ark_schema.GenericRoot;\ndeclare const arkTsGenerics: arkTsGenerics.module;\ndeclare namespace arkTsGenerics {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n Exclude: typeof Exclude.t;\n Extract: typeof Extract.t;\n Omit: typeof Omit.t;\n Partial: typeof Partial.t;\n Pick: typeof Pick.t;\n Record: typeof Record.t;\n Required: typeof Required.t;\n };\n}\n\ninterface Ark extends Omit, Ark.wrapped {\n}\ndeclare namespace Ark {\n interface keywords extends arkTsKeywords.$, arkTsGenerics.$, arkPrototypes.keywords, arkBuiltins.$ {\n }\n interface wrapped extends arkPrototypes.wrapped {\n string: string.submodule;\n number: number.submodule;\n object: object.submodule;\n unknown: unknown.submodule;\n }\n type flat = flatResolutionsOf;\n interface typeAttachments extends arkTsKeywords.$ {\n arrayIndex: arkPrototypes.$[\"Array\"][\"index\"];\n Key: arkBuiltins.$[\"Key\"];\n Record: arkTsGenerics.$[\"Record\"];\n Date: arkPrototypes.$[\"Date\"];\n Array: arkPrototypes.$[\"Array\"][\"root\"];\n }\n interface boundTypeAttachments<$> extends Omit, arkKind> {\n }\n}\ndeclare const ark: Scope;\ndeclare const keywords: Module;\ndeclare const type: TypeParser<{}>;\ndeclare namespace type {\n interface cast {\n [inferred]?: to;\n }\n type errors = ArkErrors;\n type validate> = validateDefinition;\n type instantiate> = instantiateType, $>;\n type infer> = inferDefinition;\n namespace infer {\n type In = distill.In>;\n type Out = distill.Out>;\n namespace introspectable {\n type Out = distill.introspectable.Out>;\n }\n }\n type brand = t extends InferredMorph ? o[\"introspectable\"] extends true ? (In: i) => To> : (In: i) => Out> : Brand;\n /** @ts-ignore cast variance */\n interface Any extends Type {\n }\n}\ntype type = Type$1;\ndeclare const match: MatchParser<{}>;\ndeclare const generic: GenericParser<{}>;\ndeclare const define: DefinitionParser<{}>;\ndeclare const declare: DeclarationParser<{}>;\n\ntype ParameterString = `<${params}>`;\ntype extractParams = s extends ParameterString ? params : never;\ntype validateParameterString = parseGenericParams, $> extends infer e extends ErrorMessage ? e : s;\ntype validateGenericArg = type.infer extends param[1] ? unknown : ErrorType<`Invalid argument for ${param[0]}`, [expected: param[1]]>;\ntype GenericInstantiator, def, $, args$> = params[\"length\"] extends 1 ? {\n >(a: type.validate & validateGenericArg): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 2 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 3 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 4 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 5 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 6 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : (error: ErrorMessage<`You may not define more than 6 positional generic parameters`>) => never;\ntype instantiateGeneric, args, $, args$> = Type$1<[\n def\n] extends [Hkt] ? Hkt.apply;\n}> : inferDefinition>, args$>;\ntype bindGenericArgs, $, args> = {\n [i in keyof params & `${number}` as params[i][0]]: type.infer;\n};\ntype baseGenericResolutions, $> = baseGenericConstraints extends infer baseConstraints ? {\n [k in keyof baseConstraints]: Type$1;\n} : never;\ntype baseGenericConstraints> = {\n [i in keyof params & `${number}` as params[i][0]]: params[i][1];\n};\ntype GenericConstructor = array, bodyDef = unknown, $ = {}, arg$ = {}> = new () => Generic;\ninterface Generic = array, bodyDef = unknown, $ = {}, arg$ = $> extends Callable> {\n [arkKind]: \"generic\";\n t: GenericAst;\n bodyDef: bodyDef;\n params: {\n [i in keyof params]: [params[i][0], Type$1];\n };\n names: genericParamNames;\n constraints: {\n [i in keyof params]: Type$1;\n };\n $: Scope<$>;\n arg$: Scope;\n internal: GenericRoot;\n json: JsonStructure;\n}\ndeclare const Generic: GenericConstructor;\ntype GenericDeclaration = `${name}${params}`;\ntype parseValidGenericParams = conform, $>, array>;\ndeclare const emptyGenericParameterMessage = \"An empty string is not a valid generic parameter name\";\ntype emptyGenericParameterMessage = typeof emptyGenericParameterMessage;\ntype parseGenericParams = parseNextNameChar, \"\", [\n], $>;\ntype ParamsTerminator = WhitespaceChar | \",\";\ntype parseName, $> = parseNextNameChar, \"\", result, $>;\ntype parseNextNameChar, $> = unscanned extends `${infer lookahead}${infer nextUnscanned}` ? lookahead extends ParamsTerminator ? name extends \"\" ? ErrorMessage : lookahead extends \",\" ? parseName : lookahead extends WhitespaceChar ? _parseOptionalConstraint : never : parseNextNameChar : name extends \"\" ? result : [...result, [name, unknown]];\ndeclare const extendsToken = \"extends \";\ntype extendsToken = typeof extendsToken;\ndeclare const _parseOptionalConstraint: (scanner: ArkTypeScanner, name: string, result: GenericParamDef[], ctx: BaseParseContext) => GenericParamDef[];\ntype _parseOptionalConstraint, $> = ArkTypeScanner.skipWhitespace extends (`${extendsToken}${infer nextUnscanned}`) ? parseUntilFinalizer, $, {}> extends (infer finalArgState extends StaticState) ? validateAst extends (infer e extends ErrorMessage) ? e : parseName]\n], $> : never : parseName extends (`,${infer nextUnscanned}`) ? nextUnscanned : unscanned, [\n ...result,\n [name, unknown]\n], $>;\ntype genericParamDefToAst = schema extends string ? [schema, unknown] : schema extends readonly [infer name, infer def] ? [name, type.infer] : never;\ntype genericParamDefsToAst, $> = [\n ...{\n [i in keyof defs]: genericParamDefToAst;\n }\n];\ntype GenericParser<$ = {}> = >(...params: {\n [i in keyof paramsDef]: paramsDef[i] extends (readonly [infer name, infer def]) ? readonly [name, type.validate] : paramsDef[i];\n}) => GenericBodyParser, $>;\ninterface GenericBodyParser, $> {\n (body: type.validate>): Generic;\n (instantiateDef: LazyGenericBody>, hkt: hkt): Generic, $, $>;\n}\n\ndeclare const Module: new <$ extends {}>(exports: exportScope<$>) => Module<$>;\ninterface Module<$ extends {} = {}> extends RootModule> {\n}\ntype exportScope<$> = bindExportsToScope<$, $>;\ndeclare const BoundModule: new (exports: bindExportsToScope, $: $) => BoundModule;\ninterface BoundModule extends RootModule> {\n}\ntype bindExportsToScope = {\n [k in keyof exports]: instantiateExport;\n} & unknown;\ntype Submodule = RootModule;\ntype instantiateExport = [\n t\n] extends [PreparsedNodeResolution] ? [\n t\n] extends [anyOrNever] ? Type$1 : t extends GenericAst ? Generic : t extends Submodule ? BoundModule : never : Type$1;\n\ndeclare class liftFromHkt extends Hkt<[element: unknown]> {\n body: liftArray extends infer lifted ? (In: this[0] | lifted) => To : never;\n}\ndeclare const liftFrom: _ark_schema.GenericRoot;\ndeclare const arkArray: arkArray.module;\ndeclare namespace arkArray {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: unknown[];\n readonly: readonly unknown[];\n index: NonNegativeIntegerString;\n liftFrom: typeof liftFrom.t;\n };\n}\ntype NonNegativeIntegerString = `${Digit}` | (`${Exclude}${string}` & `${bigint}`);\n\ntype FormDataValue = string | File;\ntype ParsedFormData = Record;\ndeclare const arkFormData: arkFormData.module;\ndeclare namespace arkFormData {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: FormData;\n value: FormDataValue;\n parse: (In: FormData) => To;\n parsed: ParsedFormData;\n };\n}\n\ndeclare const TypedArray: TypedArray.module;\ndeclare namespace TypedArray {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n Int8: Int8Array;\n Uint8: Uint8Array;\n Uint8Clamped: Uint8ClampedArray;\n Int16: Int16Array;\n Uint16: Uint16Array;\n Int32: Int32Array;\n Uint32: Uint32Array;\n Float32: Float32Array;\n Float64: Float64Array;\n BigInt64: BigInt64Array;\n BigUint64: BigUint64Array;\n };\n}\n\ndeclare const omittedPrototypes: {\n Boolean: 1;\n Number: 1;\n String: 1;\n};\ndeclare const arkPrototypes: arkPrototypes.module;\ndeclare namespace arkPrototypes {\n type module = Module;\n type submodule = Submodule<$>;\n interface keywords extends ecmascript, platform {\n }\n interface $ extends Omit, wrapped {\n }\n interface wrapped {\n Array: arkArray.submodule;\n TypedArray: TypedArray.submodule;\n FormData: arkFormData.submodule;\n }\n type ecmascript = Omit;\n type platform = PlatformObjects;\n interface instances extends ecmascript, platform {\n }\n type NonDegenerateName = keyof instances extends infer k ? k extends keyof instances ? {} extends instances[k] ? never : k : never : never;\n type instanceOf = instances[name];\n}\n\ntype DateLiteral = `d\"${source}\"` | `d'${source}'`;\ntype LimitLiteral = number | DateLiteral;\ntype distill = finalizeDistillation>;\ndeclare namespace distill {\n type Endpoint = \"in\" | \"out\" | \"out.introspectable\";\n type In = distill;\n type Out = distill;\n namespace introspectable {\n type Out = distill;\n }\n}\ntype finalizeDistillation = equals extends true ? t : distilled;\ntype _distill = t extends undefined ? t : [t] extends [anyOrNever] ? t : unknown extends t ? unknown : t extends Brand ? endpoint extends \"in\" ? base : t : t extends TerminallyInferredObject | Primitive ? t : t extends Function ? t extends (...args: never) => anyOrNever ? t : t extends InferredMorph ? distillIo : t : t extends Default ? _distill : t extends array ? distillArray : isSafelyMappable extends true ? distillMappable : t;\ntype distillMappable = endpoint extends \"in\" ? show<{\n [k in keyof o as k extends inferredDefaultKeyOf ? never : k]: _distill;\n} & {\n [k in inferredDefaultKeyOf]?: _distill;\n}> : {\n [k in keyof o]: _distill;\n};\ntype distillIo = endpoint extends \"out\" ? _distill : endpoint extends \"in\" ? _distill : o extends To ? _distill : unknown;\ntype unwrapInput = t extends InferredMorph ? t extends anyOrNever ? t : i : t;\ntype inferredDefaultKeyOf = keyof o extends infer k ? k extends keyof o ? unwrapInput extends Default ? [\n t\n] extends [anyOrNever] ? never : k : never : never : never;\ntype distillArray = t[number][] extends t ? alignReadonly<_distill[], t> : distillNonArraykeys, t>, endpoint>;\ntype alignReadonly = original extends unknown[] ? result : Readonly;\ntype distillNonArraykeys = keyof originalArray extends keyof distilledArray ? distilledArray : distilledArray & _distill<{\n [k in keyof originalArray as k extends keyof distilledArray ? never : k]: originalArray[k];\n}, endpoint>;\ntype distillArrayFromPrefix = t extends readonly [infer head, ...infer tail] ? distillArrayFromPrefix\n]> : [...prefix, ...distillArrayFromPostfix];\ntype distillArrayFromPostfix = t extends readonly [...infer init, infer last] ? distillArrayFromPostfix,\n ...postfix\n]> : [...{\n [i in keyof t]: _distill;\n}, ...postfix];\ntype BuiltinTerminalObjectKind = Exclude;\n/** Objects we don't want to expand during inference like Date or Promise */\ntype TerminallyInferredObject = arkPrototypes.instanceOf | ArkEnv.prototypes;\ntype inferPredicate = predicate extends (data: any, ...args: any[]) => data is infer narrowed ? narrowed : t;\ntype inferNaryPipe = _inferNaryPipe;\ntype _inferNaryPipe = remaining extends (readonly [infer head extends Morph, ...infer tail extends Morph[]]) ? _inferNaryPipe> : result;\ntype inferNaryIntersection = number extends types[\"length\"] ? _inferNaryIntersection, unknown> : _inferNaryIntersection;\ntype _inferNaryIntersection = remaining extends readonly [infer head, ...infer tail] ? _inferNaryIntersection> : result;\ntype inferNaryMerge = number extends types[\"length\"] ? _inferUnorderedMerge : _inferNaryMerge;\ntype _inferUnorderedMerge, requiredKey extends PropertyKey = Exclude, optionalKey>> = show<{\n [k in requiredKey]: types[number] extends infer v ? v extends unknown ? k extends keyof v ? v[k] : never : never : never;\n} & {\n [k in optionalKey]?: types[number] extends infer v ? v extends unknown ? k extends keyof v ? v[k] : never : never : never;\n}>;\n/** Coalesce keys that exist and are optional on one or more branches of a union */\ntype optionalAtLeastOnceUnionKeyOf = t extends unknown ? optionalKeyOf : never;\ntype _inferNaryMerge = remaining extends (readonly [infer head, ...infer tail extends readonly unknown[]]) ? _inferNaryMerge> : result;\ntype inferMorphOut = Exclude, ArkError | ArkErrors>;\ndeclare const isMorphOutKey: \" isMorphOut\";\ninterface Out {\n [isMorphOutKey]: true;\n t: o;\n introspectable: boolean;\n}\ninterface To extends Out {\n introspectable: true;\n}\ntype InferredMorph = (In: i) => o;\ndeclare const defaultsToKey: \" defaultsTo\";\ntype Default = {\n [defaultsToKey]: [t, v];\n};\ntype withDefault = t extends InferredMorph ? addDefaultToMorph : Default, v>;\ntype addDefaultToMorph = [\n normalizeMorphDistribution\n] extends [InferredMorph] ? (In: Default) => o : never;\ntype normalizeMorphDistribution ? i : never, undistributedOut extends Out = t extends InferredMorph ? [\n o\n] extends [To] ? To : o : never> = (Extract extends anyOrNever ? never : Extract extends InferredMorph ? [\n undistributedOut\n] extends [o] ? (In: undistributedIn) => undistributedOut : [undistributedIn] extends [i] ? (In: undistributedIn) => undistributedOut : t : never) | Exclude extends infer _ ? _ : never;\ntype defaultFor = (Primitive extends t ? Primitive : t extends Primitive ? t : never) | (() => t);\ntype inferIntersection = normalizeMorphDistribution<_inferIntersection>;\ntype inferMorph = morph extends type.cast ? inferPipe : inferMorphOut extends infer out ? (In: distill.In) => Out : never;\ntype inferPipe = normalizeMorphDistribution<_inferIntersection>;\ntype _inferIntersection = [\n l & r\n] extends [infer t extends anyOrNever] ? t : l extends InferredMorph ? r extends InferredMorph ? piped extends true ? (In: lIn) => rOut : never : piped extends true ? (In: lIn) => To : (In: _inferIntersection) => lOut : r extends InferredMorph ? (In: _inferIntersection) => rOut : [l, r] extends [object, object] ? intersectObjects extends infer result ? result : never : l & r;\ninterface MorphableIntersection extends Hkt<[unknown, unknown]> {\n body: _inferIntersection;\n}\ntype intersectObjects = l extends array ? r extends array ? intersectArrays> : // for an intersection with exactly one array operand like { name: string } & string[],\nl & r : r extends array ? l & r : show<{\n [k in keyof l]: k extends keyof r ? _inferIntersection : l[k];\n} & {\n [k in keyof r]: k extends keyof l ? _inferIntersection : r[k];\n}>;\n\nexport { Ark, ArkAmbient, type ArkConfig, type Type as BaseType, BoundModule, Generic, type KeywordConfig, Module, type Out, Scope, type Submodule, Type$1 as Type, ark, type bindThis, configure, declare, define, distill, generic, type inferDefinition, keywords, match, scope, type, type validateDefinition };\n\n}" +export const typeDts = "declare module \"arktype\" {\n import * as _ark_schema from '@ark/schema';\nimport { TypeMeta, arkKind, BaseMappedPropInner, OptionalMappedPropInner, Prop, InclusiveNumericRangeSchema, ExclusiveNumericRangeSchema, ExactLength, InclusiveDateRangeSchema, ExclusiveDateRangeSchema, Divisor, Pattern, BaseRoot, BaseParseContext, GenericAst, GenericRoot, genericParamNames, resolvableReferenceIn, writeUnresolvableMessage, writeNonSubmoduleDotMessage, emptyBrandNameMessage, writeUnboundableMessage, writeUnassignableDefaultValueMessage, writeIndivisibleMessage, writeNonStructuralOperandMessage, PrivateDeclaration, writeMissingSubmoduleAccessMessage, GenericParamAst, writeUnsatisfiedParameterConstraintMessage, writeInvalidPropertyKeyMessage, UndeclaredKeyBehavior, ArkSchemaScopeConfig, BaseNode, exportedNameOf, toInternalScope, RootSchema, NodeKind, RootKind, NodeSchema, BaseParseOptions, nodeOfKind, reducibleKindOf, PreparsedNodeResolution, writeDuplicateAliasError, BaseScope, AliasDefEntry, GenericParamDef, BaseParseContextInput, Morph, unwrapDefault, Predicate, Sequence, postfixAfterOptionalOrDefaultableMessage, ArkErrors, ToJsonSchema, JsonSchema, NodeSelector, Disjoint, StandardSchemaV1, flatResolutionsOf, LazyGenericBody, RootModule, ArkError } from '@ark/schema';\nexport { ArkError, ArkErrors, ArkSchemaConfig, ArkSchemaScopeConfig, JsonSchema, Traversal, TraversalError } from '@ark/schema';\nimport * as util from '@ark/util';\nimport { anyOrNever, array, arkKeyOf, arkIndexableOf, arkGet, toArkKey, merge, ErrorType, listable, Key, show, intersectUnion, inferred, optionalKeyOf, JsonStructure, Scanner, EscapeChar, WhitespaceChar, Stringifiable, requireKeys, ErrorMessage, Completion, defined, NumberLiteral, join, lastOf, BigintLiteral, trim as trim$1, typeToString, writeMalformedNumericLiteralMessage, Hkt, flattenListable, Brand, noSuggest, Constructor, satisfy, conform, Fn, ifEmptyObjectLiteral, Primitive, objectKindOrDomainOf, equals, requiredKeyOf, Callable, unset, numericStringKeyOf, isDisjoint, unionToTuple, propValueOf, Json, omit, pick, Digit, liftArray, EcmascriptObjects, PlatformObjects, isSafelyMappable, intersectArrays, unionKeyOf } from '@ark/util';\nexport { Hkt, ParseError, inferred } from '@ark/util';\nimport { ArkSchemaConfig } from '@ark/schema/config';\n\ntype KeywordConfig = {\n [k in keyof Ark.flat as parseConfigurableFlatAlias]?: TypeMeta.Collapsible;\n};\ntype parseConfigurableFlatAlias = [\n v\n] extends [anyOrNever] ? k : v extends {\n [arkKind]: \"generic\" | \"module\";\n} ? never : k extends `${infer prefix}.root` ? prefix : k;\ninterface ArkConfig extends ArkSchemaConfig {\n keywords?: KeywordConfig;\n}\ndeclare const configure: (config: config) => config;\ndeclare global {\n export interface ArkEnv {\n $(): Ark;\n }\n}\n/**\n * This mirrors the global ArkEnv namespace as a local export. We use it instead\n * of the global internally due to a bug in twoslash that prevents `ark/docs`\n * from building if we refer to the global directly.\n *\n * If, in the future, docs can build while arktype refers to `ArkEnv.$` directly,\n * this can be removed.\n */\ndeclare namespace ArkAmbient {\n type $ = ReturnType;\n type meta = ArkEnv.meta;\n type prototypes = ArkEnv.prototypes;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$6 extends Type {\n readonly(): t extends array ? Type$5<{\n readonly [i in keyof t]: t[i];\n }, $> : Type$6<{\n readonly [k in keyof t]: t[k];\n }, $>;\n keyof(): instantiateType, $>;\n /**\n * Get the `Type` of a property of this `Type`.\n * @example type({ foo: \"string\" }).get(\"foo\") // Type\n */\n get, r = instantiateType, $>>(k1: k1 | type.cast): r extends infer _ ? _ : never;\n get, const k2 extends arkIndexableOf>, r = instantiateType, k2>, $>>(k1: k1 | type.cast, k2: k2 | type.cast): r extends infer _ ? _ : never;\n get, const k2 extends arkIndexableOf>, const k3 extends arkIndexableOf, k2>>, r = instantiateType, k2>, k3>, $>>(k1: k1 | type.cast, k2: k2 | type.cast, k3: k3 | type.cast): r extends infer _ ? _ : never;\n /**\n * Create a copy of this `Type` with only the specified properties.\n * @example type({ foo: \"string\", bar: \"number\" }).pick(\"foo\") // Type<{ foo: string }>\n */\n pick = never>(...keys: (key | type.cast)[]): Type$6<{\n [k in keyof t as Extract, key>]: t[k];\n }, $>;\n /**\n * Create a copy of this `Type` with all properties except the specified ones.\n * @example type({ foo: \"string\", bar: \"number\" }).omit(\"foo\") // Type<{ bar: number }>\n */\n omit = never>(...keys: (key | type.cast)[]): Type$6<{\n [k in keyof t as Exclude, key>]: t[k];\n }, $>;\n /**\n * Merge another `Type` definition, overriding properties of this `Type` with the duplicate keys.\n * @example type({ a: \"1\", b: \"2\" }).merge({ b: \"3\", c: \"4\" }) // Type<{ a: 1, b: 3, c: 4 }>\n */\n merge, r = Type$6, $>>(def: type.validate & (inferredDef extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n /**\n * Create a copy of this `Type` with all properties required.\n * @example const T = type({ \"foo?\"\": \"string\" }).required() // Type<{ foo: string }>\n */\n required(): Type$6<{\n [k in keyof t]-?: t[k];\n }, $>;\n /**\n * Create a copy of this `Type` with all properties optional.\n * @example: const T = type({ foo: \"string\" }).optional() // Type<{ foo?: string }>\n */\n partial(): Type$6<{\n [k in keyof t]?: t[k];\n }, $>;\n map, r = Type$6, $>>(flatMapEntry: (entry: typePropOf) => transformed): r extends infer _ ? _ : never;\n /**\n * List of property info of this `Type`.\n * @example type({ foo: \"string = \"\" }).props // [{ kind: \"required\", key: \"foo\", value: Type, default: \"\" }]\n */\n props: array>;\n}\ntype typePropOf = keyof o extends infer k ? k extends keyof o ? typeProp : never : never;\ntype typeProp = t extends Default ? DefaultedTypeProp : BaseTypeProp ? \"optional\" : \"required\", k & Key, t, $>;\ninterface BaseTypeProp {\n kind: kind;\n key: k;\n value: instantiateType;\n meta: ArkEnv.meta;\n toJSON: () => JsonStructure;\n}\ninterface DefaultedTypeProp extends BaseTypeProp<\"optional\", k, v, $> {\n default: defaultValue;\n}\ntype MappedTypeProp = BaseMappedTypeProp | OptionalMappedTypeProp;\ntype BaseMappedTypeProp = merge;\n}>;\ntype OptionalMappedTypeProp = merge;\n default?: v;\n}>;\ntype constructMapped> = show>>;\ntype fromTypeProps> = show<{\n [prop in props[number] as Extract, {\n kind: \"required\";\n }>[\"key\"]]: prop[\"value\"][inferred];\n} & {\n [prop in props[number] as Extract, {\n kind: \"optional\";\n default?: never;\n }>[\"key\"]]?: prop[\"value\"][inferred];\n} & {\n [prop in props[number] as Extract, {\n kind: \"optional\";\n default: unknown;\n }>[\"key\"]]: withDefault;\n}>;\ntype NonObjectMergeErrorMessage = \"Merged type must be an object\";\ntype applyHomomorphicOptionality = prop[\"kind\"] extends string ? prop : prop & {\n kind: prop[\"key\"] extends optionalKeyOf ? \"optional\" : \"required\";\n};\n\ninterface Type$5<\n/** @ts-ignore cast variance */\nout t extends readonly unknown[] = readonly unknown[], $ = {}> extends Type$6 {\n atLeastLength(schema: InclusiveNumericRangeSchema): this;\n atMostLength(schema: InclusiveNumericRangeSchema): this;\n moreThanLength(schema: ExclusiveNumericRangeSchema): this;\n lessThanLength(schema: ExclusiveNumericRangeSchema): this;\n exactlyLength(schema: ExactLength.Schema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$4 extends Type$6 {\n atOrAfter(schema: InclusiveDateRangeSchema): this;\n atOrBefore(schema: InclusiveDateRangeSchema): this;\n laterThan(schema: ExclusiveDateRangeSchema): this;\n earlierThan(schema: ExclusiveDateRangeSchema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$3 extends Type {\n divisibleBy(schema: Divisor.Schema): this;\n atLeast(schema: InclusiveNumericRangeSchema): this;\n atMost(schema: InclusiveNumericRangeSchema): this;\n moreThan(schema: ExclusiveNumericRangeSchema): this;\n lessThan(schema: ExclusiveNumericRangeSchema): this;\n}\n\n/** @ts-ignore cast variance */\ninterface Type$2 extends Type {\n matching(schema: Pattern.Schema): this;\n atLeastLength(schema: InclusiveNumericRangeSchema): this;\n atMostLength(schema: InclusiveNumericRangeSchema): this;\n moreThanLength(schema: ExclusiveNumericRangeSchema): this;\n lessThanLength(schema: ExclusiveNumericRangeSchema): this;\n exactlyLength(schema: ExactLength.Schema): this;\n}\n\ntype instantiateType = [\n t\n] extends [anyOrNever] ? Type : [t] extends [object] ? [\n t\n] extends [array] ? Type$5 : [t] extends [Date] ? Type$4 : Type$6 : [t] extends [string] ? Type$2 : [t] extends [number] ? Type$3 : Type;\n\ntype StringifiablePrefixOperator = \"keyof\";\ndeclare const minComparators: {\n readonly \">\": true;\n readonly \">=\": true;\n};\ntype MinComparator = keyof typeof minComparators;\ndeclare const maxComparators: {\n readonly \"<\": true;\n readonly \"<=\": true;\n};\ntype MaxComparator = keyof typeof maxComparators;\ndeclare const comparators: {\n \">\": boolean;\n \">=\": boolean;\n \"<\": boolean;\n \"<=\": boolean;\n \"==\": boolean;\n};\ntype Comparator = keyof typeof comparators;\ntype InvertedComparators = {\n \"<\": \">\";\n \">\": \"<\";\n \"<=\": \">=\";\n \">=\": \"<=\";\n \"==\": \"==\";\n};\ntype BranchOperator = \"&\" | \"|\" | \"|>\";\ntype OpenLeftBound = {\n limit: LimitLiteral;\n comparator: MinComparator;\n};\ndeclare const writeUnmatchedGroupCloseMessage: (unscanned: unscanned) => writeUnmatchedGroupCloseMessage;\ntype writeUnmatchedGroupCloseMessage = `Unmatched )${unscanned extends \"\" ? \"\" : ` before ${unscanned}`}`;\ndeclare const writeUnclosedGroupMessage: (missingChar: missingChar) => writeUnclosedGroupMessage;\ntype writeUnclosedGroupMessage = `Missing ${missingChar}`;\ndeclare const writeOpenRangeMessage: (min: min, comparator: comparator) => writeOpenRangeMessage;\ntype writeOpenRangeMessage = `Left bounds are only valid when paired with right bounds (try ...${comparator}${min})`;\ntype writeUnpairableComparatorMessage = `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`;\ndeclare const writeUnpairableComparatorMessage: (comparator: comparator) => writeUnpairableComparatorMessage;\ndeclare const writeMultipleLeftBoundsMessage: (openLimit: openLimit, openComparator: openComparator, limit: limit, comparator: comparator) => writeMultipleLeftBoundsMessage;\ntype writeMultipleLeftBoundsMessage = `An expression may have at most one left bound (parsed ${openLimit}${InvertedComparators[openComparator]}, ${limit}${InvertedComparators[comparator]})`;\n\ndeclare class ArkTypeScanner extends Scanner {\n shiftUntilNextTerminator(): string;\n static terminatingChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n readonly \"<\": 1;\n readonly \">\": 1;\n readonly \"=\": 1;\n readonly \"|\": 1;\n readonly \"&\": 1;\n readonly \")\": 1;\n readonly \"[\": 1;\n readonly \"%\": 1;\n readonly \",\": 1;\n readonly \":\": 1;\n readonly \"?\": 1;\n readonly \"#\": 1;\n };\n static finalizingLookaheads: {\n readonly \">\": 1;\n readonly \",\": 1;\n readonly \"\": 1;\n readonly \"=\": 1;\n readonly \"?\": 1;\n };\n static lookaheadIsFinalizing: (lookahead: string, unscanned: string) => lookahead is \">\" | \",\" | \"=\" | \"?\";\n}\ndeclare namespace ArkTypeScanner {\n type lookaheadIsFinalizing = lookahead extends \">\" ? unscanned extends `=${infer nextUnscanned}` ? nextUnscanned extends `=${string}` ? true : false : ArkTypeScanner.skipWhitespace extends (\"\" | `${TerminatingChar}${string}`) ? true : false : lookahead extends \"=\" ? unscanned extends `=${string}` ? false : true : lookahead extends \",\" | \"?\" ? true : false;\n type TerminatingChar = keyof typeof ArkTypeScanner.terminatingChars;\n type FinalizingLookahead = keyof typeof ArkTypeScanner.finalizingLookaheads;\n type InfixToken = Comparator | \"|\" | \"&\" | \"%\" | \":\" | \"=>\" | \"|>\" | \"#\" | \"@\" | \"=\";\n type PostfixToken = \"[]\" | \"?\";\n type OperatorToken = InfixToken | PostfixToken;\n type shift = `${lookahead}${unscanned}`;\n type shiftUntil = unscanned extends shift ? lookahead extends terminator ? scanned extends `${infer base}${EscapeChar}` ? shiftUntil : [scanned, unscanned] : shiftUntil : [scanned, \"\"];\n type shiftUntilNot = unscanned extends shift ? lookahead extends nonTerminator ? shiftUntilNot : [scanned, unscanned] : [scanned, \"\"];\n type shiftUntilNextTerminator = shiftUntil;\n type skipWhitespace = shiftUntilNot[1];\n type shiftResult = [\n scanned,\n unscanned\n ];\n}\n\ntype astToString = ast extends InferredAst | DefAst ? ast[2] : ast extends PostfixExpression ? operator extends \"[]\" ? `${astToString}[]` : never : ast extends InfixExpression ? operator extends \"&\" | \"|\" | \"%\" | Comparator ? `${astToString} ${operator} ${astToString}` : never : ast extends Stringifiable ? `${ast extends bigint ? `${ast}n` : ast}` : \"...\";\ntype writeConstrainedMorphMessage = `To constrain the output of ${astToString}, pipe like myMorph.to('number > 0').\nTo constrain the input, intersect like myMorph.and('number > 0').`;\n\ntype BranchState$1 = {\n prefixes: StringifiablePrefixOperator[];\n leftBound: OpenLeftBound | null;\n intersection: BaseRoot | null;\n union: BaseRoot | null;\n pipe: BaseRoot | null;\n};\ntype DynamicStateWithRoot = requireKeys;\ndeclare class DynamicState {\n root: BaseRoot | undefined;\n branches: BranchState$1;\n finalizer: ArkTypeScanner.FinalizingLookahead | undefined;\n groups: BranchState$1[];\n scanner: ArkTypeScanner;\n ctx: BaseParseContext;\n constructor(scanner: ArkTypeScanner, ctx: BaseParseContext);\n error(message: string): never;\n hasRoot(): this is DynamicStateWithRoot;\n setRoot(root: BaseRoot): void;\n unsetRoot(): this[\"root\"];\n constrainRoot(...args: Parameters[\"constrain\"]>): void;\n finalize(finalizer: ArkTypeScanner.FinalizingLookahead): void;\n reduceLeftBound(limit: LimitLiteral, comparator: Comparator): void;\n finalizeBranches(): void;\n finalizeGroup(): void;\n addPrefix(prefix: StringifiablePrefixOperator): void;\n applyPrefixes(): void;\n pushRootToBranch(token: BranchOperator): void;\n parseUntilFinalizer(): DynamicStateWithRoot;\n parseOperator(this: DynamicStateWithRoot): void;\n parseOperand(): void;\n private assertRangeUnset;\n reduceGroupOpen(): void;\n previousOperator(): MinComparator | StringifiablePrefixOperator | ArkTypeScanner.InfixToken | undefined;\n shiftedByOne(): this;\n}\n\ntype StaticState = {\n root: unknown;\n branches: BranchState;\n groups: BranchState[];\n finalizer: ArkTypeScanner.FinalizingLookahead | ErrorMessage | undefined;\n scanned: string;\n unscanned: string;\n};\ntype BranchState = {\n prefixes: StringifiablePrefixOperator[];\n leftBound: OpenLeftBound | undefined;\n intersection: unknown;\n pipe: unknown;\n union: unknown;\n};\ndeclare namespace state {\n type initialize = from<{\n root: undefined;\n branches: initialBranches;\n groups: [];\n finalizer: undefined;\n scanned: \"\";\n unscanned: def;\n }>;\n type error = from<{\n root: ErrorMessage;\n branches: initialBranches;\n groups: [];\n finalizer: ErrorMessage;\n scanned: \"\";\n unscanned: \"\";\n }>;\n type completion = from<{\n root: Completion;\n branches: initialBranches;\n groups: [];\n finalizer: Completion;\n scanned: \"\";\n unscanned: \"\";\n }>;\n type initialBranches = branchesFrom<{\n prefixes: [];\n leftBound: undefined;\n intersection: undefined;\n pipe: undefined;\n union: undefined;\n }>;\n type updateScanned = previousUnscanned extends `${infer justScanned}${updatedUnscanned}` ? `${previousScanned}${justScanned}` : previousScanned;\n type setRoot = from<{\n root: root;\n branches: s[\"branches\"];\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type addPrefix = from<{\n root: s[\"root\"];\n branches: {\n prefixes: [...s[\"branches\"][\"prefixes\"], prefix];\n leftBound: s[\"branches\"][\"leftBound\"];\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceBranch = s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : from<{\n root: undefined;\n branches: {\n prefixes: [];\n leftBound: undefined;\n intersection: token extends \"&\" ? mergeToIntersection : undefined;\n union: token extends \"|\" ? mergeToUnion : token extends \"|>\" ? undefined : s[\"branches\"][\"union\"];\n pipe: token extends \"|>\" ? mergeToPipe : s[\"branches\"][\"pipe\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceLeftBound = comparator extends \"<\" | \"<=\" ? s[\"branches\"][\"leftBound\"] extends {} ? state.error> : from<{\n root: undefined;\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: {\n limit: limit;\n comparator: InvertedComparators[comparator];\n };\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }> : state.error>;\n type reduceRange = state.from<{\n root: [minLimit, minComparator, [s[\"root\"], maxComparator, maxLimit]];\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: undefined;\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type reduceSingleBound = state.from<{\n root: [s[\"root\"], comparator, limit];\n branches: {\n prefixes: s[\"branches\"][\"prefixes\"];\n leftBound: undefined;\n intersection: s[\"branches\"][\"intersection\"];\n pipe: s[\"branches\"][\"pipe\"];\n union: s[\"branches\"][\"union\"];\n };\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type mergeToIntersection = s[\"branches\"][\"intersection\"] extends undefined ? mergePrefixes : [s[\"branches\"][\"intersection\"], \"&\", mergePrefixes];\n type mergeToUnion = s[\"branches\"][\"union\"] extends undefined ? mergeToIntersection : [s[\"branches\"][\"union\"], \"|\", mergeToIntersection];\n type mergeToPipe = s[\"branches\"][\"pipe\"] extends undefined ? mergeToUnion : [s[\"branches\"][\"pipe\"], \"|>\", mergeToUnion];\n type mergePrefixes = remaining extends [infer head, ...infer tail] ? [\n head,\n mergePrefixes\n ] : s[\"root\"];\n type popGroup = [\n ...stack,\n top\n ];\n type finalizeGroup = s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : s[\"groups\"] extends popGroup ? from<{\n groups: stack;\n branches: top;\n root: mergeToPipe;\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }> : state.error>;\n type reduceGroupOpen = from<{\n groups: [...s[\"groups\"], s[\"branches\"]];\n branches: initialBranches;\n root: undefined;\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type finalize = s[\"groups\"] extends [] ? s[\"branches\"][\"leftBound\"] extends {} ? openRangeError : from<{\n root: mergeToPipe;\n groups: s[\"groups\"];\n branches: initialBranches;\n finalizer: finalizer;\n scanned: s[\"scanned\"];\n unscanned: s[\"unscanned\"];\n }> : state.error>;\n type openRangeError> = state.error>;\n type previousOperator = s[\"branches\"][\"leftBound\"] extends {} ? s[\"branches\"][\"leftBound\"][\"comparator\"] : s[\"branches\"][\"prefixes\"] extends ([\n ...unknown[],\n infer tail extends string\n ]) ? tail : s[\"branches\"][\"intersection\"] extends {} ? \"&\" : s[\"branches\"][\"union\"] extends {} ? \"|\" : undefined;\n type scanTo = from<{\n root: s[\"root\"];\n branches: s[\"branches\"];\n groups: s[\"groups\"];\n finalizer: s[\"finalizer\"];\n scanned: updateScanned;\n unscanned: unscanned;\n }>;\n type from = s;\n type branchesFrom = b;\n}\n\ntype StringLiteral = DoubleQuotedStringLiteral | SingleQuotedStringLiteral;\ntype DoubleQuotedStringLiteral = `\"${Text}\"`;\ntype SingleQuotedStringLiteral = `'${Text}'`;\ndeclare const parseEnclosed: (s: DynamicState, enclosing: EnclosingStartToken) => void;\ntype parseEnclosed = ArkTypeScanner.shiftUntil extends ArkTypeScanner.shiftResult ? nextUnscanned extends \"\" ? state.error> : state.setRoot, nextUnscanned extends ArkTypeScanner.shift ? unscanned : \"\"> : never;\ndeclare const enclosingQuote: {\n readonly \"'\": 1;\n readonly '\"': 1;\n};\ntype EnclosingQuote = keyof typeof enclosingQuote;\ndeclare const enclosingTokens: {\n readonly \"d'\": \"'\";\n readonly 'd\"': \"\\\"\";\n readonly \"'\": \"'\";\n readonly '\"': \"\\\"\";\n readonly \"/\": \"/\";\n};\ntype EnclosingTokens = typeof enclosingTokens;\ntype EnclosingStartToken = keyof EnclosingTokens;\ndeclare const enclosingCharDescriptions: {\n readonly '\"': \"double-quote\";\n readonly \"'\": \"single-quote\";\n readonly \"/\": \"forward slash\";\n};\ntype enclosingCharDescriptions = typeof enclosingCharDescriptions;\ndeclare const writeUnterminatedEnclosedMessage: (fragment: fragment, enclosingStart: enclosingStart) => writeUnterminatedEnclosedMessage;\ntype writeUnterminatedEnclosedMessage = `${enclosingStart}${fragment} requires a closing ${enclosingCharDescriptions[EnclosingTokens[enclosingStart]]}`;\n\ndeclare const parseUnenclosed: (s: DynamicState) => void;\ntype parseUnenclosed = ArkTypeScanner.shiftUntilNextTerminator extends (ArkTypeScanner.shiftResult) ? tryResolve extends state.from ? s : never : never;\ntype parseResolution = resolutionToAst extends infer ast ? ast extends GenericAst ? parseGenericInstantiation, $, args> : state.setRoot : never;\ndeclare const parseGenericInstantiation: (name: string, g: GenericRoot, s: DynamicState) => BaseRoot;\ntype parseGenericInstantiation = ArkTypeScanner.skipWhitespace extends `<${infer unscanned}` ? parseGenericArgs extends infer result ? result extends ParsedArgs ? state.setRoot, nextUnscanned> : result : never : state.error, [\n]>>;\ntype tryResolve = token extends keyof args ? parseResolution : token extends keyof $ ? parseResolution : `#${token}` extends keyof $ ? parseResolution : token extends keyof ArkAmbient.$ ? parseResolution : token extends NumberLiteral ? state.setRoot, unscanned> : token extends (`${infer submodule extends keyof $ & string}.${infer reference}`) ? tryResolveSubmodule : token extends (`${infer submodule extends keyof ArkAmbient.$ & string}.${infer reference}`) ? tryResolveSubmodule : token extends BigintLiteral ? state.setRoot, unscanned> : token extends \"keyof\" ? state.addPrefix : unresolvableState;\ntype tryResolveSubmodule = resolution extends {\n [arkKind]: \"module\";\n} ? reference extends keyof resolution ? parseResolution : reference extends (`${infer nestedSubmodule extends keyof resolution & string}.${infer nestedReference}`) ? tryResolveSubmodule : unresolvableState : state.error>>;\n/** Provide valid completions for the current token, or fallback to an\n * unresolvable error if there are none */\ntype unresolvableState = [\n token,\n s[\"unscanned\"]\n] extends ([\n \"\",\n ArkTypeScanner.shift<\"#\", infer unscanned>\n]) ? ArkTypeScanner.shiftUntilNextTerminator extends (ArkTypeScanner.shiftResult) ? state.error> : never : validReferenceFromToken extends (never) ? state.error>> : state.completion<`${s[\"scanned\"]}${qualifiedReference, submodulePath>}`>;\ntype qualifiedReference = join<[...submodulePath, reference], \".\">;\ntype validReferenceFromToken = Extract : resolvableReferenceIn<$>, `${token}${string}`>;\ntype writeMissingRightOperandMessage = `Token '${token}' requires a right operand${unscanned extends \"\" ? \"\" : ` before '${unscanned}'`}`;\ndeclare const writeMissingRightOperandMessage: (token: token, unscanned?: unscanned) => writeMissingRightOperandMessage;\n\ndeclare const parseOperand: (s: DynamicState) => void;\ntype parseOperand = s[\"unscanned\"] extends (ArkTypeScanner.shift) ? lookahead extends \"(\" ? state.reduceGroupOpen : lookahead extends EnclosingStartToken ? parseEnclosed : lookahead extends WhitespaceChar ? parseOperand, $, args> : lookahead extends \"d\" ? unscanned extends (ArkTypeScanner.shift) ? parseEnclosed : parseUnenclosed : parseUnenclosed : state.completion<`${s[\"scanned\"]}${BaseCompletions<$, args>}`>;\n\ntype UnitLiteralKeyword = \"null\" | \"undefined\" | \"true\" | \"false\";\ntype UnitLiteral = StringLiteral | BigintLiteral | NumberLiteral | DateLiteral | UnitLiteralKeyword;\ntype ParsedDefaultableProperty = readonly [BaseRoot, \"=\", unknown];\ndeclare const parseDefault: (s: DynamicStateWithRoot) => ParsedDefaultableProperty;\ntype parseDefault = trim$1 extends infer defaultValue extends UnitLiteral ? [\n root,\n \"=\",\n defaultValue\n] : ErrorMessage>>;\ndeclare const writeNonLiteralDefaultMessage: (defaultDef: defaultDef) => writeNonLiteralDefaultMessage;\ntype writeNonLiteralDefaultMessage = `Default value '${defaultDef}' must a literal value`;\n\ndeclare const parseBound: (s: DynamicStateWithRoot, start: ComparatorStartChar) => void;\ntype parseBound = shiftComparator extends infer shiftResultOrError ? shiftResultOrError extends (ArkTypeScanner.shiftResult) ? s[\"root\"] extends (InferredAst) ? state.reduceLeftBound : parseRightBound, comparator, $, args> : shiftResultOrError : never;\ntype OneCharComparator = \">\" | \"<\";\ntype ComparatorStartChar = Comparator extends `${infer char}${string}` ? char : never;\ndeclare const shiftComparator: (s: DynamicState, start: ComparatorStartChar) => Comparator;\ntype shiftComparator = unscanned extends `=${infer nextUnscanned}` ? [`${start}=`, nextUnscanned] : [start & OneCharComparator, unscanned];\ndeclare const parseRightBound: (s: DynamicStateWithRoot, comparator: Comparator) => void;\ntype parseRightBound = parseOperand extends infer nextState extends StaticState ? nextState[\"root\"] extends (InferredAst) ? s[\"branches\"][\"leftBound\"] extends {} ? comparator extends MaxComparator ? state.reduceRange : state.error> : state.reduceSingleBound : state.error, \"right\">> : never;\ndeclare const writeInvalidLimitMessage: (comparator: comparator, limit: limit, boundKind: boundKind) => writeInvalidLimitMessage;\ntype writeInvalidLimitMessage = `Comparator ${boundKind extends \"left\" ? InvertedComparators[comparator] : comparator} must be ${boundKind extends \"left\" ? \"preceded\" : \"followed\"} by a corresponding literal (was ${limit})`;\ntype BoundExpressionKind = \"left\" | \"right\";\n\ndeclare const parseBrand: (s: DynamicStateWithRoot) => void;\ntype parseBrand = ArkTypeScanner.shiftUntilNextTerminator> extends (ArkTypeScanner.shiftResult<`${infer brandName}`, infer nextUnscanned>) ? brandName extends \"\" ? state.error : state.setRoot : never;\n\ndeclare const parseDivisor: (s: DynamicStateWithRoot) => void;\ntype parseDivisor = ArkTypeScanner.shiftUntilNextTerminator> extends ArkTypeScanner.shiftResult ? scanned extends `${infer divisor extends number}` ? divisor extends 0 ? state.error> : state.setRoot : state.error> : never;\ndeclare const writeInvalidDivisorMessage: (divisor: divisor) => writeInvalidDivisorMessage;\ntype writeInvalidDivisorMessage = `% operator must be followed by a non-zero integer literal (was ${divisor})`;\n\ndeclare const parseOperator: (s: DynamicStateWithRoot) => void;\ntype parseOperator = s[\"unscanned\"] extends (ArkTypeScanner.shift) ? lookahead extends \"[\" ? unscanned extends ArkTypeScanner.shift<\"]\", infer nextUnscanned> ? state.setRoot : state.error : lookahead extends \"|\" ? unscanned extends ArkTypeScanner.shift<\">\", infer nextUnscanned> ? state.reduceBranch\", nextUnscanned> : state.reduceBranch : lookahead extends \"&\" ? state.reduceBranch : lookahead extends \")\" ? state.finalizeGroup : ArkTypeScanner.lookaheadIsFinalizing extends true ? state.finalize, lookahead & ArkTypeScanner.FinalizingLookahead> : lookahead extends ComparatorStartChar ? parseBound : lookahead extends \"%\" ? parseDivisor : lookahead extends \"#\" ? parseBrand : lookahead extends WhitespaceChar ? parseOperator, $, args> : state.error> : state.finalize;\ndeclare const writeUnexpectedCharacterMessage: (char: char, shouldBe?: shouldBe) => writeUnexpectedCharacterMessage;\ntype writeUnexpectedCharacterMessage = `'${char}' is not allowed here${shouldBe extends \"\" ? \"\" : ` (should be ${shouldBe})`}`;\ndeclare const incompleteArrayTokenMessage = \"Missing expected ']'\";\ntype incompleteArrayTokenMessage = typeof incompleteArrayTokenMessage;\n\ndeclare const parseString: (def: string, ctx: BaseParseContext) => InnerParseResult;\n/**\n * Try to parse the definition from right to left using the most common syntax.\n * This can be much more efficient for simple definitions.\n */\ntype parseString = def extends keyof $ ? resolutionToAst : def extends `${infer child}[]` ? child extends keyof $ ? [\n resolutionToAst,\n \"[]\"\n] : fullStringParse, $, args> : fullStringParse, $, args>;\ntype inferString = inferAstRoot, $, args>;\ntype BaseCompletions<$, args, otherSuggestions extends string = never> = resolvableReferenceIn<$> | resolvableReferenceIn | (keyof args & string) | StringifiablePrefixOperator | otherSuggestions;\ndeclare const fullStringParse: (s: DynamicState) => InnerParseResult;\ntype fullStringParse = extractFinalizedResult>;\ndeclare const parseUntilFinalizer: (s: DynamicState) => DynamicStateWithRoot;\ntype parseUntilFinalizer = s[\"finalizer\"] extends undefined ? parseUntilFinalizer, $, args> : s;\ndeclare const next: (s: DynamicState) => void;\ntype next = s[\"root\"] extends undefined ? parseOperand : parseOperator;\ntype extractFinalizedResult = s[\"finalizer\"] extends \"\" ? s[\"root\"] : s[\"finalizer\"] extends ErrorMessage ? s[\"finalizer\"] : s[\"finalizer\"] extends \"?\" ? [s[\"root\"], \"?\"] : s[\"finalizer\"] extends \"=\" ? parseDefault : ErrorMessage>;\n\ndeclare const parseGenericArgs: (name: string, g: GenericRoot, s: DynamicState) => BaseRoot[];\ntype parseGenericArgs = _parseGenericArgs;\ntype ParsedArgs = {\n result: result;\n unscanned: unscanned;\n};\ndeclare const _parseGenericArgs: (name: string, g: GenericRoot, s: DynamicState, argNodes: BaseRoot[]) => BaseRoot[];\ntype _parseGenericArgs = parseUntilFinalizer, $, args> extends (infer finalArgState extends StaticState) ? {\n defs: [\n ...argDefs,\n finalArgState[\"scanned\"] extends `${infer def}${\",\" | \">\"}` ? def : finalArgState[\"scanned\"]\n ];\n asts: [...argAsts, finalArgState[\"root\"]];\n unscanned: finalArgState[\"unscanned\"];\n} extends ({\n defs: infer nextDefs extends string[];\n asts: infer nextAsts extends unknown[];\n unscanned: infer nextUnscanned extends string;\n}) ? finalArgState[\"finalizer\"] extends \">\" ? nextAsts[\"length\"] extends g[\"paramsAst\"][\"length\"] ? ParsedArgs : state.error, nextDefs>> : finalArgState[\"finalizer\"] extends \",\" ? _parseGenericArgs : finalArgState[\"finalizer\"] extends ErrorMessage ? finalArgState : state.error\">> : never : never;\ndeclare const writeInvalidGenericArgCountMessage: , argDefs extends array>(name: name, params: params, argDefs: argDefs) => writeInvalidGenericArgCountMessage;\ntype writeInvalidGenericArgCountMessage, argDefs extends array> = `${name}<${join}> requires exactly ${params[\"length\"]} args (got ${argDefs[\"length\"]}${argDefs[\"length\"] extends (0) ? \"\" : `: ${join}`})`;\n\ntype validateRange = [\n l\n] extends [LimitLiteral] ? validateBound : [l] extends [[infer leftAst, Comparator, unknown]] ? ErrorMessage>> : validateBound;\ntype validateBound = inferAstRoot extends infer bounded ? isNumericallyBoundable extends true ? limit extends number ? validateAst : ErrorMessage> : [bounded] extends [Date] ? validateAst : [bounded] extends [InferredMorph] ? ErrorMessage> : ErrorMessage>> : never;\ntype isNumericallyBoundable = [\n bounded\n] extends [number] ? true : [bounded] extends [string] ? true : [bounded] extends [array] ? true : false;\ndeclare const writeDoubleRightBoundMessage: (root: root) => writeDoubleRightBoundMessage;\ntype writeDoubleRightBoundMessage = `Expression ${root} must have at most one right bound`;\n\ntype validateDefault = validateAst extends infer e extends ErrorMessage ? e : type.infer extends inferAstIn ? undefined : ErrorMessage, unitLiteral>>;\n\ntype validateDivisor = inferAstRoot extends infer data ? [\n data\n] extends [number] ? validateAst : [data] extends [InferredMorph] ? ErrorMessage> : ErrorMessage> : never;\n\ntype validateKeyof = inferAstRoot extends infer data ? [\n data\n] extends [object] ? validateAst : ErrorMessage>> : never;\n\ntype validateAst = ast extends ErrorMessage ? ast : ast extends InferredAst ? validateInferredAst : ast extends DefAst ? ast[2] extends PrivateDeclaration ? ErrorMessage> : undefined : ast extends PostfixExpression<\"[]\" | \"?\", infer operand> ? validateAst : ast extends InfixExpression ? operator extends BranchOperator ? validateInfix : operator extends Comparator ? validateRange : operator extends \"%\" ? validateDivisor : operator extends \"=\" ? validateDefault : operator extends \"#\" ? validateAst : ErrorMessage>> : ast extends [\"keyof\", infer operand] ? validateKeyof : ast extends GenericInstantiationAst ? validateGenericInstantiation : ErrorMessage>> & {\n ast: ast;\n};\ntype writeUnexpectedExpressionMessage = `Failed to parse the expression resulting from ${expression}`;\ndeclare const writePrefixedPrivateReferenceMessage: (name: name) => writePrefixedPrivateReferenceMessage;\ntype writePrefixedPrivateReferenceMessage = `Private type references should not include '#'. Use '${name}' instead.`;\ntype validateInferredAst = def extends NumberLiteral ? number extends inferred ? ErrorMessage> : undefined : def extends BigintLiteral ? bigint extends inferred ? ErrorMessage> : undefined : [inferred] extends [anyOrNever] ? undefined : def extends PrivateDeclaration ? ErrorMessage> : inferred extends Generic ? ErrorMessage> : inferred extends {\n [arkKind]: \"module\";\n} ? \"root\" extends keyof inferred ? undefined : ErrorMessage> : def extends ErrorMessage ? def : undefined;\ntype validateString = parseString extends infer ast ? validateAst extends infer result extends ErrorMessage ? result extends Completion ? text : result : def : never;\ntype validateInfix = validateAst extends infer e extends ErrorMessage ? e : validateAst extends infer e extends ErrorMessage ? e : undefined;\ndeclare const shallowOptionalMessage = \"Optional definitions like 'string?' are only valid as properties in an object or tuple\";\ntype shallowOptionalMessage = typeof shallowOptionalMessage;\ndeclare const shallowDefaultableMessage = \"Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple\";\ntype shallowDefaultableMessage = typeof shallowDefaultableMessage;\n\ntype GenericInstantiationAst = [generic, \"<>\", argAsts];\ntype inferGenericInstantiation = g[\"bodyDef\"] extends Hkt ? Hkt.apply;\n}> : inferDefinition, {\n [i in keyof g[\"names\"] & `${number}` as g[\"names\"][i]]: inferExpression, args>;\n}>;\ntype validateGenericInstantiation = validateGenericArgs;\ntype validateGenericArgs, argAsts extends array, $, args, indices extends 1[]> = argAsts extends readonly [infer arg, ...infer argsTail] ? validateAst extends infer e extends ErrorMessage ? e : inferAstRoot extends params[indices[\"length\"]][1] ? validateGenericArgs : ErrorMessage, astToString>> : undefined;\ntype resolveScope = g$ extends UnparsedScope ? $ : g$;\n\ntype inferAstRoot = ast extends array ? inferExpression : never;\ntype inferAstIn = distill.In>;\ntype DefAst = [\n def,\n \"def\",\n alias\n];\ntype InferredAst = [\n t,\n \"inferred\",\n def\n];\ntype inferExpression = ast extends array ? ast extends InferredAst ? resolution : ast extends DefAst ? inferDefinition : ast extends GenericInstantiationAst ? inferGenericInstantiation : ast[1] extends \"[]\" ? inferExpression[] : ast[1] extends \"|\" ? inferExpression | inferExpression : ast[1] extends \"&\" ? inferIntersection, inferExpression> : ast[1] extends \"|>\" ? inferPipe, inferExpression> : ast[1] extends \"=\" ? type.infer extends infer defaultValue ? withDefault, defaultValue> : never : ast[1] extends \"#\" ? type.brand, ast[2]> : ast[1] extends Comparator ? ast[0] extends LimitLiteral ? inferExpression : inferExpression : ast[1] extends \"%\" ? inferExpression : ast[1] extends \"?\" ? inferExpression : ast[0] extends \"keyof\" ? arkKeyOf> : never : never;\ntype PostfixExpression = readonly [operand, operator];\ntype InfixExpression = [l, operator, r];\n\ntype inferObjectLiteral = show<\"...\" extends keyof def ? merge, _inferObjectLiteral> : _inferObjectLiteral>;\n/**\n * Infers the contents of an object literal, ignoring a spread definition\n */\ntype _inferObjectLiteral = {\n -readonly [k in keyof def as nonOptionalKeyFromEntry]: inferDefinition;\n} & {\n -readonly [k in keyof def as optionalKeyFromEntry]?: def[k] extends OptionalPropertyDefinition ? inferDefinition : inferDefinition;\n};\ntype validateObjectLiteral = {\n [k in keyof def]: preparseKey extends (infer parsedKey extends PreparsedKey) ? parsedKey extends PreparsedEntryKey<\"index\"> ? validateString extends (ErrorMessage) ? ErrorType : inferDefinition extends Key ? validateProperty : ErrorMessage> : validateProperty : never;\n};\ntype nonOptionalKeyFromEntry = preparseKey extends infer parsedKey ? parsedKey extends PreparsedEntryKey<\"required\"> ? [\n v\n] extends [OptionalPropertyDefinition] ? [\n v\n] extends [anyOrNever] ? parsedKey[\"normalized\"] : never : parsedKey[\"normalized\"] : parsedKey extends PreparsedEntryKey<\"index\"> ? inferDefinition & Key : never : never;\ntype optionalKeyFromEntry = preparseKey extends infer parsedKey ? parsedKey extends PreparsedEntryKey<\"optional\"> ? parsedKey[\"normalized\"] : v extends OptionalPropertyDefinition ? k : never : never;\ntype normalizedKeyKind = kind extends \"index\" ? string : Key;\ntype PreparsedEntryKey = normalizedKeyKind> = {\n kind: kind;\n normalized: normalized;\n};\ntype PreparsedSpecialKey = {\n kind: kind;\n};\ntype PreparsedKey = PreparsedEntryKey | PreparsedSpecialKey;\ndeclare namespace PreparsedKey {\n type from = t;\n}\ntype ParsedKeyKind = EntryKeyKind | SpecialKeyKind;\ntype EntryKeyKind = \"required\" | \"optional\" | \"index\";\ntype SpecialKeyKind = \"spread\" | \"undeclared\";\ntype MetaKey = \"...\" | \"+\";\ntype IndexKey = `[${def}]`;\ndeclare const preparseKey: (key: Key) => PreparsedKey;\ntype preparseKey = k extends symbol ? PreparsedKey.from<{\n kind: \"required\";\n normalized: k;\n}> : k extends `${infer inner}?` ? inner extends `${infer baseName}${EscapeChar}` ? PreparsedKey.from<{\n kind: \"required\";\n normalized: `${baseName}?`;\n}> : PreparsedKey.from<{\n kind: \"optional\";\n normalized: inner;\n}> : k extends \"+\" ? {\n kind: \"undeclared\";\n} : k extends \"...\" ? {\n kind: \"spread\";\n} : k extends `${EscapeChar}${infer escapedMeta extends MetaKey}` ? PreparsedKey.from<{\n kind: \"required\";\n normalized: escapedMeta;\n}> : k extends IndexKey ? PreparsedKey.from<{\n kind: \"index\";\n normalized: def;\n}> : PreparsedKey.from<{\n kind: \"required\";\n normalized: k extends (`${EscapeChar}${infer escapedIndexKey extends IndexKey}`) ? escapedIndexKey : k extends Key ? k : `${k & number}`;\n}>;\ndeclare const writeInvalidSpreadTypeMessage: (def: def) => writeInvalidSpreadTypeMessage;\ntype writeInvalidSpreadTypeMessage = `Spread operand must resolve to an object literal type (was ${def})`;\n\ntype ParsedOptionalProperty = readonly [BaseRoot, \"?\"];\ntype validateProperty = [\n def\n] extends [anyOrNever] ? \n/** this extra [anyOrNever] check is required to ensure that nested `type` invocations\n * like the following are not prematurely validated by the outer call:\n *\n * ```ts\n * type({\n * \t\"test?\": type(\"string\").pipe(x => x === \"true\")\n * })\n * ```\n */\ndef : keyKind extends \"spread\" ? def extends validateInnerDefinition ? inferDefinition extends object ? def : ErrorType>>> : validateInnerDefinition : keyKind extends \"undeclared\" ? UndeclaredKeyBehavior : keyKind extends \"required\" ? validateInnerDefinition : def extends OptionalPropertyDefinition ? ErrorMessage : isDefaultable extends true ? ErrorMessage : validateInnerDefinition;\ntype isDefaultable = def extends DefaultablePropertyTuple ? true : def extends PossibleDefaultableStringDefinition ? parseString extends DefaultablePropertyTuple ? true : false : false;\ntype OptionalPropertyDefinition = OptionalPropertyTuple | OptionalPropertyString;\ntype OptionalPropertyString = `${baseDef}?`;\ntype OptionalPropertyTuple = readonly [baseDef, \"?\"];\ntype PossibleDefaultableStringDefinition = `${string}=${string}`;\ntype DefaultablePropertyTuple = readonly [baseDef, \"=\", thunkableProperty];\ndeclare const invalidOptionalKeyKindMessage = \"Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }\";\ntype invalidOptionalKeyKindMessage = typeof invalidOptionalKeyKindMessage;\ndeclare const invalidDefaultableKeyKindMessage = \"Only required keys may specify default values, e.g. { value: 'number = 0' }\";\ntype invalidDefaultableKeyKindMessage = typeof invalidDefaultableKeyKindMessage;\n\ninterface ArkScopeConfig extends ArkSchemaScopeConfig {\n}\ninterface ScopeParser {\n (def: scope.validate, config?: ArkScopeConfig): Scope>;\n define: (def: scope.validate) => def;\n}\ntype ModuleParser = (def: scope.validate, config?: ArkScopeConfig) => scope.infer extends infer $ ? Module<{\n [k in exportedNameOf<$>]: $[k];\n}> : never;\ntype bindThis = {\n this: Def;\n};\n/** nominal type for an unparsed definition used during scope bootstrapping */\ntype Def = Brand;\n/** sentinel indicating a scope that will be associated with a generic has not yet been parsed */\ntype UnparsedScope = \"$\";\n/** These are legal as values of a scope but not as definitions in other contexts */\ntype PreparsedResolution = PreparsedNodeResolution;\ntype bootstrapAliases = {\n [k in Exclude]: def[k] extends (PreparsedResolution) ? def[k] extends {\n t: infer g extends GenericAst;\n } ? g : def[k] extends Module | BoundModule ? Submodule<$> : def[k] : def[k] extends (() => infer thunkReturn extends PreparsedResolution) ? thunkReturn extends {\n t: infer g extends GenericAst;\n } ? g : thunkReturn extends Module | BoundModule ? Submodule<$> : thunkReturn : Def;\n} & {\n [k in keyof def & GenericDeclaration as extractGenericName]: GenericAst, bootstrapAliases>, def[k], UnparsedScope>;\n};\ntype inferBootstrapped<$> = {\n [name in keyof $]: $[name] extends Def ? inferDefinition : $[name] extends {\n t: infer g extends GenericAst;\n } ? bindGenericToScope : $[name];\n} & unknown;\ntype bindGenericToScope = GenericAst;\ntype extractGenericName = k extends GenericDeclaration ? name : never;\ntype extractGenericParameters = k extends `${string}<${infer params}>` ? ParameterString : never;\ntype resolutionToAst = [\n resolution\n] extends [anyOrNever] ? InferredAst : resolution extends Def ? DefAst : resolution extends {\n [arkKind]: \"module\";\n root: infer root;\n} ? InferredAst : resolution extends GenericAst ? resolution : InferredAst;\ninterface InternalScope {\n constructor: typeof InternalScope;\n}\ndeclare class InternalScope<$ extends {} = {}> extends BaseScope<$> {\n get ambientAttachments(): Ark.boundTypeAttachments<$> | undefined;\n protected preparseOwnAliasEntry(alias: string, def: unknown): AliasDefEntry;\n parseGenericParams(def: string, opts: BaseParseOptions): array;\n protected normalizeRootScopeValue(resolution: unknown): unknown;\n protected preparseOwnDefinitionFormat(def: unknown, opts: BaseParseOptions): BaseRoot | BaseParseContextInput;\n parseOwnDefinitionFormat(def: unknown, ctx: BaseParseContext): BaseRoot;\n unit: UnitTypeParser<$>;\n valueOf: ValueOfTypeParser<$>;\n enumerated: EnumeratedTypeParser<$>;\n instanceOf: InstanceOfTypeParser<$>;\n or: NaryUnionParser<$>;\n and: NaryIntersectionParser<$>;\n merge: NaryMergeParser<$>;\n pipe: NaryPipeParser<$>;\n match: InternalMatchParser;\n declare: () => {\n type: InternalTypeParser;\n };\n define(def: def): def;\n type: InternalTypeParser;\n static scope: ScopeParser;\n static module: ModuleParser;\n}\ndeclare const scope: ScopeParser;\ndeclare namespace scope {\n type validate = {\n [k in keyof def]: k extends noSuggest ? unknown : parseScopeKey[\"params\"] extends infer params ? params extends array ? params[\"length\"] extends 0 ? def[k] extends type.Any | PreparsedResolution ? def[k] : k extends (PrivateDeclaration) ? ErrorType> : type.validate, {}> : type.validate, baseGenericConstraints> : params : never;\n };\n type infer = inferBootstrapped>;\n}\ninterface ScopeConstructor {\n new <$ = {}>(...args: ConstructorParameters): Scope<$>;\n scope: ScopeParser;\n module: ModuleParser;\n}\ninterface Scope<$ = {}> {\n t: $;\n [arkKind]: \"scope\";\n config: ArkScopeConfig;\n references: readonly BaseNode[];\n json: JsonStructure;\n exportedNames: array>;\n /** The set of names defined at the root-level of the scope mapped to their\n * corresponding definitions.**/\n aliases: Record;\n internal: toInternalScope<$>;\n defineSchema(schema: def): def;\n node>(kinds: kinds, schema: NodeSchema>, opts?: BaseParseOptions): nodeOfKind>>;\n unit: UnitTypeParser<$>;\n enumerated: EnumeratedTypeParser<$>;\n valueOf: ValueOfTypeParser<$>;\n instanceOf: InstanceOfTypeParser<$>;\n type: TypeParser<$>;\n match: MatchParser<$>;\n declare: DeclarationParser<$>;\n define: DefinitionParser<$>;\n generic: GenericParser<$>;\n schema: SchemaParser<$>;\n import(): Module<{\n [k in exportedNameOf<$> as PrivateDeclaration]: $[k];\n }>;\n import[]>(...names: names): BoundModule<{\n [k in names[number] as PrivateDeclaration]: $[k];\n } & unknown, $>;\n export(): Module<{\n [k in exportedNameOf<$>]: $[k];\n }>;\n export[]>(...names: names): BoundModule<{\n [k in names[number]]: $[k];\n } & unknown, $>;\n resolve>(name: name): instantiateExport<$[name], $>;\n}\ndeclare const Scope: ScopeConstructor;\ntype parseScopeKey = k extends `${infer name}<${infer params}>` ? parseGenericScopeKey : {\n name: k;\n params: [];\n};\ntype parseGenericScopeKey = {\n name: name;\n params: parseGenericParams>;\n};\ntype InnerParseResult = BaseRoot | ParsedOptionalProperty | ParsedDefaultableProperty;\n\ntype maybeValidateTupleExpression = def extends IndexZeroExpression ? validatePrefixExpression : def extends IndexOneExpression ? validateIndexOneExpression : def extends (readonly [\"\", ...unknown[]] | readonly [unknown, \"\", ...unknown[]]) ? readonly [\n def[0] extends \"\" ? BaseCompletions<$, args, IndexZeroOperator | \"...\"> : def[0],\n def[1] extends \"\" ? BaseCompletions<$, args, IndexOneOperator | \"...\"> : def[1]\n] : null;\ntype inferTupleExpression = def[1] extends \"[]\" ? inferDefinition[] : def[1] extends \"?\" ? inferDefinition : def[1] extends \"&\" ? inferIntersection, inferDefinition> : def[1] extends \"|\" ? inferDefinition | inferDefinition : def[1] extends \":\" ? inferPredicate, def[2]> : def[1] extends \"=>\" ? parseMorph : def[1] extends \"|>\" ? parseTo : def[1] extends \"=\" ? withDefault, unwrapDefault> : def[1] extends \"@\" ? inferDefinition : def extends readonly [\"===\", ...infer values] ? values[number] : def extends (readonly [\"instanceof\", ...infer constructors extends Constructor[]]) ? InstanceType : def[0] extends \"keyof\" ? inferKeyOfExpression : never;\ntype validatePrefixExpression = def[\"length\"] extends 1 ? readonly [writeMissingRightOperandMessage] : def[0] extends \"keyof\" ? readonly [def[0], validateDefinition] : def[0] extends \"===\" ? readonly [def[0], ...unknown[]] : def[0] extends \"instanceof\" ? readonly [def[0], ...Constructor[]] : never;\ntype validateIndexOneExpression = def[1] extends TuplePostfixOperator ? readonly [validateDefinition, def[1]] : readonly [\n validateDefinition,\n def[\"length\"] extends 2 ? writeMissingRightOperandMessage : def[1],\n def[1] extends \"|\" ? validateDefinition : def[1] extends \"&\" ? validateDefinition : def[1] extends \":\" ? Predicate> : def[1] extends \"=>\" ? Morph> : def[1] extends \"|>\" ? validateDefinition : def[1] extends \"=\" ? defaultFor> : def[1] extends \"@\" ? TypeMeta.MappableInput : validateDefinition\n];\ntype inferKeyOfExpression = show>;\ntype TupleExpression = IndexZeroExpression | IndexOneExpression;\ntype ArgTwoOperator = Exclude;\ntype parseTo = inferPipe, inferDefinition>;\ntype parseMorph = morph extends Morph ? inferMorphOut extends infer out ? (In: distill.In>) => Out : never : never;\ntype IndexOneExpression = readonly [unknown, token, ...unknown[]];\ntype IndexOneParser = (def: IndexOneExpression, ctx: BaseParseContext) => BaseRoot;\ndeclare const postfixParsers: {\n \"?\": IndexOneParser<\"?\">;\n \"[]\": IndexOneParser<\"[]\">;\n};\ntype TuplePostfixOperator = keyof typeof postfixParsers;\ndeclare const infixParsers: {\n \"|\": IndexOneParser<\"|\">;\n \"=\": IndexOneParser<\"=\">;\n \"|>\": IndexOneParser<\"|>\">;\n \"&\": IndexOneParser<\"&\">;\n \"=>\": IndexOneParser<\"=>\">;\n \":\": IndexOneParser<\":\">;\n \"@\": IndexOneParser<\"@\">;\n};\ntype TupleInfixOperator = keyof typeof infixParsers;\ndeclare const indexOneParsers: {\n \"|\": IndexOneParser<\"|\">;\n \"=\": IndexOneParser<\"=\">;\n \"|>\": IndexOneParser<\"|>\">;\n \"&\": IndexOneParser<\"&\">;\n \"=>\": IndexOneParser<\"=>\">;\n \":\": IndexOneParser<\":\">;\n \"@\": IndexOneParser<\"@\">;\n \"?\": IndexOneParser<\"?\">;\n \"[]\": IndexOneParser<\"[]\">;\n};\ntype IndexOneOperator = keyof typeof indexOneParsers;\ntype IndexZeroParser = (def: IndexZeroExpression, ctx: BaseParseContext) => BaseRoot;\ntype IndexZeroExpression = readonly [\n token,\n ...unknown[]\n];\ndeclare const indexZeroParsers: {\n keyof: IndexZeroParser<\"keyof\">;\n instanceof: IndexZeroParser<\"instanceof\">;\n \"===\": IndexZeroParser<\"===\">;\n};\ntype IndexZeroOperator = keyof typeof indexZeroParsers;\n\ntype validateTupleLiteral = parseSequence extends infer s extends SequenceParseState ? Readonly : never;\ntype inferTupleLiteral = parseSequence extends infer s extends SequenceParseState ? s[\"inferred\"] : never;\ntype SequencePhase = satisfy;\ndeclare namespace SequencePhase {\n type prefix = \"prefix\";\n type optionals = \"optionals\";\n type defaultables = \"defaultables\";\n type postfix = \"postfix\";\n}\ntype SequenceParseState = {\n unscanned: array;\n inferred: array;\n validated: array;\n phase: SequencePhase;\n};\ntype parseSequence = parseNextElement<{\n unscanned: def;\n inferred: [];\n validated: [];\n phase: SequencePhase.prefix;\n}, $, args>;\ntype PreparsedElementKind = \"required\" | SequencePhase.optionals | SequencePhase.defaultables;\ntype PreparsedElement = {\n head: unknown;\n tail: array;\n inferred: unknown;\n validated: unknown;\n kind: PreparsedElementKind;\n spread: boolean;\n};\ndeclare namespace PreparsedElement {\n type from = result;\n type required = \"required\";\n type optionals = \"optionals\";\n type defaultables = \"defaultables\";\n}\ntype preparseNextState = s[\"unscanned\"] extends readonly [\"...\", infer head, ...infer tail] ? preparseNextElement : s[\"unscanned\"] extends readonly [infer head, ...infer tail] ? preparseNextElement : null;\ntype preparseNextElement = PreparsedElement.from<{\n head: head;\n tail: tail;\n inferred: inferDefinition;\n validated: validateInnerDefinition;\n kind: head extends OptionalPropertyDefinition ? PreparsedElement.optionals : head extends DefaultablePropertyTuple ? PreparsedElement.defaultables : isDefaultable extends true ? PreparsedElement.defaultables : PreparsedElement.required;\n spread: spread;\n}>;\ntype parseNextElement = preparseNextState extends infer next extends PreparsedElement ? parseNextElement<{\n unscanned: next[\"tail\"];\n inferred: nextInferred;\n validated: nextValidated;\n phase: next[\"kind\"] extends (SequencePhase.optionals | SequencePhase.defaultables) ? next[\"kind\"] : number extends nextInferred[\"length\"] ? s[\"phase\"] : SequencePhase.prefix;\n}, $, args> : s;\ntype nextInferred = next[\"spread\"] extends true ? [\n ...s[\"inferred\"],\n ...conform\n] : next[\"kind\"] extends SequencePhase.optionals ? [\n ...s[\"inferred\"],\n next[\"inferred\"]?\n] : [...s[\"inferred\"], next[\"inferred\"]];\ntype nextValidated = [\n ...s[\"validated\"],\n ...nextValidatedSpreadOperatorIfPresent,\n nextValidatedElement\n];\ntype nextValidatedSpreadOperatorIfPresent = next[\"spread\"] extends true ? [\n next[\"inferred\"] extends infer spreadOperand extends array ? [\n number,\n number\n ] extends ([\n s[\"inferred\"][\"length\"],\n spreadOperand[\"length\"]\n ]) ? ErrorMessage : \"...\" : ErrorMessage>\n] : [];\ntype nextValidatedElement = next[\"kind\"] extends SequencePhase.optionals ? next[\"spread\"] extends true ? ErrorMessage : s[\"phase\"] extends SequencePhase.postfix ? ErrorMessage : next[\"validated\"] : next[\"kind\"] extends SequencePhase.defaultables ? next[\"spread\"] extends true ? ErrorMessage : s[\"phase\"] extends SequencePhase.optionals ? ErrorMessage : s[\"phase\"] extends SequencePhase.postfix ? ErrorMessage : next[\"validated\"] : [s[\"phase\"], next[\"spread\"]] extends ([\n SequencePhase.optionals | SequencePhase.defaultables,\n false\n]) ? ErrorMessage : next[\"validated\"];\ndeclare const writeNonArraySpreadMessage: (operand: operand) => writeNonArraySpreadMessage;\ntype writeNonArraySpreadMessage = `Spread element must be an array${operand extends string ? ` (was ${operand})` : \"\"}`;\ndeclare const multipleVariadicMesage = \"A tuple may have at most one variadic element\";\ntype multipleVariadicMessage = typeof multipleVariadicMesage;\ndeclare const optionalOrDefaultableAfterVariadicMessage = \"An optional element may not follow a variadic element\";\ntype optionalOrDefaultableAfterVariadicMessage = typeof optionalOrDefaultableAfterVariadicMessage;\ndeclare const spreadOptionalMessage = \"A spread element cannot be optional\";\ntype spreadOptionalMessage = typeof spreadOptionalMessage;\ndeclare const spreadDefaultableMessage = \"A spread element cannot have a default\";\ntype spreadDefaultableMessage = typeof spreadDefaultableMessage;\ndeclare const defaultablePostOptionalMessage = \"A defaultable element may not follow an optional element without a default\";\ntype defaultablePostOptionalMessage = typeof defaultablePostOptionalMessage;\n\ntype inferDefinition = [\n def\n] extends [anyOrNever] ? def : def extends type.cast ? ifEmptyObjectLiteral : def extends ThunkCast ? t : def extends string ? inferString : def extends array ? inferTuple : def extends RegExp ? string : def extends object ? inferObjectLiteral : never;\ntype validateDefinition = null extends undefined ? ErrorMessage<`'strict' or 'strictNullChecks' must be set to true in your tsconfig's 'compilerOptions'`> : [def] extends [anyOrNever] ? def : def extends OptionalPropertyDefinition ? ErrorMessage : isDefaultable extends true ? ErrorMessage : validateInnerDefinition;\ntype validateInnerDefinition = [\n def\n] extends [Terminal] ? def : def extends string ? validateString : def extends BadDefinitionType ? ErrorMessage>> : unknown extends def ? BaseCompletions<$, args> | {} : def extends readonly unknown[] ? validateTuple : validateObjectLiteral;\ntype validateTuple = maybeValidateTupleExpression extends infer result ? result extends null ? validateTupleLiteral : result : never;\ntype inferTuple = def extends TupleExpression ? inferTupleExpression : inferTupleLiteral;\ntype validateDeclared = def extends type.validate ? validateInference : type.validate;\ntype validateInference = def extends RegExp | type.cast | ThunkCast | TupleExpression ? validateShallowInference : def extends array ? declared extends array ? {\n [i in keyof declared]: i extends keyof def ? validateInference : declared[i];\n} : show> : def extends object ? show<{\n [k in requiredKeyOf]: k extends keyof def ? validateInference : declared[k];\n} & {\n [k in optionalKeyOf & string as `${k}?`]: `${k}?` extends (keyof def) ? validateInference, $, args> : declared[k];\n}> : validateShallowInference;\ntype validateShallowInference = equals, declared> extends true ? def : show>;\ntype declarationMismatch = {\n declared: declared;\n inferred: inferDefinition;\n};\ntype Terminal = type.cast | Fn | RegExp;\ntype ThunkCast = () => type.cast;\ntype BadDefinitionType = Exclude;\ndeclare const writeBadDefinitionTypeMessage: (actual: actual) => writeBadDefinitionTypeMessage;\ntype writeBadDefinitionTypeMessage = `Type definitions must be strings or objects (was ${actual})`;\n\n/** The convenience properties attached to `type` */\ntype TypeParserAttachments = Omit;\ninterface TypeParser<$ = {}> extends Ark.boundTypeAttachments<$> {\n /**\n * Create a {@link Type} from your definition.\n *\n * @example const Person = type({ name: \"string\" })\n */\n >(def: type.validate): r extends infer _ ? _ : never;\n /**\n * Create a {@link Generic} from a parameter string and body definition.\n *\n * @param params A string like \"\" specifying the\n * {@link Generic}'s parameters and any associated constraints via `extends`.\n *\n * @param def The definition for the body of the {@link Generic}. Can reference the\n * parameter names specified in the previous argument in addition to aliases\n * from its {@link Scope}.\n *\n * @example const BoxOf = type(\"\", { contents: \"t\" })\n */\n , def, $>>(params: validateParameterString, def: type.validate>>): r extends infer _ ? _ : never;\n /**\n * Create a {@link Type} from a [tuple expression](http://localhost:3000/docs/expressions)\n * spread as this function's arguments.\n *\n * @example type(\"string\", \"|\", { foo: \"number\" })\n */\n >(_0: zero extends IndexZeroOperator ? zero : type.validate, _1: zero extends \"keyof\" ? type.validate : zero extends \"instanceof\" ? conform : zero extends \"===\" ? conform : conform, ..._2: zero extends \"===\" ? rest : zero extends \"instanceof\" ? conform : one extends TupleInfixOperator ? one extends \":\" ? [Predicate>>] : one extends \"=>\" ? [Morph>, unknown>] : one extends \"|>\" ? [type.validate] : one extends \"@\" ? [TypeMeta.MappableInput] : [type.validate] : []): r extends infer _ ? _ : never;\n /**\n * An alias of the {@link ArkErrors} class, an instance of which is returned when a {@link Type}\n * is invoked with invalid input.\n *\n * @example\n * const out = myType(data)\n *\n * if(out instanceof type.errors) console.log(out.summary)\n *\n */\n errors: typeof ArkErrors;\n hkt: typeof Hkt;\n keywords: typeof keywords;\n /**\n * The {@link Scope} in which definitions passed to this function will be parsed.\n */\n $: Scope<$>;\n /**\n * An alias of `type` with no type-level validation or inference.\n *\n * Useful when wrapping `type` or using it to parse a dynamic definition.\n */\n raw(def: unknown): Type;\n module: ModuleParser;\n scope: ScopeParser;\n define: DefinitionParser<$>;\n generic: GenericParser<$>;\n match: MatchParser<$>;\n schema: SchemaParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value strictly equal (`===`) to the argument passed to this function.\n * @example const foo = type.unit('foo') // {@link Type}<'foo'>\n * @example const sym: unique symbol = Symbol(); type.unit(sym) // {@link Type}\n */\n unit: UnitTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value strictly equal (`===`) to one of the arguments passed to this function.\n * @example const enum = type.enumerated('foo', 'bar', obj) // obj is a by-reference object\n * @example const TupleForm = type(['===', 'foo', 'bar', obj])\n * @example const ArgsForm = type('===', 'foo', 'bar', obj)\n */\n enumerated: EnumeratedTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by one of the Object.values() of the argument passed to this function.\n *\n * ⚠️ For TypeScript enum compatibility, values at numeric keys with corresponding numeric values will not be included.\n * @example const myEnum = type.valueOf(myTsEnum)\n */\n valueOf: ValueOfTypeParser<$>;\n /**\n * Create a {@link Type} that is satisfied only by a value of a specific class.\n * @example const array = type.instanceOf(Array)\n */\n instanceOf: InstanceOfTypeParser<$>;\n /**\n * Create a {@link Type} from a union of definitions\n * @example const T = type.or(\"string\", \"number\")\n */\n or: NaryUnionParser<$>;\n /**\n * Create a {@link Type} from an intersection of definitions\n * @example const T = type.and({ a: \"1\" }, { b: \"2\" })\n */\n and: NaryIntersectionParser<$>;\n /**\n * Create a {@link Type} by merging object definitions, with later\n * definitions having precedence for overlapping keys\n * @example\n * // Type<{ a: \"3\", b: \"2\", c: \"4\" }>\n * const T = type.merge({ a: \"1\", b: \"2\" }, { a: \"3\", c: \"4\" })\n */\n merge: NaryMergeParser<$>;\n /**\n * Create a {@link Type} from a set of morphs (including Types)\n * @example\n * // Type<(In: string) => To>\n * const T = type.pipe(type.string, s => JSON.parse(s), type.object)\n */\n pipe: NaryPipeParser<$>;\n}\ndeclare class InternalTypeParser extends Callable<(...args: unknown[]) => BaseRoot | Generic, TypeParserAttachments> {\n constructor($: InternalScope);\n}\ntype DeclarationParser<$> = () => {\n type: (def: validateDeclared>) => Type$1;\n};\ntype UnitTypeParser<$> = (value: t) => Type$1;\ntype InstanceOfTypeParser<$> = (ctor: Constructor) => Type$1;\ntype EnumeratedTypeParser<$> = (...values: values) => Type$1;\ntype ValueOfTypeParser<$> = (o: o) => Type$1;\ntype DefinitionParser<$> = (def: type.validate) => def;\ntype SchemaParser<$> = (schema: RootSchema, opts?: BaseParseOptions) => Type$1;\ntype TypeConstructor = new (def: unknown, $: Scope<$>) => Type$1;\ntype Type$1 = instantiateType;\ndeclare const Type$1: TypeConstructor;\n\ntype NaryUnionParser<$> = {\n (): Type$1;\n , $>>(a: type.validate): r extends infer _ ? _ : never;\n | type.infer, $>>(a: type.validate, b: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate): r extends infer _ ? _ : never;\n | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer | type.infer, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate, q: type.validate): r extends infer _ ? _ : never;\n , $>>(...defs: {\n [i in keyof defs]: type.validate;\n }): r extends infer _ ? _ : never;\n};\ntype NaryIntersectionParser<$> = {\n (): Type$1;\n , $>>(a: type.validate): r extends infer _ ? _ : never;\n , type.infer>, $>>(a: type.validate, b: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate): r extends infer _ ? _ : never;\n ,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer,\n type.infer\n ]>, $>>(a: type.validate, b: type.validate, c: type.validate, d: type.validate, e: type.validate, f: type.validate, g: type.validate, h: type.validate, i: type.validate, j: type.validate, k: type.validate, l: type.validate, m: type.validate, n: type.validate, o: type.validate, p: type.validate, q: type.validate): r extends infer _ ? _ : never;\n ;\n }>, $>>(...defs: {\n [i in keyof defs]: type.validate;\n }): r extends infer _ ? _ : never;\n};\ntype NaryMergeParser<$> = {\n (): Type$1;\n , r = Type$1>(a: type.validate & (inferredA extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType<\"Merged type must be an object\", [actual: inferredB]>)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, inferredP = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType), p: type.validate & (inferredP extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n , inferredB = type.infer, inferredC = type.infer, inferredD = type.infer, inferredE = type.infer, inferredF = type.infer, inferredG = type.infer, inferredH = type.infer, inferredI = type.infer, inferredJ = type.infer, inferredK = type.infer, inferredL = type.infer, inferredM = type.infer, inferredN = type.infer, inferredO = type.infer, inferredP = type.infer, inferredQ = type.infer, r = Type$1, $>>(a: type.validate & (inferredA extends object ? unknown : ErrorType), b: type.validate & (inferredB extends object ? unknown : ErrorType), c: type.validate & (inferredC extends object ? unknown : ErrorType), d: type.validate & (inferredD extends object ? unknown : ErrorType), e: type.validate & (inferredE extends object ? unknown : ErrorType), f: type.validate & (inferredF extends object ? unknown : ErrorType), g: type.validate & (inferredG extends object ? unknown : ErrorType), h: type.validate & (inferredH extends object ? unknown : ErrorType), i: type.validate & (inferredI extends object ? unknown : ErrorType), j: type.validate & (inferredJ extends object ? unknown : ErrorType), k: type.validate & (inferredK extends object ? unknown : ErrorType), l: type.validate & (inferredL extends object ? unknown : ErrorType), m: type.validate & (inferredM extends object ? unknown : ErrorType), n: type.validate & (inferredN extends object ? unknown : ErrorType), o: type.validate & (inferredO extends object ? unknown : ErrorType), p: type.validate & (inferredP extends object ? unknown : ErrorType), q: type.validate & (inferredQ extends object ? unknown : ErrorType)): r extends infer _ ? _ : never;\n ;\n }>, $>>(...defs: {\n [i in keyof defs]: type.validate & (type.infer extends object ? unknown : ErrorType\n ]>);\n }): r extends infer _ ? _ : never;\n};\ntype NaryPipeParser<$, initial = unknown> = {\n (): Type$1;\n >, r = instantiateType, $>>(a: a): r extends infer _ ? _ : never;\n >, b extends Morph>, r = instantiateType, a, b]>, $>>(a: a, b: b): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, r = instantiateType, a, b, c]>, $>>(a: a, b: b, c: c): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, r = instantiateType, a, b, c, d]>, $>>(a: a, b: b, c: c, d: d): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, r = instantiateType, a, b, c, d, e]>, $>>(a: a, b: b, c: c, d: d, e: e): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, r = instantiateType, a, b, c, d, e, f]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, r = instantiateType, a, b, c, d, e, f, g]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l, m]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, r = instantiateType, a, b, c, d, e, f, g, h, i, j, k, l, m, n]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, p extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o,\n p\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o, p: p): r extends infer _ ? _ : never;\n >, b extends Morph>, c extends Morph>, d extends Morph>, e extends Morph>, f extends Morph>, g extends Morph>, h extends Morph>, i extends Morph>, j extends Morph>, k extends Morph>, l extends Morph>, m extends Morph>, n extends Morph>, o extends Morph>, p extends Morph>, q extends Morph>, r = instantiateType,\n a,\n b,\n c,\n d,\n e,\n f,\n g,\n h,\n i,\n j,\n k,\n l,\n m,\n n,\n o,\n p,\n q\n ]>, $>>(a: a, b: b, c: c, d: d, e: e, f: f, g: g, h: h, i: i, j: j, k: k, l: l, m: m, n: n, o: o, p: p, q: q): r extends infer _ ? _ : never;\n , $>>(...defs: morphs): r extends infer _ ? _ : never;\n};\n\n/** @ts-ignore cast variance */\ninterface Inferred {\n internal: BaseRoot;\n [inferred]: t;\n /**\n * precompiled JS used to optimize validation\n *\n * ⚠️ will be `undefined` in [jitless](https://arktype.io/docs/configuration#jitless) mode\n */\n precompilation: string | undefined;\n /**\n * generic parameter representing this Type\n *\n * @typeonly\n *\n * ⚠️ May contain types representing morphs or default values that would\n * be inaccurate if used directly for runtime values. In those cases,\n * you should use {@link infer} or {@link inferIn} on this object instead.\n */\n t: t;\n /**\n * #### {@link Scope} in which chained methods are parsed\n */\n $: Scope<$>;\n /**\n * #### type of output this returns\n *\n * @typeonly\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type ParsedNumber = typeof parseNumber.infer // number\n */\n infer: this[\"inferOut\"];\n /**\n * type of output this returns\n *\n * 🔗 alias of {@link infer}\n * @typeonly\n *\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type ParsedNumber = typeof parseNumber.infer // number\n */\n inferOut: distill.Out;\n /**\n * type of output that can be introspected at runtime (e.g. via {@link out})\n *\n * ⚠️ If your Type contains morphs, they will be inferred as `unknown` unless\n * they are an ArkType keyword or have an explicitly defined output validator.\n *\n * @typeonly\n *\n * @example\n * const Unmorphed = type(\"string\")\n * // with no morphs, we can introspect the input and output as a single Type\n * type UnmorphedOut = typeof Unmorphed.inferIntrospectableOut // string\n *\n * const Morphed = type(\"string\").pipe(s => s.length)\n * // with a standard user-defined morph, TypeScript can infer a\n * // return type from your function, but we have no way to\n * // know the shape at runtime\n * type MorphOut = typeof Morphed.inferIntrospectableOut // unknown\n *\n * const Validated = type(\"string\").pipe(s => s.length).to(\"number\")\n * // morphs with validated output, including all morph keywords, are introspectable\n * type ValidatedMorphOut = typeof Validated.inferIntrospectableOut\n */\n inferIntrospectableOut: distill.introspectable.Out;\n /**\n * #### type of input this allows\n *\n * @typeonly\n *\n * @example\n * const parseNumber = type(\"string\").pipe(s => Number.parseInt(s))\n * type UnparsedNumber = typeof parseNumber.inferIn // string\n */\n inferIn: distill.In;\n /**\n * #### internal JSON representation\n */\n json: JsonStructure;\n /**\n * alias of {@link json} for `JSON.stringify` compatibility\n */\n toJSON(): JsonStructure;\n /**\n * #### generate a JSON Schema\n *\n * @throws {ToJsonSchema.Error} if this cannot be converted to JSON Schema\n */\n toJsonSchema(options?: ToJsonSchema.Options): JsonSchema;\n /**\n * #### metadata like custom descriptions and error messages\n *\n * ✅ type {@link https://arktype.io/docs/configuration#custom | can be customized} for your project\n */\n meta: ArkAmbient.meta;\n /**\n * #### human-readable English description\n *\n * ✅ works best for primitive values\n *\n * @example\n * const N = type(\"0 < number <= 100\")\n * console.log(N.description) // positive and at most 100\n */\n description: string;\n /**\n * #### syntax string similar to native TypeScript\n *\n * ✅ works well for both primitives and structures\n *\n * @example\n * const Loc = type({ coords: [\"number\", \"number\"] })\n * console.log(Loc.expression) // { coords: [number, number] }\n */\n expression: string;\n /**\n * #### validate and return transformed data or throw\n *\n * ✅ sugar to avoid checking for {@link type.errors} if they are unrecoverable\n *\n * @example\n * const CriticalPayload = type({\n * superImportantValue: \"string\"\n * })\n * // throws TraversalError: superImportantValue must be a string (was missing)\n * const data = CriticalPayload.assert({ irrelevantValue: \"whoops\" })\n * console.log(data.superImportantValue) // valid output can be accessed directly\n *\n * @throws {TraversalError}\n */\n assert(data: unknown): this[\"infer\"];\n /**\n * #### check input without applying morphs\n *\n * ✅ good for stuff like filtering that doesn't benefit from detailed errors\n *\n * @example\n * const Numeric = type(\"number | bigint\")\n * // [0, 2n]\n * const numerics = [0, \"one\", 2n].filter(Numeric.allows)\n */\n allows(data: unknown): data is this[\"inferIn\"];\n /**\n * #### add metadata to shallow references\n *\n * ⚠️ does not affect error messages within properties of an object\n *\n * @example\n * const NotOdd = type(\"number % 2\").configure({ description: \"not odd\" })\n * // all constraints at the root are affected\n * const odd = NotOdd(3) // must be not odd (was 3)\n * const nonNumber = NotOdd(\"two\") // must be not odd (was \"two\")\n *\n * const NotOddBox = type({\n * // we should have referenced notOdd or added meta here\n * notOdd: \"number % 2\",\n * // but instead chained from the root object\n * }).configure({ description: \"not odd\" })\n * // error message at path notOdd is not affected\n * const oddProp = NotOddBox({ notOdd: 3 }) // notOdd must be even (was 3)\n * // error message at root is affected, leading to a misleading description\n * const nonObject = NotOddBox(null) // must be not odd (was null)\n */\n configure: NodeSelector.SelectableFn;\n /**\n * #### add description to shallow references\n *\n * 🔗 equivalent to `.configure({ description })` (see {@link configure})\n * ⚠️ does not affect error messages within properties of an object\n *\n * @example\n * const AToZ = type(/^a.*z$/).describe(\"a string like 'a...z'\")\n * const good = AToZ(\"alcatraz\") // \"alcatraz\"\n * // ArkErrors: must be a string like 'a...z' (was \"albatross\")\n * const badPattern = AToZ(\"albatross\")\n */\n describe: NodeSelector.SelectableFn;\n /**\n * #### apply undeclared key behavior\n *\n * {@inheritDoc UndeclaredKeyBehavior}\n */\n onUndeclaredKey(behavior: UndeclaredKeyBehavior): this;\n /**\n * #### deeply apply undeclared key behavior\n *\n * {@inheritDoc UndeclaredKeyBehavior}\n **/\n onDeepUndeclaredKey(behavior: UndeclaredKeyBehavior): this;\n /**\n * #### alias for {@link assert} with typed input\n *\n * @example\n * const T = type({ foo: \"string\" });\n * // TypeScript: foo must be a string (was 5)\n * const data = T.from({ foo: 5 });\n */\n from(literal: this[\"inferIn\"]): this[\"infer\"];\n /**\n * #### deeply extract inputs\n *\n * ✅ will never include morphs\n * ✅ good for generating JSON Schema or other non-transforming formats\n *\n * @example\n * const User = type({\n * age: \"string.numeric.parse\"\n * })\n * // { age: 25 } (age parsed to a number)\n * const out = User({ age: \"25\" })\n * // { age: \"25\" } (age is still a string)\n * const inOut = User.in({ age: \"25\" })\n */\n get in(): instantiateType;\n /**\n * #### deeply extract outputs\n *\n * ✅ will never include morphs\n * ⚠️ if your type includes morphs, their output will likely be unknown unless they\n * were defined with an explicit output validator via `.to(outputDef)` or `.pipe(morph, outputType)`\n *\n * @example\n * const join = type(\"string[]\").pipe(a => a.join(\",\"))\n *\n * const T = type({\n * // all keywords have introspectable output\n * keyword: \"string.numeric.parse\",\n * // TypeScript knows this returns a string, but we can't introspect that at runtime\n * unvalidated: join,\n * // if needed, it can be made introspectable with an output validator\n * validated: join.to(\"string\")\n * })\n *\n * // Type<{ keyword: number; unvalidated: unknown; validated: string }>\n * const baseOut = base.out\n */\n get out(): instantiateType;\n /**\n * #### add a compile-time brand to output\n *\n * @typenoop\n *\n * @example\n * const Palindrome = type(\"string\")\n * .narrow(s => s === [...s].reverse().join(\"\"))\n * .brand(\"palindrome\")\n * // Brand\n * const out = Palindrome.assert(\"racecar\")\n */\n brand, $>>(name: name): r extends infer _ ? _ : never;\n /**\n * #### an array of this\n *\n * @example\n * // Type<{ rebmun: number }[]>\n * const T = type({ rebmun: \"number\" }).array();\n */\n array(): Type$5;\n /**\n * #### {@link https://arktype.io/docs/objects#properties-optional | optional definition}\n *\n * @chainedDefinition\n *\n * @example\n * const Prop = type({ foo: \"number\" })\n * // Type<{ bar?: { foo: number } }>\n * const Obj = type({ bar: Prop.optional() })\n */\n optional(): [this, \"?\"];\n /**\n * #### {@link https://arktype.io/docs/objects#properties-defaultable | defaultable definition}\n *\n * ✅ object defaults can be returned from a function\n * ⚠️ throws if the default value is not allowed\n * @chainedDefinition\n *\n * @example\n * // Type<{ count: Default }>\n * const State = type({ count: type.number.default(0) })\n * const Prop = type({ nested: \"boolean\" })\n * const ForObj = type({\n * key: Prop.default(() => ({ nested: false }))\n * })\n */\n default>(value: value): [this, \"=\", value];\n /**\n * #### apply a predicate function to input\n *\n * ⚠️ the behavior of {@link narrow}, this method's output counterpart, is usually more desirable\n * ✅ most useful for morphs with input types that are re-used externally\n * @predicateCast\n *\n * @example\n * const stringifyUser = type({ name: \"string\" }).pipe(user => JSON.stringify(user))\n * const stringifySafe = stringifyUser.filter(user => user.name !== \"Bobby Tables\")\n * // Type<(In: `${string}Z`) => To>\n * const WithPredicate = type(\"string.date.parse\").filter((s): s is `${string}Z` =>\n * s.endsWith(\"Z\")\n * )\n */\n filter ? (In: narrowed) => o : narrowed, $>>(predicate: Predicate.Castable): r extends infer _ ? _ : never;\n /**\n * #### apply a predicate function to output\n *\n * ✅ go-to fallback for validation not composable via built-in types and operators\n * ✅ runs after all other validators and morphs, if present\n * @predicateCast\n *\n * @example\n * const Palindrome = type(\"string\").narrow(s => s === [...s].reverse().join(\"\"))\n *\n * const PalindromicEmail = type(\"string.date.parse\").narrow((date, ctx) =>\n *\t\tdate.getFullYear() === 2025 || ctx.mustBe(\"the current year\")\n * )\n * // Type<`${string}.tsx`>\n * const WithPredicate = type(\"string\").narrow((s): s is `${string}.tsx` => /\\.tsx?$/.test(s))\n */\n narrow ? o extends To ? (In: i) => To : (In: i) => Out : narrowed, $>>(predicate: Predicate.Castable): r extends infer _ ? _ : never;\n /**\n * #### pipe output through arbitrary transformations or other Types\n *\n * @example\n * const User = type({ name: \"string\" })\n *\n * // parse a string and validate that the result as a user\n * const parseUser = type(\"string\").pipe(s => JSON.parse(s), user)\n */\n pipe: ChainedPipeParser<$, t>;\n /**\n * #### parse a definition as an output validator\n *\n * 🔗 `to({ name: \"string\" })` is equivalent to `.pipe(type({ name: \"string\" }))`\n *\n * @example\n * // parse a string and validate that the result as a user\n * const parseUser = type(\"string\").pipe(s => JSON.parse(s)).to({ name: \"string\" })\n */\n to>, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### query internal node references\n *\n * @experimental filters and returns the Type's internal representation from `@ark/schema`\n *\n * @example\n * // [\"blue\", \"red\"]\n * const values = type(\"'red' | 'blue'\").select(\"unit\").map(u => u.unit)\n */\n select: BaseNode[\"select\"];\n}\n/** @ts-ignore cast variance */\ninterface Type extends Callable<(data: unknown) => distill.Out | ArkEnv.onFail>, Inferred {\n /**\n * #### cast the way this is inferred\n *\n * @typenoop\n *\n * @example\n * // Type<`LEEEEEEEE${string}ROY`>\n * const Leeroy = type(/^LE{8,}ROY$/).as<`LEEEEEEEE${string}ROY`>()\n */\n as(...args: validateChainedAsArgs): instantiateType;\n /**\n * #### intersect the parsed Type, throwing if the result is unsatisfiable\n *\n * @example\n * // Type<{ foo: number; bar: string }>\n * const T = type({ foo: \"number\" }).and({ bar: \"string\" })\n * // ParseError: Intersection at foo of number and string results in an unsatisfiable type\n * const Bad = type({ foo: \"number\" }).and({ foo: \"string\" })\n */\n and>, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### union with the parsed Type\n *\n * ⚠️ a union that could apply different morphs to the same data is a ParseError ({@link https://arktype.io/docs/expressions#union-morphs | docs})\n *\n * @example\n * // Type\n * const T = type(\"string\").or({ box: \"string\" })\n */\n or, $>>(def: type.validate): r extends infer _ ? _ : never;\n /**\n * #### intersect the parsed Type, returning an introspectable {@link Disjoint} if the result is unsatisfiable\n *\n * @example\n * // Type<{ foo: number; bar: string }>\n * const T = type({ foo: \"number\" }).intersect({ bar: \"string\" })\n * const Bad = type(\"number > 10\").intersect(\"number < 5\")\n * // logs \"Intersection of > 10 and < 5 results in an unsatisfiable type\"\n * if (Bad instanceof Disjoint) console.log(`${bad.summary}`)\n */\n intersect>, $>>(def: type.validate): r extends infer _ ? _ | Disjoint : never;\n /**\n * #### check if the parsed Type's constraints are identical\n *\n * ✅ equal types have identical input and output constraints and transforms\n * @ignoresMeta\n *\n * @example\n * const DivisibleBy6 = type.number.divisibleBy(6).moreThan(0)\n * // false (left side must also be positive)\n * DivisibleBy6.equals(\"number % 6\")\n * // false (right side has an additional <100 constraint)\n * console.log(DivisibleBy6.equals(\"0 < (number % 6) < 100\"))\n * const ThirdTry = type(\"(number % 2) > 0\").divisibleBy(3)\n * // true (types are normalized and reduced)\n * console.log(DivisibleBy6.equals(ThirdTry))\n */\n equals(def: type.validate): boolean;\n /**\n * #### narrow this based on an {@link equals} check\n *\n * @ignoresMeta\n *\n * @example\n * const N = type.raw(`${Math.random()}`)\n * // Type<0.5> | undefined\n * const Ez = N.ifEquals(\"0.5\")\n */\n ifEquals>(def: type.validate): r extends infer _ ? _ | undefined : never;\n /**\n * #### check if this is a subtype of the parsed Type\n *\n * ✅ a subtype must include all constraints from the base type\n * ✅ unlike {@link equals}, additional constraints may be present\n * @ignoresMeta\n *\n * @example\n * type.string.extends(\"unknown\") // true\n * type.string.extends(/^a.*z$/) // false\n */\n extends(other: type.validate): boolean;\n /**\n * #### narrow this based on an {@link extends} check\n *\n * @ignoresMeta\n *\n * @example\n * const N = type(Math.random() > 0.5 ? \"true\" : \"0\") // Type<0 | true>\n * const Ez = N.ifExtends(\"boolean\") // Type | undefined\n */\n ifExtends>(other: type.validate): r extends infer _ ? _ | undefined : never;\n /**\n * #### check if a value could satisfy this and the parsed Type\n *\n * ⚠️ will return true unless a {@link Disjoint} can be proven\n *\n * @example\n * type.string.overlaps(\"string | number\") // true (e.g. \"foo\")\n * type(\"string | number\").overlaps(\"1\") // true (1)\n * type(\"number > 0\").overlaps(\"number < 0\") // false (no values exist)\n *\n * const NoAt = type(\"string\").narrow(s => !s.includes(\"@\"))\n * NoAt.overlaps(\"string.email\") // true (no values exist, but not provable)\n */\n overlaps(r: type.validate): boolean;\n /**\n * #### extract branches {@link extend}ing the parsed Type\n *\n * @example\n * // Type\n * const T = type(\"boolean | 0 | 'one' | 2 | bigint\").extract(\"number | 0n | true\")\n */\n extract ? t : never, $>>(r: type.validate): r extends infer _ extends r ? _ : never;\n /**\n * #### exclude branches {@link extend}ing the parsed Type\n *\n * @example\n *\n * // Type\n * const T = type(\"boolean | 0 | 'one' | 2 | bigint\").exclude(\"number | 0n | true\")\n */\n exclude ? never : t, $>>(r: type.validate): r extends infer _ ? _ : never;\n /**\n * @experimental\n * Map and optionally reduce branches of a union. Types that are not unions\n * are treated as a single branch.\n *\n * @param mapBranch - the mapping function, accepting a branch Type\n * Returning another `Type` is common, but any value can be returned and\n * inferred as part of the output.\n *\n * @param [reduceMapped] - an operation to perform on the mapped branches\n * Can be used to e.g. merge an array of returned Types representing\n * branches back to a single union.\n */\n distribute(mapBranch: (branch: Type, i: number, branches: array) => mapOut, reduceMapped?: (mappedBranches: mapOut[]) => reduceOut): reduceOut;\n /** The Type's [StandardSchema](https://github.com/standard-schema/standard-schema) properties */\n \"~standard\": StandardSchemaV1.ArkTypeProps;\n /** @deprecated */\n apply: Function[\"apply\"];\n /** @deprecated */\n bind: Function[\"bind\"];\n /** @deprecated */\n call: Function[\"call\"];\n /** @deprecated */\n caller: Function;\n /** @deprecated */\n length: number;\n /** @deprecated */\n name: string;\n /** @deprecated */\n prototype: Function[\"prototype\"];\n /** @deprecated */\n arguments: Function[\"arguments\"];\n /** @deprecated */\n Symbol: never;\n}\ninterface ChainedPipeParser<$, t> extends NaryPipeParser<$, t> {\n try: NaryPipeParser<$, t>;\n}\ntype validateChainedAsArgs = [\n t\n] extends [unset] ? [\n t\n] extends [anyOrNever] ? [\n] : [\n ErrorMessage<\"as requires an explicit type parameter like myType.as()\">\n] : [];\n\ntype MatchParserContext = {\n cases: Morph[];\n $: unknown;\n input: input;\n checked: boolean;\n key: PropertyKey | null;\n};\ndeclare namespace ctx {\n type from = ctx;\n type init<$, input = unknown, checked extends boolean = false> = from<{\n cases: [];\n $: $;\n input: input;\n checked: checked;\n key: null;\n }>;\n type atKey = from<{\n cases: ctx[\"cases\"];\n $: ctx[\"$\"];\n input: ctx[\"input\"];\n checked: ctx[\"checked\"];\n key: key;\n }>;\n}\ninterface MatchParser<$> extends CaseMatchParser> {\n in(def: type.validate): ChainableMatchParser, true>>;\n in(...args: [typedInput] extends [never] ? [\n ErrorMessage<\"in requires a definition or type argument (in('string') or in())\">\n ] : []): ChainableMatchParser>;\n in(def: type.validate): ChainableMatchParser, true>>;\n case: CaseParser>;\n at: AtParser>;\n}\ntype addCasesToContext = cases extends Morph[] ? ctx.from<{\n $: ctx[\"$\"];\n input: ctx[\"input\"];\n cases: [...ctx[\"cases\"], ...cases];\n checked: ctx[\"checked\"];\n key: ctx[\"key\"];\n}> : never;\ntype addDefaultToContext> = ctx.from<{\n $: ctx[\"$\"];\n input: defaultCase extends \"never\" ? Morph.In : ctx[\"input\"];\n cases: defaultCase extends \"never\" | \"assert\" ? ctx[\"cases\"] : defaultCase extends Morph ? ctx[\"checked\"] extends true ? [\n (In: unknown) => ArkErrors,\n ...ctx[\"cases\"],\n defaultCase\n ] : [...ctx[\"cases\"], defaultCase] : [\n ...ctx[\"cases\"],\n (In: ctx[\"input\"]) => ArkErrors\n ];\n checked: ctx[\"checked\"];\n key: ctx[\"key\"];\n}>;\ntype CaseKeyKind = \"def\" | \"string\";\ntype casesToMorphTuple = unionToTuple]: cases[def] extends (Morph) ? kind extends \"def\" ? (In: inferCaseArg) => o : (In: maybeLiftToKey) => o : never;\n}>>;\ntype addCasesToParser = cases extends {\n default: infer defaultDef extends DefaultCase;\n} ? finalizeMatchParser>, defaultDef> : ChainableMatchParser>>;\ntype inferCaseArg = _finalizeCaseArg, ctx>, ctx, endpoint>;\ntype maybeLiftToKey = ctx[\"key\"] extends PropertyKey ? {\n [k in ctx[\"key\"]]: t;\n} : t;\ntype _finalizeCaseArg = [\n distill,\n distill\n] extends [infer i, infer result] ? [\n i\n] extends [ctx[\"input\"]] ? result : Extract extends never ? result : Extract : never;\ntype CaseParser = (def: type.validate, resolve: (In: inferCaseArg) => ret) => ChainableMatchParser) => ret]>>;\ntype validateKey = ctx[\"key\"] extends Key ? ErrorMessage : ctx[\"cases\"][\"length\"] extends 0 ? keyof ctx[\"input\"] extends never ? key : conform : ErrorMessage;\ninterface StringsParser {\n (def: cases extends validateStringCases ? cases : validateStringCases): addCasesToParser;\n}\ntype validateStringCases = unknown extends ctx[\"input\"] ? {\n [k in keyof cases]?: k extends \"default\" ? DefaultCase : (In: _finalizeCaseArg, ctx, \"out\">) => unknown;\n} & {\n default?: DefaultCase;\n} : {\n [k in keyof cases]?: k extends \"default\" ? DefaultCase : k extends stringValue ? (In: _finalizeCaseArg, ctx, \"out\">) => unknown : ErrorType<`${k & string} must be a possible string value`>;\n} & {\n [k in stringValue]?: unknown;\n} & {\n default?: DefaultCase;\n};\ntype stringValue = ctx[\"input\"] extends string ? ctx[\"input\"] : ctx[\"key\"] extends keyof ctx[\"input\"] ? ctx[\"input\"][ctx[\"key\"]] extends infer s extends string ? s : never : never;\ninterface AtParser {\n (key: validateKey): ChainableMatchParser>;\n >(key: validateKey, cases: cases extends validateCases ? cases : errorCases): addCasesToParser;\n}\ninterface ChainableMatchParser {\n case: CaseParser;\n match: CaseMatchParser;\n default: DefaultMethod;\n at: AtParser;\n /** @experimental */\n strings: StringsParser;\n}\ntype DefaultCaseKeyword = \"never\" | \"assert\" | \"reject\";\ntype DefaultCase> = DefaultCaseKeyword | Morph;\ntype DefaultMethod = >(def: def) => finalizeMatchParser;\ntype validateCases = {\n [def in keyof cases | BaseCompletions]?: def extends \"default\" ? DefaultCase : def extends number ? (In: inferCaseArg<`${def}`, ctx, \"out\">) => unknown : def extends type.validate ? (In: inferCaseArg) => unknown : type.validate;\n};\ntype errorCases = {\n [def in keyof cases]?: def extends \"default\" ? DefaultCase : def extends number ? (In: inferCaseArg<`${def}`, ctx, \"out\">) => unknown : def extends type.validate ? (In: inferCaseArg) => unknown : ErrorType>;\n} & {\n [k in BaseCompletions]?: (In: inferCaseArg) => unknown;\n} & {\n default?: DefaultCase;\n};\ntype CaseMatchParser = (def: cases extends validateCases ? cases : errorCases) => addCasesToParser;\ntype finalizeMatchParser> = addDefaultToContext extends (infer ctx extends MatchParserContext) ? Match : never;\ninterface Match extends Inferred<(In: Morph.In) => Out>> {\n (data: data): {\n [i in numericStringKeyOf]: isDisjoint> extends true ? never : Morph.Out;\n }[numericStringKeyOf];\n}\ndeclare class InternalMatchParser extends Callable {\n $: InternalScope;\n constructor($: InternalScope);\n in(def?: unknown): InternalChainedMatchParser;\n at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match;\n case(when: unknown, then: Morph): InternalChainedMatchParser;\n}\ntype InternalCases = Record;\ntype InternalCaseParserFn = (cases: InternalCases) => InternalChainedMatchParser | Match;\ntype CaseEntry = [BaseRoot, Morph] | [\"default\", DefaultCase];\ndeclare class InternalChainedMatchParser extends Callable {\n $: InternalScope;\n in: BaseRoot | undefined;\n protected key: Key | undefined;\n protected branches: BaseRoot[];\n constructor($: InternalScope, In?: BaseRoot);\n at(key: Key, cases?: InternalCases): InternalChainedMatchParser | Match;\n case(def: unknown, resolver: Morph): InternalChainedMatchParser;\n protected caseEntry(node: BaseRoot, resolver: Morph): InternalChainedMatchParser;\n match(cases: InternalCases): InternalChainedMatchParser | Match;\n strings(cases: InternalCases): InternalChainedMatchParser | Match;\n protected caseEntries(entries: CaseEntry[]): InternalChainedMatchParser | Match;\n default(defaultCase: DefaultCase): Match;\n}\ndeclare const chainedAtMessage = \"A key matcher must be specified before the first case i.e. match.at('foo') or match.in().at('bar')\";\ntype chainedAtMessage = typeof chainedAtMessage;\ndeclare const doubleAtMessage = \"At most one key matcher may be specified per expression\";\ntype doubleAtMessage = typeof doubleAtMessage;\n\ndeclare class MergeHkt extends Hkt<[base: object, props: object]> {\n body: util.merge;\n description: string;\n}\ndeclare const Merge: _ark_schema.GenericRoot;\ndeclare const arkBuiltins: arkBuiltins;\ntype arkBuiltins = Module;\ndeclare namespace arkBuiltins {\n type submodule = Submodule<$>;\n type $ = {\n Key: Key;\n Merge: typeof Merge.t;\n };\n}\n\ndeclare const number: number.module;\ndeclare namespace number {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: number;\n epoch: number;\n integer: number;\n safe: number;\n NaN: number;\n Infinity: number;\n NegativeInfinity: number;\n };\n}\n\ndeclare const stringInteger: stringInteger.module;\ndeclare namespace stringInteger {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare const base64: Module<{\n root: unknown;\n url: unknown;\n}>;\ndeclare namespace base64 {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n url: string;\n };\n}\ndeclare const capitalize: capitalize.module;\ndeclare namespace capitalize {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const stringDate: stringDate.module;\ndeclare namespace stringDate {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n iso: iso.submodule;\n epoch: epoch.submodule;\n };\n namespace iso {\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n }\n namespace epoch {\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n }\n}\ndeclare const ip: ip.module;\ndeclare namespace ip {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n v4: string;\n v6: string;\n };\n}\ndeclare namespace stringJson {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare namespace lower {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const normalize: Module<{\n root: unknown;\n NFC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n}>;\ndeclare namespace normalize {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n NFC: NFC.submodule;\n NFD: NFD.submodule;\n NFKC: NFKC.submodule;\n NFKD: NFKD.submodule;\n };\n namespace NFC {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFD {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFKC {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n namespace NFKD {\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n }\n}\ndeclare const stringNumeric: stringNumeric.module;\ndeclare namespace stringNumeric {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare namespace trim {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const upper: upper.module;\ndeclare namespace upper {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: (In: string) => To;\n preformatted: string;\n };\n}\ndeclare const url: url.module;\ndeclare namespace url {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n parse: (In: string) => To;\n };\n}\ndeclare const uuid: Module<{\n root: string;\n v1: unknown;\n v2: unknown;\n v3: unknown;\n v4: unknown;\n v5: unknown;\n v6: unknown;\n v7: unknown;\n v8: unknown;\n}>;\ndeclare namespace uuid {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n v1: string;\n v2: string;\n v3: string;\n v4: string;\n v5: string;\n v6: string;\n v7: string;\n v8: string;\n };\n namespace $ {\n type flat = {};\n }\n}\ndeclare const string: Module<{\n integer: Submodule;\n trim: Submodule;\n normalize: Submodule<{\n root: unknown;\n NFC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKC: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n NFKD: Submodule<{\n root: unknown;\n preformatted: unknown;\n }>;\n }>;\n root: unknown;\n date: Submodule;\n email: unknown;\n uuid: Submodule<{\n root: string;\n v1: unknown;\n v2: unknown;\n v3: unknown;\n v4: unknown;\n v5: unknown;\n v6: unknown;\n v7: unknown;\n v8: unknown;\n }>;\n regex: unknown;\n json: Submodule;\n lower: Submodule;\n upper: Submodule;\n alpha: unknown;\n alphanumeric: unknown;\n hex: unknown;\n base64: Submodule<{\n root: unknown;\n url: unknown;\n }>;\n capitalize: Submodule;\n creditCard: unknown;\n digits: unknown;\n ip: Submodule;\n numeric: Submodule;\n semver: unknown;\n url: Submodule;\n}>;\ndeclare namespace string {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: string;\n alpha: string;\n alphanumeric: string;\n hex: string;\n base64: base64.submodule;\n capitalize: capitalize.submodule;\n creditCard: string;\n date: stringDate.submodule;\n digits: string;\n email: string;\n integer: stringInteger.submodule;\n ip: ip.submodule;\n json: stringJson.submodule;\n lower: lower.submodule;\n normalize: normalize.submodule;\n numeric: stringNumeric.submodule;\n regex: string;\n semver: string;\n trim: trim.submodule;\n upper: upper.submodule;\n url: url.submodule;\n uuid: uuid.submodule;\n };\n}\n\ndeclare const arkTsKeywords: arkTsKeywords;\ntype arkTsKeywords = Module;\ndeclare namespace arkTsKeywords {\n type submodule = Submodule<$>;\n type $ = {\n bigint: bigint;\n boolean: boolean;\n false: false;\n never: never;\n null: null;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n true: true;\n unknown: unknown;\n undefined: undefined;\n };\n}\ndeclare const unknown: Module<{\n any: unknown;\n root: unknown;\n}>;\ndeclare namespace unknown {\n type submodule = Submodule<$>;\n type $ = {\n root: unknown;\n any: any;\n };\n}\ndeclare const json: Module<{\n stringify: unknown;\n root: unknown;\n}>;\ndeclare namespace json {\n type submodule = Submodule<$>;\n type $ = {\n root: Json;\n stringify: (In: Json) => To;\n };\n}\ndeclare const object: Module<{\n root: unknown;\n json: Submodule<{\n stringify: unknown;\n root: unknown;\n }>;\n}>;\ndeclare namespace object {\n type submodule = Submodule<$>;\n type $ = {\n root: object;\n json: json.submodule;\n };\n}\ndeclare class RecordHkt extends Hkt<[Key, unknown]> {\n body: Record;\n description: string;\n}\ndeclare const Record: _ark_schema.GenericRoot;\ndeclare class PickHkt extends Hkt<[object, Key]> {\n body: pick;\n description: string;\n}\ndeclare const Pick: _ark_schema.GenericRoot;\ndeclare class OmitHkt extends Hkt<[object, Key]> {\n body: omit;\n description: string;\n}\ndeclare const Omit: _ark_schema.GenericRoot;\ndeclare class PartialHkt extends Hkt<[object]> {\n body: show>;\n description: string;\n}\ndeclare const Partial: _ark_schema.GenericRoot;\ndeclare class RequiredHkt extends Hkt<[object]> {\n body: show>;\n description: string;\n}\ndeclare const Required: _ark_schema.GenericRoot;\ndeclare class ExcludeHkt extends Hkt<[unknown, unknown]> {\n body: Exclude;\n description: string;\n}\ndeclare const Exclude: _ark_schema.GenericRoot;\ndeclare class ExtractHkt extends Hkt<[unknown, unknown]> {\n body: Extract;\n description: string;\n}\ndeclare const Extract: _ark_schema.GenericRoot;\ndeclare const arkTsGenerics: arkTsGenerics.module;\ndeclare namespace arkTsGenerics {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n Exclude: typeof Exclude.t;\n Extract: typeof Extract.t;\n Omit: typeof Omit.t;\n Partial: typeof Partial.t;\n Pick: typeof Pick.t;\n Record: typeof Record.t;\n Required: typeof Required.t;\n };\n}\n\ninterface Ark extends Omit, Ark.wrapped {\n}\ndeclare namespace Ark {\n interface keywords extends arkTsKeywords.$, arkTsGenerics.$, arkPrototypes.keywords, arkBuiltins.$ {\n }\n interface wrapped extends arkPrototypes.wrapped {\n string: string.submodule;\n number: number.submodule;\n object: object.submodule;\n unknown: unknown.submodule;\n }\n type flat = flatResolutionsOf;\n interface typeAttachments extends arkTsKeywords.$ {\n arrayIndex: arkPrototypes.$[\"Array\"][\"index\"];\n Key: arkBuiltins.$[\"Key\"];\n Record: arkTsGenerics.$[\"Record\"];\n Date: arkPrototypes.$[\"Date\"];\n Array: arkPrototypes.$[\"Array\"][\"root\"];\n }\n interface boundTypeAttachments<$> extends Omit, arkKind> {\n }\n}\ndeclare const ark: Scope;\ndeclare const keywords: Module;\ndeclare const type: TypeParser<{}>;\ndeclare namespace type {\n interface cast {\n [inferred]?: to;\n }\n type errors = ArkErrors;\n type validate> = validateDefinition;\n type instantiate> = instantiateType, $>;\n type infer> = inferDefinition;\n namespace infer {\n type In = distill.In>;\n type Out = distill.Out>;\n namespace introspectable {\n type Out = distill.introspectable.Out>;\n }\n }\n type brand = t extends InferredMorph ? o[\"introspectable\"] extends true ? (In: i) => To> : (In: i) => Out> : Brand;\n /** @ts-ignore cast variance */\n interface Any extends Type {\n }\n}\ntype type = Type$1;\ndeclare const match: MatchParser<{}>;\ndeclare const generic: GenericParser<{}>;\ndeclare const define: DefinitionParser<{}>;\ndeclare const declare: DeclarationParser<{}>;\n\ntype ParameterString = `<${params}>`;\ntype extractParams = s extends ParameterString ? params : never;\ntype validateParameterString = parseGenericParams, $> extends infer e extends ErrorMessage ? e : s;\ntype validateGenericArg = type.infer extends param[1] ? unknown : ErrorType<`Invalid argument for ${param[0]}`, [expected: param[1]]>;\ntype GenericInstantiator, def, $, args$> = params[\"length\"] extends 1 ? {\n >(a: type.validate & validateGenericArg): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 2 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 3 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 4 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 5 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : params[\"length\"] extends 6 ? {\n >(...args: [\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg,\n type.validate & validateGenericArg\n ]): r extends infer _ ? _ : never;\n} : (error: ErrorMessage<`You may not define more than 6 positional generic parameters`>) => never;\ntype instantiateGeneric, args, $, args$> = Type$1<[\n def\n] extends [Hkt] ? Hkt.apply;\n}> : inferDefinition>, args$>;\ntype bindGenericArgs, $, args> = {\n [i in keyof params & `${number}` as params[i][0]]: type.infer;\n};\ntype baseGenericResolutions, $> = baseGenericConstraints extends infer baseConstraints ? {\n [k in keyof baseConstraints]: Type$1;\n} : never;\ntype baseGenericConstraints> = {\n [i in keyof params & `${number}` as params[i][0]]: params[i][1];\n};\ntype GenericConstructor = array, bodyDef = unknown, $ = {}, arg$ = {}> = new () => Generic;\ninterface Generic = array, bodyDef = unknown, $ = {}, arg$ = $> extends Callable> {\n [arkKind]: \"generic\";\n t: GenericAst;\n bodyDef: bodyDef;\n params: {\n [i in keyof params]: [params[i][0], Type$1];\n };\n names: genericParamNames;\n constraints: {\n [i in keyof params]: Type$1;\n };\n $: Scope<$>;\n arg$: Scope;\n internal: GenericRoot;\n json: JsonStructure;\n}\ndeclare const Generic: GenericConstructor;\ntype GenericDeclaration = `${name}${params}`;\ntype parseValidGenericParams = conform, $>, array>;\ndeclare const emptyGenericParameterMessage = \"An empty string is not a valid generic parameter name\";\ntype emptyGenericParameterMessage = typeof emptyGenericParameterMessage;\ntype parseGenericParams = parseNextNameChar, \"\", [\n], $>;\ntype ParamsTerminator = WhitespaceChar | \",\";\ntype parseName, $> = parseNextNameChar, \"\", result, $>;\ntype parseNextNameChar, $> = unscanned extends `${infer lookahead}${infer nextUnscanned}` ? lookahead extends ParamsTerminator ? name extends \"\" ? ErrorMessage : lookahead extends \",\" ? parseName : lookahead extends WhitespaceChar ? _parseOptionalConstraint : never : parseNextNameChar : name extends \"\" ? result : [...result, [name, unknown]];\ndeclare const extendsToken = \"extends \";\ntype extendsToken = typeof extendsToken;\ndeclare const _parseOptionalConstraint: (scanner: ArkTypeScanner, name: string, result: GenericParamDef[], ctx: BaseParseContext) => GenericParamDef[];\ntype _parseOptionalConstraint, $> = ArkTypeScanner.skipWhitespace extends (`${extendsToken}${infer nextUnscanned}`) ? parseUntilFinalizer, $, {}> extends (infer finalArgState extends StaticState) ? validateAst extends (infer e extends ErrorMessage) ? e : parseName]\n], $> : never : parseName extends (`,${infer nextUnscanned}`) ? nextUnscanned : unscanned, [\n ...result,\n [name, unknown]\n], $>;\ntype genericParamDefToAst = schema extends string ? [schema, unknown] : schema extends readonly [infer name, infer def] ? [name, type.infer] : never;\ntype genericParamDefsToAst, $> = [\n ...{\n [i in keyof defs]: genericParamDefToAst;\n }\n];\ntype GenericParser<$ = {}> = >(...params: {\n [i in keyof paramsDef]: paramsDef[i] extends (readonly [infer name, infer def]) ? readonly [name, type.validate] : paramsDef[i];\n}) => GenericBodyParser, $>;\ninterface GenericBodyParser, $> {\n (body: type.validate>): Generic;\n (instantiateDef: LazyGenericBody>, hkt: hkt): Generic, $, $>;\n}\n\ndeclare const Module: new <$ extends {}>(exports: exportScope<$>) => Module<$>;\ninterface Module<$ extends {} = {}> extends RootModule> {\n}\ntype exportScope<$> = bindExportsToScope<$, $>;\ndeclare const BoundModule: new (exports: bindExportsToScope, $: $) => BoundModule;\ninterface BoundModule extends RootModule> {\n}\ntype bindExportsToScope = {\n [k in keyof exports]: instantiateExport;\n} & unknown;\ntype Submodule = RootModule;\ntype instantiateExport = [\n t\n] extends [PreparsedNodeResolution] ? [\n t\n] extends [anyOrNever] ? Type$1 : t extends GenericAst ? Generic : t extends Submodule ? BoundModule : never : Type$1;\n\ndeclare class liftFromHkt extends Hkt<[element: unknown]> {\n body: liftArray extends infer lifted ? (In: this[0] | lifted) => To : never;\n}\ndeclare const liftFrom: _ark_schema.GenericRoot;\ndeclare const arkArray: arkArray.module;\ndeclare namespace arkArray {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: unknown[];\n readonly: readonly unknown[];\n index: NonNegativeIntegerString;\n liftFrom: typeof liftFrom.t;\n };\n}\ntype NonNegativeIntegerString = `${Digit}` | (`${Exclude}${string}` & `${bigint}`);\n\ntype FormDataValue = string | File;\ntype ParsedFormData = Record;\ndeclare const arkFormData: arkFormData.module;\ndeclare namespace arkFormData {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n root: FormData;\n value: FormDataValue;\n parse: (In: FormData) => To;\n parsed: ParsedFormData;\n };\n}\n\ndeclare const TypedArray: TypedArray.module;\ndeclare namespace TypedArray {\n type module = Module;\n type submodule = Submodule<$>;\n type $ = {\n Int8: Int8Array;\n Uint8: Uint8Array;\n Uint8Clamped: Uint8ClampedArray;\n Int16: Int16Array;\n Uint16: Uint16Array;\n Int32: Int32Array;\n Uint32: Uint32Array;\n Float32: Float32Array;\n Float64: Float64Array;\n BigInt64: BigInt64Array;\n BigUint64: BigUint64Array;\n };\n}\n\ndeclare const omittedPrototypes: {\n Boolean: 1;\n Number: 1;\n String: 1;\n};\ndeclare const arkPrototypes: arkPrototypes.module;\ndeclare namespace arkPrototypes {\n type module = Module;\n type submodule = Submodule<$>;\n interface keywords extends ecmascript, platform {\n }\n interface $ extends Omit, wrapped {\n }\n interface wrapped {\n Array: arkArray.submodule;\n TypedArray: TypedArray.submodule;\n FormData: arkFormData.submodule;\n }\n type ecmascript = Omit;\n type platform = PlatformObjects;\n interface instances extends ecmascript, platform {\n }\n type NonDegenerateName = keyof instances extends infer k ? k extends keyof instances ? {} extends instances[k] ? never : k : never : never;\n type instanceOf = instances[name];\n}\n\ntype DateLiteral = `d\"${source}\"` | `d'${source}'`;\ntype LimitLiteral = number | DateLiteral;\ntype distill = finalizeDistillation>;\ndeclare namespace distill {\n type Endpoint = \"in\" | \"out\" | \"out.introspectable\";\n type In = distill;\n type Out = distill;\n namespace introspectable {\n type Out = distill;\n }\n}\ntype finalizeDistillation = equals extends true ? t : distilled;\ntype _distill = t extends undefined ? t : [t] extends [anyOrNever] ? t : unknown extends t ? unknown : t extends Brand ? endpoint extends \"in\" ? base : t : t extends TerminallyInferredObject | Primitive ? t : t extends Function ? t extends (...args: never) => anyOrNever ? t : t extends InferredMorph ? distillIo : t : t extends Default ? _distill : t extends array ? distillArray : isSafelyMappable extends true ? distillMappable : t;\ntype distillMappable = endpoint extends \"in\" ? show<{\n [k in keyof o as k extends inferredDefaultKeyOf ? never : k]: _distill;\n} & {\n [k in inferredDefaultKeyOf]?: _distill;\n}> : {\n [k in keyof o]: _distill;\n};\ntype distillIo = endpoint extends \"out\" ? _distill : endpoint extends \"in\" ? _distill : o extends To ? _distill : unknown;\ntype unwrapInput = t extends InferredMorph ? t extends anyOrNever ? t : i : t;\ntype inferredDefaultKeyOf = keyof o extends infer k ? k extends keyof o ? unwrapInput extends Default ? [\n t\n] extends [anyOrNever] ? never : k : never : never : never;\ntype distillArray = t[number][] extends t ? alignReadonly<_distill[], t> : distillNonArraykeys, t>, endpoint>;\ntype alignReadonly = original extends unknown[] ? result : Readonly;\ntype distillNonArraykeys = keyof originalArray extends keyof distilledArray ? distilledArray : distilledArray & _distill<{\n [k in keyof originalArray as k extends keyof distilledArray ? never : k]: originalArray[k];\n}, endpoint>;\ntype distillArrayFromPrefix = t extends readonly [infer head, ...infer tail] ? distillArrayFromPrefix\n]> : [...prefix, ...distillArrayFromPostfix];\ntype distillArrayFromPostfix = t extends readonly [...infer init, infer last] ? distillArrayFromPostfix,\n ...postfix\n]> : [...{\n [i in keyof t]: _distill;\n}, ...postfix];\ntype BuiltinTerminalObjectKind = Exclude;\n/** Objects we don't want to expand during inference like Date or Promise */\ntype TerminallyInferredObject = arkPrototypes.instanceOf | ArkEnv.prototypes;\ntype inferPredicate = predicate extends (data: any, ...args: any[]) => data is infer narrowed ? narrowed : t;\ntype inferNaryPipe = _inferNaryPipe;\ntype _inferNaryPipe = remaining extends (readonly [infer head extends Morph, ...infer tail extends Morph[]]) ? _inferNaryPipe> : result;\ntype inferNaryIntersection = number extends types[\"length\"] ? _inferNaryIntersection, unknown> : _inferNaryIntersection;\ntype _inferNaryIntersection = remaining extends readonly [infer head, ...infer tail] ? _inferNaryIntersection> : result;\ntype inferNaryMerge = number extends types[\"length\"] ? _inferUnorderedMerge : _inferNaryMerge;\ntype _inferUnorderedMerge, requiredKey extends PropertyKey = Exclude, optionalKey>> = show<{\n [k in requiredKey]: types[number] extends infer v ? v extends unknown ? k extends keyof v ? v[k] : never : never : never;\n} & {\n [k in optionalKey]?: types[number] extends infer v ? v extends unknown ? k extends keyof v ? v[k] : never : never : never;\n}>;\n/** Coalesce keys that exist and are optional on one or more branches of a union */\ntype optionalAtLeastOnceUnionKeyOf = t extends unknown ? optionalKeyOf : never;\ntype _inferNaryMerge = remaining extends (readonly [infer head, ...infer tail extends readonly unknown[]]) ? _inferNaryMerge> : result;\ntype inferMorphOut = Exclude, ArkError | ArkErrors>;\ndeclare const isMorphOutKey: \" isMorphOut\";\ninterface Out {\n [isMorphOutKey]: true;\n t: o;\n introspectable: boolean;\n}\ninterface To extends Out {\n introspectable: true;\n}\ntype InferredMorph = (In: i) => o;\ndeclare const defaultsToKey: \" defaultsTo\";\ntype Default = {\n [defaultsToKey]: [t, v];\n};\ntype withDefault = t extends InferredMorph ? addDefaultToMorph : Default, v>;\ntype addDefaultToMorph = [\n normalizeMorphDistribution\n] extends [InferredMorph] ? (In: Default) => o : never;\ntype normalizeMorphDistribution ? i : never, undistributedOut extends Out = t extends InferredMorph ? [\n o\n] extends [To] ? To : o : never> = (Extract extends anyOrNever ? never : Extract extends InferredMorph ? [\n undistributedOut\n] extends [o] ? (In: undistributedIn) => undistributedOut : [undistributedIn] extends [i] ? (In: undistributedIn) => undistributedOut : t : never) | Exclude extends infer _ ? _ : never;\ntype defaultFor = (Primitive extends t ? Primitive : t extends Primitive ? t : never) | (() => t);\ntype inferIntersection = normalizeMorphDistribution<_inferIntersection>;\ntype inferMorph = morph extends type.cast ? inferPipe : inferMorphOut extends infer out ? (In: distill.In) => Out : never;\ntype inferPipe = normalizeMorphDistribution<_inferIntersection>;\ntype _inferIntersection = [\n l & r\n] extends [infer t extends anyOrNever] ? t : l extends InferredMorph ? r extends InferredMorph ? piped extends true ? (In: lIn) => rOut : never : piped extends true ? (In: lIn) => To : (In: _inferIntersection) => lOut : r extends InferredMorph ? (In: _inferIntersection) => rOut : [l, r] extends [object, object] ? intersectObjects extends infer result ? result : never : l & r;\ninterface MorphableIntersection extends Hkt<[unknown, unknown]> {\n body: _inferIntersection;\n}\ntype intersectObjects = l extends array ? r extends array ? intersectArrays> : // for an intersection with exactly one array operand like { name: string } & string[],\nl & r : r extends array ? l & r : show<{\n [k in keyof l]: k extends keyof r ? _inferIntersection : l[k];\n} & {\n [k in keyof r]: k extends keyof l ? _inferIntersection : r[k];\n}>;\n\nexport { Ark, ArkAmbient, type ArkConfig, type Type as BaseType, BoundModule, Generic, type KeywordConfig, Module, type Out, Scope, type Submodule, Type$1 as Type, ark, type bindThis, configure, declare, define, distill, generic, type inferDefinition, keywords, match, scope, type, type validateDefinition };\n\n}"; diff --git a/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts b/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts index 49f9dc4e8b..2e423a718c 100644 --- a/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts +++ b/apps/dashboard/src/components/vibe-coding/dts/util-dts.ts @@ -1,4 +1,4 @@ // FROM https://github.com/arktypeio/arktype/tree/main/ark/docs/components/dts /** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ // prettier-ignore -export const utilDts = "declare module \"@ark/util\" {\n import * as buffer from 'buffer';\n\ntype Fn = (...args: args) => returns;\ndeclare const cached: (thunk: () => t) => (() => t);\ndeclare const isThunk: (value: value) => value is Extract extends never ? value & Thunk : Extract;\ntype Thunk = () => ret;\ntype thunkable = t | Thunk;\ndeclare const tryCatch: (fn: () => returns, onError?: (e: unknown) => onError) => returns | onError;\ndeclare const DynamicFunction: DynamicFunction;\ntype DynamicFunction = new (...args: ConstructorParameters) => fn & {\n apply(thisArg: null, args: Parameters): ReturnType;\n call(thisArg: null, ...args: Parameters): ReturnType;\n};\ntype CallableOptions = {\n attach?: attachments;\n bind?: object;\n};\n/** @ts-ignore required to cast function type */\ninterface Callable extends fn, attachments {\n}\ndeclare class Callable {\n constructor(fn: fn, ...[opts]: {} extends attachments ? [opts?: CallableOptions] : [opts: CallableOptions]);\n}\ntype GuardablePredicate = ((In: input) => In is narrowed) | ((In: input) => boolean);\ntype TypeGuard = (In: input) => In is narrowed;\n/**\n * Checks if the environment has Content Security Policy (CSP) enabled,\n * preventing JIT-optimized code from being compiled via new Function().\n *\n * @returns `true` if a function created using new Function() can be\n * successfully invoked in the environment, `false` otherwise.\n *\n * The result is cached for subsequent invocations.\n */\ndeclare const envHasCsp: () => boolean;\n\ndeclare const ecmascriptConstructors: {\n Array: ArrayConstructor;\n Boolean: BooleanConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Number: NumberConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n String: StringConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype ecmascriptConstructors = typeof ecmascriptConstructors;\ntype EcmascriptObjects = satisfy, {\n Array: Array;\n Boolean: Boolean;\n Date: Date;\n Error: Error;\n Function: Function;\n Map: Map;\n Number: Number;\n RegExp: RegExp;\n Set: Set;\n String: String;\n WeakMap: WeakMap;\n WeakSet: WeakSet;\n Promise: Promise;\n}>;\n/** Node18 */\ndeclare const FileConstructor: typeof buffer.File;\ntype platformConstructors = {\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n};\ndeclare const platformConstructors: platformConstructors;\ntype PlatformObjects = instantiateConstructors;\ndeclare const typedArrayConstructors: {\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n};\ntype typedArrayConstructors = typeof typedArrayConstructors;\ntype TypedArrayObjects = instantiateConstructors;\ndeclare const builtinConstructors: {\n String: StringConstructor;\n Number: NumberConstructor;\n Boolean: BooleanConstructor;\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n Array: ArrayConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype builtinConstructors = typeof builtinConstructors;\ntype BuiltinObjectKind = keyof builtinConstructors;\ntype GlobalName = keyof typeof globalThis;\ntype instantiateConstructors = {\n [k in kind]: k extends GlobalName ? InstanceType<(typeof globalThis)[k]> : `${k}Constructor` extends GlobalName ? InstanceType<(typeof globalThis)[`${k}Constructor`]> : never;\n};\ntype BuiltinObjects = instantiateConstructors;\ntype describeObject = objectKindOf extends string ? [\n opts[\"includeArticles\"]\n] extends [true] ? objectKindDescriptions[objectKindOf] : objectKindOf : [opts[\"includeArticles\"]] extends [true] ? domainDescriptions[\"object\"] : \"object\";\ntype instantiableObjectKind = {\n [kind in keyof builtinConstructors]: data extends (InstanceType) ? kind : never;\n}[keyof builtinConstructors];\ntype objectKindOf = object extends data ? keyof builtinConstructors | undefined : data extends Fn ? \"Function\" : instantiableObjectKind extends never ? undefined : instantiableObjectKind;\ndeclare const objectKindOf: (data: data) => objectKindOf | undefined;\ndeclare const objectKindOrDomainOf: (data: data) => (objectKindOf & {}) | domainOf;\ntype objectKindOrDomainOf = data extends object ? objectKindOf extends undefined ? \"object\" : objectKindOf : domainOf;\ndeclare const hasObjectKind: (data: object, kind: kind) => data is InstanceType;\ndeclare const isArray: (data: unknown) => data is readonly unknown[];\ndeclare const ecmascriptDescriptions: {\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ndeclare const platformDescriptions: {\n ArrayBuffer: string;\n Blob: string;\n File: string;\n FormData: string;\n Headers: string;\n Request: string;\n Response: string;\n URL: string;\n};\ndeclare const typedArrayDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n};\n/** Each defaultObjectKind's completion for the phrase \"must be _____\" */\ndeclare const objectKindDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n readonly ArrayBuffer: string;\n readonly Blob: string;\n readonly File: string;\n readonly FormData: string;\n readonly Headers: string;\n readonly Request: string;\n readonly Response: string;\n readonly URL: string;\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ntype objectKindDescriptions = typeof objectKindDescriptions;\n/**\n * this will only return an object kind if it's the root constructor\n * example TypeError would return null not 'Error'\n **/\ndeclare const getBuiltinNameOfConstructor: (ctor: Function) => BuiltinObjectKind | null;\ntype Constructor = abstract new (...args: never[]) => instance;\ntype instanceOf = constructor extends Constructor ? instance : never;\n/**\n * Returns an array of constructors for all ancestors (i.e., prototypes) of a given object.\n */\ndeclare const ancestorsOf: (o: object) => Function[];\ntype normalizedKeyOf = keyof t extends infer k ? k extends number ? `${k}` : k : never;\ndeclare const constructorExtends: (ctor: Constructor, base: Constructor) => boolean;\n\ntype stringifyUnion = join, delimiter>;\ntype unionToTuple = _unionToTuple extends infer result ? conform : never;\ntype _unionToTuple = getLastBranch extends infer current ? [\n t\n] extends [never] ? result : _unionToTuple, [current, ...result]> : never;\ntype getLastBranch = intersectUnion void : never> extends ((x: infer branch) => void) ? branch : never;\ntype intersectUnion = (t extends unknown ? (_: t) => void : never) extends ((_: infer intersection) => void) ? intersection : never;\ntype intersectOverloadReturns = intersectUnion>>;\ntype overloadOf = Exclude never) & fn, givenArgs, unknown>, fn extends () => never ? never : () => never>;\ntype collectSignatures = result & fn extends (...args: infer args) => infer returns ? result extends fn ? never : collectSignatures & result & ((...args: args) => returns)> | (args extends givenArgs ? (...args: args) => returns : never) : never;\n\ntype DescribeOptions = {\n includeArticles?: boolean;\n branchDelimiter?: string;\n};\ntype typeToString = stringifyUnion<[\n t\n] extends [anyOrNever] ? unknown extends t ? \"any\" : \"never\" : unknown extends t ? \"unknown\" : boolean extends t ? \"boolean\" | ([t] extends [boolean] ? never : typeToString, opts>) : t extends array ? arrayTypeToString : t extends object ? describeObject : t extends Stringifiable ? stringifiableToString : describeDomainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\ntype stringifiableToString = inferDomain> extends t ? describeDomainOf : `${t}`;\ntype describe = typeToString;\ntype arrayTypeToString = typeToString extends infer element extends string ? opts[\"includeArticles\"] extends true ? describeArrayOf : includesDelimiter extends true ? `(${element})[]` : `${element}[]` : never;\ntype describeArrayOf = element extends \"unknown\" ? \"an array\" : `an array of ${element}`;\ntype includesDelimiter = s extends (`${string}${opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]}${string}`) ? true : false;\ntype describeDefaults = satisfy, {\n includeArticles: false;\n branchDelimiter: \" | \";\n}>;\n\ntype JsTypeOf = \"object\" | \"function\" | \"number\" | \"bigint\" | \"boolean\" | \"string\" | \"symbol\" | \"undefined\" | \"null\";\ndeclare const hasDomain: (data: data, kind: domain) => data is data & inferDomain;\ntype TypesByDomain = {\n bigint: bigint;\n boolean: boolean;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n undefined: undefined;\n null: null;\n};\ntype inferDomain = Domain extends kind ? unknown : TypesByDomain[kind];\ntype Domain = show;\ntype NullishDomain = \"undefined\" | \"null\";\ntype NonNullishDomain = Exclude;\ntype PrimitiveDomain = Exclude;\ntype Primitive = inferDomain;\ntype domainOf = unknown extends data ? Domain : data extends object ? \"object\" : data extends string ? \"string\" : data extends number ? \"number\" : data extends boolean ? \"boolean\" : data extends undefined ? \"undefined\" : data extends null ? \"null\" : data extends bigint ? \"bigint\" : data extends symbol ? \"symbol\" : never;\ndeclare const domainOf: (data: data) => domainOf;\ndeclare const jsTypeOfDescriptions: {\n readonly function: \"a function\";\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\n/** Each domain's completion for the phrase \"must be _____\" */\ndeclare const domainDescriptions: {\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\ntype domainDescriptions = typeof domainDescriptions;\ntype describeDomainOf = stringifyUnion] : domainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\n\ndeclare class InternalArktypeError extends Error {\n}\ndeclare const throwInternalError: (message: string) => never;\ndeclare const throwError: (message: string, ctor?: new (message: string) => Error) => never;\ndeclare class ParseError extends Error {\n readonly name = \"ParseError\";\n}\ndeclare const throwParseError: (message: string) => never;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ndeclare const noSuggest: (s: s) => noSuggest;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ntype noSuggest = ` ${s}`;\n/** \"Hair Space\" character, used as a non-rendered sentinel for an error message string:\n * https://www.compart.com/en/unicode/U+200A\n */\ndeclare const zeroWidthSpace = \"\\u200A\";\n/** \"Hair Space\" character, used as a non-rendered sentinel for an error message string:\n * https://www.compart.com/en/unicode/U+200A\n */\ntype ZeroWidthSpace = typeof zeroWidthSpace;\ntype ErrorMessage = `${message}${ZeroWidthSpace}`;\ninterface ErrorType {\n [brand]: \"ErrorType\";\n message: message;\n ctx: ctx;\n}\ntype Completion = `${text}${ZeroWidthSpace}${ZeroWidthSpace}`;\n\ntype Stringifiable = string | boolean | number | bigint | null | undefined;\n/** Force an operation like `{ a: 0 } & { b: 1 }` to be computed so that it displays `{ a: 0; b: 1 }`. */\ntype show = {\n [k in keyof t]: t[k];\n} & unknown;\n/** @deprecated use \"show\" instead */\ntype evaluate = {\n [k in keyof t]: t[k];\n} & unknown;\ntype exact = {\n [k in keyof t]: k extends keyof u ? conform : never;\n};\ntype exactMessageOnError = {\n [k in keyof t]: k extends keyof u ? conform : ErrorMessage<`'${k & string}' is not a valid key`>;\n} & u;\ntype promisable = t | Promise;\ntype leftIfEqual = [l, r] extends [r, l] ? l : r;\ntype UnknownUnion = string | number | symbol | bigint | boolean | object | null | undefined;\n/**\n * Interesection (`&`) that avoids evaluating `unknown` to `{}`\n */\ntype andPreserveUnknown = unknown extends l & r ? unknown : show;\n/** Can be used to test for the universal subtypes, `any` and `never`, e.g.:\n *\n * ```ts\n * type isAnyOrNever = [t] extends [anyOrNever] ? true : false\n * ```\n *\n * The actual value is a string literal, but the only realistic subtypes\n * of that literal are `any` and `never`.\n */\ntype anyOrNever = \" anyOrNever\";\ntype conform = t extends base ? t : base;\ntype equals = [l, r] extends [r, l] ? true : false;\ntype exactEquals = (<_>() => _ extends l ? 1 : 2) extends <_>() => _ extends r ? 1 : 2 ? true : false;\ndeclare const brand: \" brand\";\ntype Brand = t & {\n readonly [brand]: [t, id];\n};\ntype unbrand = t extends Brand ? base : never;\ntype satisfy = t;\ntype defined = t & ({} | null);\ntype autocomplete = suggestions | (string & {});\ntype widen = collectWidenedType>;\ntype collectWidenedType = remaining extends [infer head, ...infer tail] ? collectWidenedType : result;\ntype narrowTuple = t extends readonly [infer head, ...infer tail] ? readonly [head, ...narrowTuple] : [];\ntype narrow = t extends Primitive ? t : t extends readonly unknown[] ? narrowTuple : {\n [k in keyof t]: narrow;\n};\ndeclare const narrow: (t: narrow) => t;\n/** primitive key used to represent an inferred type at compile-time */\ndeclare const inferred: \" arkInferred\";\n/** primitive key used to represent an inferred type at compile-time */\ntype inferred = typeof inferred;\n\ndeclare const args: \" args\";\ntype args = typeof args;\ndeclare abstract class Hkt {\n [args]: unknown[];\n constraints: constraints;\n args: this[args] extends infer args extends unknown[] ? args : never;\n 0: this[args] extends [infer arg, ...any] ? arg : never;\n 1: this[args] extends [any, infer arg, ...any] ? arg : never;\n 2: this[args] extends [any, any, infer arg, ...any] ? arg : never;\n 3: this[args] extends [any, any, any, infer arg, ...any] ? arg : never;\n abstract body: unknown;\n description?: string;\n constructor();\n}\n/** A small set of HKT utility types based on https://github.com/gvergnaud/hotscript\n * See https://github.com/gvergnaud/hotscript/blob/main/src/internals/core/Core.ts\n */\ndeclare namespace Hkt {\n type constructor = new () => Hkt;\n type args = typeof args;\n type apply = (hkt & {\n [args]: args;\n })[\"body\"];\n}\n\ntype Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\ntype NumberLiteral = `${n}`;\ntype BigintLiteral = `${n}n`;\ntype IntegerLiteral = `${n}`;\ntype NonNegativeIntegerLiteral = `${Digit}` | (`${Exclude}${string}` & `${n}`);\n/**\n * Matches a well-formatted numeric expression according to the following rules:\n * 1. Must include an integer portion (i.e. '.321' must be written as '0.321')\n * 2. The first digit of the value must not be 0, unless the entire integer portion is 0\n * 3. If the value includes a decimal, its last digit may not be 0\n * 4. The value may not be \"-0\"\n */\ndeclare const wellFormedNumberMatcher: RegExp;\ndeclare const isWellFormedNumber: RegExp[\"test\"];\n/**\n * Similar to wellFormedNumber but more permissive in the following ways:\n *\n * - Allows numbers without an integer portion like \".5\" (well-formed equivalent is \"0.5\")\n * - Allows decimals with trailing zeroes like \"0.10\" (well-formed equivalent is \"0.1\")\n */\ndeclare const numericStringMatcher: RegExp;\ndeclare const isNumericString: (string: string) => boolean;\ndeclare const numberLikeMatcher: RegExp;\n/**\n * Matches a well-formatted integer according to the following rules:\n * 1. must begin with an integer, the first digit of which cannot be 0 unless the entire value is 0\n * 2. The value may not be \"-0\"\n */\ndeclare const wellFormedIntegerMatcher: RegExp;\ndeclare const isWellFormedInteger: RegExp[\"test\"];\ndeclare const integerLikeMatcher: RegExp;\ntype NumericLiteralKind = \"number\" | \"bigint\" | \"integer\";\ndeclare const numericLiteralDescriptions: {\n readonly number: \"a number\";\n readonly bigint: \"a bigint\";\n readonly integer: \"an integer\";\n};\ntype numericLiteralDescriptions = typeof numericLiteralDescriptions;\ntype writeMalformedNumericLiteralMessage = `'${def}' was parsed as ${numericLiteralDescriptions[kind]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`;\ndeclare const writeMalformedNumericLiteralMessage: (def: def, kind: kind) => writeMalformedNumericLiteralMessage;\ndeclare const tryParseWellFormedNumber: typeof tryParseNumber;\ndeclare const tryParseNumber: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseNumber = token extends `${infer n extends number}` ? number extends n ? writeMalformedNumericLiteralMessage : n : messageOnFail;\ntype parseNumber = token extends `${infer n extends number}` ? n : never;\ndeclare const tryParseInteger: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseInteger = token extends `${infer b extends bigint}` ? bigint extends b ? writeMalformedNumericLiteralMessage : token extends `${infer n extends number}` ? n : never : messageOnFail;\ntype parseInteger = token extends `${bigint}` ? token extends `${infer n extends number}` ? n : never : never;\ntype parseNonNegativeInteger = token extends `-${string}` ? never : parseInteger;\ntype NumericParseOptions = {\n errorOnFail?: errorOnFail;\n strict?: boolean;\n};\ndeclare const tryParseWellFormedBigint: (def: string) => bigint | undefined;\n/**\n * Returns the next or previous representable floating-point number after the given input.\n *\n * @param {\"+\" | \"-\"} [direction=\"+\"] - The direction to find the nearest float. \"+\" for the next float, \"-\" for the previous float.\n * @throws {Error} If the input is not a finite number.\n *\n * @example\n * console.log(nearestFloat(0)); // Smallest positive number\n * console.log(nearestFloat(2)); // 2.0000000000000004\n * console.log(nearestFloat(2.1)); // 2.1000000000000005\n * console.log(nearestFloat(2, \"-\")); // 1.9999999999999998\n * console.log(nearestFloat(2.1, \"-\")); // 2.0999999999999996\n * // as size of input increases, the increments become larger to stay within what\n * // JS can represent in a numeric value\n * console.log(nearestFloat(5555555555555555)); // 5555555555555556\n * console.log(nearestFloat(5555555555555555, \"-\")); // 5555555555555554\n */\ndeclare const nearestFloat: (n: number, direction?: \"+\" | \"-\") => number;\n\ntype Key = string | symbol;\ntype toArkKey = k extends number ? [\n o,\n number\n] extends [array, k] ? NonNegativeIntegerLiteral : `${k}` : k;\ntype arkIndexableOf = arkKeyOf extends infer k ? k extends `${infer index extends number}` ? index | k : k : never;\ntype arkKeyOf = [\n o\n] extends [object] ? [\n o\n] extends [array] ? arkArrayKeyOf : arkObjectLiteralKeyOf : never;\ntype arkArrayKeyOf = number extends a[\"length\"] ? NonNegativeIntegerLiteral : keyof a extends infer i ? i extends `${number}` ? i : never : never;\ntype arkObjectLiteralKeyOf = keyof o extends infer k ? k extends number ? `${k}` : k : never;\ntype arkGet> = o[k extends keyof o ? k : NonNegativeIntegerLiteral extends k ? number & keyof o : k extends number ? `${k}` & keyof o : never];\ntype writeInvalidKeysMessage> = `Key${keys[\"length\"] extends 1 ? \"\" : \"s\"} ${join} ${keys[\"length\"] extends 1 ? \"does\" : \"do\"} not exist on ${o}`;\n\ntype Dict = {\n readonly [_ in k]: v;\n};\ntype dict = {\n [_ in k]: v;\n};\n/** Either:\n * A, with all properties of B undefined\n * OR\n * B, with all properties of A undefined\n **/\ntype propwiseXor = show | show;\ntype unionToPropwiseXor> = props extends infer distributed ? show : never;\ntype requireKeys = o & {\n [requiredKey in key]-?: defined;\n};\ntype require = _require;\ntype _require = depth[\"length\"] extends maxDepth ? o : o extends object ? o extends Fn ? o : {\n [k in keyof o]-?: _require;\n} : o;\ntype PartialRecord = {\n [_ in k]?: v;\n};\n/** Returns true if a type can be homomorphically mapped without losing information.\n * Useful for avoiding e.g. classes with private properties while mapping.\n */\ntype isSafelyMappable = {\n [k in keyof t]: t[k];\n} extends t ? true : false;\ntype KeySet = {\n readonly [_ in key]?: 1;\n};\ntype keySetOf = KeySet>;\ntype mutable = _mutable;\ntype _mutable = depth[\"length\"] extends maxDepth ? o : o extends Primitive ? o : o extends Fn ? o : {\n -readonly [k in keyof o]: _mutable;\n};\n/**\n * extracts entries mimicking Object.entries, accounting for whether the\n * object is an array\n **/\ntype entryOf = {\n [k in keyof o]-?: [k, o[k] & ({} | null)];\n}[o extends readonly unknown[] ? keyof o & number : keyof o] & unknown;\ntype entriesOf = entryOf[];\n/**\n * Object.entries wrapper providing narrowed types for objects with known sets\n * of keys, e.g. those defined internally as configs\n */\ndeclare const entriesOf: (o: o) => entryOf[];\ntype Entry = readonly [key: key, value: value];\ntype fromEntries = show<{\n [entry in entries[number] as entry[0]]: entry[1];\n}>;\ndeclare const fromEntries: (entries: entries) => fromEntries;\n/** Mimics the result of Object.keys(...) */\ntype keyOf = o extends array ? number extends o[\"length\"] ? `${number}` : keyof o & `${number}` : keyof o extends infer k ? k extends string ? k : k extends number ? `${k}` : never : never;\ndeclare const keysOf: (o: o) => keyOf[];\ndeclare const isKeyOf: (k: k, o: o) => k is Extract;\n/** Coalesce keys that exist on one or more branches of a union */\ntype unionKeyOf = t extends unknown ? keyof t : never;\ntype extractKeyed> = Extract;\ndeclare const hasKey: >(o: o, k: k) => o is extractKeyed;\ntype extractDefinedKey> = show & {\n [_ in k]: {} | null;\n}>;\ndeclare const hasDefinedKey: >(o: o, k: k) => o is extractDefinedKey;\ntype requiredKeyOf = keyof o extends infer k ? k extends keyof o ? o extends {\n [_ in k]-?: o[k];\n} ? k : never : never : never;\ntype optionalKeyOf = Exclude>;\ntype merge = base extends unknown ? props extends unknown ? show & props> : never : never;\ntype mergeExact = base extends unknown ? props extends unknown ? show & props> : never : never;\ntype omitMerged = {\n [k in keyof base as excludeExactKeyOf]: base[k];\n};\ntype excludeExactKeyOf = Exclude>;\ntype extractExactKeyOf = keyof {\n [k in keyof base as [key, k] extends [k, key] ? key : never]: 1;\n};\ntype override = merge;\ntype propValueOf = o[keyof o];\ndeclare const InnerDynamicBase: new (base: t) => t;\n/** @ts-ignore (needed to extend `t`) **/\ninterface DynamicBase extends t {\n}\ndeclare class DynamicBase {\n constructor(properties: t);\n}\ndeclare const NoopBase: new () => t;\n/** @ts-ignore (needed to extend `t`) **/\ndeclare class CastableBase extends NoopBase {\n}\ndeclare const splitByKeys: >(o: o, leftKeys: leftKeys) => [show>, show>];\n/** Homomorphic implementation of the builtin Pick.\n *\n * Gives different results for certain union expressions like the following:\n *\n * @example\n * // flattens result to { a?: 1 | 2; b?: 1 | 2 }\n * type PickResult = Pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type pickResult = pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n */\ntype pick = o extends unknown ? {\n [k in keyof o as k extends key ? k : never]: o[k];\n} : never;\ndeclare const pick: >(o: o, keys: keys) => pick;\n/** Homomorphic implementation of the builtin Omit.\n *\n * Gives different results for many union expressions like the following:\n *\n * @example\n * // {}\n * type OmitResult = Omit<{ a: 1 } | { b: 2 }, never>\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type omitResult = omit<{ a: 1 } | { b: 2 }, never>\n */\ntype omit = {\n [k in keyof o as k extends key ? never : k]: o[k];\n};\ndeclare const omit: >(o: o, keys: keys) => omit;\n/** Returns onTrue if the type is exactly `{}` and onFalse otherwise*/\ntype ifEmptyObjectLiteral = [\n unknown,\n t & (null | undefined)\n] extends [t | null | undefined, never] ? onTrue : onFalse;\ntype EmptyObject = Record;\ndeclare const isEmptyObject: (o: object) => o is EmptyObject;\ndeclare const stringAndSymbolicEntriesOf: (o: object) => Entry[];\n/** Like Object.assign, but it will preserve getters instead of evaluating them. */\ndeclare const defineProperties: (base: base, merged: merged) => merge;\n/** Copies enumerable keys of o to a new object in alphabetical order */\ndeclare const withAlphabetizedKeys: (o: o) => o;\ntype invert> = {\n [k in t[keyof t]]: {\n [k2 in keyof t]: t[k2] extends k ? k2 : never;\n }[keyof t];\n} & unknown;\ndeclare const invert: >(t: t) => invert;\ndeclare const unset: \" represents an uninitialized value\";\ntype unset = typeof unset;\n/**\n * For each keyof o that also exists on jsDocSource, add associated JsDoc annotations to o.\n * Does not preserve modifiers on o like optionality.\n */\ntype withJsDoc = show : Pick<_withJsDoc, keyof o & keyof jsDocSource> : Pick<_withJsDoc, keyof o & keyof jsDocSource> & {\n [k in Exclude]: o[k];\n}>;\ntype _withJsDoc = {\n [k in keyof jsDocSource]-?: o[k & keyof o];\n};\ntype propertyDescriptorsOf = {\n [k in keyof o]: TypedPropertyDescriptor;\n};\ntype keyWithValue = keyof t extends infer k ? k extends keyof t ? t[k] extends constraint ? k : never : never : never;\ndeclare const enumValues: (tsEnum: tsEnum) => tsEnum[keyof tsEnum][];\n\ninterface AndPreserveUnknown extends Hkt<[unknown, unknown]> {\n body: andPreserveUnknown;\n}\ntype SequenceIntersectionKind = \"array\" | \"parameters\";\ntype intersectArrays = intersectSequences;\ntype intersectParameters = intersectSequences;\ntype intersectSequences = l extends readonly [] ? kind extends \"array\" ? [\n] extends r ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...r, ...postfix] : r extends readonly [] ? kind extends \"array\" ? [\n] extends l ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...l, ...postfix] : [\n l,\n r\n] extends ([\n readonly [(infer lHead)?, ...infer lTail],\n readonly [(infer rHead)?, ...infer rTail]\n]) ? [\n \"0\",\n lHead,\n rHead\n] extends [keyof l | keyof r, l[0], r[0]] ? intersectSequences?\n] : [...acc, Hkt.apply], postfix, operation, kind> : l extends readonly [...infer lInit, infer lLast] ? r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : intersectSequences,\n ...postfix\n], operation, kind> : r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : [...acc, ...Hkt.apply[], ...postfix] : never;\ntype isDisjoint = overlaps extends true ? false : true;\ntype overlaps = l & r extends never ? false : domainOf & domainOf extends never ? false : [l, r] extends [object, object] ? false extends (propValueOf<{\n [k in Extract | requiredKeyOf>]: overlaps;\n}>) ? false : true : true;\n\ntype DuplicateData = {\n element: val;\n indices: number[];\n};\n/**\n * Extracts duplicated elements and their indices from an array, returning them.\n *\n * Note that given `a === b && b === c`, then `c === a` must be `true` for this to give accurate results.\n *\n * @param arr The array to extract duplicate elements from.\n */ declare const getDuplicatesOf: (arr: arr, opts?: ComparisonOptions) => DuplicateData[];\ntype pathToString = segments extends [] ? \"/\" : join;\ndeclare const join: , delimiter extends string>(segments: segments, delimiter: delimiter) => join;\ntype join, delimiter extends string, result extends string = \"\"> = segments extends (readonly [infer head extends string, ...infer tail extends string[]]) ? join : result;\ndeclare const getPath: (root: unknown, path: string[]) => unknown;\ndeclare const intersectUniqueLists: (l: readonly item[], r: readonly item[]) => item[];\ntype filter = t extends readonly [infer head, ...infer tail] ? filter : result;\ntype array = readonly t[];\ntype listable = t | readonly t[];\ntype flattenListable = t extends array ? element : t;\ntype minLengthArray = readonly [\n ...repeat<[t], minLength>,\n ...t[]\n];\ntype repeat = _repeat;\ntype _repeat = depth[\"length\"] extends maxDepth ? result : _repeat;\ntype CollapsingList = readonly [] | t | readonly [t, t, ...t[]];\ntype headOf = t[0];\ntype tailOf = t extends readonly [unknown, ...infer tail] ? tail : never;\ntype lastIndexOf = tailOf[\"length\"];\ntype lastOf = t[lastIndexOf];\ntype initOf = t extends readonly [...infer init, unknown] ? init : never;\ntype numericStringKeyOf = Extract;\ntype arrayIndexOf = keyof a extends infer k ? parseNonNegativeInteger : never;\ntype liftArray = t extends array ? [\n t\n] extends [anyOrNever] ? t[] : t : t[];\ndeclare const liftArray: (data: t) => liftArray;\n/**\n * Splits an array into two arrays based on the result of a predicate\n *\n * @param predicate - The guard function used to determine which items to include.\n * @returns A tuple containing two arrays:\n * \t\t\t\t- the first includes items for which `predicate` returns true\n * \t\t\t\t- the second includes items for which `predicate` returns false\n *\n * @example\n * const list = [1, \"2\", \"3\", 4, 5];\n * const [numbers, strings] = spliterate(list, (x) => typeof x === \"number\");\n * // Type: number[]\n * // Output: [1, 4, 5]\n * console.log(evens);\n * // Type: string[]\n * // Output: [\"2\", \"3\"]\n * console.log(odds);\n */\ndeclare const spliterate: (arr: readonly item[], predicate: GuardablePredicate) => [included: included[], excluded: [item] extends [included] ? item[] : Exclude[]];\ndeclare const ReadonlyArray: new (...args: ConstructorParameters>) => ReadonlyArray;\ndeclare const includes: (array: a, element: unknown) => element is a[number];\ndeclare const range: (length: number, offset?: number) => number[];\ntype AppendOptions = {\n /** If true, adds the element to the beginning of the array instead of the end */\n prepend?: boolean;\n};\n/**\n * Adds a value or array to an array, returning the concatenated result\n */\ndeclare const append: >(to: to, value: value, opts?: AppendOptions) => to & {};\ntype appendableValue = to extends array ? element extends array ? array : listable : never;\n/**\n * Concatenates an element or list with a readonly list\n */\ndeclare const conflatenate: (to: readonly element[] | undefined | null, elementOrList: appendableValue | undefined | null) => readonly element[];\n/**\n * Concatenates a variadic list of elements or lists with a readonly list\n */\ndeclare const conflatenateAll: (...elementsOrLists: (listable | undefined | null)[]) => readonly element[];\ninterface ComparisonOptions {\n isEqual?: (l: t, r: t) => boolean;\n}\n/**\n * Appends a value or concatenates an array to an array if it is not already included, returning the array\n */\ndeclare const appendUnique: (to: to | undefined, value: NoInfer | to[number]>, opts?: ComparisonOptions) => to;\ntype groupableKeyOf = keyof o extends infer k ? k extends keyof o ? o[k] extends PropertyKey ? k : never : never : never;\ntype groupBy> = {\n [k in element[discriminant] & PropertyKey]?: (element extends unknown ? isDisjoint extends true ? never : element : never)[];\n} & unknown;\ndeclare const groupBy: >(array: readonly element[], discriminant: discriminant) => groupBy;\ndeclare const arrayEquals: (l: array, r: array, opts?: ComparisonOptions) => boolean;\ntype validateExhaustiveKeys = keys extends readonly [infer head, ...infer tail extends PropertyKey[]] ? readonly [\n conform,\n ...validateExhaustiveKeys>\n] : [expectedKey] extends [never] ? [] : [expectedKey];\n\n/** Shallowly copy the properties of the object. */\ndeclare const shallowClone: (input: input) => input;\n/** Deeply copy the properties of the a non-subclassed Object, Array or Date.*/\ndeclare const deepClone: (input: input) => input;\n\ntype objectFromListableEntries = show>>;\ntype fromGroupableEntries = {\n [entry in entries[number] as entry extends GroupedEntry ? entry[0][\"group\"] : conform]: entry extends GroupedEntry ? entry[1][] : entry[1];\n};\ntype arrayFromListableEntries = Entry extends transformed ? transformed[1][] : _arrayFromListableEntries;\ntype _arrayFromListableEntries = [\n transformed\n] extends [never] ? result : Extract> extends (infer next extends Entry) ? Exclude extends infer remaining extends Entry ? [\n transformed\n] extends [remaining] ? [\n ...result,\n ...transformed[1][]\n] : _arrayFromListableEntries : never : [...result, ...transformed[1][]];\ntype extractEntrySets> = e extends readonly GroupableEntry[] ? e : [e];\ntype extractEntries> = e extends readonly Entry[] ? e[number] : e;\ntype entryArgsWithIndex = {\n [k in keyof o]-?: [k: k, v: Exclude, i: number];\n}[keyof o];\ntype numericArrayEntry = number extends a[\"length\"] ? [number, a[number]] : {\n [i in keyof a]: i extends `${infer n extends number}` ? [n, a[i]] : never;\n}[number];\ntype GroupedEntry = readonly [key: {\n group: Key;\n}, value: unknown];\ntype GroupableEntry = Entry | Entry | GroupedEntry;\ntype ListableEntry = listable;\ntype fromMappedEntries = [\n transformed\n] extends [listable>] ? arrayFromListableEntries> : objectFromListableEntries>;\ntype FlatMorph = {\n (o: o, flatMapEntry: (...args: numericArrayEntry) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryOf) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryArgsWithIndex) => transformed): fromMappedEntries;\n};\ndeclare const flatMorph: FlatMorph;\n\ndeclare const isomorphic: {\n fileName: () => string;\n env: Record, string | undefined>;\n};\n\ndeclare const lazily: (thunk: () => t) => t;\n\ntype SerializationOptions = {\n onCycle?: (value: object) => string;\n onSymbol?: (value: symbol) => string;\n onFunction?: (value: Function) => string;\n onUndefined?: string;\n onBigInt?: (value: bigint) => string;\n};\ntype JsonStructure = JsonObject | JsonArray;\ninterface JsonObject {\n [k: string]: Json;\n}\ntype JsonArray = Json[];\ntype JsonPrimitive = string | boolean | number | null;\ntype Json = JsonStructure | JsonPrimitive;\ndeclare const snapshot: (data: t, opts?: SerializationOptions) => snapshot;\ntype snapshot = unknown extends t ? unknown : t extends Primitive ? snapshotPrimitive : t extends {\n toJSON: () => infer serialized;\n} ? serialized : t extends Function ? `Function(${string})` : t extends Date ? string : depth[\"length\"] extends 10 ? unknown : t extends array ? array> : {\n [k in keyof t as snapshotPrimitive]: snapshot;\n};\ntype snapshotPrimitive = t extends symbol ? `Symbol(${string})` : t;\ntype PrintableOptions = {\n indent?: number;\n quoteKeys?: boolean;\n};\ndeclare const print: (data: unknown, opts?: PrintableOptions) => void;\ndeclare const printable: (data: unknown, opts?: PrintableOptions) => string;\n/**\n * Converts a Date instance to a human-readable description relative to its precision\n */\ndeclare const describeCollapsibleDate: (date: Date) => string;\n\ntype StringifyPathOptions = requireKeys<{\n stringifySymbol?: (s: symbol) => string;\n stringifyNonKey?: (o: Exclude) => string;\n}, stringifiable extends PropertyKey ? never : \"stringifyNonKey\">;\ntype StringifyPathFn = (path: array, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ntype AppendStringifiedKeyFn = (path: string, prop: stringifiable, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ndeclare const appendStringifiedKey: AppendStringifiedKeyFn;\ndeclare const stringifyPath: StringifyPathFn;\ndeclare class ReadonlyPath extends ReadonlyArray {\n private cache;\n constructor(...items: array);\n toJSON(): JsonArray;\n stringify(): string;\n stringifyAncestors(): readonly string[];\n}\n\ntype SerializedString = `\"${value}\"`;\ntype SerializedPrimitives = {\n string: SerializedString;\n number: `${number}`;\n bigint: BigintLiteral;\n boolean: \"true\" | \"false\";\n null: \"null\";\n undefined: \"undefined\";\n};\ntype SerializedPrimitive = SerializedPrimitives[keyof SerializedPrimitives];\ntype SerializablePrimitive = inferDomain;\ndeclare const serializePrimitive: (value: value) => serializePrimitive;\ntype serializePrimitive = value extends string ? `\"${value}\"` : value extends bigint ? `${value}n` : `${value}`;\n\ndeclare const arkUtilVersion = \"0.45.10\";\ndeclare const initialRegistryContents: {\n version: string;\n filename: string;\n FileConstructor: typeof buffer.File;\n};\ntype InitialRegistryContents = typeof initialRegistryContents;\ninterface ArkRegistry extends InitialRegistryContents {\n [k: string]: unknown;\n}\ndeclare const registry: ArkRegistry;\ndeclare global {\n export interface ArkEnv {\n prototypes(): never;\n }\n export namespace ArkEnv {\n type prototypes = ReturnType;\n }\n}\ndeclare const register: (value: object | symbol) => string;\ndeclare const isDotAccessible: (keyName: string) => boolean;\n\ndeclare class Scanner {\n chars: string[];\n i: number;\n def: string;\n constructor(def: string);\n /** Get lookahead and advance scanner by one */\n shift(): this[\"lookahead\"];\n get lookahead(): lookahead;\n get nextLookahead(): string;\n get length(): number;\n shiftUntil(condition: Scanner.UntilCondition): string;\n shiftUntilLookahead(charOrSet: string | KeySet): string;\n shiftUntilNonWhitespace(): string;\n jumpToIndex(i: number): void;\n jumpForward(count: number): void;\n get location(): number;\n get unscanned(): string;\n get scanned(): string;\n sliceChars(start: number, end?: number): string;\n lookaheadIs(char: char): this is Scanner;\n lookaheadIsIn(tokens: keySet): this is Scanner>;\n}\ndeclare namespace Scanner {\n type UntilCondition = (scanner: Scanner, shifted: string) => boolean;\n}\n\ndeclare const capitalize: (s: s) => Capitalize;\ndeclare const uncapitalize: (s: s) => Uncapitalize;\ntype firstChar = s extends `${infer head}${string}` ? head : \"\";\ntype charsAfterFirst = s extends `${string}${infer tail}` ? tail : \"\";\ntype lastChar = s extends `${infer head}${infer tail}` ? tail extends \"\" ? head : lastChar : s;\ntype charsBeforeLast = s extends `${infer head}${infer tail}` ? tail extends \"\" ? \"\" : `${head}${charsBeforeLast}` : \"\";\ndeclare const anchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const deanchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const anchoredSource: (regex: RegExp | string) => string;\ndeclare const deanchoredSource: (regex: RegExp | string) => string;\ndeclare const RegexPatterns: {\n negativeLookahead: (pattern: string) => `(?!${string})`;\n nonCapturingGroup: (pattern: string) => `(?:${string})`;\n};\ndeclare const escapeChar = \"\\\\\";\ntype EscapeChar = typeof escapeChar;\ndeclare const whitespaceChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n};\ntype WhitespaceChar = keyof typeof whitespaceChars;\ntype trim = trimEnd>;\ntype trimStart = s extends `${WhitespaceChar}${infer tail}` ? trimEnd : s;\ntype trimEnd = s extends `${infer init}${WhitespaceChar}` ? trimEnd : s;\ntype isStringLiteral = [\n t\n] extends [string] ? [\n string\n] extends [t] ? false : Uppercase extends Uppercase> ? Lowercase extends Lowercase> ? true : false : false : false;\ndeclare const emojiToUnicode: (emoji: string) => string;\n\ntype TraitImplementation = , s extends CompositionState = composeTraits<[\n ...traits,\n implementation\n], \"implementation\">, cls extends TraitConstructor = TraitConstructor>(...args: [...traits, implementation & ThisType>]) => cls;\ntype TraitComposition = >(...traits: conform) => TraitConstructor;\ndeclare const hasTrait: (traitClass: Constructor) => (o: unknown) => boolean;\ntype TraitDeclaration = {\n abstractMethods?: object;\n abstractProps?: object;\n abstractStatics?: object;\n dynamicBase?: object;\n};\n/** @ts-ignore required to extend NoopBase */\ndeclare abstract class Trait extends NoopBase {\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatic: abstractStatics;\n static get [Symbol.hasInstance](): (o: unknown) => boolean;\n traitsOf(): readonly TraitConstructor[];\n}\ndeclare const compose: TraitComposition;\ndeclare const implement: TraitImplementation;\ntype TraitConstructor = statics & (new (...args: params) => Trait<{\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatics: abstractStatics;\n}> & instance);\ntype CompositionState = {\n validated: array;\n remaining: array;\n params: array;\n kind: TraitCompositionKind;\n implemented: object;\n abstractMethods: object;\n abstractProps: object;\n abstractStatics: object;\n statics: object;\n};\ntype TraitCompositionKind = \"abstract\" | \"implementation\";\ntype composeTraits = _compose<{\n validated: [];\n remaining: traits;\n kind: kind;\n params: [];\n implemented: {};\n abstractMethods: {};\n abstractProps: {};\n abstractStatics: {};\n statics: {};\n}>;\ntype intersectImplementations = {\n [k in keyof l]: k extends keyof r ? l[k] extends (...args: infer lArgs) => infer lReturn ? r[k] extends (...args: infer rArgs) => infer rReturn ? (...args: intersectParameters) => lReturn & rReturn : l[k] & r[k] : l[k] & r[k] : l[k];\n} & Omit;\ntype _compose = s[\"remaining\"] extends (readonly [\n TraitConstructor,\n ...infer tail\n]) ? _compose<{\n validated: [...s[\"validated\"], s[\"remaining\"][0]];\n remaining: tail;\n kind: s[\"kind\"];\n params: intersectParameters;\n implemented: intersectImplementations>;\n statics: intersectImplementations>;\n abstractMethods: intersectImplementations;\n abstractProps: intersectImplementations;\n abstractStatics: intersectImplementations;\n}> : finalizeState;\ntype finalizeState = satisfy;\n statics: show>;\n abstractMethods: show>;\n abstractProps: show>;\n abstractStatics: show>;\n}>;\ntype implementationOf = s[\"abstractMethods\"] & ({} extends s[\"abstractProps\"] ? {} : {\n construct: (...args: s[\"params\"]) => s[\"abstractProps\"];\n}) & ({} extends s[\"abstractStatics\"] ? {} : {\n statics: s[\"abstractStatics\"];\n});\n\nexport { type AndPreserveUnknown, type AppendOptions, type AppendStringifiedKeyFn, type ArkRegistry, type BigintLiteral, type Brand, type BuiltinObjectKind, type BuiltinObjects, Callable, type CallableOptions, CastableBase, type CollapsingList, type ComparisonOptions, type Completion, type Constructor, type DescribeOptions, type Dict, type Digit, type Domain, DynamicBase, DynamicFunction, type EcmascriptObjects, type EmptyObject, type Entry, type ErrorMessage, type ErrorType, type EscapeChar, FileConstructor, type FlatMorph, type Fn, type GlobalName, type GroupableEntry, type GroupedEntry, type GuardablePredicate, Hkt, type InitialRegistryContents, InnerDynamicBase, type IntegerLiteral, InternalArktypeError, type JsTypeOf, type Json, type JsonArray, type JsonObject, type JsonPrimitive, type JsonStructure, type Key, type KeySet, type ListableEntry, type NonNegativeIntegerLiteral, type NonNullishDomain, NoopBase, type NullishDomain, type NumberLiteral, type NumericParseOptions, ParseError, type PartialRecord, type PlatformObjects, type Primitive, type PrimitiveDomain, type PrintableOptions, ReadonlyArray, ReadonlyPath, RegexPatterns, Scanner, type SerializablePrimitive, type SerializationOptions, type SerializedPrimitive, type SerializedPrimitives, type Stringifiable, type StringifyPathFn, type StringifyPathOptions, type Thunk, Trait, type TraitComposition, type TraitCompositionKind, type TraitConstructor, type TraitDeclaration, type TraitImplementation, type TypeGuard, type TypedArrayObjects, type UnknownUnion, type WhitespaceChar, type ZeroWidthSpace, ancestorsOf, anchoredRegex, anchoredSource, type andPreserveUnknown, type anyOrNever, append, appendStringifiedKey, appendUnique, type appendableValue, type arkGet, type arkIndexableOf, type arkKeyOf, arkUtilVersion, type array, arrayEquals, type arrayIndexOf, type autocomplete, brand, builtinConstructors, cached, capitalize, type charsAfterFirst, type charsBeforeLast, compose, type composeTraits, conflatenate, conflatenateAll, type conform, constructorExtends, deanchoredRegex, deanchoredSource, deepClone, defineProperties, type defined, type describe, describeCollapsibleDate, type describeDefaults, type describeDomainOf, type describeObject, type dict, domainDescriptions, domainOf, ecmascriptConstructors, ecmascriptDescriptions, emojiToUnicode, entriesOf, type entryOf, enumValues, envHasCsp, type equals, escapeChar, type evaluate, type exact, type exactEquals, type exactMessageOnError, type extractDefinedKey, type extractKeyed, type filter, type firstChar, flatMorph, type flattenListable, fromEntries, type fromMappedEntries, getBuiltinNameOfConstructor, getDuplicatesOf, getPath, groupBy, type groupableKeyOf, hasDefinedKey, hasDomain, hasKey, hasObjectKind, hasTrait, type headOf, type ifEmptyObjectLiteral, implement, type implementationOf, includes, type inferDomain, inferred, type initOf, initialRegistryContents, type instanceOf, integerLikeMatcher, type intersectArrays, type intersectOverloadReturns, type intersectParameters, type intersectUnion, intersectUniqueLists, invert, isArray, type isDisjoint, isDotAccessible, isEmptyObject, isKeyOf, isNumericString, type isSafelyMappable, type isStringLiteral, isThunk, isWellFormedInteger, isWellFormedNumber, isomorphic, join, jsTypeOfDescriptions, type keyOf, type keySetOf, type keyWithValue, keysOf, type lastChar, type lastIndexOf, type lastOf, lazily, type leftIfEqual, liftArray, type listable, type merge, type mergeExact, type minLengthArray, type mutable, narrow, nearestFloat, noSuggest, type normalizedKeyOf, numberLikeMatcher, type numericStringKeyOf, numericStringMatcher, objectKindDescriptions, objectKindOf, objectKindOrDomainOf, omit, type optionalKeyOf, type overlaps, type overloadOf, type override, type parseInteger, type parseNonNegativeInteger, type parseNumber, type pathToString, pick, platformConstructors, platformDescriptions, print, printable, type promisable, type propValueOf, type propertyDescriptorsOf, type propwiseXor, range, register, registry, type repeat, type require, type requireKeys, type requiredKeyOf, type satisfy, serializePrimitive, shallowClone, type show, snapshot, splitByKeys, spliterate, stringAndSymbolicEntriesOf, stringifyPath, type stringifyUnion, type tailOf, throwError, throwInternalError, throwParseError, type thunkable, type toArkKey, type trim, type trimEnd, type trimStart, tryCatch, tryParseInteger, tryParseNumber, tryParseWellFormedBigint, tryParseWellFormedNumber, type typeToString, typedArrayConstructors, typedArrayDescriptions, type unbrand, uncapitalize, type unionKeyOf, type unionToPropwiseXor, type unionToTuple, unset, type validateExhaustiveKeys, wellFormedIntegerMatcher, wellFormedNumberMatcher, whitespaceChars, type widen, withAlphabetizedKeys, type withJsDoc, type writeInvalidKeysMessage, writeMalformedNumericLiteralMessage, zeroWidthSpace };\n\n}" +export const utilDts = "declare module \"@ark/util\" {\n import * as buffer from 'buffer';\n\ntype Fn = (...args: args) => returns;\ndeclare const cached: (thunk: () => t) => (() => t);\ndeclare const isThunk: (value: value) => value is Extract extends never ? value & Thunk : Extract;\ntype Thunk = () => ret;\ntype thunkable = t | Thunk;\ndeclare const tryCatch: (fn: () => returns, onError?: (e: unknown) => onError) => returns | onError;\ndeclare const DynamicFunction: DynamicFunction;\ntype DynamicFunction = new (...args: ConstructorParameters) => fn & {\n apply(thisArg: null, args: Parameters): ReturnType;\n call(thisArg: null, ...args: Parameters): ReturnType;\n};\ntype CallableOptions = {\n attach?: attachments;\n bind?: object;\n};\n/** @ts-ignore required to cast function type */\ninterface Callable extends fn, attachments {\n}\ndeclare class Callable {\n constructor(fn: fn, ...[opts]: {} extends attachments ? [opts?: CallableOptions] : [opts: CallableOptions]);\n}\ntype GuardablePredicate = ((In: input) => In is narrowed) | ((In: input) => boolean);\ntype TypeGuard = (In: input) => In is narrowed;\n/**\n * Checks if the environment has Content Security Policy (CSP) enabled,\n * preventing JIT-optimized code from being compiled via new Function().\n *\n * @returns `true` if a function created using new Function() can be\n * successfully invoked in the environment, `false` otherwise.\n *\n * The result is cached for subsequent invocations.\n */\ndeclare const envHasCsp: () => boolean;\n\ndeclare const ecmascriptConstructors: {\n Array: ArrayConstructor;\n Boolean: BooleanConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Number: NumberConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n String: StringConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype ecmascriptConstructors = typeof ecmascriptConstructors;\ntype EcmascriptObjects = satisfy, {\n Array: Array;\n Boolean: Boolean;\n Date: Date;\n Error: Error;\n Function: Function;\n Map: Map;\n Number: Number;\n RegExp: RegExp;\n Set: Set;\n String: String;\n WeakMap: WeakMap;\n WeakSet: WeakSet;\n Promise: Promise;\n}>;\n/** Node18 */\ndeclare const FileConstructor: typeof buffer.File;\ntype platformConstructors = {\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n};\ndeclare const platformConstructors: platformConstructors;\ntype PlatformObjects = instantiateConstructors;\ndeclare const typedArrayConstructors: {\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n};\ntype typedArrayConstructors = typeof typedArrayConstructors;\ntype TypedArrayObjects = instantiateConstructors;\ndeclare const builtinConstructors: {\n String: StringConstructor;\n Number: NumberConstructor;\n Boolean: BooleanConstructor;\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n Array: ArrayConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype builtinConstructors = typeof builtinConstructors;\ntype BuiltinObjectKind = keyof builtinConstructors;\ntype GlobalName = keyof typeof globalThis;\ntype instantiateConstructors = {\n [k in kind]: k extends GlobalName ? InstanceType<(typeof globalThis)[k]> : `${k}Constructor` extends GlobalName ? InstanceType<(typeof globalThis)[`${k}Constructor`]> : never;\n};\ntype BuiltinObjects = instantiateConstructors;\ntype describeObject = objectKindOf extends string ? [\n opts[\"includeArticles\"]\n] extends [true] ? objectKindDescriptions[objectKindOf] : objectKindOf : [opts[\"includeArticles\"]] extends [true] ? domainDescriptions[\"object\"] : \"object\";\ntype instantiableObjectKind = {\n [kind in keyof builtinConstructors]: data extends (InstanceType) ? kind : never;\n}[keyof builtinConstructors];\ntype objectKindOf = object extends data ? keyof builtinConstructors | undefined : data extends Fn ? \"Function\" : instantiableObjectKind extends never ? undefined : instantiableObjectKind;\ndeclare const objectKindOf: (data: data) => objectKindOf | undefined;\ndeclare const objectKindOrDomainOf: (data: data) => (objectKindOf & {}) | domainOf;\ntype objectKindOrDomainOf = data extends object ? objectKindOf extends undefined ? \"object\" : objectKindOf : domainOf;\ndeclare const hasObjectKind: (data: object, kind: kind) => data is InstanceType;\ndeclare const isArray: (data: unknown) => data is readonly unknown[];\ndeclare const ecmascriptDescriptions: {\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ndeclare const platformDescriptions: {\n ArrayBuffer: string;\n Blob: string;\n File: string;\n FormData: string;\n Headers: string;\n Request: string;\n Response: string;\n URL: string;\n};\ndeclare const typedArrayDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n};\n/** Each defaultObjectKind's completion for the phrase \"must be _____\" */\ndeclare const objectKindDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n readonly ArrayBuffer: string;\n readonly Blob: string;\n readonly File: string;\n readonly FormData: string;\n readonly Headers: string;\n readonly Request: string;\n readonly Response: string;\n readonly URL: string;\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ntype objectKindDescriptions = typeof objectKindDescriptions;\n/**\n * this will only return an object kind if it's the root constructor\n * example TypeError would return null not 'Error'\n **/\ndeclare const getBuiltinNameOfConstructor: (ctor: Function) => BuiltinObjectKind | null;\ntype Constructor = abstract new (...args: never[]) => instance;\ntype instanceOf = constructor extends Constructor ? instance : never;\n/**\n * Returns an array of constructors for all ancestors (i.e., prototypes) of a given object.\n */\ndeclare const ancestorsOf: (o: object) => Function[];\ntype normalizedKeyOf = keyof t extends infer k ? k extends number ? `${k}` : k : never;\ndeclare const constructorExtends: (ctor: Constructor, base: Constructor) => boolean;\n\ntype stringifyUnion = join, delimiter>;\ntype unionToTuple = _unionToTuple extends infer result ? conform : never;\ntype _unionToTuple = getLastBranch extends infer current ? [\n t\n] extends [never] ? result : _unionToTuple, [current, ...result]> : never;\ntype getLastBranch = intersectUnion void : never> extends ((x: infer branch) => void) ? branch : never;\ntype intersectUnion = (t extends unknown ? (_: t) => void : never) extends ((_: infer intersection) => void) ? intersection : never;\ntype intersectOverloadReturns = intersectUnion>>;\ntype overloadOf = Exclude never) & fn, givenArgs, unknown>, fn extends () => never ? never : () => never>;\ntype collectSignatures = result & fn extends (...args: infer args) => infer returns ? result extends fn ? never : collectSignatures & result & ((...args: args) => returns)> | (args extends givenArgs ? (...args: args) => returns : never) : never;\n\ntype DescribeOptions = {\n includeArticles?: boolean;\n branchDelimiter?: string;\n};\ntype typeToString = stringifyUnion<[\n t\n] extends [anyOrNever] ? unknown extends t ? \"any\" : \"never\" : unknown extends t ? \"unknown\" : boolean extends t ? \"boolean\" | ([t] extends [boolean] ? never : typeToString, opts>) : t extends array ? arrayTypeToString : t extends object ? describeObject : t extends Stringifiable ? stringifiableToString : describeDomainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\ntype stringifiableToString = inferDomain> extends t ? describeDomainOf : `${t}`;\ntype describe = typeToString;\ntype arrayTypeToString = typeToString extends infer element extends string ? opts[\"includeArticles\"] extends true ? describeArrayOf : includesDelimiter extends true ? `(${element})[]` : `${element}[]` : never;\ntype describeArrayOf = element extends \"unknown\" ? \"an array\" : `an array of ${element}`;\ntype includesDelimiter = s extends (`${string}${opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]}${string}`) ? true : false;\ntype describeDefaults = satisfy, {\n includeArticles: false;\n branchDelimiter: \" | \";\n}>;\n\ntype JsTypeOf = \"object\" | \"function\" | \"number\" | \"bigint\" | \"boolean\" | \"string\" | \"symbol\" | \"undefined\" | \"null\";\ndeclare const hasDomain: (data: data, kind: domain) => data is data & inferDomain;\ntype TypesByDomain = {\n bigint: bigint;\n boolean: boolean;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n undefined: undefined;\n null: null;\n};\ntype inferDomain = Domain extends kind ? unknown : TypesByDomain[kind];\ntype Domain = show;\ntype NullishDomain = \"undefined\" | \"null\";\ntype NonNullishDomain = Exclude;\ntype PrimitiveDomain = Exclude;\ntype Primitive = inferDomain;\ntype domainOf = unknown extends data ? Domain : data extends object ? \"object\" : data extends string ? \"string\" : data extends number ? \"number\" : data extends boolean ? \"boolean\" : data extends undefined ? \"undefined\" : data extends null ? \"null\" : data extends bigint ? \"bigint\" : data extends symbol ? \"symbol\" : never;\ndeclare const domainOf: (data: data) => domainOf;\ndeclare const jsTypeOfDescriptions: {\n readonly function: \"a function\";\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\n/** Each domain's completion for the phrase \"must be _____\" */\ndeclare const domainDescriptions: {\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\ntype domainDescriptions = typeof domainDescriptions;\ntype describeDomainOf = stringifyUnion] : domainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\n\ndeclare class InternalArktypeError extends Error {\n}\ndeclare const throwInternalError: (message: string) => never;\ndeclare const throwError: (message: string, ctor?: new (message: string) => Error) => never;\ndeclare class ParseError extends Error {\n readonly name = \"ParseError\";\n}\ndeclare const throwParseError: (message: string) => never;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ndeclare const noSuggest: (s: s) => noSuggest;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ntype noSuggest = ` ${s}`;\n/** \"Hair Space\" character, used as a non-rendered sentinel for an error message string:\n * https://www.compart.com/en/unicode/U+200A\n */\ndeclare const zeroWidthSpace = \"\\u200A\";\n/** \"Hair Space\" character, used as a non-rendered sentinel for an error message string:\n * https://www.compart.com/en/unicode/U+200A\n */\ntype ZeroWidthSpace = typeof zeroWidthSpace;\ntype ErrorMessage = `${message}${ZeroWidthSpace}`;\ninterface ErrorType {\n [brand]: \"ErrorType\";\n message: message;\n ctx: ctx;\n}\ntype Completion = `${text}${ZeroWidthSpace}${ZeroWidthSpace}`;\n\ntype Stringifiable = string | boolean | number | bigint | null | undefined;\n/** Force an operation like `{ a: 0 } & { b: 1 }` to be computed so that it displays `{ a: 0; b: 1 }`. */\ntype show = {\n [k in keyof t]: t[k];\n} & unknown;\n/** @deprecated use \"show\" instead */\ntype evaluate = {\n [k in keyof t]: t[k];\n} & unknown;\ntype exact = {\n [k in keyof t]: k extends keyof u ? conform : never;\n};\ntype exactMessageOnError = {\n [k in keyof t]: k extends keyof u ? conform : ErrorMessage<`'${k & string}' is not a valid key`>;\n} & u;\ntype promisable = t | Promise;\ntype leftIfEqual = [l, r] extends [r, l] ? l : r;\ntype UnknownUnion = string | number | symbol | bigint | boolean | object | null | undefined;\n/**\n * Interesection (`&`) that avoids evaluating `unknown` to `{}`\n */\ntype andPreserveUnknown = unknown extends l & r ? unknown : show;\n/** Can be used to test for the universal subtypes, `any` and `never`, e.g.:\n *\n * ```ts\n * type isAnyOrNever = [t] extends [anyOrNever] ? true : false\n * ```\n *\n * The actual value is a string literal, but the only realistic subtypes\n * of that literal are `any` and `never`.\n */\ntype anyOrNever = \" anyOrNever\";\ntype conform = t extends base ? t : base;\ntype equals = [l, r] extends [r, l] ? true : false;\ntype exactEquals = (<_>() => _ extends l ? 1 : 2) extends <_>() => _ extends r ? 1 : 2 ? true : false;\ndeclare const brand: \" brand\";\ntype Brand = t & {\n readonly [brand]: [t, id];\n};\ntype unbrand = t extends Brand ? base : never;\ntype satisfy = t;\ntype defined = t & ({} | null);\ntype autocomplete = suggestions | (string & {});\ntype widen = collectWidenedType>;\ntype collectWidenedType = remaining extends [infer head, ...infer tail] ? collectWidenedType : result;\ntype narrowTuple = t extends readonly [infer head, ...infer tail] ? readonly [head, ...narrowTuple] : [];\ntype narrow = t extends Primitive ? t : t extends readonly unknown[] ? narrowTuple : {\n [k in keyof t]: narrow;\n};\ndeclare const narrow: (t: narrow) => t;\n/** primitive key used to represent an inferred type at compile-time */\ndeclare const inferred: \" arkInferred\";\n/** primitive key used to represent an inferred type at compile-time */\ntype inferred = typeof inferred;\n\ndeclare const args: \" args\";\ntype args = typeof args;\ndeclare abstract class Hkt {\n [args]: unknown[];\n constraints: constraints;\n args: this[args] extends infer args extends unknown[] ? args : never;\n 0: this[args] extends [infer arg, ...any] ? arg : never;\n 1: this[args] extends [any, infer arg, ...any] ? arg : never;\n 2: this[args] extends [any, any, infer arg, ...any] ? arg : never;\n 3: this[args] extends [any, any, any, infer arg, ...any] ? arg : never;\n abstract body: unknown;\n description?: string;\n constructor();\n}\n/** A small set of HKT utility types based on https://github.com/gvergnaud/hotscript\n * See https://github.com/gvergnaud/hotscript/blob/main/src/internals/core/Core.ts\n */\ndeclare namespace Hkt {\n type constructor = new () => Hkt;\n type args = typeof args;\n type apply = (hkt & {\n [args]: args;\n })[\"body\"];\n}\n\ntype Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\ntype NumberLiteral = `${n}`;\ntype BigintLiteral = `${n}n`;\ntype IntegerLiteral = `${n}`;\ntype NonNegativeIntegerLiteral = `${Digit}` | (`${Exclude}${string}` & `${n}`);\n/**\n * Matches a well-formatted numeric expression according to the following rules:\n * 1. Must include an integer portion (i.e. '.321' must be written as '0.321')\n * 2. The first digit of the value must not be 0, unless the entire integer portion is 0\n * 3. If the value includes a decimal, its last digit may not be 0\n * 4. The value may not be \"-0\"\n */\ndeclare const wellFormedNumberMatcher: RegExp;\ndeclare const isWellFormedNumber: RegExp[\"test\"];\n/**\n * Similar to wellFormedNumber but more permissive in the following ways:\n *\n * - Allows numbers without an integer portion like \".5\" (well-formed equivalent is \"0.5\")\n * - Allows decimals with trailing zeroes like \"0.10\" (well-formed equivalent is \"0.1\")\n */\ndeclare const numericStringMatcher: RegExp;\ndeclare const isNumericString: (string: string) => boolean;\ndeclare const numberLikeMatcher: RegExp;\n/**\n * Matches a well-formatted integer according to the following rules:\n * 1. must begin with an integer, the first digit of which cannot be 0 unless the entire value is 0\n * 2. The value may not be \"-0\"\n */\ndeclare const wellFormedIntegerMatcher: RegExp;\ndeclare const isWellFormedInteger: RegExp[\"test\"];\ndeclare const integerLikeMatcher: RegExp;\ntype NumericLiteralKind = \"number\" | \"bigint\" | \"integer\";\ndeclare const numericLiteralDescriptions: {\n readonly number: \"a number\";\n readonly bigint: \"a bigint\";\n readonly integer: \"an integer\";\n};\ntype numericLiteralDescriptions = typeof numericLiteralDescriptions;\ntype writeMalformedNumericLiteralMessage = `'${def}' was parsed as ${numericLiteralDescriptions[kind]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`;\ndeclare const writeMalformedNumericLiteralMessage: (def: def, kind: kind) => writeMalformedNumericLiteralMessage;\ndeclare const tryParseWellFormedNumber: typeof tryParseNumber;\ndeclare const tryParseNumber: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseNumber = token extends `${infer n extends number}` ? number extends n ? writeMalformedNumericLiteralMessage : n : messageOnFail;\ntype parseNumber = token extends `${infer n extends number}` ? n : never;\ndeclare const tryParseInteger: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseInteger = token extends `${infer b extends bigint}` ? bigint extends b ? writeMalformedNumericLiteralMessage : token extends `${infer n extends number}` ? n : never : messageOnFail;\ntype parseInteger = token extends `${bigint}` ? token extends `${infer n extends number}` ? n : never : never;\ntype parseNonNegativeInteger = token extends `-${string}` ? never : parseInteger;\ntype NumericParseOptions = {\n errorOnFail?: errorOnFail;\n strict?: boolean;\n};\ndeclare const tryParseWellFormedBigint: (def: string) => bigint | undefined;\n/**\n * Returns the next or previous representable floating-point number after the given input.\n *\n * @param {\"+\" | \"-\"} [direction=\"+\"] - The direction to find the nearest float. \"+\" for the next float, \"-\" for the previous float.\n * @throws {Error} If the input is not a finite number.\n *\n * @example\n * console.log(nearestFloat(0)); // Smallest positive number\n * console.log(nearestFloat(2)); // 2.0000000000000004\n * console.log(nearestFloat(2.1)); // 2.1000000000000005\n * console.log(nearestFloat(2, \"-\")); // 1.9999999999999998\n * console.log(nearestFloat(2.1, \"-\")); // 2.0999999999999996\n * // as size of input increases, the increments become larger to stay within what\n * // JS can represent in a numeric value\n * console.log(nearestFloat(5555555555555555)); // 5555555555555556\n * console.log(nearestFloat(5555555555555555, \"-\")); // 5555555555555554\n */\ndeclare const nearestFloat: (n: number, direction?: \"+\" | \"-\") => number;\n\ntype Key = string | symbol;\ntype toArkKey = k extends number ? [\n o,\n number\n] extends [array, k] ? NonNegativeIntegerLiteral : `${k}` : k;\ntype arkIndexableOf = arkKeyOf extends infer k ? k extends `${infer index extends number}` ? index | k : k : never;\ntype arkKeyOf = [\n o\n] extends [object] ? [\n o\n] extends [array] ? arkArrayKeyOf : arkObjectLiteralKeyOf : never;\ntype arkArrayKeyOf = number extends a[\"length\"] ? NonNegativeIntegerLiteral : keyof a extends infer i ? i extends `${number}` ? i : never : never;\ntype arkObjectLiteralKeyOf = keyof o extends infer k ? k extends number ? `${k}` : k : never;\ntype arkGet> = o[k extends keyof o ? k : NonNegativeIntegerLiteral extends k ? number & keyof o : k extends number ? `${k}` & keyof o : never];\ntype writeInvalidKeysMessage> = `Key${keys[\"length\"] extends 1 ? \"\" : \"s\"} ${join} ${keys[\"length\"] extends 1 ? \"does\" : \"do\"} not exist on ${o}`;\n\ntype Dict = {\n readonly [_ in k]: v;\n};\ntype dict = {\n [_ in k]: v;\n};\n/** Either:\n * A, with all properties of B undefined\n * OR\n * B, with all properties of A undefined\n **/\ntype propwiseXor = show | show;\ntype unionToPropwiseXor> = props extends infer distributed ? show : never;\ntype requireKeys = o & {\n [requiredKey in key]-?: defined;\n};\ntype require = _require;\ntype _require = depth[\"length\"] extends maxDepth ? o : o extends object ? o extends Fn ? o : {\n [k in keyof o]-?: _require;\n} : o;\ntype PartialRecord = {\n [_ in k]?: v;\n};\n/** Returns true if a type can be homomorphically mapped without losing information.\n * Useful for avoiding e.g. classes with private properties while mapping.\n */\ntype isSafelyMappable = {\n [k in keyof t]: t[k];\n} extends t ? true : false;\ntype KeySet = {\n readonly [_ in key]?: 1;\n};\ntype keySetOf = KeySet>;\ntype mutable = _mutable;\ntype _mutable = depth[\"length\"] extends maxDepth ? o : o extends Primitive ? o : o extends Fn ? o : {\n -readonly [k in keyof o]: _mutable;\n};\n/**\n * extracts entries mimicking Object.entries, accounting for whether the\n * object is an array\n **/\ntype entryOf = {\n [k in keyof o]-?: [k, o[k] & ({} | null)];\n}[o extends readonly unknown[] ? keyof o & number : keyof o] & unknown;\ntype entriesOf = entryOf[];\n/**\n * Object.entries wrapper providing narrowed types for objects with known sets\n * of keys, e.g. those defined internally as configs\n */\ndeclare const entriesOf: (o: o) => entryOf[];\ntype Entry = readonly [key: key, value: value];\ntype fromEntries = show<{\n [entry in entries[number] as entry[0]]: entry[1];\n}>;\ndeclare const fromEntries: (entries: entries) => fromEntries;\n/** Mimics the result of Object.keys(...) */\ntype keyOf = o extends array ? number extends o[\"length\"] ? `${number}` : keyof o & `${number}` : keyof o extends infer k ? k extends string ? k : k extends number ? `${k}` : never : never;\ndeclare const keysOf: (o: o) => keyOf[];\ndeclare const isKeyOf: (k: k, o: o) => k is Extract;\n/** Coalesce keys that exist on one or more branches of a union */\ntype unionKeyOf = t extends unknown ? keyof t : never;\ntype extractKeyed> = Extract;\ndeclare const hasKey: >(o: o, k: k) => o is extractKeyed;\ntype extractDefinedKey> = show & {\n [_ in k]: {} | null;\n}>;\ndeclare const hasDefinedKey: >(o: o, k: k) => o is extractDefinedKey;\ntype requiredKeyOf = keyof o extends infer k ? k extends keyof o ? o extends {\n [_ in k]-?: o[k];\n} ? k : never : never : never;\ntype optionalKeyOf = Exclude>;\ntype merge = base extends unknown ? props extends unknown ? show & props> : never : never;\ntype mergeExact = base extends unknown ? props extends unknown ? show & props> : never : never;\ntype omitMerged = {\n [k in keyof base as excludeExactKeyOf]: base[k];\n};\ntype excludeExactKeyOf = Exclude>;\ntype extractExactKeyOf = keyof {\n [k in keyof base as [key, k] extends [k, key] ? key : never]: 1;\n};\ntype override = merge;\ntype propValueOf = o[keyof o];\ndeclare const InnerDynamicBase: new (base: t) => t;\n/** @ts-ignore (needed to extend `t`) **/\ninterface DynamicBase extends t {\n}\ndeclare class DynamicBase {\n constructor(properties: t);\n}\ndeclare const NoopBase: new () => t;\n/** @ts-ignore (needed to extend `t`) **/\ndeclare class CastableBase extends NoopBase {\n}\ndeclare const splitByKeys: >(o: o, leftKeys: leftKeys) => [show>, show>];\n/** Homomorphic implementation of the builtin Pick.\n *\n * Gives different results for certain union expressions like the following:\n *\n * @example\n * // flattens result to { a?: 1 | 2; b?: 1 | 2 }\n * type PickResult = Pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type pickResult = pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n */\ntype pick = o extends unknown ? {\n [k in keyof o as k extends key ? k : never]: o[k];\n} : never;\ndeclare const pick: >(o: o, keys: keys) => pick;\n/** Homomorphic implementation of the builtin Omit.\n *\n * Gives different results for many union expressions like the following:\n *\n * @example\n * // {}\n * type OmitResult = Omit<{ a: 1 } | { b: 2 }, never>\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type omitResult = omit<{ a: 1 } | { b: 2 }, never>\n */\ntype omit = {\n [k in keyof o as k extends key ? never : k]: o[k];\n};\ndeclare const omit: >(o: o, keys: keys) => omit;\n/** Returns onTrue if the type is exactly `{}` and onFalse otherwise*/\ntype ifEmptyObjectLiteral = [\n unknown,\n t & (null | undefined)\n] extends [t | null | undefined, never] ? onTrue : onFalse;\ntype EmptyObject = Record;\ndeclare const isEmptyObject: (o: object) => o is EmptyObject;\ndeclare const stringAndSymbolicEntriesOf: (o: object) => Entry[];\n/** Like Object.assign, but it will preserve getters instead of evaluating them. */\ndeclare const defineProperties: (base: base, merged: merged) => merge;\n/** Copies enumerable keys of o to a new object in alphabetical order */\ndeclare const withAlphabetizedKeys: (o: o) => o;\ntype invert> = {\n [k in t[keyof t]]: {\n [k2 in keyof t]: t[k2] extends k ? k2 : never;\n }[keyof t];\n} & unknown;\ndeclare const invert: >(t: t) => invert;\ndeclare const unset: \" represents an uninitialized value\";\ntype unset = typeof unset;\n/**\n * For each keyof o that also exists on jsDocSource, add associated JsDoc annotations to o.\n * Does not preserve modifiers on o like optionality.\n */\ntype withJsDoc = show : Pick<_withJsDoc, keyof o & keyof jsDocSource> : Pick<_withJsDoc, keyof o & keyof jsDocSource> & {\n [k in Exclude]: o[k];\n}>;\ntype _withJsDoc = {\n [k in keyof jsDocSource]-?: o[k & keyof o];\n};\ntype propertyDescriptorsOf = {\n [k in keyof o]: TypedPropertyDescriptor;\n};\ntype keyWithValue = keyof t extends infer k ? k extends keyof t ? t[k] extends constraint ? k : never : never : never;\ndeclare const enumValues: (tsEnum: tsEnum) => tsEnum[keyof tsEnum][];\n\ninterface AndPreserveUnknown extends Hkt<[unknown, unknown]> {\n body: andPreserveUnknown;\n}\ntype SequenceIntersectionKind = \"array\" | \"parameters\";\ntype intersectArrays = intersectSequences;\ntype intersectParameters = intersectSequences;\ntype intersectSequences = l extends readonly [] ? kind extends \"array\" ? [\n] extends r ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...r, ...postfix] : r extends readonly [] ? kind extends \"array\" ? [\n] extends l ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...l, ...postfix] : [\n l,\n r\n] extends ([\n readonly [(infer lHead)?, ...infer lTail],\n readonly [(infer rHead)?, ...infer rTail]\n]) ? [\n \"0\",\n lHead,\n rHead\n] extends [keyof l | keyof r, l[0], r[0]] ? intersectSequences?\n] : [...acc, Hkt.apply], postfix, operation, kind> : l extends readonly [...infer lInit, infer lLast] ? r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : intersectSequences,\n ...postfix\n], operation, kind> : r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : [...acc, ...Hkt.apply[], ...postfix] : never;\ntype isDisjoint = overlaps extends true ? false : true;\ntype overlaps = l & r extends never ? false : domainOf & domainOf extends never ? false : [l, r] extends [object, object] ? false extends (propValueOf<{\n [k in Extract | requiredKeyOf>]: overlaps;\n}>) ? false : true : true;\n\ntype DuplicateData = {\n element: val;\n indices: number[];\n};\n/**\n * Extracts duplicated elements and their indices from an array, returning them.\n *\n * Note that given `a === b && b === c`, then `c === a` must be `true` for this to give accurate results.\n *\n * @param arr The array to extract duplicate elements from.\n */ declare const getDuplicatesOf: (arr: arr, opts?: ComparisonOptions) => DuplicateData[];\ntype pathToString = segments extends [] ? \"/\" : join;\ndeclare const join: , delimiter extends string>(segments: segments, delimiter: delimiter) => join;\ntype join, delimiter extends string, result extends string = \"\"> = segments extends (readonly [infer head extends string, ...infer tail extends string[]]) ? join : result;\ndeclare const getPath: (root: unknown, path: string[]) => unknown;\ndeclare const intersectUniqueLists: (l: readonly item[], r: readonly item[]) => item[];\ntype filter = t extends readonly [infer head, ...infer tail] ? filter : result;\ntype array = readonly t[];\ntype listable = t | readonly t[];\ntype flattenListable = t extends array ? element : t;\ntype minLengthArray = readonly [\n ...repeat<[t], minLength>,\n ...t[]\n];\ntype repeat = _repeat;\ntype _repeat = depth[\"length\"] extends maxDepth ? result : _repeat;\ntype CollapsingList = readonly [] | t | readonly [t, t, ...t[]];\ntype headOf = t[0];\ntype tailOf = t extends readonly [unknown, ...infer tail] ? tail : never;\ntype lastIndexOf = tailOf[\"length\"];\ntype lastOf = t[lastIndexOf];\ntype initOf = t extends readonly [...infer init, unknown] ? init : never;\ntype numericStringKeyOf = Extract;\ntype arrayIndexOf = keyof a extends infer k ? parseNonNegativeInteger : never;\ntype liftArray = t extends array ? [\n t\n] extends [anyOrNever] ? t[] : t : t[];\ndeclare const liftArray: (data: t) => liftArray;\n/**\n * Splits an array into two arrays based on the result of a predicate\n *\n * @param predicate - The guard function used to determine which items to include.\n * @returns A tuple containing two arrays:\n * \t\t\t\t- the first includes items for which `predicate` returns true\n * \t\t\t\t- the second includes items for which `predicate` returns false\n *\n * @example\n * const list = [1, \"2\", \"3\", 4, 5];\n * const [numbers, strings] = spliterate(list, (x) => typeof x === \"number\");\n * // Type: number[]\n * // Output: [1, 4, 5]\n * console.log(evens);\n * // Type: string[]\n * // Output: [\"2\", \"3\"]\n * console.log(odds);\n */\ndeclare const spliterate: (arr: readonly item[], predicate: GuardablePredicate) => [included: included[], excluded: [item] extends [included] ? item[] : Exclude[]];\ndeclare const ReadonlyArray: new (...args: ConstructorParameters>) => ReadonlyArray;\ndeclare const includes: (array: a, element: unknown) => element is a[number];\ndeclare const range: (length: number, offset?: number) => number[];\ntype AppendOptions = {\n /** If true, adds the element to the beginning of the array instead of the end */\n prepend?: boolean;\n};\n/**\n * Adds a value or array to an array, returning the concatenated result\n */\ndeclare const append: >(to: to, value: value, opts?: AppendOptions) => to & {};\ntype appendableValue = to extends array ? element extends array ? array : listable : never;\n/**\n * Concatenates an element or list with a readonly list\n */\ndeclare const conflatenate: (to: readonly element[] | undefined | null, elementOrList: appendableValue | undefined | null) => readonly element[];\n/**\n * Concatenates a variadic list of elements or lists with a readonly list\n */\ndeclare const conflatenateAll: (...elementsOrLists: (listable | undefined | null)[]) => readonly element[];\ninterface ComparisonOptions {\n isEqual?: (l: t, r: t) => boolean;\n}\n/**\n * Appends a value or concatenates an array to an array if it is not already included, returning the array\n */\ndeclare const appendUnique: (to: to | undefined, value: NoInfer | to[number]>, opts?: ComparisonOptions) => to;\ntype groupableKeyOf = keyof o extends infer k ? k extends keyof o ? o[k] extends PropertyKey ? k : never : never : never;\ntype groupBy> = {\n [k in element[discriminant] & PropertyKey]?: (element extends unknown ? isDisjoint extends true ? never : element : never)[];\n} & unknown;\ndeclare const groupBy: >(array: readonly element[], discriminant: discriminant) => groupBy;\ndeclare const arrayEquals: (l: array, r: array, opts?: ComparisonOptions) => boolean;\ntype validateExhaustiveKeys = keys extends readonly [infer head, ...infer tail extends PropertyKey[]] ? readonly [\n conform,\n ...validateExhaustiveKeys>\n] : [expectedKey] extends [never] ? [] : [expectedKey];\n\n/** Shallowly copy the properties of the object. */\ndeclare const shallowClone: (input: input) => input;\n/** Deeply copy the properties of the a non-subclassed Object, Array or Date.*/\ndeclare const deepClone: (input: input) => input;\n\ntype objectFromListableEntries = show>>;\ntype fromGroupableEntries = {\n [entry in entries[number] as entry extends GroupedEntry ? entry[0][\"group\"] : conform]: entry extends GroupedEntry ? entry[1][] : entry[1];\n};\ntype arrayFromListableEntries = Entry extends transformed ? transformed[1][] : _arrayFromListableEntries;\ntype _arrayFromListableEntries = [\n transformed\n] extends [never] ? result : Extract> extends (infer next extends Entry) ? Exclude extends infer remaining extends Entry ? [\n transformed\n] extends [remaining] ? [\n ...result,\n ...transformed[1][]\n] : _arrayFromListableEntries : never : [...result, ...transformed[1][]];\ntype extractEntrySets> = e extends readonly GroupableEntry[] ? e : [e];\ntype extractEntries> = e extends readonly Entry[] ? e[number] : e;\ntype entryArgsWithIndex = {\n [k in keyof o]-?: [k: k, v: Exclude, i: number];\n}[keyof o];\ntype numericArrayEntry = number extends a[\"length\"] ? [number, a[number]] : {\n [i in keyof a]: i extends `${infer n extends number}` ? [n, a[i]] : never;\n}[number];\ntype GroupedEntry = readonly [key: {\n group: Key;\n}, value: unknown];\ntype GroupableEntry = Entry | Entry | GroupedEntry;\ntype ListableEntry = listable;\ntype fromMappedEntries = [\n transformed\n] extends [listable>] ? arrayFromListableEntries> : objectFromListableEntries>;\ntype FlatMorph = {\n (o: o, flatMapEntry: (...args: numericArrayEntry) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryOf) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryArgsWithIndex) => transformed): fromMappedEntries;\n};\ndeclare const flatMorph: FlatMorph;\n\ndeclare const isomorphic: {\n fileName: () => string;\n env: Record, string | undefined>;\n};\n\ndeclare const lazily: (thunk: () => t) => t;\n\ntype SerializationOptions = {\n onCycle?: (value: object) => string;\n onSymbol?: (value: symbol) => string;\n onFunction?: (value: Function) => string;\n onUndefined?: string;\n onBigInt?: (value: bigint) => string;\n};\ntype JsonStructure = JsonObject | JsonArray;\ninterface JsonObject {\n [k: string]: Json;\n}\ntype JsonArray = Json[];\ntype JsonPrimitive = string | boolean | number | null;\ntype Json = JsonStructure | JsonPrimitive;\ndeclare const snapshot: (data: t, opts?: SerializationOptions) => snapshot;\ntype snapshot = unknown extends t ? unknown : t extends Primitive ? snapshotPrimitive : t extends {\n toJSON: () => infer serialized;\n} ? serialized : t extends Function ? `Function(${string})` : t extends Date ? string : depth[\"length\"] extends 10 ? unknown : t extends array ? array> : {\n [k in keyof t as snapshotPrimitive]: snapshot;\n};\ntype snapshotPrimitive = t extends symbol ? `Symbol(${string})` : t;\ntype PrintableOptions = {\n indent?: number;\n quoteKeys?: boolean;\n};\ndeclare const print: (data: unknown, opts?: PrintableOptions) => void;\ndeclare const printable: (data: unknown, opts?: PrintableOptions) => string;\n/**\n * Converts a Date instance to a human-readable description relative to its precision\n */\ndeclare const describeCollapsibleDate: (date: Date) => string;\n\ntype StringifyPathOptions = requireKeys<{\n stringifySymbol?: (s: symbol) => string;\n stringifyNonKey?: (o: Exclude) => string;\n}, stringifiable extends PropertyKey ? never : \"stringifyNonKey\">;\ntype StringifyPathFn = (path: array, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ntype AppendStringifiedKeyFn = (path: string, prop: stringifiable, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ndeclare const appendStringifiedKey: AppendStringifiedKeyFn;\ndeclare const stringifyPath: StringifyPathFn;\ndeclare class ReadonlyPath extends ReadonlyArray {\n private cache;\n constructor(...items: array);\n toJSON(): JsonArray;\n stringify(): string;\n stringifyAncestors(): readonly string[];\n}\n\ntype SerializedString = `\"${value}\"`;\ntype SerializedPrimitives = {\n string: SerializedString;\n number: `${number}`;\n bigint: BigintLiteral;\n boolean: \"true\" | \"false\";\n null: \"null\";\n undefined: \"undefined\";\n};\ntype SerializedPrimitive = SerializedPrimitives[keyof SerializedPrimitives];\ntype SerializablePrimitive = inferDomain;\ndeclare const serializePrimitive: (value: value) => serializePrimitive;\ntype serializePrimitive = value extends string ? `\"${value}\"` : value extends bigint ? `${value}n` : `${value}`;\n\ndeclare const arkUtilVersion = \"0.45.10\";\ndeclare const initialRegistryContents: {\n version: string;\n filename: string;\n FileConstructor: typeof buffer.File;\n};\ntype InitialRegistryContents = typeof initialRegistryContents;\ninterface ArkRegistry extends InitialRegistryContents {\n [k: string]: unknown;\n}\ndeclare const registry: ArkRegistry;\ndeclare global {\n export interface ArkEnv {\n prototypes(): never;\n }\n export namespace ArkEnv {\n type prototypes = ReturnType;\n }\n}\ndeclare const register: (value: object | symbol) => string;\ndeclare const isDotAccessible: (keyName: string) => boolean;\n\ndeclare class Scanner {\n chars: string[];\n i: number;\n def: string;\n constructor(def: string);\n /** Get lookahead and advance scanner by one */\n shift(): this[\"lookahead\"];\n get lookahead(): lookahead;\n get nextLookahead(): string;\n get length(): number;\n shiftUntil(condition: Scanner.UntilCondition): string;\n shiftUntilLookahead(charOrSet: string | KeySet): string;\n shiftUntilNonWhitespace(): string;\n jumpToIndex(i: number): void;\n jumpForward(count: number): void;\n get location(): number;\n get unscanned(): string;\n get scanned(): string;\n sliceChars(start: number, end?: number): string;\n lookaheadIs(char: char): this is Scanner;\n lookaheadIsIn(tokens: keySet): this is Scanner>;\n}\ndeclare namespace Scanner {\n type UntilCondition = (scanner: Scanner, shifted: string) => boolean;\n}\n\ndeclare const capitalize: (s: s) => Capitalize;\ndeclare const uncapitalize: (s: s) => Uncapitalize;\ntype firstChar = s extends `${infer head}${string}` ? head : \"\";\ntype charsAfterFirst = s extends `${string}${infer tail}` ? tail : \"\";\ntype lastChar = s extends `${infer head}${infer tail}` ? tail extends \"\" ? head : lastChar : s;\ntype charsBeforeLast = s extends `${infer head}${infer tail}` ? tail extends \"\" ? \"\" : `${head}${charsBeforeLast}` : \"\";\ndeclare const anchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const deanchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const anchoredSource: (regex: RegExp | string) => string;\ndeclare const deanchoredSource: (regex: RegExp | string) => string;\ndeclare const RegexPatterns: {\n negativeLookahead: (pattern: string) => `(?!${string})`;\n nonCapturingGroup: (pattern: string) => `(?:${string})`;\n};\ndeclare const escapeChar = \"\\\\\";\ntype EscapeChar = typeof escapeChar;\ndeclare const whitespaceChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n};\ntype WhitespaceChar = keyof typeof whitespaceChars;\ntype trim = trimEnd>;\ntype trimStart = s extends `${WhitespaceChar}${infer tail}` ? trimEnd : s;\ntype trimEnd = s extends `${infer init}${WhitespaceChar}` ? trimEnd : s;\ntype isStringLiteral = [\n t\n] extends [string] ? [\n string\n] extends [t] ? false : Uppercase extends Uppercase> ? Lowercase extends Lowercase> ? true : false : false : false;\ndeclare const emojiToUnicode: (emoji: string) => string;\n\ntype TraitImplementation = , s extends CompositionState = composeTraits<[\n ...traits,\n implementation\n], \"implementation\">, cls extends TraitConstructor = TraitConstructor>(...args: [...traits, implementation & ThisType>]) => cls;\ntype TraitComposition = >(...traits: conform) => TraitConstructor;\ndeclare const hasTrait: (traitClass: Constructor) => (o: unknown) => boolean;\ntype TraitDeclaration = {\n abstractMethods?: object;\n abstractProps?: object;\n abstractStatics?: object;\n dynamicBase?: object;\n};\n/** @ts-ignore required to extend NoopBase */\ndeclare abstract class Trait extends NoopBase {\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatic: abstractStatics;\n static get [Symbol.hasInstance](): (o: unknown) => boolean;\n traitsOf(): readonly TraitConstructor[];\n}\ndeclare const compose: TraitComposition;\ndeclare const implement: TraitImplementation;\ntype TraitConstructor = statics & (new (...args: params) => Trait<{\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatics: abstractStatics;\n}> & instance);\ntype CompositionState = {\n validated: array;\n remaining: array;\n params: array;\n kind: TraitCompositionKind;\n implemented: object;\n abstractMethods: object;\n abstractProps: object;\n abstractStatics: object;\n statics: object;\n};\ntype TraitCompositionKind = \"abstract\" | \"implementation\";\ntype composeTraits = _compose<{\n validated: [];\n remaining: traits;\n kind: kind;\n params: [];\n implemented: {};\n abstractMethods: {};\n abstractProps: {};\n abstractStatics: {};\n statics: {};\n}>;\ntype intersectImplementations = {\n [k in keyof l]: k extends keyof r ? l[k] extends (...args: infer lArgs) => infer lReturn ? r[k] extends (...args: infer rArgs) => infer rReturn ? (...args: intersectParameters) => lReturn & rReturn : l[k] & r[k] : l[k] & r[k] : l[k];\n} & Omit;\ntype _compose = s[\"remaining\"] extends (readonly [\n TraitConstructor,\n ...infer tail\n]) ? _compose<{\n validated: [...s[\"validated\"], s[\"remaining\"][0]];\n remaining: tail;\n kind: s[\"kind\"];\n params: intersectParameters;\n implemented: intersectImplementations>;\n statics: intersectImplementations>;\n abstractMethods: intersectImplementations;\n abstractProps: intersectImplementations;\n abstractStatics: intersectImplementations;\n}> : finalizeState;\ntype finalizeState = satisfy;\n statics: show>;\n abstractMethods: show>;\n abstractProps: show>;\n abstractStatics: show>;\n}>;\ntype implementationOf = s[\"abstractMethods\"] & ({} extends s[\"abstractProps\"] ? {} : {\n construct: (...args: s[\"params\"]) => s[\"abstractProps\"];\n}) & ({} extends s[\"abstractStatics\"] ? {} : {\n statics: s[\"abstractStatics\"];\n});\n\nexport { type AndPreserveUnknown, type AppendOptions, type AppendStringifiedKeyFn, type ArkRegistry, type BigintLiteral, type Brand, type BuiltinObjectKind, type BuiltinObjects, Callable, type CallableOptions, CastableBase, type CollapsingList, type ComparisonOptions, type Completion, type Constructor, type DescribeOptions, type Dict, type Digit, type Domain, DynamicBase, DynamicFunction, type EcmascriptObjects, type EmptyObject, type Entry, type ErrorMessage, type ErrorType, type EscapeChar, FileConstructor, type FlatMorph, type Fn, type GlobalName, type GroupableEntry, type GroupedEntry, type GuardablePredicate, Hkt, type InitialRegistryContents, InnerDynamicBase, type IntegerLiteral, InternalArktypeError, type JsTypeOf, type Json, type JsonArray, type JsonObject, type JsonPrimitive, type JsonStructure, type Key, type KeySet, type ListableEntry, type NonNegativeIntegerLiteral, type NonNullishDomain, NoopBase, type NullishDomain, type NumberLiteral, type NumericParseOptions, ParseError, type PartialRecord, type PlatformObjects, type Primitive, type PrimitiveDomain, type PrintableOptions, ReadonlyArray, ReadonlyPath, RegexPatterns, Scanner, type SerializablePrimitive, type SerializationOptions, type SerializedPrimitive, type SerializedPrimitives, type Stringifiable, type StringifyPathFn, type StringifyPathOptions, type Thunk, Trait, type TraitComposition, type TraitCompositionKind, type TraitConstructor, type TraitDeclaration, type TraitImplementation, type TypeGuard, type TypedArrayObjects, type UnknownUnion, type WhitespaceChar, type ZeroWidthSpace, ancestorsOf, anchoredRegex, anchoredSource, type andPreserveUnknown, type anyOrNever, append, appendStringifiedKey, appendUnique, type appendableValue, type arkGet, type arkIndexableOf, type arkKeyOf, arkUtilVersion, type array, arrayEquals, type arrayIndexOf, type autocomplete, brand, builtinConstructors, cached, capitalize, type charsAfterFirst, type charsBeforeLast, compose, type composeTraits, conflatenate, conflatenateAll, type conform, constructorExtends, deanchoredRegex, deanchoredSource, deepClone, defineProperties, type defined, type describe, describeCollapsibleDate, type describeDefaults, type describeDomainOf, type describeObject, type dict, domainDescriptions, domainOf, ecmascriptConstructors, ecmascriptDescriptions, emojiToUnicode, entriesOf, type entryOf, enumValues, envHasCsp, type equals, escapeChar, type evaluate, type exact, type exactEquals, type exactMessageOnError, type extractDefinedKey, type extractKeyed, type filter, type firstChar, flatMorph, type flattenListable, fromEntries, type fromMappedEntries, getBuiltinNameOfConstructor, getDuplicatesOf, getPath, groupBy, type groupableKeyOf, hasDefinedKey, hasDomain, hasKey, hasObjectKind, hasTrait, type headOf, type ifEmptyObjectLiteral, implement, type implementationOf, includes, type inferDomain, inferred, type initOf, initialRegistryContents, type instanceOf, integerLikeMatcher, type intersectArrays, type intersectOverloadReturns, type intersectParameters, type intersectUnion, intersectUniqueLists, invert, isArray, type isDisjoint, isDotAccessible, isEmptyObject, isKeyOf, isNumericString, type isSafelyMappable, type isStringLiteral, isThunk, isWellFormedInteger, isWellFormedNumber, isomorphic, join, jsTypeOfDescriptions, type keyOf, type keySetOf, type keyWithValue, keysOf, type lastChar, type lastIndexOf, type lastOf, lazily, type leftIfEqual, liftArray, type listable, type merge, type mergeExact, type minLengthArray, type mutable, narrow, nearestFloat, noSuggest, type normalizedKeyOf, numberLikeMatcher, type numericStringKeyOf, numericStringMatcher, objectKindDescriptions, objectKindOf, objectKindOrDomainOf, omit, type optionalKeyOf, type overlaps, type overloadOf, type override, type parseInteger, type parseNonNegativeInteger, type parseNumber, type pathToString, pick, platformConstructors, platformDescriptions, print, printable, type promisable, type propValueOf, type propertyDescriptorsOf, type propwiseXor, range, register, registry, type repeat, type require, type requireKeys, type requiredKeyOf, type satisfy, serializePrimitive, shallowClone, type show, snapshot, splitByKeys, spliterate, stringAndSymbolicEntriesOf, stringifyPath, type stringifyUnion, type tailOf, throwError, throwInternalError, throwParseError, type thunkable, type toArkKey, type trim, type trimEnd, type trimStart, tryCatch, tryParseInteger, tryParseNumber, tryParseWellFormedBigint, tryParseWellFormedNumber, type typeToString, typedArrayConstructors, typedArrayDescriptions, type unbrand, uncapitalize, type unionKeyOf, type unionToPropwiseXor, type unionToTuple, unset, type validateExhaustiveKeys, wellFormedIntegerMatcher, wellFormedNumberMatcher, whitespaceChars, type widen, withAlphabetizedKeys, type withJsDoc, type writeInvalidKeysMessage, writeMalformedNumericLiteralMessage, zeroWidthSpace };\n\n}";