import { GraphQLError } from "graphql"; import { MySqlDatabase } from "drizzle-orm/mysql-core"; import { PgAsyncDatabase } from "drizzle-orm/pg-core"; import { BaseSQLiteDatabase } from "drizzle-orm/sqlite-core"; import { IncomingMessage, RequestListener, ServerResponse } from "node:http"; import { Http2ServerRequest, Http2ServerResponse } from "node:http2"; import { Socket } from "node:net"; import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor"; import { ServerOptions } from "graphql-ws"; import { YogaServerOptions, createPubSub } from "graphql-yoga"; import { useSofa } from "sofa-api"; import { Tracer } from "@opentelemetry/api"; import SchemaBuilder from "@pothos/core"; import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry"; //#region lib/helpers/asserts.d.ts /** * * Helper function to map a drizzle findFirst query result, * which may be optional, to a correct drizzle type. * * @throws RumbleError * * @example * * ```ts * schemaBuilder.queryFields((t) => { return { findFirstUser: t.drizzleField({ type: UserRef, resolve: (query, root, args, ctx, info) => { return ( db.query.users .findFirst({ ...query, where: ctx.abilities.users.filter("read").single.where, }) // note that we need to manually raise an error if the value is not found .then(assertFindFirstExists) ); }, }), }; }); * ``` */ declare const assertFindFirstExists: (value: T | undefined) => T; /** * * Helper function to map a drizzle findFirst query result, * which may be optional, to a correct drizzle type. * * @throws RumbleError * * @example * * ```ts schemaBuilder.mutationFields((t) => { return { updateUsername: t.drizzleField({ type: UserRef, args: { userId: t.arg.int({ required: true }), newName: t.arg.string({ required: true }), }, resolve: (query, root, args, ctx, info) => { return db .update(schema.users) .set({ name: args.newName, }) .where( and( eq(schema.users.id, args.userId), ctx.abilities.users.filter("update").single.where ) ) .returning({ id: schema.users.id, name: schema.users.name }) // note that we need to manually raise an error if the value is not found .then(assertFirstEntryExists); }, }), }; }); * ``` */ declare const assertFirstEntryExists: (value: T[]) => T; //#endregion //#region lib/helpers/mapNullFieldsToUndefined.d.ts /** * Helper to map null fields to undefined * @param obj The object to map * @returns The mapped object with all fields of 'null' transformed to 'undefined' * * This becomes useful for update mutations where you do not want to pass null (unset value in db) * but undefined (do not touch value in db) in case of a value not beeing set in the args of said mutation * @example * ```ts * updateUser: t.drizzleField({ type: User, args: { id: t.arg.string({ required: true }), email: t.arg.string(), lastName: t.arg.string(), firstName: t.arg.string(), }, resolve: async (query, root, args, ctx, info) => { const mappedArgs = mapNullFieldsToUndefined(args); const user = await db.transaction(async (tx) => { const user = await tx .update(schema.user) .set({ // email: args.email ?? undefined, // lastName: args.lastName ?? undefined, // firstName: args.firstName ?? undefined, // becomes this email: mappedArgs.email, lastName: mappedArgs.lastName, firstName: mappedArgs.firstName, }) .returning() .then(assertFirstEntryExists); return user; }); pubsub.updated(user.id); return db.query.user .findFirst( query( ctx.abilities.user.filter('read').merge( { where: { id: user.id }, } 1).query.single, ), ) .then(assertFindFirstExists); }, }), * * * ``` */ declare function mapNullFieldsToUndefined(obj: T): { [K in keyof T]: T[K] extends null ? undefined : Exclude }; //#endregion //#region lib/types/drizzleInstanceType.d.ts type DrizzleInstance = PgAsyncDatabase | BaseSQLiteDatabase | MySqlDatabase; /** * Type representing the query function of a Drizzle instance. */ type DrizzleQueryFunction = DB["query"]; /** * Type representing the input parameters for the `findMany` method of a specific table in the Drizzle query function. */ type DrizzleQueryFunctionInput> = Parameters[QueryField]["findMany"]>[0]; /** * Type representing the type of a record in a specific table of the Drizzle instance. */ type DrizzleTableValueType> = NonNullable[QueryField]["findFirst"]>>>; //#endregion //#region lib/runtimeFiltersPlugin/filterTypes.d.ts type Prefetch = (params: { context: Context; }) => Promise; type Filter = (p: { context: Context; entities: FilteredEntityType[]; prefetched: PrefetchReturnType; }) => FilteredEntityType[] | Promise; type FilterPrefetchCombo = { filter: Filter; prefetch?: Prefetch; }; //#endregion //#region lib/args/whereArgsImplementer.d.ts type NumberWhereInputArgument = { eq?: number; ne?: number; gt?: number; gte?: number; lt?: number; lte?: number; in?: number[]; notIn?: number[]; like?: string; ilike?: string; notLike?: string; notIlike?: string; isNull?: boolean; isNotNull?: boolean; arrayOverlaps?: number[]; arrayContained?: number[]; arrayContains?: number[]; AND?: NumberWhereInputArgument[]; OR?: NumberWhereInputArgument[]; NOT?: NumberWhereInputArgument; }; type StringWhereInputArgument = { eq?: string; ne?: string; gt?: string; gte?: string; lt?: string; lte?: string; in?: string[]; notIn?: string[]; like?: string; ilike?: string; notLike?: string; notIlike?: string; isNull?: boolean; isNotNull?: boolean; arrayOverlaps?: string[]; arrayContained?: string[]; arrayContains?: string[]; AND?: StringWhereInputArgument[]; OR?: StringWhereInputArgument[]; NOT?: StringWhereInputArgument; }; type DateWhereInputArgument = { eq?: Date; ne?: Date; gt?: Date; gte?: Date; lt?: Date; lte?: Date; in?: Date[]; notIn?: Date[]; like?: string; ilike?: string; notLike?: string; notIlike?: string; isNull?: boolean; isNotNull?: boolean; arrayOverlaps?: Date[]; arrayContained?: Date[]; arrayContains?: Date[]; AND?: DateWhereInputArgument[]; OR?: DateWhereInputArgument[]; NOT?: DateWhereInputArgument; }; //#endregion //#region node_modules/hotscript/dist/internals/helpers.d.ts type Equal$1 = (() => T extends a ? 1 : 2) extends (() => T extends b ? 1 : 2) ? true : false; /** * HACK: * Special function for never because `Equal` doesn't * work when called deep in the call stack (for a reason I don't understand * probably a TS bug). */ type IsNever$1 = [T] extends [never] ? true : false; type Not$2 = a extends true ? false : true; /** * trick to combine multiple unions of objects into a single object * only works with objects not primitives * @param union - Union of objects * @returns Intersection of objects */ type UnionToIntersection = (union extends any ? (k: union) => void : never) extends ((k: infer intersection) => void) ? intersection : never; type Prettify$1 = { [K in keyof T]: T[K] } | never; declare namespace Iterator$1 { type Get = it["length"]; type Iterator = it["length"] extends n ? it : Iterator$1; type Next = [any, ...it]; type Prev = it extends readonly [any, ...infer tail] ? tail : []; } type UppercaseLetter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"; type KebabToCamel = str extends `${infer first}-${infer rest}` ? `${first}${KebabToCamel>}` : str; type SnakeToCamel = str extends `${infer first}_${infer rest}` ? `${first}${SnakeToCamel>}` : str; /** * Converts string casing from snake_case or kebab-case to camelCase. */ type CamelCase = KebabToCamel>; /** * Converts string casing from camelCase or kebab-case to snake_case. */ type SnakeCase = str extends `${infer first}${infer rest}` ? first extends UppercaseLetter ? output extends "" ? SnakeCase> : SnakeCase}`> : first extends "-" ? SnakeCase : SnakeCase : output extends "" ? str : output; /** * Converts string casing from camelCase or snake_case to kebab-case. */ type KebabCase = str extends `${infer first}${infer rest}` ? first extends UppercaseLetter ? output extends "" ? KebabCase> : KebabCase}`> : first extends "_" ? KebabCase : KebabCase : output extends "" ? str : output; type IsTuple = a extends readonly [] | readonly [any, ...any] | readonly [...any, any] ? true : false; type IsArrayStrict = a extends readonly any[] ? Not$2> : false; /** * get last element of union * @param Union - Union of any types * @returns Last element of union */ type GetUnionLast = UnionToIntersection Union : never> extends (() => infer Last) ? Last : never; /** * Convert union to tuple * @param Union - Union of any types, can be union of complex, composed or primitive types * @returns Tuple of each elements in the union */ type UnionToTuple = [Union] extends [never] ? Tuple : UnionToTuple>, [GetUnionLast, ...Tuple]>; /** * Split string into a tuple, using a simple string literal separator * @description - This is a simple implementation of split, it does not support multiple separators * A more complete implementation is built on top of this one * @param Str - String to split * @param Sep - Separator, must be a string literal not a union of string literals * @returns Tuple of strings */ type Split$2 = Str extends "" ? Acc : Str extends `${infer T}${Sep}${infer U}` ? Split$2 : [...Acc, Str]; type Stringifiable = string | number | boolean | bigint | null | undefined; type Primitive$1 = string | number | boolean | bigint | null | undefined | symbol; type Head = xs extends [infer first, ...any] ? first : never; //#endregion //#region node_modules/hotscript/dist/internals/core/impl/MergeArgs.d.ts type ExcludePlaceholders = xs extends [infer first, ...infer rest] ? Equal$1 extends true ? ExcludePlaceholders : ExcludePlaceholders : output; type MergeArgsRec = partialArgs extends [infer partialFirst, ...infer partialRest] ? IsNever$1 extends true ? MergeArgsRec : [partialFirst] extends [_] ? pipedArgs extends [infer pipedFirst, ...infer pipedRest] ? MergeArgsRec : [...output, ...ExcludePlaceholders] : MergeArgsRec : [...output, ...pipedArgs]; type EmptyIntoPlaceholder = IsNever$1 extends true ? never : [x] extends [unset] ? _ : x; type MapEmptyIntoPlaceholder = xs extends [infer first, ...infer rest] ? MapEmptyIntoPlaceholder]> : output; type MergeArgs = MergeArgsRec>; //#endregion //#region node_modules/hotscript/dist/internals/core/Core.d.ts declare const rawArgs: unique symbol; type rawArgs = typeof rawArgs; /** * Base interface for all functions. * * @description You need to extend this interface to create a function * that can be composed with other HOTScript functions. * Usually you will just convert some utility type you already have * by wrapping it inside a HOTScript function. * * Use `this['args']`, `this['arg0']`, `this['arg1']` etc to access * function arguments. * * The `return` property is the value returned by your function. * * @example * ```ts * export interface CustomOmitFn extends Fn { * return: Omit * } * * type T = Call // { b, c } * ``` */ interface Fn { [rawArgs]: unknown; args: this[rawArgs] extends infer args extends unknown[] ? args : never; arg0: this[rawArgs] extends [infer arg, ...any] ? arg : never; arg1: this[rawArgs] extends [any, infer arg, ...any] ? arg : never; arg2: this[rawArgs] extends [any, any, infer arg, ...any] ? arg : never; arg3: this[rawArgs] extends [any, any, any, infer arg, ...any] ? arg : never; return: unknown; } declare const unset: unique symbol; declare const _: unique symbol; /** * A placeholder type that can be used to indicate that a parameter is not set. */ type unset = typeof unset; /** * A placeholder type that can be used to indicate that a parameter is to partially applied. */ type _ = typeof _; interface args$1 extends Fn { return: this["args"] extends infer args extends Constraint ? args : never; } /** * Call a HOTScript function with the given arguments. * * @param fn - The function to call. * @param args - The arguments to pass to the function. * @returns The result of the function. * * @example * ```ts * type T0 = Apply; // 3 * ``` */ type Apply = (fn & { [rawArgs]: args; })["return"]; /** * Calls a HOTScript function. * * @param fn - The function to call. * @param ...args - optional arguments * * @example * ```ts * type T0 = Call>; // 3 * type T1 = Call, 2>; // 3 * type T2 = Call; // 3 * type T3 = Call< * Tuples.Map, ["a.b", "b.c"]> * >; // [["a", "b"], ["b", "c"]] * ``` */ type Call = (fn & { [rawArgs]: ExcludePlaceholders<[arg0, arg1, arg2, arg3]>; })["return"]; /** * Pipe a value through a list of functions. * @description This is the same as the pipe operator in other languages. * Calls the first function with the initial value, then passes the result to the second function, and so on. * * @param acc - The initial value to pass to the first function. * @param xs - The list of functions to pipe the value through. * @returns The result of the last function. * * @example * ```ts * type T0 = Pipe<1, [Numbers.Add<1>, Numbers.Negate]>; // -2 * ``` */ type Pipe = xs extends [infer first extends Fn, ...infer rest extends Fn[]] ? Pipe, rest> : acc; /** * Composes a list of functions into a single function that passes the result of each function to the next. * Executes the functions from left to right. * * @param fns - The list of functions to compose. * @returns The composed function. * * @example * ```ts * type T0 = Call,T.Join<'-'> ]>, 'a.b.c'>; // 'a-b-c' * ``` */ interface ComposeLeft extends Fn { return: ComposeLeftImpl; } type ComposeLeftImpl = fns extends [infer first extends Fn, ...infer rest extends Fn[]] ? ComposeLeftImpl]> : Head; /** * `PartialApply` Pre applies some arguments to a function. * it takes a `Fn`, and a list of pre applied arguments, * and returns a new function taking the rest of these arguments. * * Most functions in HOTScript are already partially applicable (curried). * * @param fn - The function to partially apply. * @param partialArgs - The arguments to partially apply. * @returns The partially applied function. * * @example * ```ts * interface Append extends Fn { * return: [...this['arg1'], this['arg0']] * } * * type Append1 = PartialApply * type T0 = Call; // [0, 1] * * type AppendTo123 = PartialApply * type T1 = Call; // [1, 2, 3, 4] */ interface PartialApply extends Fn { return: MergeArgs extends infer args extends unknown[] ? Apply : never; } //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/absolute.d.ts type Abs = `${T}` extends `-${infer U extends number | bigint}` ? U : T; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/utils.d.ts type ToNumber = T extends `${infer N extends number | bigint}` ? N : never; type ToString = `${T}`; type Digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; type Digit = Digits[number]; type DigitNumber = { sign: "-" | ""; num: Digit[]; }; type MakeDigitNumber = { sign: S; num: N; }; type ToDigits = T extends `${infer N extends Digit}${infer R}` ? ToDigits : Acc; type ToDigitNumber = T extends `-${infer R}` ? { sign: "-"; num: ToDigits; } : { sign: ""; num: ToDigits; }; type FromDigits = T extends [infer N extends Digit, ...infer R] ? FromDigits : Acc; type Sign = T["sign"]; type InvertSign = Sign extends "-" ? "" : "-"; type MulSign = S1 extends "-" ? S2 extends "-" ? "" : "-" : S2 extends "-" ? "-" : ""; type Num = T["num"]; type FromDigitNumber = `${Sign}${FromDigits>}`; type TrimZeros = T extends [0] ? [0] : T extends [0, ...infer R extends Digit[]] ? TrimZeros : T; type Normalize>> = Trim extends [0] ? MakeDigitNumber<"", Trim> : MakeDigitNumber, Trim>; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/digits/addition.d.ts type AddDigitTable = [[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9, 0], [2, 3, 4, 5, 6, 7, 8, 9, 0, 1], [3, 4, 5, 6, 7, 8, 9, 0, 1, 2], [4, 5, 6, 7, 8, 9, 0, 1, 2, 3], [5, 6, 7, 8, 9, 0, 1, 2, 3, 4], [6, 7, 8, 9, 0, 1, 2, 3, 4, 5], [7, 8, 9, 0, 1, 2, 3, 4, 5, 6], [8, 9, 0, 1, 2, 3, 4, 5, 6, 7], [9, 0, 1, 2, 3, 4, 5, 6, 7, 8]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 0], [2, 3, 4, 5, 6, 7, 8, 9, 0, 1], [3, 4, 5, 6, 7, 8, 9, 0, 1, 2], [4, 5, 6, 7, 8, 9, 0, 1, 2, 3], [5, 6, 7, 8, 9, 0, 1, 2, 3, 4], [6, 7, 8, 9, 0, 1, 2, 3, 4, 5], [7, 8, 9, 0, 1, 2, 3, 4, 5, 6], [8, 9, 0, 1, 2, 3, 4, 5, 6, 7], [9, 0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]]; type AddDigitCarryTable = [[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]]; type AddDigit = AddDigitTable[Carry][T][U]; type AddCarryDigit = AddDigitCarryTable[Carry][T][U]; type AddDigits = T extends [...infer R extends Digit[], infer N extends Digit] ? U extends [...infer S extends Digit[], infer M extends Digit] ? AddDigits, [AddDigit, ...Acc]> : AddDigits, [AddDigit, ...Acc]> : U extends [...infer S extends Digit[], infer M extends Digit] ? AddDigits<[], S, AddCarryDigit<0, M, Carry>, [AddDigit<0, M, Carry>, ...Acc]> : Carry extends 1 ? [1, ...Acc] : Acc; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/compare.d.ts type CompareLength = T["length"] extends U["length"] ? 1 : 0; type DigitCompareTable = [[0, -1, -1, -1, -1, -1, -1, -1, -1, -1], [1, 0, -1, -1, -1, -1, -1, -1, -1, -1], [1, 1, 0, -1, -1, -1, -1, -1, -1, -1], [1, 1, 1, 0, -1, -1, -1, -1, -1, -1], [1, 1, 1, 1, 0, -1, -1, -1, -1, -1], [1, 1, 1, 1, 1, 0, -1, -1, -1, -1], [1, 1, 1, 1, 1, 1, 0, -1, -1, -1], [1, 1, 1, 1, 1, 1, 1, 0, -1, -1], [1, 1, 1, 1, 1, 1, 1, 1, 0, -1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]]; type DigitCompare = DigitCompareTable[D1][D2]; type CompareDigitsWithEqualLength = [T, U] extends [[infer N1 extends Digit, ...infer R1 extends Digit[]], [infer N2 extends Digit, ...infer R2 extends Digit[]]] ? DigitCompare extends 0 ? CompareDigitsWithEqualLength : DigitCompare : 0; type CompareDigits = CompareLength extends 1 ? CompareDigitsWithEqualLength : keyof U extends keyof T ? 1 : -1; type CompareDigitNumbers = Sign extends Sign ? Sign extends "" ? CompareDigits, Num> : CompareDigits, Num> : Sign extends "-" ? -1 : 1; /** * Compare two numbers * @param T - First number * @param U - Second number * @returns 0 if T = U, 1 if T > U, -1 if T < U */ type Compare$1 = Equal$1 extends true ? 0 : CompareDigitNumbers>, ToDigitNumber>>; type LessThan$1 = Compare$1 extends -1 ? true : false; type GreaterThan$1 = Compare$1 extends 1 ? true : false; type Equal = Equal$1; type NotEqual = Equal$1 extends true ? false : true; type LessThanOrEqual$1 = Compare$1 extends -1 | 0 ? true : false; type GreaterThanOrEqual$1 = Compare$1 extends 1 | 0 ? true : false; type Max = Compare$1 extends 1 | 0 ? T : U; type Min = Compare$1 extends 1 | 0 ? U : T; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/digits/substraction.d.ts type SubDigitTable = [[[0, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 0, 9, 8, 7, 6, 5, 4, 3, 2], [2, 1, 0, 9, 8, 7, 6, 5, 4, 3], [3, 2, 1, 0, 9, 8, 7, 6, 5, 4], [4, 3, 2, 1, 0, 9, 8, 7, 6, 5], [5, 4, 3, 2, 1, 0, 9, 8, 7, 6], [6, 5, 4, 3, 2, 1, 0, 9, 8, 7], [7, 6, 5, 4, 3, 2, 1, 0, 9, 8], [8, 7, 6, 5, 4, 3, 2, 1, 0, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]], [[9, 8, 7, 6, 5, 4, 3, 2, 1, 0], [0, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 0, 9, 8, 7, 6, 5, 4, 3, 2], [2, 1, 0, 9, 8, 7, 6, 5, 4, 3], [3, 2, 1, 0, 9, 8, 7, 6, 5, 4], [4, 3, 2, 1, 0, 9, 8, 7, 6, 5], [5, 4, 3, 2, 1, 0, 9, 8, 7, 6], [6, 5, 4, 3, 2, 1, 0, 9, 8, 7], [7, 6, 5, 4, 3, 2, 1, 0, 9, 8], [8, 7, 6, 5, 4, 3, 2, 1, 0, 9]]]; type SubDigitCarryTable = [[[0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]]]; type SubDigit = SubDigitTable[Carry][T][U]; type SubCarryDigit = SubDigitCarryTable[Carry][T][U]; type SubDigits = T extends [...infer R extends Digit[], infer N extends Digit] ? U extends [...infer S extends Digit[], infer M extends Digit] ? SubDigits, [SubDigit, ...Acc]> : SubDigits, [SubDigit, ...Acc]> : U extends [...infer S extends Digit[], infer M extends Digit] ? SubDigits<[], S, SubCarryDigit<0, M, Carry>, [SubDigit<0, M, Carry>, ...Acc]> : Carry extends 1 ? [...Acc, 9] : Acc; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/addition.d.ts type AddDigitNumbers = Sign extends Sign ? MakeDigitNumber, AddDigits, Num>> : CompareDigits, Num> extends 1 ? MakeDigitNumber, SubDigits, Num>> : MakeDigitNumber, SubDigits, Num>>; type Add = ToNumber>, ToDigitNumber>>>>>; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/substraction.d.ts type SubDigitNumbers = Sign extends Sign ? CompareDigits, Num> extends 1 ? MakeDigitNumber, SubDigits, Num>> : MakeDigitNumber, SubDigits, Num>> : MakeDigitNumber, AddDigits, Num>>; type Sub = ToNumber>, ToDigitNumber>>>>>; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/negate.d.ts type Negate = `${T}` extends `-${infer U extends number | bigint}` ? U : `-${T}` extends `${infer U extends number | bigint}` ? U : never; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/digits/multiply.d.ts type MulX2 = AddDigits; type MulX3 = AddDigits>; type MulX4 = MulX2>; type MulX5 = AddDigits>; type MulX6 = MulX2>; type MulX7 = SubDigits, MulX3>; type MulX8 = SubDigits, MulX2>; type MulX9 = SubDigits, T>; type MulX10 = [...T, 0]; type MulByDigit = U extends 0 ? [0] : U extends 1 ? T : U extends 2 ? MulX2 : U extends 3 ? MulX3 : U extends 4 ? MulX4 : U extends 5 ? MulX5 : U extends 6 ? MulX6 : U extends 7 ? MulX7 : U extends 8 ? MulX8 : MulX9; type MulDigits = U extends [infer N extends Digit, ...infer R extends Digit[]] ? MulDigits, MulX10>> : Acc; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/multiply.d.ts type MulDigitNumbers = MakeDigitNumber, Sign>, MulDigits, Num>>; type Mul = ToNumber>, ToDigitNumber>>>>>; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/digits/division.d.ts type Rest$1 = T extends [Digit, ...infer R extends Digit[]] ? R : never; type TruncateWith = U extends [] ? [T, Acc] : T extends [infer D extends Digit, ...infer DR extends Digit[]] ? TruncateWith, [...Acc, D]> : [T, Acc]; type DivModByDigit, Comp = CompareDigits> = IterTable extends [infer Iteration extends Digit, ...infer Next extends Digit[]] ? Comp extends 0 ? { Quotient: Next[0]; Remainder: [0]; } : Comp extends 1 ? DivModByDigit : { Quotient: Iteration; Remainder: SubDigits; } : never; /** * compute the long division of a number by a divisor * @param A the Numerator Cut after M digits * @param D the Numerator Cut with M first digits * @param M the Divisor * @param Q the Quotient * @see https://en.wikipedia.org/wiki/Long_division#Algorithm_for_arbitrary_base */ type _DivModDigits = DivModByDigit extends { Quotient: infer B extends Digit; Remainder: infer R extends Digit[]; } ? A extends [infer A1 extends Digit, ...infer AR extends Digit[]] ? _DivModDigits, M, [...Q, B]> : { Quotient: [...Q, B]; Remainder: R; } : never; type DivDigits = TruncateWith extends [infer A extends Digit[], infer D extends Digit[]] ? _DivModDigits["Quotient"] : never; type ModDigits = TruncateWith extends [infer A extends Digit[], infer D extends Digit[]] ? _DivModDigits["Remainder"] : never; type DivModDigits = TruncateWith extends [infer A extends Digit[], infer D extends Digit[]] ? _DivModDigits : never; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/division.d.ts type DivDigitNumbers = MakeDigitNumber, Sign>, DivDigits, Num>>; type Div = ToNumber>, ToDigitNumber>>>>>; type ModDigitNumbers = MakeDigitNumber, ModDigits, Num>>; type Mod = ToNumber>, ToDigitNumber>>>>>; type DivModDigitNumbers, Num>> = { Quotient: MakeDigitNumber, Sign>, DivMod["Quotient"]>; Remainder: MakeDigitNumber, DivMod["Remainder"]>; }; type DivMod>, ToDigitNumber>>> = { Quotient: ToNumber>>; Remainder: ToNumber>>; }; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/digits/power.d.ts type PowerDigits = U extends [0] ? [1] : U extends [1] ? MulDigits : U extends [infer UN extends Digit, ...infer UR extends Digit[]] ? _DivModDigits extends { Quotient: infer Q extends Digit[]; Remainder: infer R extends Digit[]; } ? TrimZeros extends [0] ? PowerDigits, TrimZeros, Acc> : PowerDigits, TrimZeros, MulDigits> : never : Acc; //#endregion //#region node_modules/hotscript/dist/internals/numbers/impl/power.d.ts type PowerSign = S extends "-" ? Num extends [...Digit[], 0 | 2 | 4 | 6 | 8] ? "" : "-" : ""; type PowerDigitNumbers = Sign extends "-" ? MakeDigitNumber, [0]> : MakeDigitNumber, U>, PowerDigits, Num>>; type Power = ToNumber>, ToDigitNumber>>>>>; //#endregion //#region node_modules/hotscript/dist/internals/numbers/Numbers.d.ts declare namespace Numbers { /** * Add two numbers together * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number * @returns the sum of the two numbers * @example * ```ts * type T0 = Call>; // 3 * type T1 = Call>; // 1000000000000000000000000001n * ``` */ export type Add = PartialApply; interface AddFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Add : never; } /** * Subtract two numbers * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to subtract from the first * @returns the difference of the two numbers * @example * ```ts * type T0 = Call>; // -1 * type T1 = Call>; // 999999999999999999999999999n * ``` */ export type Sub = PartialApply; interface SubFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Sub : never; } /** * Multiply two numbers together * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number * @returns the product of the two numbers * @example * ```ts * type T0 = Call>; // 297 * type T1 = Call>; // 1999999999999999999999999998n * ``` */ export type Mul = PartialApply; interface MulFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Mul : never; } /** * Divide two numbers * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to divide the first by * @returns the quotient of the two numbers * @example * ```ts * type T0 = Call>; // 33 * type T1 = Call>; // 249999999999999999999999999n * ``` */ export type Div = PartialApply; interface DivFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Div : never; } /** * Modulo of two numbers * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to divide the first by * @returns the remainder of the two numbers * @example * ```ts * type T0 = Call>; // 1 * type T1 = Call>; // 3n * ``` */ export type Mod = PartialApply; interface ModFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Mod : never; } /** * Negate a number * @description the number can be of different types (bigint or number) and handle really large numbers * @param n - the number to negate * @returns the negated number * @example * ```ts * type T0 = Call>; // -1 * type T1 = Call>; // -999999999999999999999999999n * ``` */ export type Negate = PartialApply; interface NegateFn extends Fn { return: this["args"] extends [infer a extends number | bigint, ...any] ? Negate : never; } /** * Absolute value of a number * @description the number can be of different types (bigint or number) and handle really large numbers * @param n - the number to get the absolute value of * @returns the absolute value of the number * @example * ```ts * type T0 = Call>; // 1 * type T1 = Call>; // 999999999999999999999999999n * ``` */ export type Abs = PartialApply; export interface AbsFn extends Fn { return: this["args"] extends [infer a extends number | bigint, ...any] ? Abs : never; } /** * Returns the max between 2 numbers. * @param n1 - first number or bigint * @param n2 - second number or bigint * @returns the maximum values between the two * @example * ```ts * type T0 = Call>; // 2 * ``` */ export type Max = PartialApply; export interface MaxFn extends Fn { return: Max, Extract>; } /** * Returns the min between 2 numbers. * @param n1 - first number or bigint * @param n2 - second number or bigint * @returns the minimum values between the two * @example * ```ts * type T0 = Call>; // 1 * ``` */ export type Min = PartialApply; export interface MinFn extends Fn { return: Min, Extract>; } /** * Power of a number * @description the number can be of different types (bigint or number) and handle really large numbers * @param n1 - the base number * @param n2 - the exponent * @returns the power of the two numbers * @example * ```ts * type T0 = Call>; // 340282366920938463463374607431768211456 * ``` */ export type Power = PartialApply; interface PowerFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Power : never; } /** * Compare two numbers * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns -1 if n1 < n2, 0 if n1 === n2, 1 if n1 > n2 * @example * ```ts * type T0 = Call>; // -1 * type T1 = Call>; // 1 * type T2 = Call>; // 0 * ``` */ export type Compare = PartialApply; interface CompareFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Compare$1 : never; } /** * Check if two numbers are equal * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns true if n1 === n2, false otherwise * @example * ```ts * type T0 = Call>; // false * type T1 = Call>; // true * ``` */ export type Equal = PartialApply; interface EqualFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Equal : never; } /** * Check if two numbers are not equal * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns true if n1 !== n2, false otherwise * @example * ```ts * type T0 = Call>; // true * type T1 = Call>; // false * ``` */ export type NotEqual = PartialApply; interface NotEqualFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? NotEqual : never; } /** * Check if a number is less than another * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns true if n1 < n2, false otherwise * @example * ```ts * type T0 = Call>; // true * type T1 = Call>; // false * type T2 = Call>; // false * ``` */ export type LessThan = PartialApply; interface LessThanFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? LessThan$1 : never; } /** * Check if a number is less than or equal to another * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns true if n1 <= n2, false otherwise * @example * ```ts * type T0 = Call>; // true * type T1 = Call>; // true * type T2 = Call>; // false * ``` */ export type LessThanOrEqual = PartialApply; interface LessThanOrEqualFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? LessThanOrEqual$1 : never; } /** * Check if a number is greater than another * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns true if n1 > n2, false otherwise * @example * ```ts * type T0 = Call>; // false * type T1 = Call>; // false * type T2 = Call>; // true * ``` */ export type GreaterThan = PartialApply; interface GreaterThanFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? GreaterThan$1 : never; } /** * Check if a number is greater than or equal to another * @description the two numbers can be of different types (bigint or number) and handle really large numbers * @param n1 - the first number * @param n2 - the second number to compare the first to * @returns true if n1 >= n2, false otherwise * @example * ```ts * type T0 = Call>; // false * type T1 = Call>; // true * type T2 = Call>; // true * ``` */ export type GreaterThanOrEqual = PartialApply; interface GreaterThanOrEqualFn extends Fn { return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? GreaterThanOrEqual$1 : never; } export {}; } //#endregion //#region node_modules/hotscript/dist/internals/std/Std.d.ts declare namespace Std { type _Pick = Pick; type _Omit = Omit; type _Extract = Extract; type _Exclude = Exclude; type _Uppercase = Uppercase; type _Lowercase = Lowercase; type _Capitalize = Capitalize; type _Uncapitalize = Uncapitalize; type _Record = Record; type _Readonly = Readonly; type _Required = Required; type _Partial = Partial; type _NonNullable = NonNullable; } //#endregion //#region node_modules/hotscript/dist/internals/tuples/Tuples.d.ts declare namespace Tuples { type HeadImpl = xs extends readonly [infer head, ...any] ? head : never; /** * Get an element from a tuple at a given index. * @param args[0] - The index of the element to get. * @param args[1] - The tuple to get the element from. * @param index - The index of the element to get. * @param tuple - The tuple to get the element from. * @returns The element at the specified index. * @example * ```ts * type T0 = Call; // "b" * type T1 = Call>; // "b" * type T2 = Call, ["a", "b", "c"]>; // "b" * ``` */ export type At = PartialApply; interface AtFn extends Fn { return: Extract[Extract]; } type IsEmptyImpl = [] extends tuple ? true : false; interface IsEmptyFn extends Fn { return: IsEmptyImpl>; } /** * Check if a tuple is empty. * @param args[0] - The tuple to check. * @param tuple - The tuple to check. * @returns `true` if the tuple is empty, `false` otherwise. * @example * ```ts * type T0 = Call; // true * type T1 = Call; // false * type T2 = Call>; // true * ``` */ export type IsEmpty = PartialApply; interface ToUnionFn extends Fn { return: this["arg0"][number]; } /** * Convert a tuple to a union of its elements. * @param tuple - The tuple to convert. * @returns A union of the tuple's elements. * @example * ```ts * type T0 = Call; // 1 | 2 | 3 * type T1 = Call>; // 1 | 2 | 3 * ``` */ export type ToUnion = PartialApply; /** * `Unions.ToIntersection` turns a tuple into an intersection type. * @param tuple - any tuple. * @returns an intersection of all member of the tuple * @example * ```ts * type T0 = Call; // {a: string} & {b: number} * ``` */ export type ToIntersection = PartialApply; interface ToIntersectionFn extends Fn { return: this["args"] extends [infer tuples extends readonly any[], ...any] ? Call> : never; } interface IntersectFn extends Fn { return: this["arg0"] & this["arg1"]; } /** * Returns the first element of a tuple. * @params args[0] - A tuple. * @return The first element of a tuple. * @example * ```ts * type T0 = Call; // 1 * type T1 = Call; // never * type T2 = Call; // 1 * ``` */ export type Head = PartialApply; interface HeadFn extends Fn { return: HeadImpl; } type TailImpl = xs extends readonly [any, ...infer tail] ? tail : []; /** * Returns a tuple with all elements except the first. * @params args[0] - A tuple. * @return A tuple with all elements except the first. * @example * ```ts * type T0 = Call; // [2, 3] * type T1 = Call; // [] * type T2 = Call; // [] * ``` */ export type Tail = PartialApply; export interface TailFn extends Fn { return: TailImpl; } type LastImpl = xs extends readonly [...any, infer last] ? last : never; /** * Returns the last element of a tuple. * @params args[0] - A tuple. * @return The last element of a tuple. * @example * ```ts * type T0 = Call; // 3 * type T1 = Call; // never * type T2 = Call; // 1 * ``` */ export type Last = PartialApply; export interface LastFn extends Fn { return: LastImpl; } /** * Apply a function to each element of a tuple and return a new tuple with the results. * @params args[0] - A tuple of elements to be transformed. * @param fn - A function that takes an element of the tuple and transforms it. * @returns A tuple with the results of applying the function to each element of the input tuple. * @example * ```ts * type T0 = Call,[1,2,3]>; // ["1","2","3"] * type T1 = Call,[]>; // [] * ``` */ export type Map = PartialApply; interface MapFn extends Fn { return: this["args"] extends [infer fn extends Fn, infer tuple extends unknown[]] ? { [key in keyof tuple]: Call } : never; } interface FlatMapReducer extends Fn { return: this["args"] extends [infer acc extends any[], infer item] ? [...acc, ...Extract, readonly any[]>] : never; } /** * Apply a function to each element of a tuple and return a new tuple with the results flattened by one level. * @params args[0] - A tuple of elements to be transformed. * @param fn - A function that takes an element of the tuple and transforms it. * @returns A tuple with the results of applying the function to each element of the input tuple flattened by one level. * @example * ```ts * type T0 = Call,["hello","world"]>; // ["h","e","l","l","o","w","o","r","l","d"] * type T1 = Call,[]>; // [] * ``` */ export type FlatMap = PartialApply; interface FlatMapFn extends Fn { return: ReduceImpl>, [], this["arg1"]>; } type ReduceImpl = xs extends [infer first, ...infer rest] ? ReduceImpl, rest> : xs extends readonly [infer first, ...infer rest] ? ReduceImpl, rest> : acc; /** * Apply a reducer function to each element of a tuple starting from the first and return the accumulated result. * @params args[0] - A tuple of elements to be transformed. * @params fn - A reducer function that takes the accumulated result and the current element and returns a new accumulated result. * @params init - The initial value of the accumulated result. * @returns The accumulated result. * @example * ```ts * type T0 = Call,[1,2,3]>; // 6 * type T1 = Call,[]>; // 0 * ``` */ export type Reduce = PartialApply; interface ReduceFn extends Fn { return: ReduceImpl, this["arg1"], this["arg2"]>; } type ReverseImpl = any[] extends tuple ? tuple : ReverseRecImpl; type ReverseRecImpl = tuple extends [infer first, ...infer rest] ? ReverseRecImpl : acc; /** * Reverse a tuple. * @params args[0] - A tuple. * @return Reversed tuple. * @example * ```ts * type T0 = Call; // [3,2,1] * ``` */ export type Reverse = PartialApply; interface ReverseFn extends Fn { return: ReverseImpl; } type ReduceRightImpl = xs extends [...infer rest, infer last] ? ReduceRightImpl, fn> : acc; /** * Apply a reducer function to each element of a tuple starting from the last and return the accumulated result. * @params args[0] - A tuple of elements to be transformed. * @params fn - A reducer function that takes the accumulated result and the current element and returns a new accumulated result. * @params init - The initial value of the accumulated result. * @returns The accumulated result. * @example * ```ts * type T0 = Call,[1,2,3]>; // 6 * type T1 = Call,[]>; // 0 * ``` */ export type ReduceRight = PartialApply; interface ReduceRightFn extends Fn { return: ReduceRightImpl>; } interface FilterReducer extends Fn { return: this["args"] extends [infer acc extends any[], infer item] ? Call extends true ? [...acc, item] : acc : never; } /** * Apply a predicate function to each element of a tuple and return a new tuple with the elements that satisfy the predicate. * @params args[0] - A tuple of elements to be filtered. * @param fn - A predicate function that takes an element of the tuple and returns a boolean. * @returns A tuple with the elements that satisfy the predicate. * @example * ```ts * type T0 = Call>,[1,2,"3"]>; // ["3"] * type T1 = Call>,[]>; // [] * ``` */ export type Filter = PartialApply; export interface FilterFn extends Fn { return: ReduceImpl>, [], this["arg1"]>; } type FindImpl = xs extends [infer first, ...infer rest] ? Call extends true ? first : FindImpl : never; /** * Apply a predicate function to each element of a tuple and return the first element that satisfies the predicate. * @params args[0] - A tuple of elements to be filtered. * @param fn - A predicate function that takes an element of the tuple and returns a boolean. * @returns The first element that satisfies the predicate. * @example * ```ts * type T0 = Call>,[1,2,"3",4,"5"]>; // "3" * type T1 = Call>,[1,2]>; // never * ``` */ export type Find = PartialApply; export interface FindFn extends Fn { return: FindImpl>; } /** * Sum the elements of a tuple of numbers. * @params args[0] - A tuple of numbers. * @returns The sum of the elements of the tuple. * @example * ```ts * type T0 = Call; // 6 * type T1 = Call; // 0 * ``` */ export type Sum = PartialApply; interface SumFn extends Fn { return: ReduceImpl; } type DropImpl = Iterator$1.Get extends 0 ? xs : xs extends readonly [any, ...infer tail] ? DropImpl> : []; /** * Drop the first n elements of a tuple. * @params args[0] - A tuple of elements. * @params n - The number of elements to drop. * @returns A tuple with the first n elements dropped. * @example * ```ts * type T0 = Call,[1,2,3,4]>; // [3,4] * type T1 = Call,[1,2]>; // [] * type T2 = Call,[]>; // [] * ``` */ export type Drop = PartialApply; export interface DropFn extends Fn { return: this["args"] extends [infer N extends number, infer T extends readonly any[]] ? DropImpl> : never; } type TakeImpl = Iterator$1.Get extends 0 ? output : xs extends readonly [infer head, ...infer tail] ? TakeImpl, [...output, head]> : output; /** * Take the first n elements of a tuple. * @params args[0] - A tuple of elements. * @params n - The number of elements to take. * @returns A tuple with the first n elements. * @example * ```ts * type T0 = Call,[1,2,3,4]>; // [1,2] * type T1 = Call,[1,2]>; // [1,2] * type T2 = Call,[]>; // [] * ``` */ export type Take = PartialApply; interface TakeFn extends Fn { return: this["args"] extends [infer N extends number, infer T extends readonly any[]] ? TakeImpl> : never; } type TakeWhileImpl = xs extends readonly [infer head, ...infer tail] ? Call extends true ? TakeWhileImpl : output : output; /** * Take the first elements of a tuple that satisfy a predicate function. * @params args[0] - A tuple of elements. * @param fn - A predicate function that takes an element of the tuple and returns a boolean. * @returns A tuple with the first elements that satisfy the predicate. * @example * ```ts * type T0 = Call>,[1,2,"3",4,"5"]>; // [1,2] * type T1 = Call>,["1", 2]>; // [] * ``` */ export type TakeWhile = PartialApply; export interface TakeWhileFn extends Fn { return: TakeWhileImpl, Extract>; } /** * Check if a tuple staisfies a predicate function for at least one element. * @params args[0] - A tuple of elements. * @param fn - A predicate function that takes an element of the tuple and returns a boolean. * @returns A boolean indicating whether the predicate is satisfied by at least one element. * @example * ```ts * type T0 = Call>,[1,2,"3",4,"5"]>; // true * type T1 = Call>,["1", "2"]>; // false * ``` */ export type Some = PartialApply; export interface SomeFn extends Fn { return: true extends Call>, this["arg1"]>[number] ? true : false; } /** * Check if a tuple staisfies a predicate function for all elements. * @params args[0] - A tuple of elements. * @param fn - A predicate function that takes an element of the tuple and returns a boolean. * @returns A boolean indicating whether the predicate is satisfied by all elements. * @example * ```ts * type T0 = Call>,[1,2,"3",4,"5"]>; // false * type T1 = Call>,["1", "2"]>; // false * type T2 = Call>,[1, 2]>; // true * ``` */ export type Every = PartialApply; export interface EveryFn extends Fn { return: false extends Call>, this["arg1"]>[number] ? false : true; } type SortImpl = xs extends [infer head, ...infer tail] ? Call, tail>> extends [infer left extends any[], infer right extends any[]] ? [...SortImpl, head, ...SortImpl] : never : []; /** * Sort a tuple. * @param args[0] - The tuple to sort. * @param predicateFn - The predicate function to use for sorting. should compare 2 items and return a boolean. * @returns The sorted tuple. * @example * ```ts * type T0 = Call; // [1,2,3] * type T1 = Call,["b","c","a"]>; // ["a","b","c"] * ``` */ export interface Sort extends Fn { return: this["args"] extends [infer xs extends any[]] ? SortImpl : never; } interface JoinReducer extends Fn { return: this["args"] extends [infer acc extends Stringifiable, infer item extends Stringifiable] ? `${acc extends "" ? "" : `${acc}${sep}`}${item}` : never; } /** * Join a tuple into a single string. * @param args[0] - The tuple to join. * @param sep - The separator to join the strings with. * @returns The joined string. * @example * ```ts * type T0 = Call,["a","b","c"]>; // "a,b,c" * type T1 = Call; // "a,b,c" * type T2 = Call>; // "a,b,c" * ``` */ export type Join = PartialApply; interface JoinFn extends Fn { return: this["args"] extends [infer Sep extends string, infer Tuple] ? ReduceImpl, "", Tuple> : never; } /** * Adds a new element to the start of a tuple * @param args[0] - The tuple to update. * @param element - The element to add to our tuple * @returns The updated tuple. * @example * ```ts * type T0 = Call, ["a", "b", "c"]>; // ["new", "a", "b", "c"] * ``` */ export type Prepend = PartialApply; interface PrependFn extends Fn { return: this["args"] extends [infer element, infer tuple extends any[]] ? [element, ...tuple] : never; } /** * Adds a new element to the end of a tuple * @param args[0] - The tuple to update. * @param element - The element to add to our tuple * @returns The updated tuple. * @example * ```ts * type T0 = Call, ["a", "b", "c"]>; // ["a", "b", "c", "new"] * ``` */ export type Append = PartialApply; interface AppendFn extends Fn { return: this["args"] extends [infer element, infer tuple extends any[]] ? [...tuple, element] : never; } /** * Concatenate two tuples together * @param tuple1 - A list of types * @param tuple2 - Another list of types * @returns [...tuple1, ...tuple2] * @example * ```ts * type T0 = Call; // [1, 2, 3] * ``` */ export type Concat = PartialApply; interface ConcatFn extends Fn { return: this["args"] extends [infer t1 extends readonly any[], infer t2 extends readonly any[], ...any] ? [...t1, ...t2] : never; } /** * Splits a tuple into two groups based on a predicate: * - The first group contains elements predicate returns true for. * - The second group contains elements predicate returns false for. * * @param predicate - The tuple to update. * @param element - The element to add to our tuple * @returns - a tuple containing two tuples: one for each groupe * @example * ```ts * type T0 = Call>, [1, "a", 2, "b", 3, "c"]>; * // ^? [[1, 2, 3], ["a", "b", "c"]] * ``` */ export type Partition = PartialApply; type PartitionImpl = tuple extends [infer first, ...infer rest] ? Call extends true ? PartitionImpl : PartitionImpl : [left, right]; interface PartitionFn extends Fn { return: PartitionImpl, Extract>; } /** * SplitAt takes an index and a tuple, splits the tuple * at the provided index and returns the list of elements * before this index and the list of elements after this * index as a [before[], after[]] tuple. * * @param index - the index at which to split the list * @param tuple - The list to split * @returns A [before[], after[]] tuple. * @example * ```ts * type T0 = Call, [1, 2, 3, 4]>; // [[1, 2], [3, 4]] * type T1 = Call, [1]>; // [[1], []] * ``` */ export type SplitAt = PartialApply; export interface SplitAtFn extends Fn { return: this["args"] extends [infer index extends number, infer tuple extends any[], ...any] ? [TakeImpl>, DropImpl>] : never; } interface ZipWithMapper extends Fn { return: this["args"] extends [infer Index extends number, ...any] ? Apply, arrs>>> : never; } interface ZipWithFn extends Fn { return: this["args"] extends infer arrays extends unknown[][] ? Pipe>, Tuples.Min, Numbers.Abs, Numbers.Sub<_, 1>, Tuples.Range<0, _>, Tuples.Map>]> : never; } /** * Zip two tuples together. * @param args[0] - The first tuple to zip. * @param args[1] - The second tuple to zip. * @param arr1 - The first tuple to zip. * @param arr2 - The second tuple to zip. * @returns The zipped tuple. * @example * ```ts * type T0 = Call; // [[1, 10], [2, 2], [3, 5]] * type T1 = Call>; // [[1, 10], [2, 2], [3, 5]] * ``` */ export type Zip = PartialApply, [arr0, arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8, arr9]>; /** * Zip two tuples together using a function. * @description The function should take a 2 elements and return a value. * Using the identity function will return a 2-tuple and have the same effect as `Zip`. * @param args[0] - The first tuple to zip. * @param args[1] - The second tuple to zip. * @param fn - The function to use to zip the tuples. * @param arr1 - The first tuple to zip. * @param arr2 - The second tuple to zip. * @returns The zipped tuple. * @example * ```ts * type T0 = Call, [1, 2, 3], [10, 2, 5]>; // [[1, 10], [2, 2], [3, 5]] * type T1 = Call>; // [[1, 10], [2, 2], [3, 5]] * type T3 = Call, [1, 2, 3], [10, 2, 5]>; // [11, 4, 8] * ``` */ export type ZipWith = PartialApply, [arr0, arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8, arr9]>; /** * Group values in a tuple into an object, using a predicate * to compute the key of each group. * @param fn - function applied to all values in the tuple to get a key. * @param tuple - A list of element * @returns an object containing a list of element for each key. * @example * ```ts * interface IsNumber extends Fn { * return: this["arg0"] extends number ? true : false; * } * * type T0 = Call, [1, "str", 2]>; * // ^? { true: [1, 2], false: ["str"] } * type T2 = Call>, ["alice", "bob", "carl"]>; * // ^? { true: ["alice"], false: ["bob", "carl"] } * ``` */ export interface GroupBy extends Fn { return: GroupByImpl; } type GroupByImplRec = xs extends [infer first, ...infer rest] ? Call extends infer key extends PropertyKey ? GroupByImplRec & { [K in key]: [...(key extends keyof acc ? Extract : []), first] }> : never : acc; export type GroupByImpl = Prettify$1>; /** * Range takes a `start` and an `end` integer and produces * a tuple containing integer ranging from `start` to `end` * @param start - the start of the range (included) * @param end - the end of the range (included) * @returns a tuple of integers * @example * ```ts * type T0 = Call, 7>; // [3, 4, 5, 6, 7] * type T1 = Call, 5>; // [5, 6, 7, 8, 9, 10] * type T3 = Call, 5>; // [-2, 1, 0, 1, 2] * type T4 = Call, 5>; // [-5, -4, -3, -2] * ``` */ export type Range = PartialApply; interface RangeFn extends Fn { return: this["args"] extends [infer start extends number, infer end extends number] ? Call extends true ? Pipe, Numbers.Add<1>, Numbers.Abs]> extends infer length extends number ? RangeImpl : never : never : never; } type RangeImpl = output["length"] extends length ? output : RangeImpl>]>; /** * Returns the length of a tuple * @param tuple - any tuple * @returns a number * @example * ```ts * type T0 = Call; // 3 * type T1 = Call; 0 * type T2 = Call; 1 * ``` */ export type Length = PartialApply; interface LengthFn extends Fn { return: this["args"] extends [infer tuple extends readonly any[], ...any] ? tuple["length"] : never; } /** * Takes a tuple of numbers and returns the smallest one * @param tuple - a tuple of numbers * @returns a number * @example * ```ts * type T0 = Call; // 1 * type T1 = Call; // -3 * type T2 = Call; never * ``` */ export type Min = PartialApply; interface MinFn extends Fn { return: this["args"] extends [infer tuple extends readonly (number | bigint)[], ...any] ? MinImpl : never; } type MinImpl = xs extends [infer first extends number | bigint, ...infer rest] ? MinImpl> : min; /** * Takes a tuple of numbers and returns the smallest one * @param tuple - a tuple of numbers * @returns a number * @example * ```ts * type T0 = Call; // 3 * type T1 = Call; // -1 * type T2 = Call; never * ``` */ export type Max = PartialApply; interface MaxFn extends Fn { return: this["args"] extends [infer tuple extends readonly (number | bigint)[], ...any] ? MaxImpl : never; } type MaxImpl = xs extends [infer first extends number | bigint, ...infer rest] ? MaxImpl> : min; export {}; } //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/split.d.ts type ConcatSplits = Parts extends [infer First extends string, ...infer Rest extends string[]] ? ConcatSplits]> : Acc; type SplitManySep = Sep extends [infer FirstSep extends string, ...infer RestSep extends string[]] ? ConcatSplits, RestSep> : [Str, ...Acc]; /** * Split a string into a tuple. * @param Str - The string to split. * @param Sep - The separator to split on, can be a union of strings of more than one character. * @returns The tuple of each split. if sep is an empty string, returns a tuple of each character. */ type Split$1> = Seps extends string[] ? Str extends string ? SplitManySep : [] : []; /** * Split a string into a tuple with each character. * @param Str - The string to split. * @returns The tuple of each character. */ type StringToTuple = Str extends string ? Str extends `${infer First}${infer Rest}` ? StringToTuple : Acc : []; //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/trim.d.ts /** * Trim the left side of a string. * @param Str - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. */ type TrimLeft = Str extends `${Sep}${infer Rest}` ? TrimLeft : Str; /** * Trim the right side of a string. * @param Str - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. */ type TrimRight = Str extends `${infer Rest}${Sep}` ? TrimRight : Str; /** * Trim a string. * @param Str - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. */ type Trim = TrimLeft, Sep>; //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/replace.d.ts type Replace = Str extends string ? Str extends `${infer Before}${From}${infer After}` ? Replace<`${Before}${To}${After}`, From, To> : Str : Str; interface ReplaceReducer extends Fn { return: this["args"] extends [infer Str extends string, infer From extends string, ...any] ? Replace : never; } //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/repeat.d.ts type RepeatX2 = `${T}${T}`; type Repeat> = N extends 0 ? Acc : N extends 1 ? `${Acc}${T}` : Calc["Remainder"] extends 0 ? Repeat, Calc["Quotient"], Acc> : Repeat, `${Acc}${T}`>; //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/compare.d.ts type ascii = { " ": 32; "!": 33; '"': 34; "#": 35; $: 36; "%": 37; "&": 38; "'": 39; "(": 40; ")": 41; "*": 42; "+": 43; ",": 44; "-": 45; ".": 46; "/": 47; "0": 48; "1": 49; "2": 50; "3": 51; "4": 52; "5": 53; "6": 54; "7": 55; "8": 56; "9": 57; ":": 58; ";": 59; "<": 60; "=": 61; ">": 62; "?": 63; "@": 64; A: 65; B: 66; C: 67; D: 68; E: 69; F: 70; G: 71; H: 72; I: 73; J: 74; K: 75; L: 76; M: 77; N: 78; O: 79; P: 80; Q: 81; R: 82; S: 83; T: 84; U: 85; V: 86; W: 87; X: 88; Y: 89; Z: 90; "[": 91; "\\": 92; "]": 93; "^": 94; _: 95; "`": 96; a: 97; b: 98; c: 99; d: 100; e: 101; f: 102; g: 103; h: 104; i: 105; j: 106; k: 107; l: 108; m: 109; n: 110; o: 111; p: 112; q: 113; r: 114; s: 115; t: 116; u: 117; v: 118; w: 119; x: 120; y: 121; z: 122; "{": 123; "|": 124; "}": 125; "~": 126; é: 130; â: 131; ä: 132; à: 133; å: 134; ç: 135; ê: 136; ë: 137; è: 138; ï: 139; î: 140; ì: 141; Ä: 142; Å: 143; É: 144; æ: 145; Æ: 146; ô: 147; ö: 148; ò: 149; û: 150; ù: 151; ÿ: 152; Ö: 153; Ü: 154; ø: 155; "£": 156; Ø: 157; "×": 158; ƒ: 159; á: 160; í: 161; ó: 162; ú: 163; ñ: 164; Ñ: 165; ª: 166; º: 167; "¿": 168; "®": 169; "½": 171; "¼": 172; "¡": 173; "«": 174; "»": 175; "░": 176; "▒": 177; "▓": 178; "│": 179; "┤": 180; Á: 181; Â: 182; À: 183; "©": 184; "╣": 185; "║": 186; "╗": 187; "╝": 188; "¢": 189; "¥": 190; "┐": 191; "└": 192; "┴": 193; "┬": 194; "├": 195; "─": 196; "┼": 197; ã: 198; Ã: 199; "╚": 200; "╔": 201; "╩": 202; "╦": 203; "╠": 204; "═": 205; "╬": 206; "¤": 207; ð: 208; Ð: 209; Ê: 210; Ë: 211; È: 212; ı: 213; Í: 214; Î: 215; Ï: 216; "┘": 217; "┌": 218; "█": 219; "▄": 220; "¦": 221; Ì: 222; "▀": 223; Ó: 224; ß: 225; Ô: 226; Ò: 227; õ: 228; Õ: 229; µ: 230; þ: 231; Þ: 232; Ú: 233; Û: 234; Ù: 235; ý: 236; Ý: 237; "¯": 238; "´": 239; "¬": 240; "±": 241; "‗": 242; "¾": 243; "¶": 244; "§": 245; "÷": 246; "¸": 247; "°": 248; "¨": 249; "•": 250; "¹": 251; "³": 252; "²": 253; "■": 254; }; type CharacterCompare = Char1 extends Char2 ? 0 : Char1 extends keyof ascii ? Char2 extends keyof ascii ? Call : 1 : -1; type CharactersCompare = T extends [infer N1 extends string, ...infer R1 extends string[]] ? U extends [infer N2 extends string, ...infer R2 extends string[]] ? CharacterCompare extends 0 ? CharactersCompare : CharacterCompare : 1 : U extends [string, ...string[]] ? -1 : 0; type Compare = Equal$1 extends true ? 0 : CharactersCompare, StringToTuple>; type LessThan = Compare extends -1 ? true : false; type LessThanOrEqual = Compare extends 1 ? false : true; type GreaterThan = Compare extends 1 ? true : false; type GreaterThanOrEqual = Compare extends -1 ? false : true; //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/utils.d.ts declare namespace StringIterator { type Iter = [string, number | bigint]; /** * Iterator over the string is a linked list of [string, number] pairs * where the string is the pattern to match any character in the string 'N' times * and the number is the value 'N' of the pattern * the linked list allows to easily add iterate and reverse iterate */ export type Iterator = [Iter, ...Iter[]]; /** * The initial iterator is a list of one element * * @description we need to prefix the pattern with '$' * * to avoid typescript to merge multiple patterns into one */ export type Init = [[`$${string}`, 1]]; /** * The string is the pattern to match any character in the string 'N' times * * @param It - the iterator to get the string from * @returns the string */ export type String = It[0][0]; /** * The value is the number 'N' of the pattern * * @param It - the iterator to get the value from * @returns the value */ export type Value = It[0][1]; /** * The size is the number of elements in the linked list * * @param It - the iterator to get the size from * @returns the size */ export type Size = It["length"]; /** * Get the next iterator * * @param It - the iterator to get the next iterator from * @returns the next iterator */ export type Next = [[`${String}${string}`, Add, 1>], ...It]; /** * Get the previous iterator * @param It - the iterator to get the previous iterator from * @returns the previous iterator */ export type Prev = It extends [unknown, ...infer Rest extends Iterator] ? Rest : undefined; /** * Double the iterator to match any character in the string '2N' times * This allows the algorithm to be O(log(N)) instead of O(N) * * @description we need to prefix the pattern with '$' and suffix it with '_' * to avoid typescript to merge multiple patterns into one * * @param It - the iterator to double * @returns the doubled iterator */ export type Double = `${String}_` extends `$${infer pattern}` ? `${String}${pattern}` extends `${infer double}_` ? [[double, Mul, 2>], ...It] : never : never; /** * Cut the string at the iterator * * @param T - the string to cut * @param It - the iterator to cut at * @returns the rest of the string */ export type CutAt = `$${T}` extends `${String}${infer $Rest}` ? $Rest : undefined; export {}; } //#endregion //#region node_modules/hotscript/dist/internals/strings/impl/length.d.ts type LengthUp = StringIterator.Double extends infer $DoubleIt extends StringIterator.Iterator ? StringIterator.CutAt extends `${infer $Rest}` ? StringIterator.Size extends 12 ? LengthDown<$Rest, Add>, $DoubleIt> : LengthUp<$Rest, Add>, $DoubleIt> : StringIterator.CutAt extends `${infer $Rest}` ? LengthUp<$Rest, Add>, It> : LengthDown> : never; type LengthDown = It extends StringIterator.Iterator ? StringIterator.CutAt extends `${infer $Rest}` ? LengthDown<$Rest, Add>, It> : LengthDown> : Length; type Length = T extends "" ? 0 : LengthUp; //#endregion //#region node_modules/hotscript/dist/internals/strings/Strings.d.ts declare namespace Strings { export type Stringifiable = string | number | boolean | bigint | null | undefined; /** * Get the length of a string. * @param args[0] - The string to get the length of. * @returns The length of the string. * @warning - 🔥 does not work with emojis since they are multiple characters 🔥 * @example * ```ts * type T0 = Call; // 3 * ``` */ export type Length = PartialApply; /** * Get the length of a string. * @param args[0] - The string to get the length of. * @returns The length of the string. * @warning - 🔥 does not work with emojis since they are multiple characters 🔥 * @example * ```ts * type T0 = Call; // 3 * ``` */ export interface LengthFn extends Fn { return: this["arg0"] extends string ? Length : never; } /** * Trim the left side of a string. * @param args[0] - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. * @example * ```ts * type T0 = Call; // "abc" * ``` */ export type TrimLeft = PartialApply; interface TrimLeftFn extends Fn { return: this["args"] extends [infer Sep extends string, infer Str extends string, ...any] ? TrimLeft : never; } /** * Trim the right side of a string. * @param args[0] - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. * @example * ```ts * type T0 = Call; // "abc" * ``` */ export type TrimRight = PartialApply; interface TrimRightFn extends Fn { return: this["args"] extends [infer Sep extends string, infer Str extends string, ...any] ? TrimRight : never; } /** * Trim a string. * @param args[0] - The string to trim. * @param Sep - The separator to trim. * @returns The trimmed string. * @example * ```ts * type T0 = Call; // "abc" * ``` */ export type Trim = PartialApply; interface TrimFn extends Fn { return: this["args"] extends [infer Sep extends string, infer Str extends string, ...any] ? Trim : never; } /** * Replace all instances of a substring in a string. * @param args[0] - The string to replace. * @param from - The substring to replace. * @param to - The substring to replace with. * @returns The replaced string. * @example * ```ts * type T0 = Call,"a.b.c.d">; // "a/b/c/d" */ export type Replace = PartialApply; interface ReplaceFn extends Fn { return: this["args"] extends [infer From extends string, infer To extends string, infer Str, ...any] ? Call, Str>, UnionToTuple> : never; } /** * Cut a slice of a string out from a start index to an end index. * @param args[0] - The string to slice. * @param start - The start index. * @param end - The end index. * @returns The sliced string. * @warning - 🔥 does not work with emojis since they are multiple characters 🔥 * @example * ```ts * type T0 = Call,"1234567890">; // "23456789" */ export type Slice = ComposeLeft<[Strings.Split<"">, Tuples.Take, Tuples.Drop, Tuples.Join<"">]>; /** * Split a string into a tuple of strings. * @param args[0] - The string to split. * @param sep - The separator to split the string with. * @returns The split string. * @warning - 🔥 using an empty sep with emojis in the string will destroy the emoji 🔥 * @example * ```ts * type T0 = Call,"a,b,c">; // ["a","b","c"] * ``` */ export type Split = PartialApply; export interface SplitFn extends Fn { return: this["args"] extends [infer Sep extends string, infer Str, ...any] ? Split$1 : never; } /** * Repeat a string a number of times. * @param args[0] - The string to repeat. * @param times - The number of times to repeat the string. * @returns The repeated string. * @example * ```ts * type T0 = Call,"Hello! ">; // "Hello! Hello! Hello! " * ``` */ export type Repeat = PartialApply; interface RepeatFn extends Fn { return: this["args"] extends [infer Times extends number, infer Str extends string] ? Repeat : never; } /** * Check if a string starts with a substring. * @param args[0] - The string to check. * @param str - The substring to check for. * @returns Whether the string starts with the substring. * @example * ```ts * type T0 = Call,"abcdef">; // true * type T1 = Call,"defabc">; // false * ``` */ export type StartsWith = PartialApply; interface StartsWithFn extends Fn { return: this["args"] extends [infer Start extends string, infer Str] ? Str extends `${Start}${string}` ? true : false : never; } /** * Check if a string ends with a substring. * @param args[0] - The string to check. * @param str - The substring to check for. * @returns Whether the string ends with the substring. * @example * ```ts * type T0 = Call,"abcdef">; // false * type T1 = Call,"defabc">; // true * ``` */ export type EndsWith = PartialApply; interface EndsWithFn extends Fn { return: this["args"] extends [infer End extends string, infer Str] ? Str extends `${string}${End}` ? true : false : never; } /** * Split a string into a tuple of each character. * @param args[0] - The string to split. * @returns The splited string. * @warning - 🔥 does not work with emojis since they are multiple characters 🔥 * @example * ```ts * type T0 = Call; // ["a","b","c"] * ``` */ export interface ToTuple extends Fn { return: StringToTuple; } /** * Convert a string to a number or bigint. * @param args[0] - The string to convert. * @returns The converted number or bigint. * @example * ```ts * type T0 = Call; // 123 * type T1 = Call; // 12367543547677078675456656790n * ``` */ export interface ToNumber extends Fn { return: this["arg0"] extends `${infer n extends number | bigint}` ? n : never; } /** * Convert a stringifiable literal to a string. * @param args[0] - The stringifiable literal to convert. * @returns The converted string. * @example * ```ts * type T0 = Call; // "123" * type T1 = Call; // "true" * type T2 = Call; // "null" * ``` */ export interface ToString extends Fn { return: `${Extract}`; } /** * Prepend a string to another string. * @param args[0] - The string to be prepended to. * @param str - The string to prepend. * @returns The prepended string. * @example * ```ts * type T0 = Call,"def">; // "abcdef" * ``` */ export type Prepend = PartialApply; interface PrependFn extends Fn { return: `${Extract}${Extract}`; } /** * Append a string to another string. * @param args[0] - The string to be appended to. * @param str - The string to append. * @returns The appended string. * @example * ```ts * type T0 = Call,"def">; // "defabc" * ``` */ export type Append = PartialApply; interface AppendFn extends Fn { return: `${Extract}${Extract}`; } /** * Transform a string to uppercase. * @param args[0] - The string to transform. * @returns The transformed string. * @example * ```ts * type T0 = Call; // "ABC" * ``` */ export interface Uppercase extends Fn { return: Std._Uppercase>; } /** * Transform a string to lowercase. * @param args[0] - The string to transform. * @returns The transformed string. * @example * ```ts * type T0 = Call; // "abc" * ``` */ export interface Lowercase extends Fn { return: Std._Lowercase>; } /** * Capitalize a string. * @param args[0] - The string to capitalize. * @returns The capitalized string. * @example * ```ts * type T0 = Call; // "Abc" * ``` */ export interface Capitalize extends Fn { return: Std._Capitalize>; } /** * Uncapitalize a string. * @param args[0] - The string to uncapitalize. * @returns The uncapitalized string. * @example * ```ts * type T0 = Call; // "addTop" * ``` */ export interface Uncapitalize extends Fn { return: Std._Uncapitalize>; } /** * Convert a string to snake case. * @param args[0] - The string to convert. * @returns The converted string. * @example * ```ts * type T0 = Call; // "add_top" * ``` */ export interface SnakeCase extends Fn { return: SnakeCase; } /** * Convert a string to camel case. * @param args[0] - The string to convert. * @returns The converted string. * @example * ```ts * type T0 = Call; // "addTop" * ``` */ export interface CamelCase extends Fn { return: CamelCase; } /** * Convert a string to kebab case. * @param args[0] - The string to convert. * @returns The converted string. * @example * ```ts * type T0 = Call; // "add-top" * type T1 = Call; // "add-top" * type T2 = Call; // "add-top" * ``` */ export interface KebabCase extends Fn { return: KebabCase; } /** * Compare two strings. (only works with ascii extended characters) * @param args[0] - The first string to compare. * @param args[1] - The second string to compare. * @n1 - The first string to compare or _. * @n2 - The second string to compare or _. * @returns The result of the comparison. * @example * ```ts * type T0 = Call; // -1 * type T1 = Call; // 1 * type T2 = Call; // 0 * ``` */ export type Compare = PartialApply; interface CompareFn extends Fn { return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? Compare : never; } /** * Check if a string is lexically less than another string. (only works with ascii extended characters) * @param args[0] - The first string to compare. * @param args[1] - The second string to compare. * @n1 - The first string to compare or _. * @n2 - The second string to compare or _. * @returns True if the first string is lexically less than the second string, false otherwise. * @example * ```ts * type T0 = Call; // true * type T1 = Call; // false * type T2 = Call; // false * ``` */ export type LessThan = PartialApply; interface LessThanFn extends Fn { return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? LessThan : never; } /** * Check if a string is lexically less than or equal to another string. (only works with ascii extended characters) * @param args[0] - The first string to compare. * @param args[1] - The second string to compare. * @n1 - The first string to compare or _. * @n2 - The second string to compare or _. * @returns True if the first string is lexically less than or equal to the second string, false otherwise. * @example * ```ts * type T0 = Call; // true * type T1 = Call; // false * type T2 = Call; // true */ export type LessThanOrEqual = PartialApply; interface LessThanOrEqualFn extends Fn { return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? LessThanOrEqual : never; } /** * Check if a string is lexically greater than another string. (only works with ascii extended characters) * @param args[0] - The first string to compare. * @param args[1] - The second string to compare. * @n1 - The first string to compare or _. * @n2 - The second string to compare or _. * @returns True if the first string is lexically greater than the second string, false otherwise. * @example * ```ts * type T0 = Call; // false * type T1 = Call; // true * type T2 = Call; // false * ``` */ export type GreaterThan = PartialApply; interface GreaterThanFn extends Fn { return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? GreaterThan : never; } /** * Check if a string is lexically greater than or equal to another string. (only works with ascii extended characters) * @param args[0] - The first string to compare. * @param args[1] - The second string to compare. * @n1 - The first string to compare or _. * @n2 - The second string to compare or _. * @returns True if the first string is lexically greater than or equal to the second string, false otherwise. * @example * ```ts * type T0 = Call; // false * type T1 = Call; // true * type T2 = Call; // true * ``` */ export type GreaterThanOrEqual = PartialApply; interface GreaterThanOrEqualFn extends Fn { return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? GreaterThanOrEqual : never; } export {}; } //#endregion //#region node_modules/hotscript/dist/internals/objects/impl/objects.d.ts type Keys = src extends readonly unknown[] ? { [key in keyof src]: key }[number] extends infer res ? res extends string ? Call & keyof src : res & keyof src : never : keyof src; type Values = Keys extends infer keys extends keyof src ? src[keys] : never; type FromEntries = { [entry in entries as entry[0]]: entry[1] } | never; type Entries = Keys extends infer keys extends keyof T ? { [K in keys]: [K, T[K]] }[keys] : never; type Assign = Prettify$1>; type GetFromPath = RecursiveGet>; type ParsePath = path extends number ? [`${path}`] : path extends `${infer first}${infer rest}` ? first extends "." | "[" | "]" ? ParsePath : ParsePath : [...output, ...(currentChunk extends "" ? [] : [currentChunk])]; type RecursiveGet = Obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof Obj ? RecursiveGet : [first, Obj] extends [`${number}` | "number", readonly any[]] ? RecursiveGet[number], rest> : undefined : Obj : never; type TransformObjectDeep = type extends Function | Date ? type : type extends Map ? Map, TransformObjectDeep> : type extends ReadonlyMap ? ReadonlyMap, TransformObjectDeep> : type extends WeakMap ? WeakMap, object>, TransformObjectDeep> : type extends Set ? Set> : type extends ReadonlySet ? ReadonlySet> : type extends WeakSet ? WeakSet, object>> : type extends Array ? IsTuple extends true ? Call }> : Array | undefined> : type extends Promise ? Promise> : type extends object ? Call }> : Equal$1 extends true ? unknown : Partial; type Update = RecursiveUpdate, fnOrValue>; type RecursiveUpdate = obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof obj ? { [K in keyof obj]: Equal$1 extends true ? RecursiveUpdate : obj[K] } : [first, obj] extends ["number", readonly any[]] ? RecursiveUpdate[number], rest, fnOrValue>[] : Assign<[obj, { [K in Extract]: RecursiveUpdate<{}, rest, fnOrValue> }]> : fnOrValue extends Fn ? Call, obj> : fnOrValue : never; type Create = pattern extends infer p extends Fn ? Apply : pattern extends Primitive$1 ? pattern : pattern extends readonly [any, ...any] ? { [key in keyof pattern]: Create } : pattern extends readonly (infer V)[] ? Create[] : pattern extends object ? { [key in keyof pattern]: Create } : pattern; type JoinPath = [A] extends [never] ? B : [B] extends [never] ? A : `${A}${Sep}${B}`; type AllPaths = T extends Primitive$1 ? ParentPath : unknown extends T ? JoinPath : T extends readonly any[] ? Keys extends infer key extends string | number ? JoinPath | AllPaths> : never : keyof T extends infer key extends keyof T & string ? key extends any ? JoinPath | AllPaths> : never : ParentPath; //#endregion //#region node_modules/hotscript/dist/internals/objects/Objects.d.ts declare namespace Objects { /** * Create an object from a union of `[key, value]` entries. * @param entries - union of entries to convert to an object * @returns an object * @example * ```ts * type T0 = Call; // { a: 1; b: true } * ``` */ export interface FromEntries extends Fn { return: FromEntries>; } /** * Turn an object into a union of entries * @param obj - The object to transform to entries * @returns a union of `[key, value]` entry tuples. * @example * ```ts * type T0 = Call; // ["a", 1] | ["b", true] * ``` */ export interface Entries extends Fn { return: Entries; } type MapValuesImpl = { [K in keyof T]: Call }; /** * Map over values in an object type. * @param fn - The function to run on every object value * @param obj - The object to transform * @returns a new object with updated values * @example * ```ts * type T0 = Call< * Objects.MapValues, * { a: "1"; b: "2" } * >; // { a: 1, b: 2 } * ``` */ export interface MapValues extends Fn { return: MapValuesImpl; } type MapKeysImpl = { [K in keyof T as Extract, PropertyKey>]: T[K] }; /** * Map over keys in an object type. * @param fn - The function to run on every object key * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.MapKeys, * { a: 1; b: 2 } * >; // { A: 1, B: 2 } * ``` */ export interface MapKeys extends Fn { return: MapKeysImpl; } /** * Turn object keys into kebab-case * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.KebabCase, * { userName: "Bob" } * >; // { "user-name": "Bob" } * ``` */ export interface KebabCase extends Fn { return: Call, this["arg0"]>; } /** * Turn object keys into snake_case * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.SnakeCase, * { userName: "Bob" } * >; // { user_name: "Bob" } * ``` */ export interface SnakeCase extends Fn { return: Call, this["arg0"]>; } /** * Turn object keys into camelCase * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.CamelCase, * { user_name: "Bob" } * >; // { userName: "Bob" } * ``` */ export interface CamelCase extends Fn { return: Call, this["arg0"]>; } type MapKeysDeepImpl = IsArrayStrict extends true ? MapKeysDeepImpl[number], fn>[] : T extends object ? { [K in keyof T as Extract, PropertyKey>]: Prettify$1> } : T; /** * Recursively transform all keys in a structure of object types * @param fn - The function to apply to every key * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.MapKeysDeep>, * { a: { b: { c: string } } } * >; // { _a: { _b: { _c: string } } } * ``` */ export interface MapKeysDeep extends Fn { return: MapKeysDeepImpl; } /** * Recursively transform all keys of a deeply nested object * to kebab-case. * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.KebabCaseDeep, * { currentUser: { firstName: string } } * >; // { "current-user": { "first-name": string } } * ``` */ export interface KebabCaseDeep extends Fn { return: Call, this["arg0"]>; } /** * Recursively transform all keys of a deeply nested object * to snake_case. * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.SnakeCaseDeep, * { currentUser: { firstName: string } } * >; // { current_user: { first_name: string } } * ``` */ export interface SnakeCaseDeep extends Fn { return: Call, this["arg0"]>; } /** * Recursively transform all keys of a deeply nested object * to camelCase. * @param obj - The object to transform * @returns a new object with updated keys * @example * ```ts * type T0 = Call< * Objects.CamelCaseDeep, * { current_user: { first_name: string } } * >; // { currentUser: { firstName: string } } * ``` */ export interface CamelCaseDeep extends Fn { return: Call, this["arg0"]>; } /** * Only keep keys of an object if they are * assignable to some type. * @param key - The type remaining keys should be assignable to * @param obj - The object to filter * @returns a filtered object * @example * ```ts * type T0 = Call< * Objects.Pick<"a" | "b">, * { a: 1, b: 1, c: 1 } * >; // { a: 1, b: 1 } * ``` */ export type Pick = PartialApply; interface PickFn extends Fn { return: PickImpl; } type PickImpl = { [key in Extract]: obj[key] }; /** * Only keep keys of an object if they aren't * assignable to some type. * @param key - The type remaining keys should _not_ be assignable to * @param obj - The object to filter * @returns a filtered object * @example * ```ts * type T0 = Call< * Objects.Pick<"a" | "b">, * { a: 1, b: 1, c: 1 } * >; // { c: 1 } * ``` */ export type Omit = PartialApply; interface OmitFn extends Fn { return: OmitImpl; } type OmitImpl = { [key in Exclude]: obj[key] }; /** * Only keep keys of an object if the predicate function * returns true * @param fn - The predicate function, taking (value, key) as arguments * @param obj - The object to filter * @returns a filtered object * @example * ```ts * type T0 = Call< * Objects.PickBy>, * { a: "ab", b: "ac", c: "bc" } * >; // { a: "ab", b: "ac" } * ``` */ export interface PickBy extends Fn { return: PickByImpl; } type PickByImpl = FromEntries, fn>>; type PickEntriesImpl = entries extends any ? Call extends true ? entries : never : never; /** * Only keep keys of an object if the predicate function * returns false * @param fn - The predicate function, taking (value, key) as arguments * @param obj - The object to filter * @returns a filtered object * @example * ```ts * type T0 = Call< * Objects.PickBy>, * { a: "ab", b: "ac", c: "bc" } * >; // { c: "bc" } * ``` */ export interface OmitBy extends Fn { return: OmitByImpl; } type OmitByImpl = FromEntries, fn>>; type OmitEntriesImpl = entries extends any ? Call extends true ? never : entries : never; /** * Merge several objects together * @param {...objects} - Objects to merge * @returns a merged object * @example * ```ts * type T0 = Call, { b: number }>; // { a: string, b: number } * type T1 = Call>; // { a: string, b: number } * type T2 = Call>; // { a: 1, b: 1, c: 1 } * ``` */ export type Assign = PartialApply; interface AssignFn extends Fn { return: Assign; } /** * Make all properties of an object readonly * @description This function is used to make properties of an object readonly * @param value - The object to make properties readonly * @returns The object with its properties made readonly * @example * ```ts * type T0 = Call; // { readonly a:1; readonly b: true} * type T1 = Call>; // { readonly a:1; readonly b: true} * ``` */ export type Readonly = PartialApply; interface ReadonlyFn extends Fn { return: this["args"] extends [infer value] ? Std._Readonly : never; } /** * Make all properties of an object required * @description This function is used to make properties of an object required * @param value - The object to make properties required * @returns The object with its properties made required * @example * ```ts * type T0 = Call; // { a:1; b: true} * type T1 = Call>; // { a:1; b: true} * ``` */ export type Required = PartialApply; interface RequiredFn extends Fn { return: this["args"] extends [infer value] ? Std._Required : never; } /** * Make all properties of an object optional * @description This function is used to make properties of an object optional * @param value - The object to make properties optional * @returns The object with its properties made optional * @example * ```ts * type T0 = Call; // { a?:1; b?: true} * type T1 = Call>; // { a?:1; b?: true} * ``` */ export type Partial = PartialApply; interface PartialFn extends Fn { return: this["args"] extends [infer value] ? Std._Partial : never; } /** * Make all properties of an object mutable * @param value - The object to make properties mutable * @returns The object with its properties made mutable * @example * ```ts * type T0 = Call; // { a:1; b: true } * ``` */ export type Mutable = PartialApply; interface MutableFn extends Fn { return: this["args"] extends [infer obj, ...any] ? { -readonly [key in keyof obj]: obj[key] } : never; } /** * Makes all levels of an object optional * @description This function is used to make all levels of an object optional * @param obj - The object to make levels optional * @returns The object with its levels made optional * * @example * ```ts * type T0 = Call; * // ^? { a?:1; b?: true} * type T1 = Call; * // ^? { a?:1; b?: { c?: true } } * type T2 = Call; * // ^? { a?:1; b?: { c?: true, d?: { e?: false } } } */ export type PartialDeep = PartialApply; interface PartialDeepFn extends Fn { return: this["args"] extends [infer obj] ? TransformObjectDeep : never; } /** * Makes all levels of an object required * @description This function is used to make all levels of an object required * @param obj - The object to make levels required * @returns The object with its levels made required * * @example * ```ts * type T0 = Call; * // ^? { a: 1; b: true } * type T1 = Call; * // ^? { a: 1; b: { c: true } } * type T2 = Call; * // ^? { a: 1; b: { c: true, d: { e: false } } } */ export type RequiredDeep = PartialApply; interface RequiredDeepFn extends Fn { return: this["args"] extends [infer obj] ? TransformObjectDeep : never; } /** * Makes all levels of an object readonly * @description This function is used to make all levels of an object readonly * @param obj - The object to make levels readonly * @returns The object with its levels made readonly * * @example * ```ts * type T0 = Call; * // ^? { readonly a: 1; readonly b: true } * type T1 = Call; * // ^? { readonly a: 1; readonly b: { readonly c: true } } * type T2 = Call; * // ^? { readonly a: 1; readonly b: { readonly c: true, d: { readonly e: false } } } */ export type ReadonlyDeep = PartialApply; interface ReadonlyDeepFn extends Fn { return: this["args"] extends [infer obj] ? TransformObjectDeep : never; } /** * Makes all levels of an object mutable * @description This function is used to make all levels of an object mutable * @param obj - The object to make levels mutable * @returns The object with its levels made mutable * * @example * ```ts * type T0 = Call; * // ^? { a:1; b: true } * type T1 = Call; * // ^? { a:1; b: { c: true } } * type T2 = Call; * // ^? { a:1; b: { c: true, d: { e: false } } } */ export type MutableDeep = PartialApply; interface MutableDeepFn extends Fn { return: this["args"] extends [infer obj] ? TransformObjectDeep : never; } /** * Get a value within an object or a tuple type. * @description This function takes an object, a path to one of its properties, * and returns the property under that path. * @param path - the path to the property to get. * @param obj - the object to read from. * @returns The value under that path * * @example * ```ts * type T0 = Call, { a: 1, b: 1 }>; // 1 * type T1 = Call, { a: [1, 2, 3] }>; // 1 * type T2 = Call, { a: { b: 1 }, c: '' }>; // 1 * ``` */ export type Get = PartialApply; export interface GetFn extends Fn { return: this["args"] extends [infer path extends string | number, infer obj, ...any] ? GetFromPath : never; } /** * Updates an object or a tuple type. * @description This function takes an object, a path to one of its properties, * a new value or a function to apply to this property, and returns a new version * of this object with this property updated. * @param path - the path to the property to update * @param valueOrFn - a value to set, or a function to apply on the target property * @param obj - the object to update. * @returns The updated object. * * @example * ```ts * type T0 = Call>, { a: 1, b: 1 }>; // { a: 2, b: 1 } * type T1 = Call, { a: [1, 2, 3] }>; // { a: [4, 2, 3] } * type T2 = Call>, { a: { b: 1 }, c: '' }>; // { a: { b: 2 }, c: '' } * type T3 = Call, { a: { b: 1 } }>; // { a: { b: "Hello" } } * ``` */ export type Update = PartialApply; export interface UpdateFn extends Fn { return: this["args"] extends [infer path extends string | number, infer fnOrValue, infer obj, ...any] ? Update : never; } /** * Create an object from parameters * @description This function is used to make an object from parameters * And allows to place the parameters in any object property * @param args - The parameters to make the object from * @returns The object made from the parameters * * @example * ```ts * type T0 = Apply, [1, 2]>; // { a: 1, b: 2 } * ``` */ interface CreateFn extends Fn { return: this["args"] extends [infer pattern, ...infer args] ? Create : never; } export type Create = PartialApply; interface RecordFn extends Fn { return: this["args"] extends [infer union extends string, infer value] ? Std._Record : never; } /** * Create a record from a union of strings and a value type * @description This function is used to create a record from a union of strings * @param union - The union of strings to create the record from * @param value - The value to assign to each property * @returns The record created from the union of strings * * @example * ```ts * type T0 = Call, 1>; // { a: 1, b: 1, c: 1 } * ``` */ export type Record = PartialApply; /** * Smarter version of keyof that also works with tuples * @params args[0] - The type to extract keys from * @returns An union of all the types's keys * @example * ```ts * type T0 = Call; // 0 | 1 | 2 * ``` */ export interface Keys extends Fn { return: Keys; } /** * Smarter version of Values that also works with tuples * @params args[0] - The type to extract values from * @returns An union of all the types's values * @example * ```ts * type T0 = Call; // 'a' | 'b' | 'c' * ``` */ export interface Values extends Fn { return: Values; } /** * Create a union of all deep paths the object has * @description This function is used to create a union from an object with keys * @param obj - The object from which the union will be generated * @returns An union with all the possible deep paths * * @example * ```ts * type T0 = Call; // 'a' | 'a.b' * ``` */ export interface AllPaths extends Fn { return: AllPaths; } export {}; } //#endregion //#region node_modules/ts-algebra/lib/utils/and.d.ts declare type And$1 = BOOL_A extends true ? BOOL_B extends true ? true : false : false; //#endregion //#region node_modules/ts-algebra/lib/utils/extends.d.ts declare type DoesExtend$1 = [TYPE_A] extends [TYPE_B] ? true : false; declare type ArrayKeys = keyof []; declare type IsObject = TYPE extends object ? ArrayKeys extends Extract ? false : true : false; declare type IsArray = TYPE extends object ? ArrayKeys extends Extract ? true : false : false; //#endregion //#region node_modules/ts-algebra/lib/utils/if.d.ts declare type If = CONDITION extends true ? THEN : ELSE; //#endregion //#region node_modules/ts-algebra/lib/utils/intersectUnion.d.ts declare type IntersectUnion$1 = (UNION extends unknown ? (arg: UNION) => void : never) extends ((arg: infer INTERSECTION) => void) ? INTERSECTION : never; //#endregion //#region node_modules/ts-algebra/lib/utils/isNever.d.ts declare type IsNever = [TYPE] extends [never] ? true : false; //#endregion //#region node_modules/ts-algebra/lib/utils/merge.d.ts declare type DeepMergeUnsafe = IsObject extends true ? IsObject extends true ? { [KEY in keyof (TYPE_A & TYPE_B)]: KEY extends keyof TYPE_B ? KEY extends keyof TYPE_A ? DeepMergeUnsafe : TYPE_B[KEY] : KEY extends keyof TYPE_A ? TYPE_A[KEY] : never } : TYPE_B : IsArray extends true ? IsArray extends true ? TYPE_B extends unknown[] ? [...(TYPE_A extends unknown[] ? TYPE_A : never), TYPE_B] : never : TYPE_B : TYPE_B; //#endregion //#region node_modules/ts-algebra/lib/utils/not.d.ts declare type Not$1 = BOOL extends false ? true : BOOL extends true ? false : never; //#endregion //#region node_modules/ts-algebra/lib/utils/or.d.ts declare type Or = BOOL_A extends true ? true : BOOL_B extends true ? true : false; //#endregion //#region node_modules/ts-algebra/lib/utils/prettify.d.ts declare type Prettify = IsObject extends true ? { [KEY in keyof TYPE]: KEY extends keyof TYPE ? TYPE[KEY] : never } : TYPE; //#endregion //#region node_modules/ts-algebra/lib/utils/tail.d.ts declare type Tail$1 = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer TAIL] ? TAIL : ARRAY; //#endregion //#region node_modules/ts-algebra/lib/utils/unionLast.d.ts declare type UnionLast = IntersectUnion$1 void : never> extends ((x: infer LAST) => void) ? LAST : never; //#endregion //#region node_modules/ts-algebra/lib/utils/unionPop.d.ts declare type UnionPop = Exclude>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/never.d.ts declare type NeverTypeId = "never"; declare type Never = { type: NeverTypeId; }; declare type NeverType = Never; declare type ResolveNever = never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/utils.d.ts declare type IsSerialized = SERIALIZABLE_META_TYPE["isSerialized"]; declare type Deserialized = SERIALIZABLE_META_TYPE["deserialized"]; //#endregion //#region node_modules/ts-algebra/lib/meta-types/const.d.ts declare type ConstTypeId = "const"; declare type Const = If, Never, { type: ConstTypeId; value: VALUE; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }>; declare type ConstType = { type: ConstTypeId; value: unknown; isSerialized: boolean; deserialized: unknown; }; declare type ConstValue = META_CONST["value"]; declare type ResolveConst = If>, Deserialized, ConstValue>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/enum.d.ts declare type EnumTypeId = "enum"; declare type Enum = If, Never, { type: EnumTypeId; values: VALUES; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }>; declare type EnumType = { type: EnumTypeId; values: unknown; isSerialized: boolean; deserialized: unknown; }; declare type EnumValues = META_ENUM["values"]; declare type ResolveEnum = If>, Deserialized, EnumValues>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/object.d.ts declare type ObjectTypeId = "object"; declare type _Object = {}, REQUIRED_KEYS extends string = never, OPEN_PROPS extends Type = Never, CLOSE_ON_RESOLVE extends boolean = false, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = _$Object; declare type _$Object = DoesExtend$1]: KEY extends keyof VALUES ? DoesExtend$1 : DoesExtend$1 }[Extract]> extends true ? Never : { type: ObjectTypeId; values: VALUES; required: REQUIRED_KEYS; isOpen: Not$1>; openProps: OPEN_PROPS; closeOnResolve: CLOSE_ON_RESOLVE; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }; declare type ObjectType = { type: ObjectTypeId; values: Record; required: string; isOpen: boolean; openProps: Type; closeOnResolve: boolean; isSerialized: boolean; deserialized: unknown; }; declare type ObjectValues = META_OBJECT["values"]; declare type ObjectValue = KEY extends keyof ObjectValues ? ObjectValues[KEY] : IsObjectOpen extends true ? ObjectOpenProps : Never; declare type ObjectRequiredKeys = META_OBJECT["required"]; declare type IsObjectOpen = META_OBJECT["isOpen"]; declare type ObjectOpenProps = META_OBJECT["openProps"]; declare type IsObjectClosedOnResolve = META_OBJECT["closeOnResolve"]; declare type IsObjectEmpty = IsNever>; declare type ResolveObject = If>, Deserialized, DeepMergeUnsafe, Not$1>>, If, { [KEY: string]: Resolve, OPTIONS>; }, { [KEY: string]: Resolve; }>, {}>, DeepMergeUnsafe<{ [KEY in Exclude, ObjectRequiredKeys>]?: Resolve[KEY], OPTIONS> }, { [KEY in ObjectRequiredKeys]: KEY extends keyof ObjectValues ? Resolve[KEY], OPTIONS> : Resolve }>>>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/primitive.d.ts declare type PrimitiveTypeId = "primitive"; declare type Primitive = $Primitive; declare type $Primitive = If, Never, { type: PrimitiveTypeId; value: VALUE; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }>; declare type PrimitiveType = { type: PrimitiveTypeId; value: null | boolean | number | string; isSerialized: boolean; deserialized: unknown; }; declare type PrimitiveValue = META_PRIMITIVE["value"]; declare type ResolvePrimitive = If>, Deserialized, PrimitiveValue>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/tuple.d.ts declare type TupleTypeId = "tuple"; declare type Tuple = $Tuple; declare type $Tuple = IsAnyValueNever extends true ? Never : { type: TupleTypeId; values: VALUES; isOpen: Not$1>; openProps: OPEN_PROPS; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }; declare type IsAnyValueNever = TUPLE extends [infer TUPLE_HEAD, ...infer TUPLE_TAIL] ? TUPLE_HEAD extends NeverType ? true : IsAnyValueNever : false; declare type TupleType = { type: TupleTypeId; values: Type[]; isOpen: boolean; openProps: Type; isSerialized: boolean; deserialized: unknown; }; declare type TupleValues = META_TUPLE["values"]; declare type IsTupleOpen = META_TUPLE["isOpen"]; declare type TupleOpenProps = META_TUPLE["openProps"]; declare type ResolveTuple = If>, Deserialized, If, [...RecurseOnTuple, OPTIONS>, ...Resolve, OPTIONS>[]], RecurseOnTuple, OPTIONS>>>; declare type RecurseOnTuple = VALUES extends [infer VALUES_HEAD, ...infer VALUES_TAIL] ? VALUES_HEAD extends Type ? VALUES_TAIL extends Type[] ? RecurseOnTuple]> : never : never : RESULT; //#endregion //#region node_modules/ts-algebra/lib/meta-types/union.d.ts declare type UnionTypeId = "union"; declare type Union = $Union; declare type $Union = If, Never, DoesExtend$1 extends true ? Never : { type: UnionTypeId; values: VALUES; }>; declare type UnionType = { type: UnionTypeId; values: Type; }; declare type UnionValues = META_UNION["values"]; declare type ResolveUnion = RecurseOnUnion, OPTIONS>; declare type RecurseOnUnion = VALUES extends infer META_TYPE ? $Resolve : never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/type.d.ts declare type Type = NeverType | AnyType | ConstType | EnumType | PrimitiveType | ArrayType | TupleType | ObjectType | UnionType; declare type SerializableType = Type extends infer META_TYPE ? META_TYPE extends { isSerialized: boolean; deserialized: unknown; } ? META_TYPE : never : never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/array.d.ts declare type ArrayTypeId = "array"; declare type _Array = _$Array; declare type _$Array = { type: ArrayTypeId; values: VALUES; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }; declare type ArrayType = { type: ArrayTypeId; values: Type; isSerialized: boolean; deserialized: unknown; }; declare type ArrayValues = META_ARRAY["values"]; declare type ResolveArray = If>, Deserialized, ArrayValues extends NeverType ? [] : Prettify, OPTIONS>[]>>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/resolve.d.ts declare type ResolveOptions = { deserialize: boolean; }; declare type ResolveDefaultOptions = { deserialize: true; }; declare type Resolve = $Resolve; declare type $Resolve = META_TYPE extends AnyType ? ResolveAny : META_TYPE extends NeverType ? ResolveNever : META_TYPE extends ConstType ? ResolveConst : META_TYPE extends EnumType ? ResolveEnum : META_TYPE extends PrimitiveType ? ResolvePrimitive : META_TYPE extends ArrayType ? ResolveArray : META_TYPE extends TupleType ? ResolveTuple : META_TYPE extends ObjectType ? ResolveObject : META_TYPE extends UnionType ? ResolveUnion : never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/any.d.ts declare type AnyTypeId = "any"; declare type Any = { type: AnyTypeId; isSerialized: IS_SERIALIZED; deserialized: DESERIALIZED; }; declare type AnyType = { type: AnyTypeId; isSerialized: boolean; deserialized: unknown; }; declare type ResolveAny = If>, Deserialized, unknown>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/union.d.ts declare type IntersectUnion = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? META_UNION : META_TYPE extends ConstType ? DistributeIntersection : META_TYPE extends EnumType ? DistributeIntersection : META_TYPE extends PrimitiveType ? DistributeIntersection : META_TYPE extends ArrayType ? DistributeIntersection : META_TYPE extends TupleType ? DistributeIntersection : META_TYPE extends ObjectType ? DistributeIntersection : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; declare type DistributeIntersection = $Union extends infer UNION_VALUE ? $Intersect : never>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/utils.d.ts declare type IntersectIsSerialized = Or, IsSerialized>; declare type IntersectDeserialized = If, If, Deserialized & Deserialized, Deserialized>, If, Deserialized>>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/const.d.ts declare type IntersectConstSerializationParams = Const, IntersectIsSerialized, IntersectDeserialized>; declare type IntersectConst = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectConstSerializationParams : META_TYPE extends ConstType ? CheckExtendsResolved : META_TYPE extends EnumType ? IntersectConstToEnum : META_TYPE extends PrimitiveType ? IntersectConstToPrimitive : META_TYPE extends ArrayType ? IntersectConstToArray : META_TYPE extends TupleType ? IntersectConstToTuple : META_TYPE extends ObjectType ? IntersectConstToObject : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; declare type CheckExtendsResolved = ConstValue extends Resolve ? IntersectConstSerializationParams : Never; declare type IntersectConstToEnum = CheckExtendsResolved; declare type IntersectConstToPrimitive = CheckExtendsResolved; declare type IntersectConstToArray = CheckExtendsResolved; declare type IntersectConstToTuple = CheckExtendsResolved; declare type IntersectConstToObject = If>, IntersectObjectConstToObject, Never>; declare type IntersectObjectConstToObject, META_OBJECT>> = If>, IntersectConstSerializationParams, Never>; declare type IntersectConstValuesToObjectValues = { [KEY in Extract, string>]: KEY extends keyof CONST_VALUE ? Intersect, ObjectValue> : Never }; declare type NeverKeys = { [KEY in keyof META_OBJECT]: META_OBJECT[KEY] extends Never ? KEY : never }[keyof META_OBJECT]; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/enum.d.ts declare type IntersectEnumSerializationParams = Enum, IntersectDeserialized>; declare type IntersectEnum = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectEnumSerializationParams, META_ENUM, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToEnum : META_TYPE extends EnumType ? FilterEnum : META_TYPE extends PrimitiveType ? IntersectEnumToPrimitive : META_TYPE extends ArrayType ? FilterEnum : META_TYPE extends TupleType ? FilterEnum : META_TYPE extends ObjectType ? FilterEnum : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; declare type FilterEnum = IntersectEnumSerializationParams, SERIALIZABLE_META_TYPE>, META_ENUM, SERIALIZABLE_META_TYPE>; declare type FilterEnumValues = ENUM_VALUES extends infer ENUM_VALUE ? $Intersect, SERIALIZABLE_META_TYPE> extends Never ? never : ENUM_VALUE : never; declare type IntersectEnumToPrimitive = FilterEnum; declare type IntersectEnumToArray = FilterEnum; declare type IntersectEnumToTuple = FilterEnum; declare type IntersectEnumToObject = FilterEnum; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/tuple.d.ts declare type IntersectTupleSerializationParams = $MergeTuplePropsToSerializable; declare type $MergeTuplePropsToSerializable = $Tuple, IntersectDeserialized>; declare type IntersectTuple = META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectTupleSerializationParams, TupleOpenProps, META_TUPLE, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToTuple : META_TYPE extends EnumType ? IntersectEnumToTuple : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? IntersectTupleToArray : META_TYPE extends TupleType ? IntersectTuples : META_TYPE extends ObjectType ? Never : META_TYPE extends UnionType ? DistributeIntersection : Never; declare type IntersectTupleToArray, ArrayValues>, INTERSECTED_OPEN_PROPS = $Intersect, ArrayValues>> = $MergeTuplePropsToSerializable; declare type IntersectTupleToArrayValues = TUPLE_VALUES extends [infer TUPLE_VALUES_HEAD, ...infer TUPLE_VALUES_TAIL] ? TUPLE_VALUES_HEAD extends Type ? TUPLE_VALUES_TAIL extends Type[] ? IntersectTupleToArrayValues]> : never : never : RESULT; declare type IntersectTuples, TupleValues, IsTupleOpen, IsTupleOpen, TupleOpenProps, TupleOpenProps>, INTERSECTED_OPEN_PROPS = $Intersect, TupleOpenProps>> = $MergeTuplePropsToSerializable; declare type IntersectTupleValues = TUPLE_A_VALUES extends [infer TUPLE_A_VALUES_HEAD, ...infer TUPLE_A_VALUES_TAIL] ? TUPLE_A_VALUES_HEAD extends Type ? TUPLE_A_VALUES_TAIL extends Type[] ? TUPLE_B_VALUES extends [infer TUPLE_B_VALUES_HEAD, ...infer TUPLE_B_VALUES_TAIL] ? TUPLE_B_VALUES_HEAD extends Type ? TUPLE_B_VALUES_TAIL extends Type[] ? IntersectTupleValues]> : never : never : IntersectTupleValues : Never]> : never : never : TUPLE_B_VALUES extends [infer TUPLE_B_VALUES_HEAD, ...infer TUPLE_B_VALUES_TAIL] ? TUPLE_B_VALUES_HEAD extends Type ? TUPLE_B_VALUES_TAIL extends Type[] ? IntersectTupleValues : Never]> : never : never : RESULT; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/array.d.ts declare type IntersectArraySerializationParams = $MergeArrayValuesToSerializable; declare type $MergeArrayValuesToSerializable = _$Array, IntersectDeserialized>; declare type IntersectArray = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectArraySerializationParams, META_ARRAY, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToArray : META_TYPE extends EnumType ? IntersectEnumToArray : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? IntersectArrays : META_TYPE extends TupleType ? IntersectTupleToArray : META_TYPE extends ObjectType ? Never : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; declare type IntersectArrays = $MergeArrayValuesToSerializable, ArrayValues>, META_ARRAY_A, META_ARRAY_B>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/object.d.ts declare type IntersectObjectSerializationParams, REQUIRED_KEYS extends string, OPEN_PROPS extends Type, CLOSE_ON_RESOLVE extends boolean, META_OBJECT extends ObjectType, SERIALIZABLE_META_TYPE extends SerializableType> = $MergeObjectPropsToSerializable; declare type $MergeObjectPropsToSerializable = _$Object, IntersectDeserialized>; declare type IntersectObject = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectObjectSerializationParams, ObjectRequiredKeys, ObjectOpenProps, IsObjectClosedOnResolve, META_OBJECT, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToObject : META_TYPE extends EnumType ? IntersectEnumToObject : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? Never : META_TYPE extends TupleType ? Never : META_TYPE extends ObjectType ? IntersectObjects : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; declare type IntersectObjects = IntersectObjectsValues, INTERSECTED_OPEN_PROPS = Intersect, ObjectOpenProps>, INTERSECTED_CLOSE_ON_RESOLVE = Or, IsObjectClosedOnResolve>> = $MergeObjectPropsToSerializable<{ [KEY in keyof INTERSECTED_VALUES]: INTERSECTED_VALUES[KEY] }, ObjectRequiredKeys | ObjectRequiredKeys, INTERSECTED_OPEN_PROPS, INTERSECTED_CLOSE_ON_RESOLVE, META_OBJECT_A, META_OBJECT_B>; declare type IntersectObjectsValues = { [KEY in Extract | keyof ObjectValues, string>]: $Intersect, ObjectValue> }; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/primitive.d.ts declare type IntersectPrimitiveSerializationParams = Primitive, IntersectIsSerialized, IntersectDeserialized>; declare type IntersectPrimitive = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectPrimitiveSerializationParams : META_TYPE extends ConstType ? IntersectConstToPrimitive : META_TYPE extends EnumType ? IntersectEnumToPrimitive : META_TYPE extends PrimitiveType ? If, PrimitiveValue>, DoesExtend$1, PrimitiveValue>>, IntersectPrimitiveSerializationParams, Never> : META_TYPE extends ArrayType ? Never : META_TYPE extends TupleType ? Never : META_TYPE extends ObjectType ? Never : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/any.d.ts declare type IntersectAny = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? Any, IntersectDeserialized> : META_TYPE extends ConstType ? IntersectConstSerializationParams : META_TYPE extends EnumType ? IntersectEnumSerializationParams, META_TYPE, META_ANY> : META_TYPE extends PrimitiveType ? IntersectPrimitiveSerializationParams : META_TYPE extends ArrayType ? IntersectArraySerializationParams, META_TYPE, META_ANY> : META_TYPE extends TupleType ? IntersectTupleSerializationParams, TupleOpenProps, META_TYPE, META_ANY> : META_TYPE extends ObjectType ? IntersectObjectSerializationParams, ObjectRequiredKeys, ObjectOpenProps, IsObjectClosedOnResolve, META_TYPE, META_ANY> : META_TYPE extends UnionType ? DistributeIntersection : Never : Never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/intersection/index.d.ts declare type Intersect = $Intersect; declare type $Intersect = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? IntersectAny : META_TYPE_A extends ConstType ? IntersectConst : META_TYPE_A extends EnumType ? IntersectEnum : META_TYPE_A extends PrimitiveType ? IntersectPrimitive : META_TYPE_A extends ArrayType ? IntersectArray : META_TYPE_A extends TupleType ? IntersectTuple : META_TYPE_A extends ObjectType ? IntersectObject : META_TYPE_A extends UnionType ? IntersectUnion : Never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/union.d.ts declare type ExcludeFromUnion = $Union extends infer META_UNION_VALUE ? _$Exclude : never>; declare type ExcludeUnion = If>, META_TYPE, RecurseOnUnionValues>, META_UNION>>; declare type RecurseOnUnionValues = $Intersect<_$Exclude, _$Exclude, META_UNION_VALUE>>>>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/any.d.ts declare type ExcludeFromAny = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ANY : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_ANY : META_TYPE extends EnumType ? META_ANY : META_TYPE extends PrimitiveType ? META_ANY : META_TYPE extends ArrayType ? META_ANY : META_TYPE extends TupleType ? META_ANY : META_TYPE extends ObjectType ? META_ANY : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/array.d.ts declare type ExcludeFromArray = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ARRAY : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_ARRAY : META_TYPE extends EnumType ? META_ARRAY : META_TYPE extends PrimitiveType ? META_ARRAY : META_TYPE extends ArrayType ? ExcludeArrays : META_TYPE extends TupleType ? And$1, []>, IsTupleOpen> extends true ? ExcludeArrays>> : META_ARRAY : META_TYPE extends ObjectType ? META_ARRAY : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; declare type ExcludeArrays = _Exclude, ArrayValues> extends NeverType ? NeverType : META_ARRAY_A; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/const.d.ts declare type ExcludeFromConst = META_TYPE extends Type ? META_TYPE extends NeverType ? META_CONST : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? CheckNotExtendsResolved : META_TYPE extends EnumType ? CheckNotExtendsResolved : META_TYPE extends PrimitiveType ? CheckNotExtendsResolved : META_TYPE extends ArrayType ? CheckNotExtendsResolved : META_TYPE extends TupleType ? CheckNotExtendsResolved : META_TYPE extends ObjectType ? ExcludeObject : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; declare type CheckNotExtendsResolved = ConstValue extends Resolve ? Never : META_CONST; declare type ExcludeObject = If>, ObjectRequiredKeys extends keyof ConstValue ? ExcludeObjectFromConst : META_CONST, META_CONST>; declare type ExcludeObjectFromConst, META_OBJECT>> = If>, Never, META_CONST>; declare type ExcludeConstValues = { [KEY in keyof VALUE]: KEY extends keyof ObjectValues ? _Exclude, ObjectValues[KEY]> : IsObjectOpen extends true ? _Exclude, ObjectOpenProps> : Const }; declare type RepresentableKeys$1 = { [KEY in keyof VALUES]: VALUES[KEY] extends Never ? never : KEY }[keyof VALUES]; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/enum.d.ts declare type ExcludeFromEnum = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ENUM : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? FilterEnumExcluded : META_TYPE extends EnumType ? FilterEnumExcluded : META_TYPE extends PrimitiveType ? FilterEnumExcluded : META_TYPE extends ArrayType ? FilterEnumExcluded : META_TYPE extends TupleType ? FilterEnumExcluded : META_TYPE extends ObjectType ? FilterEnumExcluded : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; declare type FilterEnumExcluded = Enum, META_TYPE>>; declare type FilterEnumExcludedValues = ENUM_VALUES extends infer ENUM_VALUE ? _Exclude, META_TYPE> extends NeverType ? never : ENUM_VALUE : never; declare type ExcludeEnum> = ExcludeEnumValue, ENUM_VALUES>; declare type ExcludeEnumValue = $Intersect<_Exclude>, _Exclude>>>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/utils.d.ts declare type ValueExclusionResult = { sourceValue: VALUE_A; isAllowedInSource: IS_ALLOWED_IN_A; isRequiredInSource: IS_REQUIRED_IN_A; isAllowedInExcluded: IS_ALLOWED_IN_B; isRequiredInExcluded: IS_REQUIRED_IN_B; exclusionResult: _$Exclude; }; declare type ValueExclusionResultType = { sourceValue: Type; isAllowedInSource: boolean; isRequiredInSource: boolean; isAllowedInExcluded: boolean; isRequiredInExcluded: boolean; exclusionResult: any; }; declare type SourceValue = VALUE_EXCLUSION_RESULT["sourceValue"]; declare type IsAllowedInSource = VALUE_EXCLUSION_RESULT["isAllowedInSource"]; declare type IsRequiredInSource = VALUE_EXCLUSION_RESULT["isRequiredInSource"]; declare type ExclusionResult = VALUE_EXCLUSION_RESULT["exclusionResult"]; declare type IsAllowedInExcluded = VALUE_EXCLUSION_RESULT["isAllowedInExcluded"]; declare type IsRequiredInExcluded = VALUE_EXCLUSION_RESULT["isRequiredInExcluded"]; declare type IsOutsideOfSourceScope = And$1>, IsRequiredInExcluded>; declare type IsOutsideOfExcludedScope = And$1, Not$1>>; declare type IsOmittable = And$1>, IsRequiredInExcluded>; declare type PropagateExclusion = ExclusionResult extends NeverType ? SourceValue : ExclusionResult; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/object.d.ts declare type ExcludeFromObject = META_TYPE extends Type ? META_TYPE extends NeverType ? META_OBJECT : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? ExcludeConstFromObject : META_TYPE extends EnumType ? ExcludeEnum : META_TYPE extends PrimitiveType ? META_OBJECT : META_TYPE extends ArrayType ? META_OBJECT : META_TYPE extends TupleType ? META_OBJECT : META_TYPE extends ObjectType ? ExcludeObjects : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; declare type ExcludeObjects = ExcludeObjectValues, REPRESENTABLE_KEYS extends string = RepresentableKeys, OPEN_PROPS_EXCLUSION = _Exclude, ObjectOpenProps>> = DoesObjectSizesMatch extends true ? { moreThanTwo: META_OBJECT_A; onlyOne: PropagateExclusions$1; none: OmitOmittableKeys; }[And$1, Not$1>> extends true ? "moreThanTwo" : GetUnionLength] : META_OBJECT_A; declare type ExcludeObjectValues = { [KEY in Extract | keyof ObjectValues | ObjectRequiredKeys | ObjectRequiredKeys, string>]: ValueExclusionResult, IsAllowedIn, IsRequiredIn, ObjectValue, IsAllowedIn, IsRequiredIn> }; declare type GetUnionLength = If, "none", If>, "onlyOne", "moreThanTwo">>; declare type IsAllowedIn = Or>, IsObjectOpen>; declare type IsRequiredIn = DoesExtend$1>; declare type DoesObjectSizesMatch> = If, Not$1>>, false, And$1, IsExcludedBigEnough$1>>; declare type IsExcludedSmallEnough$1> = Not$1 }[keyof VALUE_EXCLUSION_RESULTS]>>; declare type IsExcludedBigEnough$1> = Not$1 }[keyof VALUE_EXCLUSION_RESULTS]>>; declare type RepresentableKeys> = { [KEY in Extract]: ExclusionResult extends NeverType ? never : KEY }[Extract]; declare type PropagateExclusions$1> = _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: PropagateExclusion }, ObjectRequiredKeys, ObjectOpenProps, IsObjectClosedOnResolve, IsSerialized, Deserialized>; declare type OmitOmittableKeys, OMITTABLE_KEYS extends string = OmittableKeys, OMITTABLE_KEYS_COUNT extends string = GetUnionLength> = OMITTABLE_KEYS_COUNT extends "moreThanTwo" ? META_OBJECT : OMITTABLE_KEYS_COUNT extends "onlyOne" ? _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: KEY extends OMITTABLE_KEYS ? Never : SourceValue }, ObjectRequiredKeys, ObjectOpenProps, IsObjectClosedOnResolve, IsSerialized, Deserialized> : Never; declare type OmittableKeys> = { [KEY in Extract]: IsOmittable extends true ? KEY : never }[Extract]; declare type ExcludeConstFromObject> = If, _$Exclude]: Const }, Extract, Never, IsObjectClosedOnResolve, IsSerialized, Deserialized>>, META_OBJECT>; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/primitive.d.ts declare type ExcludeFromPrimitive = META_TYPE extends Type ? META_TYPE extends NeverType ? META_PRIMITIVE : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_PRIMITIVE : META_TYPE extends EnumType ? META_PRIMITIVE : META_TYPE extends PrimitiveType ? PrimitiveValue extends PrimitiveValue ? Never : META_PRIMITIVE : META_TYPE extends ArrayType ? META_PRIMITIVE : META_TYPE extends TupleType ? META_PRIMITIVE : META_TYPE extends ObjectType ? META_PRIMITIVE : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/tuple.d.ts declare type ExcludeFromTuple = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TUPLE : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? ExcludeConst : META_TYPE extends EnumType ? ExcludeEnum : META_TYPE extends PrimitiveType ? META_TUPLE : META_TYPE extends ArrayType ? ExcludeArray : META_TYPE extends TupleType ? ExcludeTuples : META_TYPE extends ObjectType ? META_TUPLE : META_TYPE extends UnionType ? ExcludeUnion : Never : Never; declare type ExcludeArray = ExcludeTuples, IsSerialized, Deserialized>>; declare type ExcludeTuples, TupleValues, IsTupleOpen, IsTupleOpen, TupleOpenProps, TupleOpenProps>, REPRESENTABLE_VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[] = RepresentableExcludedValues, EXCLUDED_OPEN_PROPS = _Exclude, TupleOpenProps>, IS_OPEN_PROPS_EXCLUSION_REPRESENTABLE = Not$1>> = If, { moreThanTwo: META_TUPLE_A; onlyOne: $Tuple, TupleOpenProps, IsSerialized, Deserialized>; none: OmitOmittableExcludedItems; }[And$1, IS_OPEN_PROPS_EXCLUSION_REPRESENTABLE> extends true ? "moreThanTwo" : GetTupleLength], META_TUPLE_A>; declare type ExcludeTupleValues = META_TUPLE_A_VALUES extends [infer META_TUPLE_A_VALUES_HEAD, ...infer META_TUPLE_A_VALUES_TAIL] ? META_TUPLE_A_VALUES_HEAD extends Type ? META_TUPLE_A_VALUES_TAIL extends Type[] ? META_TUPLE_B_VALUES extends [infer META_TUPLE_B_VALUES_HEAD, ...infer META_TUPLE_B_VALUES_TAIL] ? META_TUPLE_B_VALUES_HEAD extends Type ? META_TUPLE_B_VALUES_TAIL extends Type[] ? ExcludeTupleValues]> : never : never : ExcludeTupleValues]> : never : never : META_TUPLE_B_VALUES extends [infer META_TUPLE_B_VALUES_HEAD, ...infer META_TUPLE_B_VALUES_TAIL] ? META_TUPLE_B_VALUES_HEAD extends Type ? META_TUPLE_B_VALUES_TAIL extends Type[] ? ExcludeTupleValues<[], META_TUPLE_B_VALUES_TAIL, IS_META_TUPLE_A_OPEN, IS_META_TUPLE_B_OPEN, META_TUPLE_A_OPEN_PROPS, META_TUPLE_B_OPEN_PROPS, [...VALUE_EXCLUSION_RESULTS, ValueExclusionResult]> : never : never : VALUE_EXCLUSION_RESULTS; declare type GetTupleLength> = If, "none", If, "onlyOne", "moreThanTwo">>; declare type DoesTupleSizesMatch = If, Not$1>>, false, And$1, IsExcludedBigEnough>>; declare type IsExcludedSmallEnough = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? If, false, IsExcludedSmallEnough> : never : never : true; declare type IsExcludedBigEnough = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? If, false, IsExcludedBigEnough> : never : never : true; declare type RepresentableExcludedValues = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? ExclusionResult extends NeverType ? RepresentableExcludedValues : RepresentableExcludedValues : never : never : REPRESENTABLE_VALUE_EXCLUSION_RESULTS; declare type PropagateExclusions = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? PropagateExclusions]> : never : never : RESULT; declare type OmitOmittableExcludedItems, OMITTABLE_ITEMS_COUNT extends string = GetTupleLength> = OMITTABLE_ITEMS_COUNT extends "moreThanTwo" ? META_TUPLE : OMITTABLE_ITEMS_COUNT extends "onlyOne" ? $Tuple, Never, IsSerialized, Deserialized> : Never; declare type OmittableExcludedItems = ITEM_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? If, OmittableExcludedItems, OmittableExcludedItems> : never : never : RESULT; declare type RequiredExcludedItems = ITEM_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? IsOmittable extends true ? RESULT : RequiredExcludedItems]> : never : never : RESULT; declare type ExcludeConst> = META_CONST_VALUE extends unknown[] ? _Exclude, Never, IsSerialized, Deserialized>> : META_TUPLE; declare type ExtractConstValues = CONST_VALUES extends [infer CONST_VALUES_HEAD, ...infer CONST_VALUES_TAIL] ? ExtractConstValues]> : RESULT; //#endregion //#region node_modules/ts-algebra/lib/meta-types/exclusion/index.d.ts declare type _Exclude = _$Exclude; declare type _$Exclude = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? ExcludeFromAny : META_TYPE_A extends ConstType ? ExcludeFromConst : META_TYPE_A extends EnumType ? ExcludeFromEnum : META_TYPE_A extends PrimitiveType ? ExcludeFromPrimitive : META_TYPE_A extends ArrayType ? ExcludeFromArray : META_TYPE_A extends TupleType ? ExcludeFromTuple : META_TYPE_A extends ObjectType ? ExcludeFromObject : META_TYPE_A extends UnionType ? ExcludeFromUnion : Never; //#endregion //#region node_modules/json-schema-to-ts/lib/types/definitions/deserializationPattern.d.ts type DeserializationPattern = Readonly<{ pattern: unknown; output: unknown; }>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/definitions/jsonSchema.d.ts declare const $JSONSchema: unique symbol; type $JSONSchema = typeof $JSONSchema; type JSONSchemaType = "string" | "number" | "integer" | "boolean" | "object" | "array" | "null"; type JSONSchema$1 = boolean | Readonly<{ [$JSONSchema]?: $JSONSchema; $id?: string | undefined; $ref?: string | undefined; $schema?: string | undefined; $comment?: string | undefined; type?: JSONSchemaType | readonly JSONSchemaType[]; const?: unknown; enum?: unknown; multipleOf?: number | undefined; maximum?: number | undefined; exclusiveMaximum?: number | undefined; minimum?: number | undefined; exclusiveMinimum?: number | undefined; maxLength?: number | undefined; minLength?: number | undefined; pattern?: string | undefined; items?: JSONSchema$1 | readonly JSONSchema$1[]; additionalItems?: JSONSchema$1; contains?: JSONSchema$1; maxItems?: number | undefined; minItems?: number | undefined; uniqueItems?: boolean | undefined; maxProperties?: number | undefined; minProperties?: number | undefined; required?: readonly string[]; properties?: Readonly>; patternProperties?: Readonly>; additionalProperties?: JSONSchema$1; unevaluatedProperties?: JSONSchema$1; dependencies?: Readonly>; propertyNames?: JSONSchema$1; if?: JSONSchema$1; then?: JSONSchema$1; else?: JSONSchema$1; allOf?: readonly JSONSchema$1[]; anyOf?: readonly JSONSchema$1[]; oneOf?: readonly JSONSchema$1[]; not?: JSONSchema$1; format?: string | undefined; contentMediaType?: string | undefined; contentEncoding?: string | undefined; definitions?: Readonly>; title?: string | undefined; description?: string | undefined; default?: unknown; readOnly?: boolean | undefined; writeOnly?: boolean | undefined; examples?: readonly unknown[]; nullable?: boolean; }>; type JSONSchemaReference = JSONSchema$1 & Readonly<{ $id: string; }>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/definitions/fromSchemaOptions.d.ts type FromSchemaOptions = { parseNotKeyword?: boolean; parseIfThenElseKeywords?: boolean; keepDefaultedPropertiesOptional?: boolean; references?: JSONSchemaReference[] | false; deserialize?: DeserializationPattern[] | false; }; type FromSchemaDefaultOptions = { parseNotKeyword: false; parseIfThenElseKeywords: false; keepDefaultedPropertiesOptional: false; references: false; deserialize: false; }; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-options.d.ts type IndexReferencesById = { [REF_SCHEMA in SCHEMA_REFERENCES[number] as REF_SCHEMA["$id"]]: REF_SCHEMA }; type ParseOptions = { parseNotKeyword: OPTIONS["parseNotKeyword"] extends boolean ? OPTIONS["parseNotKeyword"] : FromSchemaDefaultOptions["parseNotKeyword"]; parseIfThenElseKeywords: OPTIONS["parseIfThenElseKeywords"] extends boolean ? OPTIONS["parseIfThenElseKeywords"] : FromSchemaDefaultOptions["parseIfThenElseKeywords"]; keepDefaultedPropertiesOptional: OPTIONS["keepDefaultedPropertiesOptional"] extends boolean ? OPTIONS["keepDefaultedPropertiesOptional"] : FromSchemaDefaultOptions["keepDefaultedPropertiesOptional"]; rootSchema: ROOT_SCHEMA; references: OPTIONS["references"] extends JSONSchemaReference[] ? IndexReferencesById : {}; deserialize: OPTIONS["deserialize"] extends DeserializationPattern[] | false ? OPTIONS["deserialize"] : FromSchemaDefaultOptions["deserialize"]; }; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/and.d.ts type And = CONDITION_A extends true ? CONDITION_B extends true ? true : false : false; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/extends.d.ts type DoesExtend = [TYPE_A] extends [TYPE_B] ? true : false; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/get.d.ts type DeepGet = PATH extends [infer PATH_HEAD, ...infer PATH_TAIL] ? PATH_HEAD extends string ? PATH_TAIL extends string[] ? PATH_HEAD extends keyof OBJECT ? DeepGet : DEFAULT : never : never : OBJECT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/join.d.ts type Join = STRINGS extends [] ? "" : STRINGS extends [string] ? `${STRINGS[0]}` : STRINGS extends [string, ...infer STRINGS_TAIL] ? STRINGS_TAIL extends string[] ? `${STRINGS[0]}${SEPARATOR}${Join}` : never : string; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/not.d.ts type Not = BOOL extends false ? true : BOOL extends true ? false : never; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/pop.d.ts type Pop = ARRAY extends readonly [...infer ARRAY_BODY, unknown] | readonly [...infer ARRAY_BODY, unknown?] ? ARRAY_BODY : ARRAY; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/split.d.ts type RecursiveSplit = STRING extends `${infer BEFORE}${SEPARATOR}${infer AFTER}` ? [BEFORE, ...RecursiveSplit] : [STRING]; type Split> = SEPARATOR extends "" ? Pop : RESULT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/tail.d.ts type Tail = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer ARRAY_TAIL] ? ARRAY_TAIL : ARRAY; //#endregion //#region node_modules/json-schema-to-ts/lib/types/type-utils/writable.d.ts type Writable = TYPE extends ((...args: unknown[]) => unknown) | Date | RegExp ? TYPE : TYPE extends ReadonlyMap ? Map, Writable> : TYPE extends ReadonlySet ? Set> : TYPE extends ReadonlyArray ? `${bigint}` extends `${keyof TYPE & any}` ? { -readonly [KEY in keyof TYPE]: Writable } : Writable[] : TYPE extends object ? { -readonly [KEY in keyof TYPE]: Writable } : TYPE; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/utils.d.ts type RemoveInvalidAdditionalItems = SCHEMA extends Readonly<{ items: JSONSchema$1 | readonly JSONSchema$1[]; }> ? SCHEMA extends Readonly<{ additionalItems: JSONSchema$1; }> ? SCHEMA : SCHEMA & Readonly<{ additionalItems: true; }> : SCHEMA extends boolean ? SCHEMA : Omit; type RemoveInvalidAdditionalProperties = SCHEMA extends Readonly<{ additionalProperties: JSONSchema$1; }> ? SCHEMA extends Readonly<{ properties: Readonly>; }> ? SCHEMA : SCHEMA & Readonly<{ properties: {}; }> : SCHEMA extends boolean ? SCHEMA : Omit; type MergeSubSchema>> = Omit & CLEANED_SUB_SCHEMA; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/allOf.d.ts type AllOfSchema = JSONSchema$1 & Readonly<{ allOf: readonly JSONSchema$1[]; }>; type ParseAllOfSchema = RecurseOnAllOfSchema, OPTIONS>>; type RecurseOnAllOfSchema = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnAllOfSchema, SUB_SCHEMAS_HEAD>, OPTIONS>, PARSED_ROOT_ALL_OF_SCHEMA>> : never : never : PARSED_ROOT_ALL_OF_SCHEMA; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/anyOf.d.ts type AnyOfSchema = JSONSchema$1 & Readonly<{ anyOf: readonly JSONSchema$1[]; }>; type ParseAnyOfSchema = $Union>; type RecurseOnAnyOfSchema = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnAnyOfSchema, OPTIONS>, ParseSchema, SUB_SCHEMAS_HEAD>, OPTIONS>>> : never : never : RESULT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/const.d.ts type ConstSchema = JSONSchema$1 & Readonly<{ const: unknown; }>; type ParseConstSchema = $Intersect, ParseSchema, OPTIONS>>; type ParseConst = Const>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/deserialize.d.ts type DeserializeSchema & { deserialize: DeserializationPattern[]; }> = RecurseOnDeserializationPatterns; type RecurseOnDeserializationPatterns = DESERIALIZATION_PATTERNS extends [infer DESERIALIZATION_PATTERNS_HEAD, ...infer DESERIALIZATION_PATTERNS_TAIL] ? DESERIALIZATION_PATTERNS_HEAD extends DeserializationPattern ? DESERIALIZATION_PATTERNS_TAIL extends DeserializationPattern[] ? RecurseOnDeserializationPatterns, RESULT> : RESULT> : never : never : RESULT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/enum.d.ts type EnumSchema = JSONSchema$1 & Readonly<{ enum: readonly unknown[]; }>; type ParseEnumSchema = $Intersect, ParseSchema, OPTIONS>>; type ParseEnum = Enum>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/ifThenElse.d.ts type IfThenElseSchema = JSONSchema$1 & { if: JSONSchema$1; then?: JSONSchema$1; else?: JSONSchema$1; }; type ParseIfThenElseSchema, IF_SCHEMA extends JSONSchema$1 = MergeSubSchema, PARSED_THEN_SCHEMA = (IF_THEN_ELSE_SCHEMA extends { then: JSONSchema$1; } ? $Intersect, ParseSchema, OPTIONS>> : ParseSchema), PARSED_ELSE_SCHEMA = (IF_THEN_ELSE_SCHEMA extends { else: JSONSchema$1; } ? $Intersect<_$Exclude, ParseSchema>, ParseSchema, OPTIONS>> : _$Exclude, ParseSchema>)> = $Intersect<$Union, ParseSchema>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/multipleTypes.d.ts type MultipleTypesSchema = JSONSchema$1 & Readonly<{ type: readonly JSONSchemaType[]; }>; type ParseMultipleTypesSchema = $Union>; type RecurseOnMixedSchema = TYPES extends readonly [infer TYPES_HEAD, ...infer TYPES_TAIL] ? TYPES_HEAD extends JSONSchemaType ? TYPES_TAIL extends readonly JSONSchemaType[] ? RecurseOnMixedSchema & { type: TYPES_HEAD; }, OPTIONS>> : never : never : RESULT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/not.d.ts type NotSchema = JSONSchema$1 & Readonly<{ not: JSONSchema$1; }>; type AllTypes = Union | Primitive | Primitive | Primitive | _Array | _Object<{}, never, Any>>; type ParseNotSchema, OPTIONS>, EXCLUSION = _$Exclude : PARSED_REST_SCHEMA, ParseSchema, NOT_SCHEMA["not"]>, OPTIONS>>> = EXCLUSION extends Never ? PARSED_REST_SCHEMA : EXCLUSION; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/nullable.d.ts type NullableSchema = JSONSchema$1 & Readonly<{ nullable: boolean; }>; type ParseNullableSchema, OPTIONS>> = NULLABLE_SCHEMA extends Readonly<{ nullable: true; }> ? $Union | PARSED_REST_SCHEMA> : PARSED_REST_SCHEMA; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/oneOf.d.ts type OneOfSchema = JSONSchema$1 & Readonly<{ oneOf: readonly JSONSchema$1[]; }>; type ParseOneOfSchema = $Union>; type RecurseOnOneOfSchema = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnOneOfSchema, OPTIONS>, ParseSchema, SUB_SCHEMAS_HEAD>, OPTIONS>>> : never : never : RESULT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/utils.d.ts type ParseReference>, false> : REFERENCE_SOURCE)> = $Intersect, ParseSchema, OPTIONS>>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/external.d.ts type ParseExternalReferenceSchema = OPTIONS["references"] extends { [KEY in EXTERNAL_REFERENCE_ID]: JSONSchema$1 } ? ParseReference, OPTIONS, OPTIONS["references"][EXTERNAL_REFERENCE_ID], SUB_PATH> : OPTIONS extends { rootSchema: IdSchema; } ? ParseExternalReferenceWithoutDirectorySchema, OPTIONS, EXTERNAL_REFERENCE_ID, SUB_PATH> : Never; type ParseDirectory = Join>, "/">; type IdSchema = JSONSchema$1 & { $id: string; }; type ParseExternalReferenceWithoutDirectorySchema, COMPLETE_REFERENCE extends string = Join<[DIRECTORY, EXTERNAL_REFERENCE_ID], "/">> = COMPLETE_REFERENCE extends keyof OPTIONS["references"] ? ParseReference : Never; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/internal.d.ts type ParseInternalReferenceSchema = ParseReference, OPTIONS, OPTIONS["rootSchema"], PATH>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/index.d.ts type ReferencingSchema = JSONSchema$1 & { $ref: string; }; type ParseReferenceSchema> = REFERENCE_ID_AND_PATH[0] extends "" ? ParseInternalReferenceSchema : ParseExternalReferenceSchema; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/array.d.ts type ArrayOrTupleSchema = JSONSchema$1 & Readonly<{ type: "array"; }>; type ArraySchema = Omit & Readonly<{ type: "array"; items: JSONSchema$1; }>; type TupleSchema = JSONSchema$1 & Readonly<{ type: "array"; items: readonly JSONSchema$1[]; }>; type ParseArrayOrTupleSchema = ARRAY_OR_TUPLE_SCHEMA extends ArraySchema ? _$Array> : ARRAY_OR_TUPLE_SCHEMA extends TupleSchema ? $Union, ARRAY_OR_TUPLE_SCHEMA, OPTIONS>> : _$Array; type ParseTupleItems = ITEM_SCHEMAS extends readonly [infer ITEM_SCHEMAS_HEAD, ...infer ITEM_SCHEMAS_TAIL] ? ITEM_SCHEMAS_HEAD extends JSONSchema$1 ? ITEM_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? [ParseSchema, ...ParseTupleItems] : never : never : []; type ApplyMinMaxAndAdditionalItems = ApplyAdditionalItems ? ROOT_SCHEMA["minItems"] : 0, ROOT_SCHEMA extends Readonly<{ maxItems: number; }> ? ROOT_SCHEMA["maxItems"] : undefined>, ROOT_SCHEMA extends Readonly<{ additionalItems: JSONSchema$1; }> ? ROOT_SCHEMA["additionalItems"] : true, OPTIONS>; type ApplyMinMax = And>, DoesExtend> extends true ? RECURSED_PARSED_ITEM_SCHEMAS extends [...infer RECURSED_PARSED_ITEM_SCHEMAS_BODY, unknown] ? ApplyMinMax : RESULT | $Tuple, HAS_ENCOUNTERED_MIN extends true ? true : DoesExtend, HAS_ENCOUNTERED_MAX extends true ? true : DoesExtend, INITIAL_PARSED_ITEM_SCHEMAS> : never : { result: MAX extends undefined ? RESULT | $Tuple : HAS_ENCOUNTERED_MAX extends true ? RESULT | $Tuple : MAX extends RECURSED_PARSED_ITEM_SCHEMAS["length"] ? $Tuple : IsLongerThan, MAX> extends true ? never : RESULT | $Tuple; hasEncounteredMin: DoesExtend; hasEncounteredMax: HAS_ENCOUNTERED_MAX extends true ? true : MAX extends RECURSED_PARSED_ITEM_SCHEMAS["length"] ? true : IsLongerThan, MAX>; completeTuple: INITIAL_PARSED_ITEM_SCHEMAS; }; type IsLongerThan = LENGTH extends undefined ? false : TUPLE["length"] extends LENGTH ? true : TUPLE extends [any, ...infer TUPLE_TAIL] ? IsLongerThan : RESULT; type ApplyAdditionalItems = APPLY_MIN_MAX_RESULT extends { hasEncounteredMax: true; } ? APPLY_MIN_MAX_RESULT extends { hasEncounteredMin: true; } ? APPLY_MIN_MAX_RESULT["result"] : Never : ADDITIONAL_ITEMS_SCHEMA extends false ? APPLY_MIN_MAX_RESULT extends { hasEncounteredMin: true; } ? APPLY_MIN_MAX_RESULT["result"] : Never : ADDITIONAL_ITEMS_SCHEMA extends true ? APPLY_MIN_MAX_RESULT extends { hasEncounteredMin: true; } ? APPLY_MIN_MAX_RESULT["result"] | $Tuple : $Tuple : APPLY_MIN_MAX_RESULT extends { hasEncounteredMin: true; } ? APPLY_MIN_MAX_RESULT["result"] | $Tuple> : $Tuple>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/object.d.ts type ObjectSchema$1 = JSONSchema$1 & Readonly<{ type: "object"; }>; type ParseObjectSchema = OBJECT_SCHEMA extends Readonly<{ properties: Readonly>; }> ? _$Object<{ [KEY in keyof OBJECT_SCHEMA["properties"]]: ParseSchema }, GetRequired, GetOpenProps, GetClosedOnResolve> : _$Object<{}, GetRequired, GetOpenProps, GetClosedOnResolve>; type GetRequired = (OBJECT_SCHEMA extends Readonly<{ required: ReadonlyArray; }> ? OBJECT_SCHEMA["required"][number] : never) | (OPTIONS["keepDefaultedPropertiesOptional"] extends true ? never : OBJECT_SCHEMA extends Readonly<{ properties: Readonly>; }> ? { [KEY in keyof OBJECT_SCHEMA["properties"] & string]: OBJECT_SCHEMA["properties"][KEY] extends Readonly<{ default: unknown; }> ? KEY : never }[keyof OBJECT_SCHEMA["properties"] & string] : never); type GetOpenProps = OBJECT_SCHEMA extends Readonly<{ additionalProperties: JSONSchema$1; }> ? OBJECT_SCHEMA extends Readonly<{ patternProperties: Record; }> ? AdditionalAndPatternProps : ParseSchema : OBJECT_SCHEMA extends Readonly<{ patternProperties: Record; }> ? PatternProps : Any; type GetClosedOnResolve = OBJECT_SCHEMA extends Readonly<{ unevaluatedProperties: false; }> ? true : false; type PatternProps>, OPTIONS extends ParseSchemaOptions> = $Union<{ [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema }[keyof PATTERN_PROPERTY_SCHEMAS]>; type AdditionalAndPatternProps>, OPTIONS extends ParseSchemaOptions> = ADDITIONAL_PROPERTIES_SCHEMA extends boolean ? PatternProps : $Union | { [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema }[keyof PATTERN_PROPERTY_SCHEMAS]>; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/singleType.d.ts type SingleTypeSchema = JSONSchema$1 & Readonly<{ type: JSONSchemaType; }>; type ParseSingleTypeSchema = SINGLE_TYPE_SCHEMA extends Readonly<{ type: "null"; }> ? Primitive : SINGLE_TYPE_SCHEMA extends Readonly<{ type: "boolean"; }> ? Primitive : SINGLE_TYPE_SCHEMA extends Readonly<{ type: "integer"; }> ? Primitive : SINGLE_TYPE_SCHEMA extends Readonly<{ type: "number"; }> ? Primitive : SINGLE_TYPE_SCHEMA extends Readonly<{ type: "string"; }> ? Primitive : SINGLE_TYPE_SCHEMA extends ArrayOrTupleSchema ? ParseArrayOrTupleSchema : SINGLE_TYPE_SCHEMA extends ObjectSchema$1 ? ParseObjectSchema : Never; //#endregion //#region node_modules/json-schema-to-ts/lib/types/parse-schema/index.d.ts type ParseSchemaOptions = { parseNotKeyword: boolean; parseIfThenElseKeywords: boolean; keepDefaultedPropertiesOptional: boolean; rootSchema: JSONSchema$1; references: Record; deserialize: DeserializationPattern[] | false; }; type ParseSchema : SCHEMA extends ReferencingSchema ? ParseReferenceSchema : And, DoesExtend> extends true ? SCHEMA extends IfThenElseSchema ? ParseIfThenElseSchema : never : And, DoesExtend> extends true ? SCHEMA extends NotSchema ? ParseNotSchema : never : SCHEMA extends AllOfSchema ? ParseAllOfSchema : SCHEMA extends OneOfSchema ? ParseOneOfSchema : SCHEMA extends AnyOfSchema ? ParseAnyOfSchema : SCHEMA extends EnumSchema ? ParseEnumSchema : SCHEMA extends ConstSchema ? ParseConstSchema : SCHEMA extends MultipleTypesSchema ? ParseMultipleTypesSchema : SCHEMA extends SingleTypeSchema ? ParseSingleTypeSchema : Any)> = OPTIONS extends { deserialize: DeserializationPattern[]; } ? $Intersect, RESULT> : RESULT; //#endregion //#region node_modules/json-schema-to-ts/lib/types/index.d.ts type FromSchema$1 = $Resolve>>; //#endregion //#region node_modules/@whatwg-node/promise-helpers/typings/index.d.cts type MaybePromise = Promise | T; type MaybePromiseLike = PromiseLike | T; //#endregion //#region node_modules/fets/node_modules/@whatwg-node/server/typings/utils.d.cts interface NodeRequest { protocol?: string | undefined; hostname?: string | undefined; body?: any | undefined; url?: string | undefined; originalUrl?: string | undefined; method?: string | undefined; headers?: any | undefined; req?: IncomingMessage | Http2ServerRequest | undefined; raw?: IncomingMessage | Http2ServerRequest | undefined; socket?: Socket | undefined; query?: any | undefined; once?(event: string, listener: (...args: any[]) => void): void; aborted?: boolean | undefined; } type NodeResponse = ServerResponse | Http2ServerResponse; //#endregion //#region node_modules/fets/node_modules/@whatwg-node/server/typings/uwebsockets.d.cts interface UWSRequest { getMethod(): string; forEach(callback: (key: string, value: string) => void): void; getUrl(): string; getQuery(): string; getHeader(key: string): string | undefined; setYield(y: boolean): void; } interface UWSResponse { onData(callback: (chunk: ArrayBuffer, isLast: boolean) => void): void; onAborted(callback: () => void): void; writeStatus(status: string): void; writeHeader(key: string, value: string): void; end(body?: any): void; close(): void; write(body: any): boolean; cork(callback: () => void): void; } type UWSHandler = (res: UWSResponse, req: UWSRequest) => void | Promise; //#endregion //#region node_modules/fets/node_modules/@whatwg-node/server/typings/types.d.cts interface FetchEvent extends Event { waitUntil(f: MaybePromise): void; request: Request; respondWith(r: MaybePromiseLike): void; } interface ServerAdapterBaseObject = ServerAdapterRequestHandler> { /** * An async function that takes `Request` and the server context and returns a `Response`. * If you use `requestListener`, the server context is `{ req: IncomingMessage, res: ServerResponse }`. */ handle: THandleRequest; } interface ServerAdapterObject extends EventListenerObject, AsyncDisposable { /** * A basic request listener that takes a `Request` with the server context and returns a `Response`. */ handleRequest: (request: Request, ctx: TServerContext & Partial) => MaybePromise; /** * WHATWG Fetch spec compliant `fetch` function that can be used for testing purposes. */ fetch(request: Request, ctx: TServerContext): MaybePromise; fetch(request: Request, ...ctx: Partial[]): MaybePromise; fetch(urlStr: string, ctx: TServerContext): MaybePromise; fetch(urlStr: string, ...ctx: Partial[]): MaybePromise; fetch(urlStr: string, init: RequestInit, ctx: TServerContext): MaybePromise; fetch(urlStr: string, init: RequestInit, ...ctx: Partial[]): MaybePromise; fetch(url: URL, ctx: TServerContext): MaybePromise; fetch(url: URL, ...ctx: Partial[]): MaybePromise; fetch(url: URL, init: RequestInit, ctx: TServerContext): MaybePromise; fetch(url: URL, init: RequestInit, ...ctx: Partial[]): MaybePromise; /** * This function takes Node's request object and returns a WHATWG Fetch spec compliant `Response` object. * * @deprecated Use `handleNodeRequestAndResponse` instead. **/ handleNodeRequest(nodeRequest: NodeRequest, ...ctx: Partial[]): MaybePromise; /** * This function takes Node's request and response objects and returns a WHATWG Fetch spec compliant `Response` object. */ handleNodeRequestAndResponse(nodeRequest: NodeRequest, nodeResponseOrContainer: { raw: NodeResponse; } | NodeResponse, ...ctx: Partial[]): MaybePromise; /** * A request listener function that can be used with any Node server variation. */ requestListener: RequestListener; handleUWS: UWSHandler; handle(req: NodeRequest, res: NodeResponse, ...ctx: Partial[]): Promise; handle(requestLike: RequestLike, ...ctx: Partial[]): MaybePromise; handle(request: Request, ...ctx: Partial[]): MaybePromise; handle(request: Request, ...ctx: Partial[]): MaybePromise; handle(fetchEvent: FetchEvent & Partial, ...ctx: Partial[]): void; handle(res: UWSResponse, req: UWSRequest, ...ctx: Partial[]): Promise; handle(container: { request: Request; } & Partial, ...ctx: Partial[]): MaybePromise; disposableStack: AsyncDisposableStack; dispose(): Promise | void; /** * Register a promise that should be waited in the background for before the server process is exited. * * This also avoids unhandled promise rejections, which would otherwise cause the process to exit on some environment like Node. * @param promise The promise to wait for * @returns */ waitUntil: WaitUntilFn; } interface RequestLike { url: string; method: string; headers: HeadersLike; body?: AsyncIterable | null; } interface HeadersLike extends Iterable<[string, string]> { get(name: string): string | null | undefined; set(name: string, value: string): void; has(name: string): boolean; } type ServerAdapter> = TBaseObject & ServerAdapterObject['handle'] & ServerAdapterObject; type ServerAdapterRequestHandler = (request: Request, ctx: TServerContext & ServerAdapterInitialContext) => MaybePromise; type WaitUntilFn = (promise: Promise | void) => void; type ServerAdapterInitialContext = { /** * Register a promise that should be waited in the background for before the server process is exited. * * This also avoids unhandled promise rejections, which would otherwise cause the process to exit on some environment like Node. * @param promise The promise to wait for * @returns */ waitUntil: WaitUntilFn; }; //#endregion //#region node_modules/fets/typings/types.d.ts type StatusCodeMap$1 = { [TKey in StatusCode$1]?: T }; //#endregion //#region node_modules/fets/typings/typed-fetch.d.ts type OkStatusCode$1 = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226; type RedirectStatusCode$1 = 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; type ClientErrorStatusCode$1 = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451; type ServerErrorStatusCode$1 = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511; type StatusCode$1 = OkStatusCode$1 | RedirectStatusCode$1 | ClientErrorStatusCode$1 | ServerErrorStatusCode$1; type TypedBody$1, THeaders extends Record> = Omit & { /** * The `json()` method takes the stream and reads it to completion. * It returns a promise which resolves with the result of parsing the body text as JSON. * * Note that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object. * * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/json */ json(): Promise; /** * The formData() method takes the stream and reads it to completion. It returns a promise that resolves with a `FormData` object. * * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/formData */ formData(): Promise>; /** * The headers read-only property of the Response interface contains the Headers object associated with the response. * * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/headers */ headers: TypedHeaders$1; }; type DefaultHTTPHeaders$1 = 'accept' | 'accept-language' | 'content-language' | 'content-type' | 'content-length'; type Maybe$1 = undefined | null; type UndefinedToNull$1 = T extends undefined ? Exclude | null : T; interface TypedHeaders$1> { append(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void; delete(name: TName): void; get(name: TName): TName extends keyof TMap ? UndefinedToNull$1 : TName extends DefaultHTTPHeaders$1 ? string | null : never; has(name: TName): TName extends DefaultHTTPHeaders$1 ? boolean : TName extends keyof TMap ? TMap[TName] extends Maybe$1 ? boolean : true : never; set(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void; forEach(callbackfn: (value: TMap[TName], key: TName, parent: TypedHeaders$1) => void, thisArg?: any): void; entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; getSetCookie(): string[]; } type StatusTextMap$1 = { 100: 'Continue'; 101: 'Switching Protocols'; 102: 'Processing'; 103: 'Early Hints'; 200: 'OK'; 201: 'Created'; 202: 'Accepted'; 203: 'Non-Authoritative Information'; 204: 'No Content'; 205: 'Reset Content'; 206: 'Partial Content'; 207: 'Multi-Status'; 208: 'Already Reported'; 226: 'IM Used'; 300: 'Multiple Choices'; 301: 'Moved Permanently'; 302: 'Found'; 303: 'See Other'; 304: 'Not Modified'; 305: 'Use Proxy'; 307: 'Temporary Redirect'; 308: 'Permanent Redirect'; 400: 'Bad Request'; 401: 'Unauthorized'; 402: 'Payment Required'; 403: 'Forbidden'; 404: 'Not Found'; 405: 'Method Not Allowed'; 406: 'Not Acceptable'; 407: 'Proxy Authentication Required'; 408: 'Request Timeout'; 409: 'Conflict'; 410: 'Gone'; 411: 'Length Required'; 412: 'Precondition Failed'; 413: 'Payload Too Large'; 414: 'URI Too Long'; 415: 'Unsupported Media Type'; 416: 'Range Not Satisfiable'; 417: 'Expectation Failed'; 418: "I'm a Teapot"; 421: 'Misdirected Request'; 422: 'Unprocessable Entity'; 423: 'Locked'; 424: 'Failed Dependency'; 425: 'Too Early'; 426: 'Upgrade Required'; 428: 'Precondition Required'; 429: 'Too Many Requests'; 431: 'Request Header Fields Too Large'; 451: 'Unavailable For Legal Reasons'; 500: 'Internal Server Error'; 501: 'Not Implemented'; 502: 'Bad Gateway'; 503: 'Service Unavailable'; 504: 'Gateway Timeout'; 505: 'HTTP Version Not Supported'; 506: 'Variant Also Negotiates'; 507: 'Insufficient Storage'; 508: 'Loop Detected'; 509: 'Bandwidth Limit Exceeded'; 510: 'Not Extended'; 511: 'Network Authentication Required'; }; type TypedResponse$1 = Record, TStatusCode extends StatusCode$1 = StatusCode$1> = Omit & Omit, 'formData'> & { /** * The status read-only property of the Response interface contains the HTTP status codes of the response. * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/status * * You can use `Response.ok` to check if the status is in the range 200-299. */ status: TStatusCode; /** * The statusText read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status. * For example, this would be OK for a status code 200, Continue for 100, Not Found for 404. * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/statusText */ statusText: TStatusCode extends keyof StatusTextMap$1 ? StatusTextMap$1[TStatusCode] : string; } & { /** * The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not. */ ok: TStatusCode extends OkStatusCode$1 ? true : false; }; type JSONofResponse = TResponse extends TypedResponse$1 ? TJSON : never; interface TypedFormData$1 = Record> { append(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void; delete(name: keyof TMap): void; get(name: TName): TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName]; getAll(name: TName): TMap[TName] extends any[] ? TMap[TName] : TMap[TName][]; has(name: TName): TName extends keyof TMap ? (TMap[TName] extends Maybe$1 ? boolean : true) : false; set(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void; forEach(callbackfn: (value: TMap[TName], key: TName, parent: this) => void, thisArg?: any): void; entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; } //#endregion //#region node_modules/fets/typings/client/clientResponse.d.cts type ClientTypedResponsePromise = Promise & { json(): Promise : any>; }; //#endregion //#region node_modules/fets/typings/typed-fetch.d.cts type OkStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226; type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451; type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511; type StatusCode = OkStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode; type TypedBody, THeaders extends Record> = Omit & { /** * The `json()` method takes the stream and reads it to completion. * It returns a promise which resolves with the result of parsing the body text as JSON. * * Note that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object. * * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/json */ json(): Promise; /** * The formData() method takes the stream and reads it to completion. It returns a promise that resolves with a `FormData` object. * * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/formData */ formData(): Promise>; /** * The headers read-only property of the Response interface contains the Headers object associated with the response. * * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/headers */ headers: TypedHeaders; }; type DefaultHTTPHeaders = 'accept' | 'accept-language' | 'content-language' | 'content-type' | 'content-length'; type Maybe = undefined | null; type UndefinedToNull = T extends undefined ? Exclude | null : T; interface TypedHeaders> { append(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void; delete(name: TName): void; get(name: TName): TName extends keyof TMap ? UndefinedToNull : TName extends DefaultHTTPHeaders ? string | null : never; has(name: TName): TName extends DefaultHTTPHeaders ? boolean : TName extends keyof TMap ? TMap[TName] extends Maybe ? boolean : true : never; set(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void; forEach(callbackfn: (value: TMap[TName], key: TName, parent: TypedHeaders) => void, thisArg?: any): void; entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; getSetCookie(): string[]; } type StatusTextMap = { 100: 'Continue'; 101: 'Switching Protocols'; 102: 'Processing'; 103: 'Early Hints'; 200: 'OK'; 201: 'Created'; 202: 'Accepted'; 203: 'Non-Authoritative Information'; 204: 'No Content'; 205: 'Reset Content'; 206: 'Partial Content'; 207: 'Multi-Status'; 208: 'Already Reported'; 226: 'IM Used'; 300: 'Multiple Choices'; 301: 'Moved Permanently'; 302: 'Found'; 303: 'See Other'; 304: 'Not Modified'; 305: 'Use Proxy'; 307: 'Temporary Redirect'; 308: 'Permanent Redirect'; 400: 'Bad Request'; 401: 'Unauthorized'; 402: 'Payment Required'; 403: 'Forbidden'; 404: 'Not Found'; 405: 'Method Not Allowed'; 406: 'Not Acceptable'; 407: 'Proxy Authentication Required'; 408: 'Request Timeout'; 409: 'Conflict'; 410: 'Gone'; 411: 'Length Required'; 412: 'Precondition Failed'; 413: 'Payload Too Large'; 414: 'URI Too Long'; 415: 'Unsupported Media Type'; 416: 'Range Not Satisfiable'; 417: 'Expectation Failed'; 418: "I'm a Teapot"; 421: 'Misdirected Request'; 422: 'Unprocessable Entity'; 423: 'Locked'; 424: 'Failed Dependency'; 425: 'Too Early'; 426: 'Upgrade Required'; 428: 'Precondition Required'; 429: 'Too Many Requests'; 431: 'Request Header Fields Too Large'; 451: 'Unavailable For Legal Reasons'; 500: 'Internal Server Error'; 501: 'Not Implemented'; 502: 'Bad Gateway'; 503: 'Service Unavailable'; 504: 'Gateway Timeout'; 505: 'HTTP Version Not Supported'; 506: 'Variant Also Negotiates'; 507: 'Insufficient Storage'; 508: 'Loop Detected'; 509: 'Bandwidth Limit Exceeded'; 510: 'Not Extended'; 511: 'Network Authentication Required'; }; type TypedResponse = Record, TStatusCode extends StatusCode = StatusCode> = Omit & Omit, 'formData'> & { /** * The status read-only property of the Response interface contains the HTTP status codes of the response. * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/status * * You can use `Response.ok` to check if the status is in the range 200-299. */ status: TStatusCode; /** * The statusText read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status. * For example, this would be OK for a status code 200, Continue for 100, Not Found for 404. * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/statusText */ statusText: TStatusCode extends keyof StatusTextMap ? StatusTextMap[TStatusCode] : string; } & { /** * The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not. */ ok: TStatusCode extends OkStatusCode ? true : false; }; type TypedResponseWithJSONStatusMap> = { [TStatusCode in keyof TResponseJSONStatusMap]: TStatusCode extends StatusCode ? TypedResponse, TStatusCode> : never }[keyof TResponseJSONStatusMap]; type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE'; type TypedRequest = Record, THeaders extends Record = Record, TMethod extends HTTPMethod = HTTPMethod, TQueryParams = any, TPathParams extends Record = Record> = Omit & TypedBody & { parsedUrl: URL; method: TMethod; params: TPathParams; query: TQueryParams; }; interface TypedFormData = Record> { append(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void; delete(name: keyof TMap): void; get(name: TName): TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName]; getAll(name: TName): TMap[TName] extends any[] ? TMap[TName] : TMap[TName][]; has(name: TName): TName extends keyof TMap ? (TMap[TName] extends Maybe ? boolean : true) : false; set(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void; forEach(callbackfn: (value: TMap[TName], key: TName, parent: this) => void, thisArg?: any): void; entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>; } //#endregion //#region node_modules/fets/typings/client/types.d.cts type ClientRequestInit = Omit; //#endregion //#region node_modules/fets/typings/types.d.cts type Simplify = { [KeyType in keyof T]: Simplify } & {}; type JSONSchema = Exclude; interface OpenAPIInfo { title?: string; description?: string; version?: string; license?: { name?: string; url?: string; }; termsOfService?: string; contact?: { name?: string; url?: string; email?: string; }; } type OpenAPIPathObject = Record & { parameters?: OpenAPIParameterObject[]; }; interface OpenAPIParameterObject { name: string; in: 'path' | 'query' | 'header' | 'cookie'; required?: boolean; schema?: any; } interface OpenAPIRequestBodyObject { content?: Record; } interface OpenAPIOperationObject { operationId?: string; description?: string; tags?: string[]; parameters?: OpenAPIParameterObject[]; requestBody?: OpenAPIRequestBodyObject; responses?: Record; security?: any[]; } interface OpenAPIResponseObject { description?: string; content?: Record; } interface OpenAPIMediaTypeObject { schema?: any; } type OpenAPIDocument = { openapi?: string; info?: OpenAPIInfo; servers?: { url: string; }[] | string[]; paths?: Record; components?: unknown; }; type RouterComponentsBase = { schemas?: Record; securitySchemes?: Record; }; type BasicAuthSecurityScheme = { type: 'http'; scheme: 'basic'; }; type BearerAuthSecurityScheme = { type: 'http'; scheme: 'bearer'; }; type ApiKeySecurityScheme = { type: 'apiKey'; name: string; in: 'header' | 'query' | 'cookie'; }; type SecurityScheme = BasicAuthSecurityScheme | BearerAuthSecurityScheme | ApiKeySecurityScheme; type Circular = TJSONSchema extends { properties: { [key: string]: JSONSchema; }; } ? TJSONSchema extends PropertyValue> ? true : [Extract>, { $id: string; }>] extends [never] ? [ArrayItemValue>>] extends [never] ? Circular>> : ArrayItemValue>> extends TJSONSchema ? true : Circular>> : true : false; type Property = keyof TJSONSchema['properties']; type PropertyValue = TJSONSchema['properties'][TProperty]; type ArrayItemValue = TJSONSchema extends { items: infer TItems extends JSONSchema; } ? TItems : never; type FromSchema = T extends { static: infer U; } ? U : T extends JSONSchema ? FromSchema$1 extends false ? [{ pattern: { type: 'string'; format: 'binary'; }; output: File; }, { pattern: { type: 'number'; format: 'int64'; }; output: bigint | number; }, { pattern: { type: 'integer'; format: 'int64'; }; output: bigint | number; }] : false; }> : never; type PromiseOrValue = T | Promise; type StatusCodeMap = { [TKey in StatusCode]?: T }; interface RouterBaseObject> { openAPIDocument: OpenAPIDocument; handle: ServerAdapterRequestHandler; route, TTypedResponse extends TypedResponseFromRouteSchemas>(opts: RouteWithSchemasOpts): Router>; route, Record, TMethod, any, Record, string>>, TTypedResponse extends TypedResponse>(opts: RouteWithTypesOpts): Router>; use>(subRouter: Router): Router; use>(prefix: TPrefix, subRouter: Router): Router; __client: TRouterSDK; __onRouterInitHooks: OnRouterInitHook[]; __routes: RouteWithSchemasOpts[]; __base: string; } type Router> = ServerAdapter>; type RouteHandler = ( /** * The request object represents the incoming HTTP request. * This object implements [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) interface. */ request: TTypedRequest, context: TServerContext) => PromiseOrValue; type OnRouterInitHook = (router: Router) => void; type ObjectSchemaWithPrimitiveProperties = JSONSchema & { type: 'object'; properties: Record; }; type ObjectSchema = JSONSchema & { type: 'object'; }; type RouteSchemas = { request?: { headers?: ObjectSchemaWithPrimitiveProperties; params?: ObjectSchemaWithPrimitiveProperties; query?: ObjectSchema; json?: JSONSchema; formData?: ObjectSchema; }; responses?: StatusCodeMap; }; type RouterSDKOpts = TTypedRequest extends TypedRequest ? Simplify<(Partial extends TJSONBody ? { json?: TJSONBody; } : { json: TJSONBody; }) & (Partial extends THeaders ? { headers?: THeaders; } : { headers: THeaders; }) & (Partial extends TQueryParams ? { query?: TQueryParams; } : { query: TQueryParams; }) & (Partial extends TPathParam ? { params?: TPathParam; } : { params: TPathParam; })> & (Partial extends TFormData ? { formData?: TFormData; } : { formData: TFormData; }) : never; type RouterSDK = { [TPathKey in TPath]: { [TMethod in Lowercase]: Partial> extends RouterSDKOpts ? (opts?: RouterSDKOpts & ClientRequestInit) => ClientTypedResponsePromise> : (opts: RouterSDKOpts & ClientRequestInit) => ClientTypedResponsePromise> } }; type FromSchemaWithComponents = TComponents extends { schemas: Record; } ? FromSchema<{ components: TComponents; } & TSchema> : FromSchema; type TypedRequestFromRouteSchemas = TRouteSchemas extends { request: Required['request']; } ? TypedRequest : {}, TRouteSchemas['request'] extends { formData: JSONSchema; } ? FromSchemaWithComponents extends Record ? FromSchemaWithComponents : never : {}, TRouteSchemas['request'] extends { headers: JSONSchema; } ? FromSchemaWithComponents extends Record ? FromSchemaWithComponents : never : {}, TMethod, TRouteSchemas['request'] extends { query: JSONSchema; } ? FromSchemaWithComponents : {}, TRouteSchemas['request'] extends { params: JSONSchema; } ? FromSchemaWithComponents extends Record ? FromSchemaWithComponents : never : Record, string>> : TypedRequest>, Partial>, TMethod, any, Record, string>>; type TypedResponseFromRouteSchemas = TRouteSchemas extends { responses: StatusCodeMap; } ? TypedResponseWithJSONStatusMap<{ [TStatusCode in keyof TRouteSchemas['responses']]: TRouteSchemas['responses'][TStatusCode] extends JSONSchema ? FromSchemaWithComponents : never }> : TypedResponse; type RouteWithSchemasOpts, TTypedResponse extends TypedResponseFromRouteSchemas> = { schemas: TRouteSchemas; security?: SecuritySchemeRefsFromComponents[]; } & RouteWithTypesOpts; type SecuritySchemeRefsFromComponents = TComponents extends { securitySchemes: Record; } ? Record : never; type RouteWithTypesOpts, Record, TMethod, any, Record, string>>, TTypedResponse extends TypedResponse> = { operationId?: string; description?: string; method?: TMethod; tags?: string[]; internal?: boolean; path: TPath; handler: RouteHandler; }; type ExtractPathParamsWithPattern = Pipe, Tuples.Filter>, Tuples.Map>, Tuples.ToUnion]>; //#endregion //#region lib/types/rumbleInput.d.ts type CustomRumblePothosConfig = Omit[0], "smartSubscriptions" | "drizzle">; type RumbleInput, DB extends DrizzleInstance, RequestEvent extends Record, Action extends string, PothosConfig extends CustomRumblePothosConfig, Schema extends Record = Record> = { /** * Your drizzle database instance */ db: DB; /** * The drizzle schema object (the same one passed to `defineRelations`). */ schema: Schema; /** * A function for providing context for each request based on the incoming HTTP Request. * The type of the parameter equals the HTTPRequest type of your chosen server. */ context?: ((event: RequestEvent) => Promise | UserContext) | undefined; /** * If you only want to disable query, mutation or subscription default objects, you can do so here */ disableDefaultObjects?: { mutation?: boolean; subscription?: boolean; query?: boolean; }; /** * The actions that are available */ actions?: Action[]; /** * Customization for subscriptions. See https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#distributed-pubsub-for-production */ subscriptions?: Parameters; /** * Options passed along to the pothos schema builder. */ pothosConfig?: PothosConfig; /** * Limits the returned amount when querying lists. Set to null to disable. * @default 100 */ defaultLimit?: number | undefined | null; /** * rumble supports fuzzy search for the query helpers. This enables the users of your API to search for entities via fuzzy search inputs. * This currently only is supported by postgres databases and will fail if enabled on other dialects. * * Please note that this will install the pg_trgm extension on startup if your database does not have it already installed. * https://www.postgresql.org/docs/current/pgtrgm.html */ search?: { /** * Whether search is enabled */ enabled?: boolean; /** * The cuttoff factor to reduce the amount of returned results. * Defaults to 0.3. Lower values will return more results. */ threshold?: number; /** * Will perform a local * SET cpu_operator_cost = x; * for search queries. This can help to make the planner * use a potential index scan instead of a sequential scan. * This will not affect queries that are not using the search feature. */ cpu_operator_cost?: number; } | undefined; /** * rumble can set up otel tracing if you want to. This will provide details of execution time and outcome to the provided tracer. See https://pothos-graphql.dev/docs/plugins/tracing#install for more information. */ otel?: { /** * Whether otel tracing should be enabled. This will create a tracer if none is provided. */ enabled?: boolean; /** * The tracer to use. If enabled is true and no tracer is provided, a tracer will be created. */ tracer?: Tracer; /** * You can pass options to the tracing wrapper */ options?: TracingWrapperOptions; }; }; //#endregion //#region lib/rumble.d.ts declare const rumble: , DB extends DrizzleInstance, RequestEvent extends Record, PothosConfig extends CustomRumblePothosConfig, Schema extends Record, Action extends string = "read" | "update" | "delete">(rumbleInput: RumbleInput & { schema: Schema; }) => { /** * The ability builder. Use it to declare whats allowed for each entity in your DB. * * @example * * ```ts * // users can edit themselves abilityBuilder.users .allow(["read", "update", "delete"]) .when(({ userId }) => ({ where: eq(schema.users.id, userId) })); // everyone can read posts abilityBuilder.posts.allow("read"); * * ``` */ abilityBuilder: (keyof DrizzleQueryFunction extends infer T extends keyof DrizzleQueryFunction ? { [key in T]: { allow: (action: Action | Action[]) => { when: (queryFilter: DrizzleQueryFunctionInput | ((context: UserContext) => DrizzleQueryFunctionInput | "allow" | undefined)) => void; }; filter: (action: Action | Action[]) => { prefetch: (prefetch: Prefetch) => { by: (explicitFilter: Filter, PrefetchReturnType>) => void; }; by: (explicitFilter: Filter>) => void; }; _: { runtimeFilters: Map[]>; queryFilters: Map | ((context: UserContext) => DrizzleQueryFunctionInput | "allow" | undefined))[]>; }; } } : never) & { _: { registeredFilters({ action, table }: { table: keyof DrizzleQueryFunction; action: Action; }): Filter>>[]; build(): (ctx: UserContext) => keyof DrizzleQueryFunction extends infer T_1 extends keyof DrizzleQueryFunction ? { [key_1 in T_1]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }; }; /** * The pothos schema builder. See https://pothos-graphql.dev/docs/plugins/drizzle */ schemaBuilder: PothosSchemaTypes.SchemaBuilder extends infer T_1 extends keyof DrizzleQueryFunction ? { [key_1 in T_1]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }>; DrizzleRelations: DB["_"]["relations"]; Scalars: { JSON: { Input: unknown; Output: unknown; }; Date: { Input: Date; Output: Date; }; DateTime: { Input: Date; Output: Date; }; }; Inputs: { IntWhereInputArgument: NumberWhereInputArgument; FloatWhereInputArgument: NumberWhereInputArgument; StringWhereInputArgument: StringWhereInputArgument; DateWhereInputArgument: DateWhereInputArgument; }; DefaultFieldNullability: false; }>>; /** * Creates the native yoga instance. Can be used to run an actual HTTP server. * * @example * * ```ts * import { createServer } from "node:http"; * const server = createServer(createYoga()); * server.listen(3000, () => { * console.info("Visit http://localhost:3000/graphql"); * }); * ``` * https://the-guild.dev/graphql/yoga-server/docs#server */ createYoga: (args?: (Omit, "schema" | "context"> & { /** * Determines if the API should disclose various things about its structure. * Defaults to `process.env.NODE_ENV === "development"`. * If enabled, the api will allow introspection requests, provide the graphiql * explorer and will not apply the additional envelop armor plugin. */ enableApiDocs?: boolean; /** * Optional configuration passed to the auto-installed graphql-armor * EnvelopArmorPlugin. Only applied when `enableApiDocs` is false * (i.e. in production). Useful for relaxing the default depth/alias/ * directive/token limits when the generated schema legitimately exceeds * them. See https://github.com/Escape-Technologies/graphql-armor for available options. * * @example * createYoga({ armorConfig: { maxDepth: { n: 20 } } }) */ armorConfig?: Parameters[0]; }) | undefined) => import("graphql-yoga").YogaServerInstance; /** * Creates a sofa instance to offer a REST API. * * ```ts * import express from "express"; * * const app = express(); * const sofa = createSofa(...); * * app.use("/api", useSofa({ schema })); * ``` * https://the-guild.dev/graphql/sofa-api/docs#usage */ createSofa: (args: Omit[0], "schema" | "context">) => Promise>; /** * Creates a WebSocket server handler for GraphQL subscriptions. * Pass the ws implementation function as the first argument and rumble will * inject the schema and context automatically. * * @example * * ```ts * // ws * import { useServer } from "graphql-ws/use/ws"; * import { WebSocketServer } from "ws"; * const wss = new WebSocketServer({ port: 4000 }); * const disposable = createWs(useServer, { ... }, wss); * * // bun * import { makeHandler } from "graphql-ws/use/bun"; * Bun.serve({ websocket: createWs(makeHandler, { ... }), ... }); * ``` */ createWs: , Rest extends unknown[], Return>(implementation: (options: Options, ...rest: Rest) => Return, args: Omit, ...rest: Rest) => Return; /** * A function for creating default objects for your schema */ object: , RefName extends string>({ table, refName, readAction, adjust }: { table: TableName; refName?: RefName | undefined; readAction?: Action | undefined; adjust?: ((t: import("@pothos/plugin-drizzle").DrizzleObjectFieldBuilder extends infer T_2 extends keyof DrizzleQueryFunction ? { [key_1 in T_2]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }>; DrizzleRelations: DB["_"]["relations"]; Scalars: { JSON: { Input: unknown; Output: unknown; }; Date: { Input: Date; Output: Date; }; DateTime: { Input: Date; Output: Date; }; }; Inputs: { IntWhereInputArgument: NumberWhereInputArgument; FloatWhereInputArgument: NumberWhereInputArgument; StringWhereInputArgument: StringWhereInputArgument; DateWhereInputArgument: DateWhereInputArgument; }; DefaultFieldNullability: false; }>, (DB["_"]["relations"] & {})[TableName], DrizzleTableValueType, { [Key in keyof Extract<(DB["_"]["relations"] & {})[TableName]["table"], { _: { brand: "Table"; }; }>["_"]["columns"] & string]: Extract<(DB["_"]["relations"] & {})[TableName]["table"], { _: { brand: "Table"; }; }>["_"]["columns"][Key]["_"]["notNull"] extends true ? Extract<(DB["_"]["relations"] & {})[TableName]["table"], { _: { brand: "Table"; }; }>["_"]["columns"][Key]["_"]["data"] : Extract<(DB["_"]["relations"] & {})[TableName]["table"], { _: { brand: "Table"; }; }>["_"]["columns"][Key]["_"]["data"] | null } extends infer T_3 ? { [K in keyof T_3]: T_3[K] } : never>) => import("@pothos/core").FieldMap) | undefined; }) => import("@pothos/plugin-drizzle").DrizzleObjectRef extends infer T_2 extends keyof DrizzleQueryFunction ? { [key_1 in T_2]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }>; DrizzleRelations: DB["_"]["relations"]; Scalars: { JSON: { Input: unknown; Output: unknown; }; Date: { Input: Date; Output: Date; }; DateTime: { Input: Date; Output: Date; }; }; Inputs: { IntWhereInputArgument: NumberWhereInputArgument; FloatWhereInputArgument: NumberWhereInputArgument; StringWhereInputArgument: StringWhereInputArgument; DateWhereInputArgument: DateWhereInputArgument; }; DefaultFieldNullability: false; }>, TableName, import("drizzle-orm").BuildQueryResult ? true : (true | import("drizzle-orm").DBQueryConfig<"one", DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})[TableName]>) & { columns: {}; }, import("drizzle-orm").Assume<(DB["_"]["relations"] & {})[TableName]["table"], { $inferSelect: Record; }>["$inferSelect"]>>; /** * A function for creating where args to filter entities */ whereArg: , RefName_1 extends string>({ table, refName, dbName }: Partial<{ table: TableName; refName: RefName_1 | undefined; dbName: string; }> & ({ dbName: string; } | { table: TableName; })) => PothosSchemaTypes.InputObjectRef extends infer T_2 extends keyof DrizzleQueryFunction ? { [key_1 in T_2]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }>; DrizzleRelations: DB["_"]["relations"]; Scalars: { JSON: { Input: unknown; Output: unknown; }; Date: { Input: Date; Output: Date; }; DateTime: { Input: Date; Output: Date; }; }; Inputs: { IntWhereInputArgument: NumberWhereInputArgument; FloatWhereInputArgument: NumberWhereInputArgument; StringWhereInputArgument: StringWhereInputArgument; DateWhereInputArgument: DateWhereInputArgument; }; DefaultFieldNullability: false; }>, { [x: string]: unknown; }>; /** * A function for creating order args to sort entities */ orderArg: >({ table, refName, dbName }: Partial<{ table: TableName; refName: RefName_2 | undefined; dbName: string; }> & ({ dbName: string; } | { table: TableName; })) => PothosSchemaTypes.InputObjectRef extends infer T_2 extends keyof DrizzleQueryFunction ? { [key_1 in T_2]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }>; DrizzleRelations: DB["_"]["relations"]; Scalars: { JSON: { Input: unknown; Output: unknown; }; Date: { Input: Date; Output: Date; }; DateTime: { Input: Date; Output: Date; }; }; Inputs: { IntWhereInputArgument: NumberWhereInputArgument; FloatWhereInputArgument: NumberWhereInputArgument; StringWhereInputArgument: StringWhereInputArgument; DateWhereInputArgument: DateWhereInputArgument; }; DefaultFieldNullability: false; }>, { [x: string]: unknown; }>; /** * A function for creating default READ queries. * Make sure the objects for the table you are creating the queries for are implemented */ query: >({ table, readAction, listAction }: { table: TableName_1; readAction?: Action | undefined; listAction?: Action | undefined; }) => void; /** * A function for creating a pubsub instance for a table. Use this to publish or subscribe events */ pubsub: >({ table }: { table: TableName_1; }) => { registerOnInstance({ instance, action, primaryKeyValue }: { instance: { register: (id: string) => void; }; action: "created" | "removed" | "updated"; primaryKeyValue?: string; }): void; created(): void; removed(): void; updated(primaryKeyValue?: any | any[]): void; }; /** * A function to implement enums for graphql usage. * The other helpers use this helper internally so in most cases you do not have to * call this helper directly, unless you need the reference to an enum type */ enum_: | import("drizzle-orm/pg-core").PgEnumObject ? K : never]: Schema[K] } = never, EnumArg extends import("drizzle-orm/pg-core").PgEnum | import("drizzle-orm/pg-core").PgEnumObject = never, EnumColumn extends import("drizzle-orm").Column = never, RefName_2 extends string = string>(args: { refName?: RefName_2 | undefined; } & ({ tsName: TsName; enum?: never; enumColumn?: never; } | { enum: EnumArg; tsName?: never; enumColumn?: never; } | { enumColumn: EnumColumn; tsName?: never; enum?: never; })) => PothosSchemaTypes.EnumRef extends infer T_2 extends keyof DrizzleQueryFunction ? { [key_1 in T_2]: { filter: (action: Action) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; } & { merge: (p: NonNullable>) => { query: { single: Pick[0]>>, "where">; many: Pick[0]>>, "where" | "limit">; }; sql: { readonly where: import("drizzle-orm").SQL | undefined; }; }; }; } } : never; }>; DrizzleRelations: DB["_"]["relations"]; Scalars: { JSON: { Input: unknown; Output: unknown; }; Date: { Input: Date; Output: Date; }; DateTime: { Input: Date; Output: Date; }; }; Inputs: { IntWhereInputArgument: NumberWhereInputArgument; FloatWhereInputArgument: NumberWhereInputArgument; StringWhereInputArgument: StringWhereInputArgument; DateWhereInputArgument: DateWhereInputArgument; }; DefaultFieldNullability: false; }>, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer T_3 ? T_3 extends Schema[TsName] ? T_3 extends import("drizzle-orm/pg-core").PgEnum ? V : T_3 extends import("drizzle-orm/pg-core").PgEnumObject ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends { enumValues: infer CV extends readonly [string, ...string[]]; } ? CV[number] : string, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer T_4 ? T_4 extends Schema[TsName] ? T_4 extends import("drizzle-orm/pg-core").PgEnum ? V : T_4 extends import("drizzle-orm/pg-core").PgEnumObject ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends { enumValues: infer CV extends readonly [string, ...string[]]; } ? CV[number] : string>; /** * Create a client to consume a rumble graphql api at the specified location. * Requires GraphQL, does not work with the SOFA REST API. */ clientCreator: ({ apiUrl, outputPath, rumbleImportPath, useExternalUrqlClient, removeExisting, forceReactivity, autoIncludeIdField }: { outputPath: string; apiUrl?: string; rumbleImportPath?: string; useExternalUrqlClient?: string; removeExisting?: boolean; forceReactivity?: boolean; autoIncludeIdField?: boolean | string; }) => Promise; /** * A function for creating count queries for your tables */ countQuery: >({ table, listAction, isAllowed }: { table: TableName_1; listAction?: Action | undefined; isAllowed?: ((context: UserContext) => boolean | Promise) | undefined; }) => void; /** * The generated GraphQL schema. You can use this for example to create a GraphQL server with a different library than Yoga or to generate types with codegen. * When calling this function, the schema will be built for the first time and cached for later usage. So you can call this function multiple times without performance issues. * After calling, you cannot adjust the schema via the schema builder */ buildSchema: () => import("graphql").GraphQLSchema; }; //#endregion //#region lib/types/rumbleError.d.ts /** * An error that gets raised by rumble whenever something does not go according to plan. * Mostly internals, configuration errors or other unexpected things. */ declare class RumbleError extends Error { constructor(message: string); } /** * An error that gets raised by rumble whenever an error occurs in a resolver, containing * information safely exposeable to the user. * E.g. the assert helpers issue these. */ declare class RumbleErrorSafe extends GraphQLError {} //#endregion export { RumbleError, RumbleErrorSafe, assertFindFirstExists, assertFirstEntryExists, mapNullFieldsToUndefined, rumble }; //# sourceMappingURL=index.d.cts.map