{"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: src/helper/css/index.ts\n\nMODULE CONTEXT:\nimport { raw } from '../../helper/html'\nimport { DOM_RENDERER } from '../../jsx/constants'\nimport { createCssJsxDomObjects } from '../../jsx/dom/css'\nimport { escapeToBuffer } from '../../utils/html'\nimport type { HtmlEscapedCallback, HtmlEscapedString } from '../../utils/html'\nimport type {\n ClassNameSlug,\n CssClassName as CssClassNameCommon,\n CssVariableType,\n OnInvalidSlug,\n} from './common'\nimport {\n CLASS_NAME,\n DEFAULT_STYLE_ID,\n PSEUDO_GLOBAL_SELECTOR,\n SELECTOR,\n SELECTORS,\n STYLE_STRING,\n cssCommon,\n cxCommon,\n keyframesCommon,\n viewTransitionCommon,\n} from './common'\ntype CssClassName = HtmlEscapedString & CssClassNameCommon\ntype usedClassNameData = [\n Record, // class name to add\n Record, // class name already added\n]\ninterface CssType {\n (strings: TemplateStringsArray, ...values: CssVariableType[]): Promise\n}\ninterface CxType {\n (\n ...args: (CssClassName | Promise | string | boolean | null | undefined)[]\n ): Promise\n}\ninterface KeyframesType {\n (strings: TemplateStringsArray, ...values: CssVariableType[]): CssClassNameCommon\n}\ninterface ViewTransitionType {\n (strings: TemplateStringsArray, ...values: CssVariableType[]): Promise\n (content: Promise): Promise\n (): Promise\n}\ninterface StyleType {\n (args?: { children?: Promise; nonce?: string }): HtmlEscapedString\n}\ninterface DefaultContextType {\n css: CssType\n cx: CxType\n keyframes: KeyframesType\n viewTransition: ViewTransitionType\n Style: StyleType\n}\n\nTASK SPECIFICATION:\nImplement the TypeScript arrow_function satisfying this exact contract:\n```typescript\nconst appendStyle: HtmlEscapedCallback = ({ buffer, context }): Promise | undefined =>\n```"},{"role":"assistant","content":"```typescript\nconst appendStyle: HtmlEscapedCallback = ({ buffer, context }): Promise | undefined => {\n const [toAdd, added] = contextMap.get(context) as usedClassNameData\n const names = Object.keys(toAdd)\n\n if (!names.length) {\n return\n }\n\n let stylesStr = ''\n names.forEach((className) => {\n added[className] = true\n stylesStr += className.startsWith(PSEUDO_GLOBAL_SELECTOR)\n ? toAdd[className]\n : `${className[0] === '@' ? '' : '.'}${className}{${toAdd[className]}}`\n })\n contextMap.set(context, [{}, added])\n\n if (buffer && replaceStyleRe.test(buffer[0])) {\n buffer[0] = buffer[0].replace(replaceStyleRe, (_, pre, post) => `${pre}${stylesStr}${post}`)\n return\n }\n\n const nonce = nonceMap.get(context)\n const appendStyleScript = `document.querySelector('#${id}').textContent+=${JSON.stringify(stylesStr)}`\n\n if (buffer) {\n buffer[0] = `${appendStyleScript}${buffer[0]}`\n return\n }\n\n return Promise.resolve(appendStyleScript)\n }\n```"}],"metadata":{"repo":"hono","file":"src/helper/css/index.ts","function":"appendStyle","type":"arrow_function","line_count":34}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: apps/nextjs-app/src/components/ui/dropdown/dropdown.stories.tsx\n\nMODULE CONTEXT:\nimport type { Meta } from '@storybook/react';\nimport React from 'react';\nimport { Button } from '@/components/ui/button';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n DropdownMenuRadioGroup,\n} from './dropdown';\n\nTASK SPECIFICATION:\nImplement the TypeScript arrow_function satisfying this exact contract:\n```typescript\nexport const WithCheckboxItems = () =>\n```"},{"role":"assistant","content":"```typescript\nexport const WithCheckboxItems = () => {\n const [checked, setChecked] = React.useState(true);\n const [checked2, setChecked2] = React.useState(false);\n\n return (\n \n \n \n \n \n \n Option One\n \n \n Option Two\n \n \n \n );\n};\n```"}],"metadata":{"repo":"bulletproof-react","file":"apps/nextjs-app/src/components/ui/dropdown/dropdown.stories.tsx","function":"WithCheckboxItems","type":"arrow_function","line_count":26}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/zod/src/v4/core/parse.ts\n\nMODULE CONTEXT:\nimport * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport type * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\nexport type $ZodErrorClass = { new (issues: errors.$ZodIssue[]): errors.$ZodError };\ntype $ParseParams = { callee?: util.AnyFunc; Err?: $ZodErrorClass | undefined };\nexport type $Parse = (\n schema: T,\n value: unknown,\n _ctx?: schemas.ParseContext,\n _params?: $ParseParams\n) => core.output;\nexport type $ParseAsync = (\n schema: T,\n value: unknown,\n _ctx?: schemas.ParseContext,\n _params?: $ParseParams\n) => Promise>;\nexport type $SafeParse = (\n schema: T,\n value: unknown,\n _ctx?: schemas.ParseContext\n) => util.SafeParseResult>;\nexport type $SafeParseAsync = (\n schema: T,\n value: unknown,\n _ctx?: schemas.ParseContext\n) => Promise>>;\ninterface CompiledBag {\n validator?: ((input: unknown) => unknown) & { definite?: boolean | undefined };\n fallbackRun?: (payload: schemas.ParsePayload, ctx: schemas.ParseContextInternal) => unknown;\n}\nexport type $Validate = (\n schema: T,\n value: unknown,\n _ctx?: schemas.ParseContext\n) => value is core.input;\nexport type $ValidateAsync = (\n schema: T,\n value: unknown,\n _ctx?: schemas.ParseContext\n) => Promise;\nexport type $Encode = (\n schema: T,\n value: core.output,\n _ctx?: schemas.ParseContext,\n _params?: $ParseParams\n) => core.input;\nexport type $Decode = (\n schema: T,\n value: core.input,\n _ctx?: schemas.ParseContext,\n _params?: $ParseParams\n) => core.output;\nexport type $EncodeAsync = (\n schema: T,\n value: core.output,\n _ctx?: schemas.ParseContext,\n _params?: $ParseParams\n) => Promise>;\nexport type $DecodeAsync = (\n schema: T,\n value: core.input,\n _ctx?: schemas.ParseContext,\n _params?: $ParseParams\n) => Promise>;\nexport type $SafeEncode = (\n schema: T,\n value: core.output,\n _ctx?: schemas.ParseContext\n) => util.SafeParseResult>;\nexport type $SafeDecode = (\n schema: T,\n value: core.input,\n _ctx?: schemas.ParseContext\n) => util.SafeParseResult>;\nexport type $SafeEncodeAsync = (\n schema: T,\n value: core.output,\n _ctx?: schemas.ParseContext\n) => Promise>>;\nexport type $SafeDecodeAsync = (\n schema: T,\n value: core.input,\n _ctx?: schemas.ParseContext\n) => Promise>>;\n\nTASK SPECIFICATION:\nImplement the TypeScript arrow_function satisfying this exact contract:\n```typescript\nconst fn: $DecodeAsync = async (schema, value, _ctx, _params) =>\n```"},{"role":"assistant","content":"```typescript\nconst fn: $DecodeAsync = async (schema, value, _ctx, _params) => {\n return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));\n };\n```"}],"metadata":{"repo":"zod","file":"packages/zod/src/v4/core/parse.ts","function":"fn","type":"arrow_function","line_count":3}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/zod/src/v4/core/api.ts\n\nMODULE CONTEXT:\nimport * as checks from \"./checks.js\";\nimport type * as core from \"./core.js\";\nimport type * as errors from \"./errors.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\nexport type Params<\n T extends schemas.$ZodType | checks.$ZodCheck,\n IssueTypes extends errors.$ZodIssueBase,\n OmitKeys extends keyof T[\"_zod\"][\"def\"] = never,\n> = util.Flatten<\n Partial<\n util.EmptyToNever<\n Omit &\n ([IssueTypes] extends [never]\n ? {} // unknown\n : {\n error?: string | errors.$ZodErrorMap | undefined;\n /** @deprecated This parameter is deprecated. Use `error` instead. */\n message?: string | undefined; // supported in Zod 3\n })\n >\n >\n>;\nexport type TypeParams<\n T extends schemas.$ZodType = schemas.$ZodType & { _isst: never },\n AlsoOmit extends Exclude = never,\n> = Params, \"type\" | \"checks\" | \"error\" | AlsoOmit>;\nexport type CheckParams<\n T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },\n AlsoOmit extends Exclude = never,\n> = Params, \"check\" | \"error\" | AlsoOmit>;\nexport type StringFormatParams<\n T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat,\n AlsoOmit extends Exclude = never,\n> = Params<\n T,\n NonNullable,\n \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\" | AlsoOmit\n>;\nexport type CheckStringFormatParams<\n T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat,\n AlsoOmit extends Exclude = never,\n> = Params, \"type\" | \"coerce\" | \"checks\" | \"error\" | \"check\" | \"format\" | AlsoOmit>;\nexport type CheckTypeParams<\n T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck,\n AlsoOmit extends Exclude = never,\n> = Params, \"type\" | \"checks\" | \"error\" | \"check\" | AlsoOmit>;\nexport type $ZodStringParams = TypeParams, \"coerce\"> & {\n checks?: readonly checks.$ZodCheck[];\n};\nexport type $ZodStringFormatParams = CheckTypeParams<\n schemas.$ZodStringFormat,\n \"format\" | \"coerce\" | \"when\" | \"pattern\"\n>;\nexport type $ZodCheckStringFormatParams = CheckParams;\nexport type $ZodEmailParams = StringFormatParams;\nexport type $ZodCheckEmailParams = CheckStringFormatParams;\nexport type $ZodGUIDParams = StringFormatParams;\nexport type $ZodCheckGUIDParams = CheckStringFormatParams;\nexport type $ZodUUIDParams = StringFormatParams;\nexport type $ZodCheckUUIDParams = CheckStringFormatParams;\nexport type $ZodUUIDv4Params = StringFormatParams;\nexport type $ZodCheckUUIDv4Params = CheckStringFormatParams;\nexport type $ZodUUIDv6Params = StringFormatParams;\nexport type $ZodCheckUUIDv6Params = CheckStringFormatParams;\nexport type $ZodUUIDv7Params = StringFormatParams;\nexport type $ZodCheckUUIDv7Params = CheckStringFormatParams;\nexport type $ZodURLParams = StringFormatParams;\nexport type $ZodCheckURLParams = CheckStringFormatParams;\nexport type $ZodEmojiParams = StringFormatParams;\nexport type $ZodCheckEmojiParams = CheckStringFormatParams;\nexport type $ZodNanoIDParams = StringFormatParams;\nexport type $ZodCheckNanoIDParams = CheckStringFormatParams;\nexport type $ZodCUIDParams = StringFormatParams;\nexport type $ZodCheckCUIDParams = CheckStringFormatParams;\nexport type $ZodCUID2Params = StringFormatParams;\nexport type $ZodCheckCUID2Params = CheckStringFormatParams;\nexport type $ZodULIDParams = StringFormatParams;\nexport type $ZodCheckULIDParams = CheckStringFormatParams;\nexport type $ZodXIDParams = StringFormatParams;\nexport type $ZodCheckXIDParams = CheckStringFormatParams;\nexport type $ZodKSUIDParams = StringFormatParams;\nexport type $ZodCheckKSUIDParams = CheckStringFormatParams;\nexport type $ZodIPv4Params = StringFormatParams;\nexport type $ZodCheckIPv4Params = CheckStringFormatParams;\nexport type $ZodIPv6Params = StringFormatParams;\nexport type $ZodCheckIPv6Params = CheckStringFormatParams;\nexport type $ZodMACParams = StringFormatParams;\nexport type $ZodCheckMACParams = CheckStringFormatParams;\nexport type $ZodCIDRv4Params = StringFormatParams;\nexport type $ZodCheckCIDRv4Params = CheckStringFormatParams;\nexport type $ZodCIDRv6Params = StringFormatParams;\nexport type $ZodCheckCIDRv6Params = CheckStringFormatParams;\nexport type $ZodBase64Params = StringFormatParams;\nexport type $ZodCheckBase64Params = CheckStringFormatParams;\nexport type $ZodBase64URLParams = StringFormatParams;\nexport type $ZodCheckBase64URLParams = CheckStringFormatParams;\nexport type $ZodE164Params = StringFormatParams;\nexport type $ZodCheckE164Params = CheckStringFormatParams;\nexport type $ZodCreditCardParams = StringFormatParams;\nexport type $ZodCheckCreditCardParams = CheckStringFormatParams;\nexport type $ZodIBANParams = StringFormatParams;\nexport type $ZodCheckIBANParams = CheckStringFormatParams;\nexport type $ZodJWTParams = StringFormatParams;\nexport type $ZodCheckJWTParams = CheckStringFormatParams;\nexport type $ZodISODateTimeParams = StringFormatParams;\nexport type $ZodCheckISODateTimeParams = CheckStringFormatParams;\nexport type $ZodISODateParams = StringFormatParams;\nexport type $ZodCheckISODateParams = CheckStringFormatParams;\nexport type $ZodISOTimeParams = StringFormatParams;\nexport type $ZodCheckISOTimeParams = CheckStringFormatParams;\nexport type $ZodISODurationParams = StringFormatParams;\nexport type $ZodCheckISODurationParams = CheckStringFormatParams;\nexport type $ZodNumberParams = TypeParams, \"coerce\"> & {\n checks?: readonly checks.$ZodCheck[];\n};\nexport type $ZodNumberFormatParams = CheckTypeParams;\nexport type $ZodCheckNumberFormatParams = CheckParams;\nexport type $ZodBooleanParams = TypeParams, \"coerce\">;\nexport type $ZodBigIntParams = TypeParams>;\nexport type $ZodBigIntFormatParams = CheckTypeParams;\nexport type $ZodCheckBigIntFormatParams = CheckParams;\nexport type $ZodSymbolParams = TypeParams;\nexport type $ZodUndefinedParams = TypeParams;\nexport type $ZodNullParams = TypeParams;\nexport type $ZodAnyParams = TypeParams;\nexport type $ZodUnknownParams = TypeParams;\nexport type $ZodNeverParams = TypeParams;\nexport type $ZodVoidParams = TypeParams;\nexport type $ZodDateParams = TypeParams;\nexport type $ZodNaNParams = TypeParams;\nexport type $ZodCheckLessThanParams = CheckParams;\nexport type $ZodCheckGreaterThanParams = CheckParams;\nexport type $ZodCheckMultipleOfParams = CheckParams;\nexport type $ZodCheckMaxSizeParams = CheckParams;\nexport type $ZodCheckMinSizeParams = CheckParams;\nexport type $ZodCheckSizeEqualsParams = CheckParams;\nexport type $ZodCheckMaxLengthParams = CheckParams;\nexport type $ZodCheckMinLengthParams = CheckParams;\nexport type $ZodCheckLengthEqualsParams = CheckParams;\nexport type $ZodCheckRegexParams = CheckParams;\nexport type $ZodCheckLowerCaseParams = CheckParams;\nexport type $ZodCheckUpperCaseParams = CheckParams;\nexport type $ZodCheckIncludesParams = CheckParams;\nexport type $ZodCheckStartsWithParams = CheckParams<\n checks.$ZodCheckStartsWith,\n \"prefix\" | \"format\" | \"when\" | \"pattern\"\n>;\nexport type $ZodCheckEndsWithParams = CheckParams;\nexport type $ZodCheckPropertyParams = CheckParams;\nexport type $ZodCheckPropertiesParams = CheckParams;\nexport type $ZodCheckMimeTypeParams = CheckParams;\nexport type $ZodArrayParams = TypeParams;\nexport type $ZodObjectParams = TypeParams;\nexport type $ZodUnionParams = TypeParams;\nexport type $ZodXorParams = TypeParams;\nexport interface $ZodTypeDiscriminableInternals<_Disc extends string = string> extends schemas._$ZodTypeInternals {\n propValues: util.PropValues;\n}\nexport interface $ZodTypeDiscriminable<_Disc extends string = string> extends schemas.SomeType {\n _zod: $ZodTypeDiscriminableInternals;\n}\nexport type $ZodDiscriminatedUnionParams = TypeParams;\nexport type $ZodIntersectionParams = TypeParams;\nexport type $ZodTupleParams = TypeParams;\nexport type $ZodRecordParams = TypeParams;\nexport type $ZodMapParams = TypeParams;\nexport type $ZodSetParams = TypeParams;\nexport type $ZodEnumParams = TypeParams;\nexport type $ZodLiteralParams = TypeParams;\nexport type $ZodFileParams = TypeParams;\nexport type $ZodTransformParams = TypeParams;\nexport type $ZodOptionalParams = TypeParams;\nexport type $ZodNullableParams = TypeParams;\nexport type $ZodDefaultParams = TypeParams;\nexport type $ZodNonOptionalParams = TypeParams;\nexport type $ZodSuccessParams = TypeParams;\nexport type $ZodCatchParams = TypeParams;\nexport type $ZodPipeParams = TypeParams;\nexport type $ZodReadonlyParams = TypeParams;\nexport type $ZodTemplateLiteralParams = TypeParams;\nexport type $ZodLazyParams = TypeParams;\nexport type $ZodPromiseParams = TypeParams;\nexport type $ZodCustomParams = CheckTypeParams;\nexport type $ZodSuperRefineIssue = T extends any\n ? RawIssue\n : never;\ntype RawIssue = T extends any\n ? util.Flatten<\n util.MakePartial & {\n /** The schema or check that originated this issue. */\n readonly inst?: schemas.$ZodType | checks.$ZodCheck;\n /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */\n readonly continue?: boolean | undefined;\n } & Record\n >\n : never;\nexport interface $RefinementCtx extends schemas.ParsePayload {\n addIssue(arg: string | $ZodSuperRefineIssue): void;\n}\nexport interface $ZodSuperRefineParams {\n /** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */\n when?: ((payload: schemas.ParsePayload) => boolean) | undefined;\n}\nexport interface $ZodStringBoolParams extends TypeParams {\n truthy?: string[];\n falsy?: string[];\n /**\n * Options: `\"sensitive\"`, `\"insensitive\"`\n *\n * @default `\"insensitive\"`\n */\n case?: \"sensitive\" | \"insensitive\" | undefined;\n}\n\nTASK SPECIFICATION:\nImplement the TypeScript function satisfying this exact contract:\n```typescript\nexport function _any(Class: util.SchemaClass): T\n```"},{"role":"assistant","content":"```typescript\nexport function _any(Class: util.SchemaClass): T {\n return new Class({\n type: \"any\",\n });\n}\n```"}],"metadata":{"repo":"zod","file":"packages/zod/src/v4/core/api.ts","function":"_any","type":"function","line_count":5}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: src/jsx/dom/index.test.tsx\n\nMODULE CONTEXT:\nimport { JSDOM } from 'jsdom'\nimport type { Child, FC } from '..'\nimport { createElement, jsx } from '..'\nimport type { RefObject } from '../hooks'\nimport {\n createRef,\n useCallback,\n useEffect,\n useInsertionEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from '../hooks'\nimport type { NodeObject } from './render'\nimport { build, buildNode } from './render'\nimport DefaultExport, {\n cloneElement,\n cloneElement as cloneElementForDom,\n createElement as createElementForDom,\n createContext,\n useContext,\n createPortal,\n flushSync,\n isValidElement,\n memo,\n render,\n version,\n} from '.'\n\nTASK SPECIFICATION:\nImplement the TypeScript arrow_function satisfying this exact contract:\n```typescript\nconst App = () =>\n```"},{"role":"assistant","content":"```typescript\nconst App = () => {\n const [updated, setUpdated] = useState(false)\n reorder = () => setUpdated(true)\n return updated\n ? [

A

,

B

,

C

,

D

, X, Y]\n : [

Heading

,

A

,

B

,

C

]\n }\n```"}],"metadata":{"repo":"hono","file":"src/jsx/dom/index.test.tsx","function":"App","type":"arrow_function","line_count":7}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: examples/lambda-api-gateway/src/server.ts\n\nMODULE CONTEXT:\nimport { initTRPC } from '@trpc/server';\nimport type { CreateAWSLambdaContextOptions } from '@trpc/server/adapters/aws-lambda';\nimport { awsLambdaRequestHandler } from '@trpc/server/adapters/aws-lambda';\nimport type { APIGatewayProxyEvent } from 'aws-lambda';\nimport { z } from 'zod';\ntype Context = Awaited>;\nexport type AppRouter = typeof appRouter;\n\nTASK SPECIFICATION:\nImplement the TypeScript function satisfying this exact contract:\n```typescript\nfunction createContext({\n event,\n context,\n}: CreateAWSLambdaContextOptions)\n```"},{"role":"assistant","content":"```typescript\nfunction createContext({\n event,\n context,\n}: CreateAWSLambdaContextOptions) {\n return {\n event: event,\n apiVersion: (event as { version?: string }).version ?? '1.0',\n user: event.headers['x-user'],\n };\n}\n```"}],"metadata":{"repo":"trpc","file":"examples/lambda-api-gateway/src/server.ts","function":"createContext","type":"function","line_count":10}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/react-query/test/useSubscription.test.tsx\n\nMODULE CONTEXT:\nimport { getServerAndReactClient } from './__reactHelpers';\nimport { IterableEventEmitter } from '@trpc/server/__tests__/iterableEventEmitter';\nimport {\n ignoreErrors,\n suppressLogsUntil,\n} from '@trpc/server/__tests__/suppressLogs';\nimport { fireEvent, render } from '@testing-library/react';\nimport type { TRPCSubscriptionResult } from '@trpc/react-query/shared';\nimport { initTRPC } from '@trpc/server';\nimport { observable } from '@trpc/server/observable';\nimport { konn } from 'konn';\nimport React, { useState } from 'react';\nimport { z } from 'zod';\ntype MyEvents = {\n data: [number | Error | typeof returnSymbol];\n};\n\nTASK SPECIFICATION:\nImplement the TypeScript method satisfying this exact contract:\n```typescript\nerrorFormatter({ shape })\n```"},{"role":"assistant","content":"```typescript\nerrorFormatter({ shape }) {\n return {\n ...shape,\n data: {\n ...shape.data,\n foo: 'bar' as const,\n },\n };\n }\n```"}],"metadata":{"repo":"trpc","file":"packages/react-query/test/useSubscription.test.tsx","function":"errorFormatter","type":"method","line_count":9}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/tests/server/validators.test.ts\n\nMODULE CONTEXT:\nimport { AsyncLocalStorage } from 'async_hooks';\nimport { testServerAndClientResource } from '@trpc/client/__tests__/testClientResource';\nimport { waitError } from '@trpc/server/__tests__/waitError';\nimport type {\n AnyRouter,\n AnyTRPCProcedure,\n inferRouterInputs,\n inferRouterOutputs,\n} from '@trpc/server';\nimport { initTRPC, StandardSchemaV1Error, TRPCError } from '@trpc/server';\nimport { getProcedureAtPath } from '@trpc/server/unstable-core-do-not-import';\nimport * as arktype from 'arktype';\nimport { Schema } from 'effect';\nimport myzod from 'myzod';\nimport * as T from 'runtypes';\nimport * as $ from 'scale-codec';\nimport * as st from 'superstruct';\nimport * as S from 'sury';\nimport * as v from 'valibot';\nimport * as yup from 'yup';\nimport { z as zod3 } from 'zod/v3';\nimport { z as zod4 } from 'zod/v4';\n\nTASK SPECIFICATION:\nImplement the TypeScript method satisfying this exact contract:\n```typescript\ncreateContext()\n```"},{"role":"assistant","content":"```typescript\ncreateContext() {\n return { foo: 'bar' };\n }\n```"}],"metadata":{"repo":"trpc","file":"packages/tests/server/validators.test.ts","function":"createContext","type":"method","line_count":3}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/react-query/test/multiple-trpc-providers.test.tsx\n\nMODULE CONTEXT:\nimport { createQueryClient } from './__queryClient';\nimport { testServerAndClientResource } from '@trpc/client/__tests__/testClientResource';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { render } from '@testing-library/react';\nimport { getUntypedClient } from '@trpc/client';\nimport { createTRPCReact } from '@trpc/react-query';\nimport { initTRPC } from '@trpc/server';\nimport { konn } from 'konn';\nimport React, { createContext } from 'react';\n\nTASK SPECIFICATION:\nImplement the TypeScript function satisfying this exact contract:\n```typescript\nfunction App()\n```"},{"role":"assistant","content":"```typescript\nfunction App() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n```"}],"metadata":{"repo":"trpc","file":"packages/react-query/test/multiple-trpc-providers.test.tsx","function":"App","type":"function","line_count":26}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: src/middleware/ip-restriction/index.ts\n\nMODULE CONTEXT:\nimport type { Context, MiddlewareHandler } from '../..'\nimport type { AddressType, GetConnInfo } from '../../helper/conninfo'\nimport { HTTPException } from '../../http-exception'\nimport type { InvalidIPAddressError } from '../../utils/ipaddr'\nimport {\n convertIPv4MappedIPv6ToIPv4,\n convertIPv4ToBinary,\n convertIPv6BinaryToString,\n convertIPv6ToBinary,\n distinctRemoteAddr,\n isIPv4MappedIPv6,\n INVALID_IP_ADDRESS_ERROR_CODE,\n} from '../../utils/ipaddr'\ntype GetIPAddr = GetConnInfo | ((c: Context) => string)\ntype IPRestrictionRuleFunction = (addr: { addr: string; type: AddressType }) => boolean\nexport type IPRestrictionRule = string | ((addr: { addr: string; type: AddressType }) => boolean)\nexport interface IPRestrictionRules {\n denyList?: IPRestrictionRule[]\n allowList?: IPRestrictionRule[]\n}\n\nTASK SPECIFICATION:\nImplement the TypeScript arrow_function satisfying this exact contract:\n```typescript\nconst parseCidrPrefix = (rule: string, prefix: string, max: number): number =>\n```"},{"role":"assistant","content":"```typescript\nconst parseCidrPrefix = (rule: string, prefix: string, max: number): number => {\n if (!/^[0-9]{1,3}$/.test(prefix)) {\n throw new TypeError(`Invalid rule: ${rule}`)\n }\n const parsedPrefix = parseInt(prefix)\n if (parsedPrefix > max) {\n throw new TypeError(`Invalid rule: ${rule}`)\n }\n return parsedPrefix\n}\n```"}],"metadata":{"repo":"hono","file":"src/middleware/ip-restriction/index.ts","function":"parseCidrPrefix","type":"arrow_function","line_count":10}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/resolution/test-resolution.ts\n\nMODULE CONTEXT:\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { execa } from \"execa\";\n\nTASK SPECIFICATION:\nImplement the TypeScript function satisfying this exact contract:\n```typescript\nasync function testCjs()\n```"},{"role":"assistant","content":"```typescript\nasync function testCjs() {\n console.log(\"🧪 Testing CommonJS build...\");\n try {\n await execa(\"nub\", [\"--node\", \"./dist/index.cjs\"], {\n cwd: __dirname,\n stdio: \"inherit\",\n });\n console.log(\"✅ CommonJS test passed!\");\n } catch (error) {\n console.error(\"❌ CommonJS test failed:\", error);\n process.exit(1);\n }\n}\n```"}],"metadata":{"repo":"zod","file":"packages/resolution/test-resolution.ts","function":"testCjs","type":"function","line_count":13}} {"messages":[{"role":"system","content":"You are an autonomous TypeScript software engineer. When given a module context, type definitions, and a function specification/signature, implement the function body with 100% type safety and zero placeholders. Output ONLY the implementation code."},{"role":"user","content":"FILE: packages/zod/src/v4/classic/schemas.ts\n\nMODULE CONTEXT:\nimport type { $ZodBigIntFormats } from \"../core/checks.js\";\nimport * as core from \"../core/index.js\";\nimport { util, type $ZodNumberFormats } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport * as regexes from \"../core/regexes.js\";\nimport type { StandardSchemaWithJSONProps } from \"../core/standard-schema.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport en from \"../locales/en.js\";\nimport * as checks from \"./checks.js\";\nimport * as parse from \"./parse.js\";\nexport type ZodStandardSchemaWithJSON = StandardSchemaWithJSONProps, core.output>;\nexport interface ZodType<\n out Output = unknown,\n out Input = unknown,\n out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals,\n> extends core.$ZodType {\n def: Internals[\"def\"];\n type: Internals[\"def\"][\"type\"];\n\n /** @deprecated Use `.def` instead. */\n _def: Internals[\"def\"];\n /** @deprecated Use `z.output` instead. */\n _output: Internals[\"output\"];\n /** @deprecated Use `z.input` instead. */\n _input: Internals[\"input\"];\n\n \"~standard\": ZodStandardSchemaWithJSON;\n /** Converts this schema to a JSON Schema representation. */\n toJSONSchema(params?: core.ToJSONSchemaParams): core.ZodStandardJSONSchemaPayload;\n\n // base methods\n check(...checks: (core.CheckFn> | core.$ZodCheck>)[]): this;\n with(...checks: (core.CheckFn> | core.$ZodCheck>)[]): this;\n clone(def?: Internals[\"def\"], params?: { parent: boolean }): this;\n register(\n registry: R,\n ...meta: this extends R[\"_schema\"]\n ? undefined extends R[\"_meta\"]\n ? [core.$replace?]\n : [core.$replace]\n : [\"Incompatible schema\"]\n ): this;\n\n brand(\n value?: T\n ): PropertyKey extends T ? this : core.$ZodBranded;\n\n // parsing\n parse(data: unknown, params?: core.ParseContext): core.output;\n safeParse(data: unknown, params?: core.ParseContext): parse.ZodSafeParseResult>;\n parseAsync(data: unknown, params?: core.ParseContext): Promise>;\n safeParseAsync(\n data: unknown,\n params?: core.ParseContext\n ): Promise>>;\n spa: (\n data: unknown,\n params?: core.ParseContext\n ) => Promise>>;\n validate(data: unknown, params?: core.ParseContext): data is core.input;\n validateAsync(data: unknown, params?: core.ParseContext): Promise;\n\n // encoding/decoding\n encode(data: core.output, params?: core.ParseContext): core.input;\n decode(data: core.input, params?: core.ParseContext): core.output;\n encodeAsync(data: core.output, params?: core.ParseContext): Promise>;\n decodeAsync(data: core.input, params?: core.ParseContext): Promise>;\n safeEncode(\n data: core.output,\n params?: core.ParseContext\n ): parse.ZodSafeParseResult>;\n safeDecode(\n data: core.input,\n params?: core.ParseContext\n ): parse.ZodSafeParseResult>;\n safeEncodeAsync(\n data: core.output,\n params?: core.ParseContext\n ): Promise>>;\n safeDecodeAsync(\n data: core.input,\n params?: core.ParseContext\n ): Promise>>;\n\n // refinements\n refine) => unknown | Promise>(\n check: Ch,\n params?: string | core.$ZodCustomParams\n ): Ch extends (arg: any) => arg is infer R ? this & ZodType> : this;\n superRefine(\n refinement: (arg: core.output, ctx: core.$RefinementCtx>) => void | Promise,\n params?: core.$ZodSuperRefineParams\n ): this;\n overwrite(fn: (x: core.output) => core.output): this;\n\n // wrappers\n optional(): ZodOptional;\n exactOptional(): ZodExactOptional;\n nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional;\n nullable(): ZodNullable;\n nullish(): ZodOptional>;\n default(def: util.NoUndefined>): ZodDefault;\n default(def: () => util.NoUndefined>): ZodDefault;\n prefault(def: () => core.input): ZodPrefault;\n prefault(def: core.input): ZodPrefault;\n array(): ZodArray;\n or(option: T): ZodUnion<[this, T]>;\n and(incoming: T): ZodIntersection;\n transform(\n transform: (arg: core.output, ctx: core.$RefinementCtx>) => NewOut | Promise\n ): ZodPipe, core.output>>;\n catch(def: core.output): ZodCatch;\n catch(def: (ctx: core.$ZodCatchCtx) => core.output): ZodCatch;\n pipe>>(\n target: T | core.$ZodType>\n ): ZodPipe;\n readonly(): ZodReadonly;\n\n /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */\n describe(description: string): this;\n description?: string;\n /** Returns the metadata associated with this instance in `z.globalRegistry` */\n meta(): core.$replace | undefined;\n /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */\n meta(data: core.$replace): this;\n\n // helpers\n /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):\n *\n * ```ts\n * const schema = z.string().optional();\n * const isOptional = schema.safeParse(undefined).success; // true\n * ```\n */\n isOptional(): boolean;\n /**\n * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):\n *\n * ```ts\n * const schema = z.string().nullable();\n * const isNullable = schema.safeParse(null).success; // true\n * ```\n */\n isNullable(): boolean;\n apply(fn: (schema: this, ...args: TArgs) => T, ...args: TArgs): T;\n}\nexport interface _ZodType\n extends ZodType {}\nexport interface _ZodString = core.$ZodStringInternals>\n extends _ZodType {\n format: string | null;\n minLength: number | null;\n maxLength: number | null;\n\n // miscellaneous checks\n regex(regex: RegExp, params?: string | core.$ZodCheckRegexParams): this;\n includes(value: string, params?: string | core.$ZodCheckIncludesParams): this;\n startsWith(value: string, params?: string | core.$ZodCheckStartsWithParams): this;\n endsWith(value: string, params?: string | core.$ZodCheckEndsWithParams): this;\n min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;\n max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;\n length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;\n nonempty(params?: string | core.$ZodCheckMinLengthParams): this;\n lowercase(params?: string | core.$ZodCheckLowerCaseParams): this;\n uppercase(params?: string | core.$ZodCheckUpperCaseParams): this;\n\n // transforms\n trim(): this;\n normalize(form?: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\" | (string & {})): this;\n toLowerCase(): this;\n toUpperCase(): this;\n slugify(): this;\n}\nexport interface ZodString extends _ZodString> {\n // string format checks\n\n /** @deprecated Use `z.email()` instead. */\n email(params?: string | core.$ZodCheckEmailParams): this;\n /** @deprecated Use `z.url()` instead. */\n url(params?: string | core.$ZodCheckURLParams): this;\n /** @deprecated Use `z.jwt()` instead. */\n jwt(params?: string | core.$ZodCheckJWTParams): this;\n /** @deprecated Use `z.emoji()` instead. */\n emoji(params?: string | core.$ZodCheckEmojiParams): this;\n /** @deprecated Use `z.guid()` instead. */\n guid(params?: string | core.$ZodCheckGUIDParams): this;\n /** @deprecated Use `z.uuid()` instead. */\n uuid(params?: string | core.$ZodCheckUUIDParams): this;\n /** @deprecated Use `z.uuid()` instead. */\n uuidv4(params?: string | core.$ZodCheckUUIDParams): this;\n /** @deprecated Use `z.uuid()` instead. */\n uuidv6(params?: string | core.$ZodCheckUUIDParams): this;\n /** @deprecated Use `z.uuid()` instead. */\n uuidv7(params?: string | core.$ZodCheckUUIDParams): this;\n /** @deprecated Use `z.nanoid()` instead. */\n nanoid(params?: string | core.$ZodCheckNanoIDParams): this;\n /** @deprecated Use `z.guid()` instead. */\n guid(params?: string | core.$ZodCheckGUIDParams): this;\n /**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use `z.cuid2()` instead.\n * See https://github.com/paralleldrive/cuid.\n */\n cuid(params?: string | core.$ZodCheckCUIDParams): this;\n /** @deprecated Use `z.cuid2()` instead. */\n cuid2(params?: string | core.$ZodCheckCUID2Params): this;\n /** @deprecated Use `z.ulid()` instead. */\n ulid(params?: string | core.$ZodCheckULIDParams): this;\n /** @deprecated Use `z.base64()` instead. */\n base64(params?: string | core.$ZodCheckBase64Params): this;\n /** @deprecated Use `z.base64url()` instead. */\n base64url(params?: string | core.$ZodCheckBase64URLParams): this;\n // /** @deprecated Use `z.jsonString()` instead. */\n // jsonString(params?: string | core.$ZodCheckJSONStringParams): this;\n /** @deprecated Use `z.xid()` instead. */\n xid(params?: string | core.$ZodCheckXIDParams): this;\n /** @deprecated Use `z.ksuid()` instead. */\n ksuid(params?: string | core.$ZodCheckKSUIDParams): this;\n // /** @deprecated Use `z.ipv4()` or `z.ipv6()` instead. */\n // ip(params?: string | (core.$ZodCheckIPv4Params & { version?: \"v4\" | \"v6\" })): ZodUnion<[this, this]>;\n /** @deprecated Use `z.ipv4()` instead. */\n ipv4(params?: string | core.$ZodCheckIPv4Params): this;\n /** @deprecated Use `z.ipv6()` instead. */\n ipv6(params?: string | core.$ZodCheckIPv6Params): this;\n /** @deprecated Use `z.cidrv4()` instead. */\n cidrv4(params?: string | core.$ZodCheckCIDRv4Params): this;\n /** @deprecated Use `z.cidrv6()` instead. */\n cidrv6(params?: string | core.$ZodCheckCIDRv6Params): this;\n /** @deprecated Use `z.e164()` instead. */\n e164(params?: string | core.$ZodCheckE164Params): this;\n\n // ISO 8601 checks\n /** @deprecated Use `z.iso.datetime()` instead. */\n datetime(params?: string | core.$ZodCheckISODateTimeParams): this;\n /** @deprecated Use `z.iso.date()` instead. */\n date(params?: string | core.$ZodCheckISODateParams): this;\n /** @deprecated Use `z.iso.time()` instead. */\n time(\n params?:\n | string\n // | {\n // message?: string | undefined;\n // precision?: number | null;\n // }\n | core.$ZodCheckISOTimeParams\n ): this;\n /** @deprecated Use `z.iso.duration()` instead. */\n duration(params?: string | core.$ZodCheckISODurationParams): this;\n}\nexport interface ZodStringFormat\n extends _ZodString> {}\nexport interface ZodISODateTime extends ZodStringFormat {\n _zod: core.$ZodISODateTimeInternals;\n}\nexport interface ZodISODate extends ZodStringFormat {\n _zod: core.$ZodISODateInternals;\n}\nexport interface ZodISOTime extends ZodStringFormat {\n _zod: core.$ZodISOTimeInternals;\n}\nexport interface ZodISODuration extends ZodStringFormat {\n _zod: core.$ZodISODurationInternals;\n}\nexport interface ZodEmail extends ZodStringFormat<\"email\"> {\n _zod: core.$ZodEmailInternals;\n}\nexport interface ZodGUID extends ZodStringFormat<\"guid\"> {\n _zod: core.$ZodGUIDInternals;\n}\nexport interface ZodUUID extends ZodStringFormat<\"uuid\"> {\n _zod: core.$ZodUUIDInternals;\n}\nexport interface ZodURL extends ZodStringFormat<\"url\"> {\n _zod: core.$ZodURLInternals;\n}\nexport interface ZodEmoji extends ZodStringFormat<\"emoji\"> {\n _zod: core.$ZodEmojiInternals;\n}\nexport interface ZodNanoID extends ZodStringFormat<\"nanoid\"> {\n _zod: core.$ZodNanoIDInternals;\n}\nexport interface ZodCUID extends ZodStringFormat<\"cuid\"> {\n _zod: core.$ZodCUIDInternals;\n}\nexport interface ZodCUID2 extends ZodStringFormat<\"cuid2\"> {\n _zod: core.$ZodCUID2Internals;\n}\nexport interface ZodULID extends ZodStringFormat<\"ulid\"> {\n _zod: core.$ZodULIDInternals;\n}\nexport interface ZodXID extends ZodStringFormat<\"xid\"> {\n _zod: core.$ZodXIDInternals;\n}\nexport interface ZodKSUID extends ZodStringFormat<\"ksuid\"> {\n _zod: core.$ZodKSUIDInternals;\n}\nexport interface ZodIPv4 extends ZodStringFormat<\"ipv4\"> {\n _zod: core.$ZodIPv4Internals;\n}\nexport interface ZodMAC extends ZodStringFormat<\"mac\"> {\n _zod: core.$ZodMACInternals;\n}\nexport interface ZodIPv6 extends ZodStringFormat<\"ipv6\"> {\n _zod: core.$ZodIPv6Internals;\n}\nexport interface ZodCIDRv4 extends ZodStringFormat<\"cidrv4\"> {\n _zod: core.$ZodCIDRv4Internals;\n}\nexport interface ZodCIDRv6 extends ZodStringFormat<\"cidrv6\"> {\n _zod: core.$ZodCIDRv6Internals;\n}\nexport interface ZodBase64 extends ZodStringFormat<\"base64\"> {\n _zod: core.$ZodBase64Internals;\n}\nexport interface ZodBase64URL extends ZodStringFormat<\"base64url\"> {\n _zod: core.$ZodBase64URLInternals;\n}\nexport interface ZodE164 extends ZodStringFormat<\"e164\"> {\n _zod: core.$ZodE164Internals;\n}\nexport interface ZodCreditCard extends ZodStringFormat<\"credit_card\"> {\n _zod: core.$ZodCreditCardInternals;\n}\nexport interface ZodIBAN extends ZodStringFormat<\"iban\"> {\n _zod: core.$ZodIBANInternals;\n}\nexport interface ZodJWT extends ZodStringFormat<\"jwt\"> {\n _zod: core.$ZodJWTInternals;\n}\nexport interface ZodCustomStringFormat\n extends ZodStringFormat,\n core.$ZodCustomStringFormat {\n _zod: core.$ZodCustomStringFormatInternals;\n \"~standard\": ZodStandardSchemaWithJSON;\n}\nexport interface _ZodNumber\n extends _ZodType {\n gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;\n /** Identical to .min() */\n gte(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;\n min(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;\n lt(value: number, params?: string | core.$ZodCheckLessThanParams): this;\n /** Identical to .max() */\n lte(value: number, params?: string | core.$ZodCheckLessThanParams): this;\n max(value: number, params?: string | core.$ZodCheckLessThanParams): this;\n /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */\n int(params?: string | core.$ZodCheckNumberFormatParams): this;\n /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */\n safe(params?: string | core.$ZodCheckNumberFormatParams): this;\n positive(params?: string | core.$ZodCheckGreaterThanParams): this;\n nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;\n negative(params?: string | core.$ZodCheckLessThanParams): this;\n nonpositive(params?: string | core.$ZodCheckLessThanParams): this;\n multipleOf(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;\n /** @deprecated Use `.multipleOf()` instead. */\n step(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;\n\n /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */\n finite(params?: unknown): this;\n\n minValue: number | null;\n maxValue: number | null;\n /** @deprecated Check the `format` property instead. */\n isInt: boolean;\n /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */\n isFinite: boolean;\n format: string | null;\n}\nexport interface ZodNumber extends _ZodNumber> {}\nexport interface ZodNumberFormat extends ZodNumber {\n _zod: core.$ZodNumberFormatInternals;\n}\nexport interface ZodInt extends ZodNumberFormat<\"safeint\"> {}\nexport interface ZodFloat32 extends ZodNumberFormat<\"float32\"> {}\nexport interface ZodFloat64 extends ZodNumberFormat<\"float64\"> {}\nexport interface ZodInt32 extends ZodNumberFormat<\"int32\"> {}\nexport interface ZodUInt32 extends ZodNumberFormat<\"uint32\"> {}\nexport interface _ZodBoolean extends _ZodType {}\nexport interface ZodBoolean extends _ZodBoolean> {}\nexport interface _ZodBigInt extends _ZodType {\n gte(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;\n /** Alias of `.gte()` */\n min(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;\n gt(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;\n /** Alias of `.lte()` */\n lte(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;\n max(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;\n lt(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;\n positive(params?: string | core.$ZodCheckGreaterThanParams): this;\n negative(params?: string | core.$ZodCheckLessThanParams): this;\n nonpositive(params?: string | core.$ZodCheckLessThanParams): this;\n nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;\n multipleOf(value: bigint, params?: string | core.$ZodCheckMultipleOfParams): this;\n\n minValue: bigint | null;\n maxValue: bigint | null;\n format: string | null;\n}\nexport interface ZodBigInt extends _ZodBigInt> {}\nexport interface ZodBigIntFormat extends ZodBigInt {\n _zod: core.$ZodBigIntFormatInternals;\n}\nexport interface ZodInt64 extends ZodBigIntFormat<\"int64\"> {}\nexport interface ZodUInt64 extends ZodBigIntFormat<\"uint64\"> {}\nexport interface ZodSymbol extends _ZodType {}\nexport interface ZodUndefined extends _ZodType {}\nexport interface ZodNull extends _ZodType {}\nexport interface ZodAny extends _ZodType {}\nexport interface ZodUnknown extends _ZodType {}\nexport interface ZodNever extends _ZodType {}\nexport interface ZodVoid extends _ZodType {}\nexport interface _ZodDate extends _ZodType {\n min(value: number | Date, params?: string | core.$ZodCheckGreaterThanParams): this;\n max(value: number | Date, params?: string | core.$ZodCheckLessThanParams): this;\n\n /** @deprecated Not recommended. */\n minDate: Date | null;\n /** @deprecated Not recommended. */\n maxDate: Date | null;\n}\nexport interface ZodDate extends _ZodDate> {}\nexport interface ZodArray\n extends _ZodType>,\n core.$ZodArray {\n element: T;\n min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;\n nonempty(params?: string | core.$ZodCheckMinLengthParams): this;\n max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;\n length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;\n\n unwrap(): T;\n \"~standard\": ZodStandardSchemaWithJSON;\n}\nexport type SafeExtendShape = {\n [K in keyof Ext]: K extends keyof Base\n ? core.output extends core.output\n ? core.input extends core.input\n ? Ext[K]\n : never\n : never\n : Ext[K];\n};\nexport interface ZodObject<\n /** @ts-ignore Cast variance */\n out Shape extends core.$ZodShape = core.$ZodLooseShape,\n out Config extends core.$ZodObjectConfig = core.$strip,\n> extends _ZodType>,\n core.$ZodObject {\n \"~standard\": ZodStandardSchemaWithJSON;\n shape: Shape;\n\n keyof(): ZodEnum>;\n /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */\n catchall(schema: T): ZodObject>;\n\n /** @deprecated Use `z.looseObject()` or `.loose()` instead. */\n passthrough(): ZodObject;\n /** Consider `z.looseObject(A.shape)` instead */\n loose(): ZodObject;\n\n /** Consider `z.strictObject(A.shape)` instead */\n strict(): ZodObject;\n\n /** This is the default behavior. This method call is likely unnecessary. */\n strip(): ZodObject;\n\n extend(shape: U): ZodObject>, Config>;\n\n safeExtend(\n shape: SafeExtendShape & Partial>\n ): ZodObject>, Config>;\n\n /**\n * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.\n */\n merge(other: U): ZodObject, U[\"_zod\"][\"config\"]>;\n\n pick>(\n mask: M & Record, never>\n ): ZodObject>>, Config>;\n\n omit>(\n mask: M & Record, never>\n ): ZodObject>>, Config>;\n\n partial(): ZodObject<\n {\n -readonly [k in keyof Shape]: ZodOptional;\n },\n Config\n >;\n partial>(\n mask: M & Record, never>\n ): ZodObject<\n {\n -readonly [k in keyof Shape]: k extends keyof M\n ? // Shape[k] extends OptionalInSchema\n // ? Shape[k]\n // :\n ZodOptional\n : Shape[k];\n },\n Config\n >;\n\n // exactPartial\n exactPartial(): ZodObject<\n {\n -readonly [k in keyof Shape]: ZodExactOptional;\n },\n Config\n >;\n exactPartial>(\n mask: M & Record, never>\n ): ZodObject<\n {\n -readonly [k in keyof Shape]: k extends keyof M ? ZodExactOptional : Shape[k];\n },\n Config\n >;\n\n // required\n required(): ZodObject<\n {\n -readonly [k in keyof Shape]: ZodNonOptional;\n },\n Config\n >;\n required>(\n mask: M & Record, never>\n ): ZodObject<\n {\n -readonly [k in keyof Shape]: k extends keyof M ? ZodNonOptional : Shape[k];\n },\n Config\n >;\n}\nexport interface ZodUnion\n extends _ZodType>,\n core.$ZodUnion {\n \"~standard\": ZodStandardSchemaWithJSON;\n options: T;\n}\nexport interface ZodXor\n extends _ZodType>,\n core.$ZodXor {\n \"~standard\": ZodStandardSchemaWithJSON;\n options: T;\n}\nexport interface ZodDiscriminatedUnion<\n Options extends readonly core.SomeType[] = readonly core.$ZodType[],\n Disc extends string = string,\n> extends ZodUnion,\n core.$ZodDiscriminatedUnion {\n \"~standard\": ZodStandardSchemaWithJSON;\n _zod: core.$ZodDiscriminatedUnionInternals;\n def: core.$ZodDiscriminatedUnionDef;\n}\nexport interface ZodIntersection\n extends _ZodType>,\n core.$ZodIntersection {\n \"~standard\": ZodStandardSchemaWithJSON;\n}\nexport interface ZodTuple<\n T extends util.TupleItems = readonly core.$ZodType[],\n Rest extends core.SomeType | null = core.$ZodType | null,\n> extends _ZodType>,\n core.$ZodTuple {\n \"~standard\": ZodStandardSchemaWithJSON;\n rest(rest: Rest): ZodTuple;\n partial(): ZodTuple<{ -readonly [k in keyof T]: ZodOptional }, Rest>;\n}\nexport interface ZodRecord<\n Key extends core.$ZodRecordKey = core.$ZodRecordKey,\n Value extends core.SomeType = core.$ZodType,\n> extends _ZodType>,\n core.$ZodRecord {\n \"~standard\": ZodStandardSchemaWithJSON;\n keyType: Key;\n valueType: Value;\n}\nexport interface ZodMap\n extends _ZodType>,\n core.$ZodMap {\n \"~standard\": ZodStandardSchemaWithJSON;\n keyType: Key;\n valueType: Value;\n min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;\n nonempty(params?: string | core.$ZodCheckMinSizeParams): this;\n max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;\n size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;\n}\nexport interface ZodSet\n extends _ZodType>,\n core.$ZodSet {\n \"~standard\": ZodStandardSchemaWithJSON;\n min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;\n nonempty(params?: string | core.$ZodCheckMinSizeParams): this;\n max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;\n size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;\n}\nexport interface ZodEnum<\n /** @ts-ignore Cast variance */\n out T extends util.EnumLike = util.EnumLike,\n> extends _ZodType>,\n core.$ZodEnum {\n \"~standard\": ZodStandardSchemaWithJSON;\n enum: T;\n options: Array;\n\n extract(\n values: U,\n params?: string | core.$ZodEnumParams\n ): ZodEnum>>;\n exclude(\n values: U,\n params?: string | core.$ZodEnumParams\n ): ZodEnum>>;\n}\nexport interface ZodLiteral\n extends _ZodType>,\n core.$ZodLiteral {\n \"~standard\": ZodStandardSchemaWithJSON;\n values: Set;\n /** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */\n value: T;\n}\nexport interface ZodFile extends _ZodType, core.$ZodFile {\n \"~standard\": ZodStandardSchemaWithJSON;\n min(size: number, params?: string | core.$ZodCheckMinSizeParams): this;\n max(size: number, params?: string | core.$ZodCheckMaxSizeParams): this;\n mime(types: util.MimeTypes | Array, params?: string | core.$ZodCheckMimeTypeParams): this;\n}\nexport interface ZodTransform\n extends _ZodType>,\n core.$ZodTransform {\n \"~standard\": ZodStandardSchemaWithJSON;\n}\nexport interface ZodOptional\n extends _ZodType>,\n core.$ZodOptional {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodExactOptional\n extends _ZodType>,\n core.$ZodExactOptional {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodNullable\n extends _ZodType>,\n core.$ZodNullable {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodDefault\n extends _ZodType>,\n core.$ZodDefault {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n /** @deprecated Use `.unwrap()` instead. */\n removeDefault(): T;\n}\nexport interface ZodPrefault\n extends _ZodType>,\n core.$ZodPrefault {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodNonOptional\n extends _ZodType>,\n core.$ZodNonOptional {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodSuccess\n extends _ZodType>,\n core.$ZodSuccess {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodCatch\n extends _ZodType>,\n core.$ZodCatch {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n /** @deprecated Use `.unwrap()` instead. */\n removeCatch(): T;\n}\nexport interface ZodNaN extends _ZodType, core.$ZodNaN {\n \"~standard\": ZodStandardSchemaWithJSON;\n}\nexport interface ZodPipe\n extends _ZodType>,\n core.$ZodPipe {\n \"~standard\": ZodStandardSchemaWithJSON;\n in: A;\n out: B;\n}\nexport interface ZodCodec\n extends ZodPipe,\n core.$ZodCodec {\n \"~standard\": ZodStandardSchemaWithJSON;\n _zod: core.$ZodCodecInternals;\n def: core.$ZodCodecDef;\n}\nexport interface ZodPreprocess\n extends ZodPipe, B>,\n core.$ZodPreprocess {\n \"~standard\": ZodStandardSchemaWithJSON;\n _zod: core.$ZodPreprocessInternals;\n def: core.$ZodPreprocessDef;\n}\nexport interface ZodReadonly\n extends _ZodType>,\n core.$ZodReadonly {\n \"~standard\": ZodStandardSchemaWithJSON;\n unwrap(): T;\n}\nexport interface ZodTemplateLiteral