[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trpc-validators":3,"mdc-uo36c5-key":39,"related-repo-trpc-validators":4504,"related-org-trpc-validators":4609},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":34,"sourceUrl":37,"mdContent":38},"validators","validate tRPC input and output data","Configure input and output validation with .input() and .output() using Zod, Yup, Superstruct, ArkType, Valibot, Effect, or custom validator functions. Chain multiple .input() calls to merge object schemas. Standard Schema protocol support. Output validation returns INTERNAL_SERVER_ERROR on failure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"trpc","tRPC","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrpc.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Validation","validation","tag",{"name":17,"slug":18,"type":15},"Backend","backend",{"name":20,"slug":21,"type":15},"TypeScript","typescript",{"name":9,"slug":8,"type":15},40424,"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc","2026-07-18T05:46:48.622013",null,1636,[29,30,31,32,33,21],"api","next","nextjs","prisma","react",{"repoUrl":24,"stars":23,"forks":27,"topics":35,"description":36},[29,30,31,32,33,21],"🧙‍♀️  Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ","https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Ftree\u002FHEAD\u002Fpackages\u002Fserver\u002Fskills\u002Fvalidators","---\nname: validators\ndescription: >\n  Configure input and output validation with .input() and .output() using Zod,\n  Yup, Superstruct, ArkType, Valibot, Effect, or custom validator functions.\n  Chain multiple .input() calls to merge object schemas. Standard Schema protocol\n  support. Output validation returns INTERNAL_SERVER_ERROR on failure.\ntype: core\nlibrary: trpc\nlibrary_version: '11.16.0'\nrequires:\n  - server-setup\nsources:\n  - 'trpc\u002Ftrpc:www\u002Fdocs\u002Fserver\u002Fvalidators.md'\n  - 'trpc\u002Ftrpc:packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fparser.ts'\n---\n\n# tRPC -- Validators\n\n## Setup\n\n```ts\n\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\nconst t = initTRPC.create();\n\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n```\n\n```ts\n\u002F\u002F server\u002FappRouter.ts\nimport { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  hello: publicProcedure\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `hello ${input.name}` };\n    }),\n});\n\nexport type AppRouter = typeof appRouter;\n```\n\n## Core Patterns\n\n### Input validation with Zod\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  userById: publicProcedure.input(z.string()).query(({ input }) => {\n    return { id: input, name: 'Katt' };\n  }),\n  userCreate: publicProcedure\n    .input(z.object({ name: z.string(), email: z.string().email() }))\n    .mutation(({ input }) => {\n      return { id: '1', ...input };\n    }),\n});\n```\n\n### Input chaining to merge object schemas\n\n```ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst baseProcedure = t.procedure\n  .input(z.object({ townName: z.string() }))\n  .use((opts) => {\n    console.log(`Request from: ${opts.input.townName}`);\n    return opts.next();\n  });\n\nexport const appRouter = t.router({\n  hello: baseProcedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}, from ${input.townName}` };\n    }),\n});\n```\n\nMultiple `.input()` calls merge object properties; the final input type is `{ townName: string; name: string }`.\n\n### Output validation\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  hello: publicProcedure\n    .output(z.object({ greeting: z.string() }))\n    .query(() => {\n      return { greeting: 'hello world' };\n    }),\n});\n```\n\nOutput validation catches mismatches between your return type and the expected shape, useful for untrusted data sources.\n\n### Custom validator function (no library)\n\n```ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\nconst t = initTRPC.create();\n\nexport const appRouter = t.router({\n  hello: t.procedure\n    .input((value): string => {\n      if (typeof value === 'string') return value;\n      throw new Error('Input is not a string');\n    })\n    .output((value): string => {\n      if (typeof value === 'string') return value;\n      throw new Error('Output is not a string');\n    })\n    .query(({ input }) => {\n      return `hello ${input}`;\n    }),\n});\n```\n\n## Common Mistakes\n\n### [MEDIUM] Chaining non-object inputs\n\nWrong:\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure.input(z.string()).input(z.number());\n```\n\nCorrect:\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .input(z.object({ name: z.string() }))\n  .input(z.object({ age: z.number() }));\n```\n\nMultiple `.input()` calls merge object properties; non-object schemas (string, number, array) cannot be merged and produce type errors.\n\nSource: www\u002Fdocs\u002Fserver\u002Fvalidators.md\n\n### [MEDIUM] Output validation failure returns 500\n\nWrong:\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .output(z.object({ id: z.string() }))\n  .query(() => ({ id: 123 }));\n```\n\nCorrect:\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .output(z.object({ id: z.string() }))\n  .query(() => ({ id: '123' }));\n```\n\nIf `.output()` validation fails, tRPC returns INTERNAL_SERVER_ERROR (500), not BAD_REQUEST, because the server produced invalid data.\n\nSource: www\u002Fdocs\u002Fserver\u002Fvalidators.md\n\n### [HIGH] Using cursor: z.optional() without nullable for infinite queries\n\nWrong:\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .input(z.object({ cursor: z.string().optional() }))\n  .query(({ input }) => {\n    return { items: [], nextCursor: input.cursor };\n  });\n```\n\nCorrect:\n\n```ts\nimport { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .input(z.object({ cursor: z.string().nullish() }))\n  .query(({ input }) => {\n    return { items: [], nextCursor: input.cursor };\n  });\n```\n\nReact Query internally passes `cursor: undefined` during invalidation refetch; using `.optional()` without `.nullable()` can fail validation. Use `.nullish()` instead.\n\nSource: https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F6862\n\n## See Also\n\n- `server-setup` -- initTRPC, routers, procedures\n- `error-handling` -- how validation errors surface as BAD_REQUEST\n- `error-handling` -- errorFormatter to expose Zod field errors\n- `middlewares` -- use input chaining with middleware base procedures\n",{"data":40,"body":48},{"name":4,"description":6,"type":41,"library":8,"library_version":42,"requires":43,"sources":45},"core","11.16.0",[44],"server-setup",[46,47],"trpc\u002Ftrpc:www\u002Fdocs\u002Fserver\u002Fvalidators.md","trpc\u002Ftrpc:packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fparser.ts",{"type":49,"children":50},"root",[51,60,67,285,774,780,787,1297,1303,1951,1972,1978,2280,2285,2291,2840,2846,2857,2862,3027,3032,3275,3286,3291,3301,3305,3536,3540,3778,3791,3795,3806,3810,4103,4107,4395,4432,4445,4451,4498],{"type":52,"tag":53,"props":54,"children":56},"element","h1",{"id":55},"trpc-validators",[57],{"type":58,"value":59},"text","tRPC -- Validators",{"type":52,"tag":61,"props":62,"children":64},"h2",{"id":63},"setup",[65],{"type":58,"value":66},"Setup",{"type":52,"tag":68,"props":69,"children":74},"pre",{"className":70,"code":71,"language":72,"meta":73,"style":73},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\nconst t = initTRPC.create();\n\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n","ts","",[75],{"type":52,"tag":76,"props":77,"children":78},"code",{"__ignoreMap":73},[79,91,144,154,198,206,247],{"type":52,"tag":80,"props":81,"children":84},"span",{"class":82,"line":83},"line",1,[85],{"type":52,"tag":80,"props":86,"children":88},{"style":87},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[89],{"type":58,"value":90},"\u002F\u002F server\u002Ftrpc.ts\n",{"type":52,"tag":80,"props":92,"children":94},{"class":82,"line":93},2,[95,101,107,113,118,123,128,134,139],{"type":52,"tag":80,"props":96,"children":98},{"style":97},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[99],{"type":58,"value":100},"import",{"type":52,"tag":80,"props":102,"children":104},{"style":103},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[105],{"type":58,"value":106}," {",{"type":52,"tag":80,"props":108,"children":110},{"style":109},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[111],{"type":58,"value":112}," initTRPC",{"type":52,"tag":80,"props":114,"children":115},{"style":103},[116],{"type":58,"value":117}," }",{"type":52,"tag":80,"props":119,"children":120},{"style":97},[121],{"type":58,"value":122}," from",{"type":52,"tag":80,"props":124,"children":125},{"style":103},[126],{"type":58,"value":127}," '",{"type":52,"tag":80,"props":129,"children":131},{"style":130},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[132],{"type":58,"value":133},"@trpc\u002Fserver",{"type":52,"tag":80,"props":135,"children":136},{"style":103},[137],{"type":58,"value":138},"'",{"type":52,"tag":80,"props":140,"children":141},{"style":103},[142],{"type":58,"value":143},";\n",{"type":52,"tag":80,"props":145,"children":147},{"class":82,"line":146},3,[148],{"type":52,"tag":80,"props":149,"children":151},{"emptyLinePlaceholder":150},true,[152],{"type":58,"value":153},"\n",{"type":52,"tag":80,"props":155,"children":157},{"class":82,"line":156},4,[158,164,169,174,178,183,189,194],{"type":52,"tag":80,"props":159,"children":161},{"style":160},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[162],{"type":58,"value":163},"const",{"type":52,"tag":80,"props":165,"children":166},{"style":109},[167],{"type":58,"value":168}," t ",{"type":52,"tag":80,"props":170,"children":171},{"style":103},[172],{"type":58,"value":173},"=",{"type":52,"tag":80,"props":175,"children":176},{"style":109},[177],{"type":58,"value":112},{"type":52,"tag":80,"props":179,"children":180},{"style":103},[181],{"type":58,"value":182},".",{"type":52,"tag":80,"props":184,"children":186},{"style":185},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[187],{"type":58,"value":188},"create",{"type":52,"tag":80,"props":190,"children":191},{"style":109},[192],{"type":58,"value":193},"()",{"type":52,"tag":80,"props":195,"children":196},{"style":103},[197],{"type":58,"value":143},{"type":52,"tag":80,"props":199,"children":201},{"class":82,"line":200},5,[202],{"type":52,"tag":80,"props":203,"children":204},{"emptyLinePlaceholder":150},[205],{"type":58,"value":153},{"type":52,"tag":80,"props":207,"children":209},{"class":82,"line":208},6,[210,215,220,225,229,234,238,243],{"type":52,"tag":80,"props":211,"children":212},{"style":97},[213],{"type":58,"value":214},"export",{"type":52,"tag":80,"props":216,"children":217},{"style":160},[218],{"type":58,"value":219}," const",{"type":52,"tag":80,"props":221,"children":222},{"style":109},[223],{"type":58,"value":224}," router ",{"type":52,"tag":80,"props":226,"children":227},{"style":103},[228],{"type":58,"value":173},{"type":52,"tag":80,"props":230,"children":231},{"style":109},[232],{"type":58,"value":233}," t",{"type":52,"tag":80,"props":235,"children":236},{"style":103},[237],{"type":58,"value":182},{"type":52,"tag":80,"props":239,"children":240},{"style":109},[241],{"type":58,"value":242},"router",{"type":52,"tag":80,"props":244,"children":245},{"style":103},[246],{"type":58,"value":143},{"type":52,"tag":80,"props":248,"children":250},{"class":82,"line":249},7,[251,255,259,264,268,272,276,281],{"type":52,"tag":80,"props":252,"children":253},{"style":97},[254],{"type":58,"value":214},{"type":52,"tag":80,"props":256,"children":257},{"style":160},[258],{"type":58,"value":219},{"type":52,"tag":80,"props":260,"children":261},{"style":109},[262],{"type":58,"value":263}," publicProcedure ",{"type":52,"tag":80,"props":265,"children":266},{"style":103},[267],{"type":58,"value":173},{"type":52,"tag":80,"props":269,"children":270},{"style":109},[271],{"type":58,"value":233},{"type":52,"tag":80,"props":273,"children":274},{"style":103},[275],{"type":58,"value":182},{"type":52,"tag":80,"props":277,"children":278},{"style":109},[279],{"type":58,"value":280},"procedure",{"type":52,"tag":80,"props":282,"children":283},{"style":103},[284],{"type":58,"value":143},{"type":52,"tag":68,"props":286,"children":288},{"className":70,"code":287,"language":72,"meta":73,"style":73},"\u002F\u002F server\u002FappRouter.ts\nimport { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  hello: publicProcedure\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `hello ${input.name}` };\n    }),\n});\n\nexport type AppRouter = typeof appRouter;\n",[289],{"type":52,"tag":76,"props":290,"children":291},{"__ignoreMap":73},[292,300,341,392,399,433,452,525,591,634,693,712,728,736],{"type":52,"tag":80,"props":293,"children":294},{"class":82,"line":83},[295],{"type":52,"tag":80,"props":296,"children":297},{"style":87},[298],{"type":58,"value":299},"\u002F\u002F server\u002FappRouter.ts\n",{"type":52,"tag":80,"props":301,"children":302},{"class":82,"line":93},[303,307,311,316,320,324,328,333,337],{"type":52,"tag":80,"props":304,"children":305},{"style":97},[306],{"type":58,"value":100},{"type":52,"tag":80,"props":308,"children":309},{"style":103},[310],{"type":58,"value":106},{"type":52,"tag":80,"props":312,"children":313},{"style":109},[314],{"type":58,"value":315}," z",{"type":52,"tag":80,"props":317,"children":318},{"style":103},[319],{"type":58,"value":117},{"type":52,"tag":80,"props":321,"children":322},{"style":97},[323],{"type":58,"value":122},{"type":52,"tag":80,"props":325,"children":326},{"style":103},[327],{"type":58,"value":127},{"type":52,"tag":80,"props":329,"children":330},{"style":130},[331],{"type":58,"value":332},"zod",{"type":52,"tag":80,"props":334,"children":335},{"style":103},[336],{"type":58,"value":138},{"type":52,"tag":80,"props":338,"children":339},{"style":103},[340],{"type":58,"value":143},{"type":52,"tag":80,"props":342,"children":343},{"class":82,"line":146},[344,348,352,357,362,367,371,375,379,384,388],{"type":52,"tag":80,"props":345,"children":346},{"style":97},[347],{"type":58,"value":100},{"type":52,"tag":80,"props":349,"children":350},{"style":103},[351],{"type":58,"value":106},{"type":52,"tag":80,"props":353,"children":354},{"style":109},[355],{"type":58,"value":356}," publicProcedure",{"type":52,"tag":80,"props":358,"children":359},{"style":103},[360],{"type":58,"value":361},",",{"type":52,"tag":80,"props":363,"children":364},{"style":109},[365],{"type":58,"value":366}," router",{"type":52,"tag":80,"props":368,"children":369},{"style":103},[370],{"type":58,"value":117},{"type":52,"tag":80,"props":372,"children":373},{"style":97},[374],{"type":58,"value":122},{"type":52,"tag":80,"props":376,"children":377},{"style":103},[378],{"type":58,"value":127},{"type":52,"tag":80,"props":380,"children":381},{"style":130},[382],{"type":58,"value":383},".\u002Ftrpc",{"type":52,"tag":80,"props":385,"children":386},{"style":103},[387],{"type":58,"value":138},{"type":52,"tag":80,"props":389,"children":390},{"style":103},[391],{"type":58,"value":143},{"type":52,"tag":80,"props":393,"children":394},{"class":82,"line":156},[395],{"type":52,"tag":80,"props":396,"children":397},{"emptyLinePlaceholder":150},[398],{"type":58,"value":153},{"type":52,"tag":80,"props":400,"children":401},{"class":82,"line":200},[402,406,410,415,419,423,428],{"type":52,"tag":80,"props":403,"children":404},{"style":97},[405],{"type":58,"value":214},{"type":52,"tag":80,"props":407,"children":408},{"style":160},[409],{"type":58,"value":219},{"type":52,"tag":80,"props":411,"children":412},{"style":109},[413],{"type":58,"value":414}," appRouter ",{"type":52,"tag":80,"props":416,"children":417},{"style":103},[418],{"type":58,"value":173},{"type":52,"tag":80,"props":420,"children":421},{"style":185},[422],{"type":58,"value":366},{"type":52,"tag":80,"props":424,"children":425},{"style":109},[426],{"type":58,"value":427},"(",{"type":52,"tag":80,"props":429,"children":430},{"style":103},[431],{"type":58,"value":432},"{\n",{"type":52,"tag":80,"props":434,"children":435},{"class":82,"line":208},[436,442,447],{"type":52,"tag":80,"props":437,"children":439},{"style":438},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[440],{"type":58,"value":441},"  hello",{"type":52,"tag":80,"props":443,"children":444},{"style":103},[445],{"type":58,"value":446},":",{"type":52,"tag":80,"props":448,"children":449},{"style":109},[450],{"type":58,"value":451}," publicProcedure\n",{"type":52,"tag":80,"props":453,"children":454},{"class":82,"line":249},[455,460,465,470,474,479,483,488,493,497,501,505,510,515,520],{"type":52,"tag":80,"props":456,"children":457},{"style":103},[458],{"type":58,"value":459},"    .",{"type":52,"tag":80,"props":461,"children":462},{"style":185},[463],{"type":58,"value":464},"input",{"type":52,"tag":80,"props":466,"children":467},{"style":109},[468],{"type":58,"value":469},"(z",{"type":52,"tag":80,"props":471,"children":472},{"style":103},[473],{"type":58,"value":182},{"type":52,"tag":80,"props":475,"children":476},{"style":185},[477],{"type":58,"value":478},"object",{"type":52,"tag":80,"props":480,"children":481},{"style":109},[482],{"type":58,"value":427},{"type":52,"tag":80,"props":484,"children":485},{"style":103},[486],{"type":58,"value":487},"{",{"type":52,"tag":80,"props":489,"children":490},{"style":438},[491],{"type":58,"value":492}," name",{"type":52,"tag":80,"props":494,"children":495},{"style":103},[496],{"type":58,"value":446},{"type":52,"tag":80,"props":498,"children":499},{"style":109},[500],{"type":58,"value":315},{"type":52,"tag":80,"props":502,"children":503},{"style":103},[504],{"type":58,"value":182},{"type":52,"tag":80,"props":506,"children":507},{"style":185},[508],{"type":58,"value":509},"string",{"type":52,"tag":80,"props":511,"children":512},{"style":109},[513],{"type":58,"value":514},"() ",{"type":52,"tag":80,"props":516,"children":517},{"style":103},[518],{"type":58,"value":519},"}",{"type":52,"tag":80,"props":521,"children":522},{"style":109},[523],{"type":58,"value":524},"))\n",{"type":52,"tag":80,"props":526,"children":528},{"class":82,"line":527},8,[529,533,538,542,546,550,554,558,563,567,571,575,579,583,587],{"type":52,"tag":80,"props":530,"children":531},{"style":103},[532],{"type":58,"value":459},{"type":52,"tag":80,"props":534,"children":535},{"style":185},[536],{"type":58,"value":537},"output",{"type":52,"tag":80,"props":539,"children":540},{"style":109},[541],{"type":58,"value":469},{"type":52,"tag":80,"props":543,"children":544},{"style":103},[545],{"type":58,"value":182},{"type":52,"tag":80,"props":547,"children":548},{"style":185},[549],{"type":58,"value":478},{"type":52,"tag":80,"props":551,"children":552},{"style":109},[553],{"type":58,"value":427},{"type":52,"tag":80,"props":555,"children":556},{"style":103},[557],{"type":58,"value":487},{"type":52,"tag":80,"props":559,"children":560},{"style":438},[561],{"type":58,"value":562}," greeting",{"type":52,"tag":80,"props":564,"children":565},{"style":103},[566],{"type":58,"value":446},{"type":52,"tag":80,"props":568,"children":569},{"style":109},[570],{"type":58,"value":315},{"type":52,"tag":80,"props":572,"children":573},{"style":103},[574],{"type":58,"value":182},{"type":52,"tag":80,"props":576,"children":577},{"style":185},[578],{"type":58,"value":509},{"type":52,"tag":80,"props":580,"children":581},{"style":109},[582],{"type":58,"value":514},{"type":52,"tag":80,"props":584,"children":585},{"style":103},[586],{"type":58,"value":519},{"type":52,"tag":80,"props":588,"children":589},{"style":109},[590],{"type":58,"value":524},{"type":52,"tag":80,"props":592,"children":594},{"class":82,"line":593},9,[595,599,604,608,613,619,624,629],{"type":52,"tag":80,"props":596,"children":597},{"style":103},[598],{"type":58,"value":459},{"type":52,"tag":80,"props":600,"children":601},{"style":185},[602],{"type":58,"value":603},"query",{"type":52,"tag":80,"props":605,"children":606},{"style":109},[607],{"type":58,"value":427},{"type":52,"tag":80,"props":609,"children":610},{"style":103},[611],{"type":58,"value":612},"({",{"type":52,"tag":80,"props":614,"children":616},{"style":615},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[617],{"type":58,"value":618}," input",{"type":52,"tag":80,"props":620,"children":621},{"style":103},[622],{"type":58,"value":623}," })",{"type":52,"tag":80,"props":625,"children":626},{"style":160},[627],{"type":58,"value":628}," =>",{"type":52,"tag":80,"props":630,"children":631},{"style":103},[632],{"type":58,"value":633}," {\n",{"type":52,"tag":80,"props":635,"children":637},{"class":82,"line":636},10,[638,643,647,651,655,660,665,670,674,678,683,688],{"type":52,"tag":80,"props":639,"children":640},{"style":97},[641],{"type":58,"value":642},"      return",{"type":52,"tag":80,"props":644,"children":645},{"style":103},[646],{"type":58,"value":106},{"type":52,"tag":80,"props":648,"children":649},{"style":438},[650],{"type":58,"value":562},{"type":52,"tag":80,"props":652,"children":653},{"style":103},[654],{"type":58,"value":446},{"type":52,"tag":80,"props":656,"children":657},{"style":103},[658],{"type":58,"value":659}," `",{"type":52,"tag":80,"props":661,"children":662},{"style":130},[663],{"type":58,"value":664},"hello ",{"type":52,"tag":80,"props":666,"children":667},{"style":103},[668],{"type":58,"value":669},"${",{"type":52,"tag":80,"props":671,"children":672},{"style":109},[673],{"type":58,"value":464},{"type":52,"tag":80,"props":675,"children":676},{"style":103},[677],{"type":58,"value":182},{"type":52,"tag":80,"props":679,"children":680},{"style":109},[681],{"type":58,"value":682},"name",{"type":52,"tag":80,"props":684,"children":685},{"style":103},[686],{"type":58,"value":687},"}`",{"type":52,"tag":80,"props":689,"children":690},{"style":103},[691],{"type":58,"value":692}," };\n",{"type":52,"tag":80,"props":694,"children":696},{"class":82,"line":695},11,[697,702,707],{"type":52,"tag":80,"props":698,"children":699},{"style":103},[700],{"type":58,"value":701},"    }",{"type":52,"tag":80,"props":703,"children":704},{"style":109},[705],{"type":58,"value":706},")",{"type":52,"tag":80,"props":708,"children":709},{"style":103},[710],{"type":58,"value":711},",\n",{"type":52,"tag":80,"props":713,"children":715},{"class":82,"line":714},12,[716,720,724],{"type":52,"tag":80,"props":717,"children":718},{"style":103},[719],{"type":58,"value":519},{"type":52,"tag":80,"props":721,"children":722},{"style":109},[723],{"type":58,"value":706},{"type":52,"tag":80,"props":725,"children":726},{"style":103},[727],{"type":58,"value":143},{"type":52,"tag":80,"props":729,"children":731},{"class":82,"line":730},13,[732],{"type":52,"tag":80,"props":733,"children":734},{"emptyLinePlaceholder":150},[735],{"type":58,"value":153},{"type":52,"tag":80,"props":737,"children":739},{"class":82,"line":738},14,[740,744,749,755,760,765,770],{"type":52,"tag":80,"props":741,"children":742},{"style":97},[743],{"type":58,"value":214},{"type":52,"tag":80,"props":745,"children":746},{"style":160},[747],{"type":58,"value":748}," type",{"type":52,"tag":80,"props":750,"children":752},{"style":751},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[753],{"type":58,"value":754}," AppRouter",{"type":52,"tag":80,"props":756,"children":757},{"style":103},[758],{"type":58,"value":759}," =",{"type":52,"tag":80,"props":761,"children":762},{"style":103},[763],{"type":58,"value":764}," typeof",{"type":52,"tag":80,"props":766,"children":767},{"style":109},[768],{"type":58,"value":769}," appRouter",{"type":52,"tag":80,"props":771,"children":772},{"style":103},[773],{"type":58,"value":143},{"type":52,"tag":61,"props":775,"children":777},{"id":776},"core-patterns",[778],{"type":58,"value":779},"Core Patterns",{"type":52,"tag":781,"props":782,"children":784},"h3",{"id":783},"input-validation-with-zod",[785],{"type":58,"value":786},"Input validation with Zod",{"type":52,"tag":68,"props":788,"children":790},{"className":70,"code":789,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  userById: publicProcedure.input(z.string()).query(({ input }) => {\n    return { id: input, name: 'Katt' };\n  }),\n  userCreate: publicProcedure\n    .input(z.object({ name: z.string(), email: z.string().email() }))\n    .mutation(({ input }) => {\n      return { id: '1', ...input };\n    }),\n});\n",[791],{"type":52,"tag":76,"props":792,"children":793},{"__ignoreMap":73},[794,833,880,887,918,991,1045,1061,1077,1182,1218,1267,1282],{"type":52,"tag":80,"props":795,"children":796},{"class":82,"line":83},[797,801,805,809,813,817,821,825,829],{"type":52,"tag":80,"props":798,"children":799},{"style":97},[800],{"type":58,"value":100},{"type":52,"tag":80,"props":802,"children":803},{"style":103},[804],{"type":58,"value":106},{"type":52,"tag":80,"props":806,"children":807},{"style":109},[808],{"type":58,"value":315},{"type":52,"tag":80,"props":810,"children":811},{"style":103},[812],{"type":58,"value":117},{"type":52,"tag":80,"props":814,"children":815},{"style":97},[816],{"type":58,"value":122},{"type":52,"tag":80,"props":818,"children":819},{"style":103},[820],{"type":58,"value":127},{"type":52,"tag":80,"props":822,"children":823},{"style":130},[824],{"type":58,"value":332},{"type":52,"tag":80,"props":826,"children":827},{"style":103},[828],{"type":58,"value":138},{"type":52,"tag":80,"props":830,"children":831},{"style":103},[832],{"type":58,"value":143},{"type":52,"tag":80,"props":834,"children":835},{"class":82,"line":93},[836,840,844,848,852,856,860,864,868,872,876],{"type":52,"tag":80,"props":837,"children":838},{"style":97},[839],{"type":58,"value":100},{"type":52,"tag":80,"props":841,"children":842},{"style":103},[843],{"type":58,"value":106},{"type":52,"tag":80,"props":845,"children":846},{"style":109},[847],{"type":58,"value":356},{"type":52,"tag":80,"props":849,"children":850},{"style":103},[851],{"type":58,"value":361},{"type":52,"tag":80,"props":853,"children":854},{"style":109},[855],{"type":58,"value":366},{"type":52,"tag":80,"props":857,"children":858},{"style":103},[859],{"type":58,"value":117},{"type":52,"tag":80,"props":861,"children":862},{"style":97},[863],{"type":58,"value":122},{"type":52,"tag":80,"props":865,"children":866},{"style":103},[867],{"type":58,"value":127},{"type":52,"tag":80,"props":869,"children":870},{"style":130},[871],{"type":58,"value":383},{"type":52,"tag":80,"props":873,"children":874},{"style":103},[875],{"type":58,"value":138},{"type":52,"tag":80,"props":877,"children":878},{"style":103},[879],{"type":58,"value":143},{"type":52,"tag":80,"props":881,"children":882},{"class":82,"line":146},[883],{"type":52,"tag":80,"props":884,"children":885},{"emptyLinePlaceholder":150},[886],{"type":58,"value":153},{"type":52,"tag":80,"props":888,"children":889},{"class":82,"line":156},[890,894,898,902,906,910,914],{"type":52,"tag":80,"props":891,"children":892},{"style":97},[893],{"type":58,"value":214},{"type":52,"tag":80,"props":895,"children":896},{"style":160},[897],{"type":58,"value":219},{"type":52,"tag":80,"props":899,"children":900},{"style":109},[901],{"type":58,"value":414},{"type":52,"tag":80,"props":903,"children":904},{"style":103},[905],{"type":58,"value":173},{"type":52,"tag":80,"props":907,"children":908},{"style":185},[909],{"type":58,"value":366},{"type":52,"tag":80,"props":911,"children":912},{"style":109},[913],{"type":58,"value":427},{"type":52,"tag":80,"props":915,"children":916},{"style":103},[917],{"type":58,"value":432},{"type":52,"tag":80,"props":919,"children":920},{"class":82,"line":200},[921,926,930,934,938,942,946,950,954,959,963,967,971,975,979,983,987],{"type":52,"tag":80,"props":922,"children":923},{"style":438},[924],{"type":58,"value":925},"  userById",{"type":52,"tag":80,"props":927,"children":928},{"style":103},[929],{"type":58,"value":446},{"type":52,"tag":80,"props":931,"children":932},{"style":109},[933],{"type":58,"value":356},{"type":52,"tag":80,"props":935,"children":936},{"style":103},[937],{"type":58,"value":182},{"type":52,"tag":80,"props":939,"children":940},{"style":185},[941],{"type":58,"value":464},{"type":52,"tag":80,"props":943,"children":944},{"style":109},[945],{"type":58,"value":469},{"type":52,"tag":80,"props":947,"children":948},{"style":103},[949],{"type":58,"value":182},{"type":52,"tag":80,"props":951,"children":952},{"style":185},[953],{"type":58,"value":509},{"type":52,"tag":80,"props":955,"children":956},{"style":109},[957],{"type":58,"value":958},"())",{"type":52,"tag":80,"props":960,"children":961},{"style":103},[962],{"type":58,"value":182},{"type":52,"tag":80,"props":964,"children":965},{"style":185},[966],{"type":58,"value":603},{"type":52,"tag":80,"props":968,"children":969},{"style":109},[970],{"type":58,"value":427},{"type":52,"tag":80,"props":972,"children":973},{"style":103},[974],{"type":58,"value":612},{"type":52,"tag":80,"props":976,"children":977},{"style":615},[978],{"type":58,"value":618},{"type":52,"tag":80,"props":980,"children":981},{"style":103},[982],{"type":58,"value":623},{"type":52,"tag":80,"props":984,"children":985},{"style":160},[986],{"type":58,"value":628},{"type":52,"tag":80,"props":988,"children":989},{"style":103},[990],{"type":58,"value":633},{"type":52,"tag":80,"props":992,"children":993},{"class":82,"line":208},[994,999,1003,1008,1012,1016,1020,1024,1028,1032,1037,1041],{"type":52,"tag":80,"props":995,"children":996},{"style":97},[997],{"type":58,"value":998},"    return",{"type":52,"tag":80,"props":1000,"children":1001},{"style":103},[1002],{"type":58,"value":106},{"type":52,"tag":80,"props":1004,"children":1005},{"style":438},[1006],{"type":58,"value":1007}," id",{"type":52,"tag":80,"props":1009,"children":1010},{"style":103},[1011],{"type":58,"value":446},{"type":52,"tag":80,"props":1013,"children":1014},{"style":109},[1015],{"type":58,"value":618},{"type":52,"tag":80,"props":1017,"children":1018},{"style":103},[1019],{"type":58,"value":361},{"type":52,"tag":80,"props":1021,"children":1022},{"style":438},[1023],{"type":58,"value":492},{"type":52,"tag":80,"props":1025,"children":1026},{"style":103},[1027],{"type":58,"value":446},{"type":52,"tag":80,"props":1029,"children":1030},{"style":103},[1031],{"type":58,"value":127},{"type":52,"tag":80,"props":1033,"children":1034},{"style":130},[1035],{"type":58,"value":1036},"Katt",{"type":52,"tag":80,"props":1038,"children":1039},{"style":103},[1040],{"type":58,"value":138},{"type":52,"tag":80,"props":1042,"children":1043},{"style":103},[1044],{"type":58,"value":692},{"type":52,"tag":80,"props":1046,"children":1047},{"class":82,"line":249},[1048,1053,1057],{"type":52,"tag":80,"props":1049,"children":1050},{"style":103},[1051],{"type":58,"value":1052},"  }",{"type":52,"tag":80,"props":1054,"children":1055},{"style":109},[1056],{"type":58,"value":706},{"type":52,"tag":80,"props":1058,"children":1059},{"style":103},[1060],{"type":58,"value":711},{"type":52,"tag":80,"props":1062,"children":1063},{"class":82,"line":527},[1064,1069,1073],{"type":52,"tag":80,"props":1065,"children":1066},{"style":438},[1067],{"type":58,"value":1068},"  userCreate",{"type":52,"tag":80,"props":1070,"children":1071},{"style":103},[1072],{"type":58,"value":446},{"type":52,"tag":80,"props":1074,"children":1075},{"style":109},[1076],{"type":58,"value":451},{"type":52,"tag":80,"props":1078,"children":1079},{"class":82,"line":593},[1080,1084,1088,1092,1096,1100,1104,1108,1112,1116,1120,1124,1128,1132,1136,1141,1145,1149,1153,1157,1161,1165,1170,1174,1178],{"type":52,"tag":80,"props":1081,"children":1082},{"style":103},[1083],{"type":58,"value":459},{"type":52,"tag":80,"props":1085,"children":1086},{"style":185},[1087],{"type":58,"value":464},{"type":52,"tag":80,"props":1089,"children":1090},{"style":109},[1091],{"type":58,"value":469},{"type":52,"tag":80,"props":1093,"children":1094},{"style":103},[1095],{"type":58,"value":182},{"type":52,"tag":80,"props":1097,"children":1098},{"style":185},[1099],{"type":58,"value":478},{"type":52,"tag":80,"props":1101,"children":1102},{"style":109},[1103],{"type":58,"value":427},{"type":52,"tag":80,"props":1105,"children":1106},{"style":103},[1107],{"type":58,"value":487},{"type":52,"tag":80,"props":1109,"children":1110},{"style":438},[1111],{"type":58,"value":492},{"type":52,"tag":80,"props":1113,"children":1114},{"style":103},[1115],{"type":58,"value":446},{"type":52,"tag":80,"props":1117,"children":1118},{"style":109},[1119],{"type":58,"value":315},{"type":52,"tag":80,"props":1121,"children":1122},{"style":103},[1123],{"type":58,"value":182},{"type":52,"tag":80,"props":1125,"children":1126},{"style":185},[1127],{"type":58,"value":509},{"type":52,"tag":80,"props":1129,"children":1130},{"style":109},[1131],{"type":58,"value":193},{"type":52,"tag":80,"props":1133,"children":1134},{"style":103},[1135],{"type":58,"value":361},{"type":52,"tag":80,"props":1137,"children":1138},{"style":438},[1139],{"type":58,"value":1140}," email",{"type":52,"tag":80,"props":1142,"children":1143},{"style":103},[1144],{"type":58,"value":446},{"type":52,"tag":80,"props":1146,"children":1147},{"style":109},[1148],{"type":58,"value":315},{"type":52,"tag":80,"props":1150,"children":1151},{"style":103},[1152],{"type":58,"value":182},{"type":52,"tag":80,"props":1154,"children":1155},{"style":185},[1156],{"type":58,"value":509},{"type":52,"tag":80,"props":1158,"children":1159},{"style":109},[1160],{"type":58,"value":193},{"type":52,"tag":80,"props":1162,"children":1163},{"style":103},[1164],{"type":58,"value":182},{"type":52,"tag":80,"props":1166,"children":1167},{"style":185},[1168],{"type":58,"value":1169},"email",{"type":52,"tag":80,"props":1171,"children":1172},{"style":109},[1173],{"type":58,"value":514},{"type":52,"tag":80,"props":1175,"children":1176},{"style":103},[1177],{"type":58,"value":519},{"type":52,"tag":80,"props":1179,"children":1180},{"style":109},[1181],{"type":58,"value":524},{"type":52,"tag":80,"props":1183,"children":1184},{"class":82,"line":636},[1185,1189,1194,1198,1202,1206,1210,1214],{"type":52,"tag":80,"props":1186,"children":1187},{"style":103},[1188],{"type":58,"value":459},{"type":52,"tag":80,"props":1190,"children":1191},{"style":185},[1192],{"type":58,"value":1193},"mutation",{"type":52,"tag":80,"props":1195,"children":1196},{"style":109},[1197],{"type":58,"value":427},{"type":52,"tag":80,"props":1199,"children":1200},{"style":103},[1201],{"type":58,"value":612},{"type":52,"tag":80,"props":1203,"children":1204},{"style":615},[1205],{"type":58,"value":618},{"type":52,"tag":80,"props":1207,"children":1208},{"style":103},[1209],{"type":58,"value":623},{"type":52,"tag":80,"props":1211,"children":1212},{"style":160},[1213],{"type":58,"value":628},{"type":52,"tag":80,"props":1215,"children":1216},{"style":103},[1217],{"type":58,"value":633},{"type":52,"tag":80,"props":1219,"children":1220},{"class":82,"line":695},[1221,1225,1229,1233,1237,1241,1246,1250,1254,1259,1263],{"type":52,"tag":80,"props":1222,"children":1223},{"style":97},[1224],{"type":58,"value":642},{"type":52,"tag":80,"props":1226,"children":1227},{"style":103},[1228],{"type":58,"value":106},{"type":52,"tag":80,"props":1230,"children":1231},{"style":438},[1232],{"type":58,"value":1007},{"type":52,"tag":80,"props":1234,"children":1235},{"style":103},[1236],{"type":58,"value":446},{"type":52,"tag":80,"props":1238,"children":1239},{"style":103},[1240],{"type":58,"value":127},{"type":52,"tag":80,"props":1242,"children":1243},{"style":130},[1244],{"type":58,"value":1245},"1",{"type":52,"tag":80,"props":1247,"children":1248},{"style":103},[1249],{"type":58,"value":138},{"type":52,"tag":80,"props":1251,"children":1252},{"style":103},[1253],{"type":58,"value":361},{"type":52,"tag":80,"props":1255,"children":1256},{"style":103},[1257],{"type":58,"value":1258}," ...",{"type":52,"tag":80,"props":1260,"children":1261},{"style":109},[1262],{"type":58,"value":464},{"type":52,"tag":80,"props":1264,"children":1265},{"style":103},[1266],{"type":58,"value":692},{"type":52,"tag":80,"props":1268,"children":1269},{"class":82,"line":714},[1270,1274,1278],{"type":52,"tag":80,"props":1271,"children":1272},{"style":103},[1273],{"type":58,"value":701},{"type":52,"tag":80,"props":1275,"children":1276},{"style":109},[1277],{"type":58,"value":706},{"type":52,"tag":80,"props":1279,"children":1280},{"style":103},[1281],{"type":58,"value":711},{"type":52,"tag":80,"props":1283,"children":1284},{"class":82,"line":730},[1285,1289,1293],{"type":52,"tag":80,"props":1286,"children":1287},{"style":103},[1288],{"type":58,"value":519},{"type":52,"tag":80,"props":1290,"children":1291},{"style":109},[1292],{"type":58,"value":706},{"type":52,"tag":80,"props":1294,"children":1295},{"style":103},[1296],{"type":58,"value":143},{"type":52,"tag":781,"props":1298,"children":1300},{"id":1299},"input-chaining-to-merge-object-schemas",[1301],{"type":58,"value":1302},"Input chaining to merge object schemas",{"type":52,"tag":68,"props":1304,"children":1306},{"className":70,"code":1305,"language":72,"meta":73,"style":73},"import { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst baseProcedure = t.procedure\n  .input(z.object({ townName: z.string() }))\n  .use((opts) => {\n    console.log(`Request from: ${opts.input.townName}`);\n    return opts.next();\n  });\n\nexport const appRouter = t.router({\n  hello: baseProcedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}, from ${input.townName}` };\n    }),\n});\n",[1307],{"type":52,"tag":76,"props":1308,"children":1309},{"__ignoreMap":73},[1310,1349,1388,1395,1430,1437,1466,1531,1568,1636,1664,1679,1686,1725,1741,1805,1841,1919,1935],{"type":52,"tag":80,"props":1311,"children":1312},{"class":82,"line":83},[1313,1317,1321,1325,1329,1333,1337,1341,1345],{"type":52,"tag":80,"props":1314,"children":1315},{"style":97},[1316],{"type":58,"value":100},{"type":52,"tag":80,"props":1318,"children":1319},{"style":103},[1320],{"type":58,"value":106},{"type":52,"tag":80,"props":1322,"children":1323},{"style":109},[1324],{"type":58,"value":112},{"type":52,"tag":80,"props":1326,"children":1327},{"style":103},[1328],{"type":58,"value":117},{"type":52,"tag":80,"props":1330,"children":1331},{"style":97},[1332],{"type":58,"value":122},{"type":52,"tag":80,"props":1334,"children":1335},{"style":103},[1336],{"type":58,"value":127},{"type":52,"tag":80,"props":1338,"children":1339},{"style":130},[1340],{"type":58,"value":133},{"type":52,"tag":80,"props":1342,"children":1343},{"style":103},[1344],{"type":58,"value":138},{"type":52,"tag":80,"props":1346,"children":1347},{"style":103},[1348],{"type":58,"value":143},{"type":52,"tag":80,"props":1350,"children":1351},{"class":82,"line":93},[1352,1356,1360,1364,1368,1372,1376,1380,1384],{"type":52,"tag":80,"props":1353,"children":1354},{"style":97},[1355],{"type":58,"value":100},{"type":52,"tag":80,"props":1357,"children":1358},{"style":103},[1359],{"type":58,"value":106},{"type":52,"tag":80,"props":1361,"children":1362},{"style":109},[1363],{"type":58,"value":315},{"type":52,"tag":80,"props":1365,"children":1366},{"style":103},[1367],{"type":58,"value":117},{"type":52,"tag":80,"props":1369,"children":1370},{"style":97},[1371],{"type":58,"value":122},{"type":52,"tag":80,"props":1373,"children":1374},{"style":103},[1375],{"type":58,"value":127},{"type":52,"tag":80,"props":1377,"children":1378},{"style":130},[1379],{"type":58,"value":332},{"type":52,"tag":80,"props":1381,"children":1382},{"style":103},[1383],{"type":58,"value":138},{"type":52,"tag":80,"props":1385,"children":1386},{"style":103},[1387],{"type":58,"value":143},{"type":52,"tag":80,"props":1389,"children":1390},{"class":82,"line":146},[1391],{"type":52,"tag":80,"props":1392,"children":1393},{"emptyLinePlaceholder":150},[1394],{"type":58,"value":153},{"type":52,"tag":80,"props":1396,"children":1397},{"class":82,"line":156},[1398,1402,1406,1410,1414,1418,1422,1426],{"type":52,"tag":80,"props":1399,"children":1400},{"style":160},[1401],{"type":58,"value":163},{"type":52,"tag":80,"props":1403,"children":1404},{"style":109},[1405],{"type":58,"value":168},{"type":52,"tag":80,"props":1407,"children":1408},{"style":103},[1409],{"type":58,"value":173},{"type":52,"tag":80,"props":1411,"children":1412},{"style":109},[1413],{"type":58,"value":112},{"type":52,"tag":80,"props":1415,"children":1416},{"style":103},[1417],{"type":58,"value":182},{"type":52,"tag":80,"props":1419,"children":1420},{"style":185},[1421],{"type":58,"value":188},{"type":52,"tag":80,"props":1423,"children":1424},{"style":109},[1425],{"type":58,"value":193},{"type":52,"tag":80,"props":1427,"children":1428},{"style":103},[1429],{"type":58,"value":143},{"type":52,"tag":80,"props":1431,"children":1432},{"class":82,"line":200},[1433],{"type":52,"tag":80,"props":1434,"children":1435},{"emptyLinePlaceholder":150},[1436],{"type":58,"value":153},{"type":52,"tag":80,"props":1438,"children":1439},{"class":82,"line":208},[1440,1444,1449,1453,1457,1461],{"type":52,"tag":80,"props":1441,"children":1442},{"style":160},[1443],{"type":58,"value":163},{"type":52,"tag":80,"props":1445,"children":1446},{"style":109},[1447],{"type":58,"value":1448}," baseProcedure ",{"type":52,"tag":80,"props":1450,"children":1451},{"style":103},[1452],{"type":58,"value":173},{"type":52,"tag":80,"props":1454,"children":1455},{"style":109},[1456],{"type":58,"value":233},{"type":52,"tag":80,"props":1458,"children":1459},{"style":103},[1460],{"type":58,"value":182},{"type":52,"tag":80,"props":1462,"children":1463},{"style":109},[1464],{"type":58,"value":1465},"procedure\n",{"type":52,"tag":80,"props":1467,"children":1468},{"class":82,"line":249},[1469,1474,1478,1482,1486,1490,1494,1498,1503,1507,1511,1515,1519,1523,1527],{"type":52,"tag":80,"props":1470,"children":1471},{"style":103},[1472],{"type":58,"value":1473},"  .",{"type":52,"tag":80,"props":1475,"children":1476},{"style":185},[1477],{"type":58,"value":464},{"type":52,"tag":80,"props":1479,"children":1480},{"style":109},[1481],{"type":58,"value":469},{"type":52,"tag":80,"props":1483,"children":1484},{"style":103},[1485],{"type":58,"value":182},{"type":52,"tag":80,"props":1487,"children":1488},{"style":185},[1489],{"type":58,"value":478},{"type":52,"tag":80,"props":1491,"children":1492},{"style":109},[1493],{"type":58,"value":427},{"type":52,"tag":80,"props":1495,"children":1496},{"style":103},[1497],{"type":58,"value":487},{"type":52,"tag":80,"props":1499,"children":1500},{"style":438},[1501],{"type":58,"value":1502}," townName",{"type":52,"tag":80,"props":1504,"children":1505},{"style":103},[1506],{"type":58,"value":446},{"type":52,"tag":80,"props":1508,"children":1509},{"style":109},[1510],{"type":58,"value":315},{"type":52,"tag":80,"props":1512,"children":1513},{"style":103},[1514],{"type":58,"value":182},{"type":52,"tag":80,"props":1516,"children":1517},{"style":185},[1518],{"type":58,"value":509},{"type":52,"tag":80,"props":1520,"children":1521},{"style":109},[1522],{"type":58,"value":514},{"type":52,"tag":80,"props":1524,"children":1525},{"style":103},[1526],{"type":58,"value":519},{"type":52,"tag":80,"props":1528,"children":1529},{"style":109},[1530],{"type":58,"value":524},{"type":52,"tag":80,"props":1532,"children":1533},{"class":82,"line":527},[1534,1538,1543,1547,1551,1556,1560,1564],{"type":52,"tag":80,"props":1535,"children":1536},{"style":103},[1537],{"type":58,"value":1473},{"type":52,"tag":80,"props":1539,"children":1540},{"style":185},[1541],{"type":58,"value":1542},"use",{"type":52,"tag":80,"props":1544,"children":1545},{"style":109},[1546],{"type":58,"value":427},{"type":52,"tag":80,"props":1548,"children":1549},{"style":103},[1550],{"type":58,"value":427},{"type":52,"tag":80,"props":1552,"children":1553},{"style":615},[1554],{"type":58,"value":1555},"opts",{"type":52,"tag":80,"props":1557,"children":1558},{"style":103},[1559],{"type":58,"value":706},{"type":52,"tag":80,"props":1561,"children":1562},{"style":160},[1563],{"type":58,"value":628},{"type":52,"tag":80,"props":1565,"children":1566},{"style":103},[1567],{"type":58,"value":633},{"type":52,"tag":80,"props":1569,"children":1570},{"class":82,"line":593},[1571,1576,1580,1585,1589,1594,1599,1603,1607,1611,1615,1619,1624,1628,1632],{"type":52,"tag":80,"props":1572,"children":1573},{"style":109},[1574],{"type":58,"value":1575},"    console",{"type":52,"tag":80,"props":1577,"children":1578},{"style":103},[1579],{"type":58,"value":182},{"type":52,"tag":80,"props":1581,"children":1582},{"style":185},[1583],{"type":58,"value":1584},"log",{"type":52,"tag":80,"props":1586,"children":1587},{"style":438},[1588],{"type":58,"value":427},{"type":52,"tag":80,"props":1590,"children":1591},{"style":103},[1592],{"type":58,"value":1593},"`",{"type":52,"tag":80,"props":1595,"children":1596},{"style":130},[1597],{"type":58,"value":1598},"Request from: ",{"type":52,"tag":80,"props":1600,"children":1601},{"style":103},[1602],{"type":58,"value":669},{"type":52,"tag":80,"props":1604,"children":1605},{"style":109},[1606],{"type":58,"value":1555},{"type":52,"tag":80,"props":1608,"children":1609},{"style":103},[1610],{"type":58,"value":182},{"type":52,"tag":80,"props":1612,"children":1613},{"style":109},[1614],{"type":58,"value":464},{"type":52,"tag":80,"props":1616,"children":1617},{"style":103},[1618],{"type":58,"value":182},{"type":52,"tag":80,"props":1620,"children":1621},{"style":109},[1622],{"type":58,"value":1623},"townName",{"type":52,"tag":80,"props":1625,"children":1626},{"style":103},[1627],{"type":58,"value":687},{"type":52,"tag":80,"props":1629,"children":1630},{"style":438},[1631],{"type":58,"value":706},{"type":52,"tag":80,"props":1633,"children":1634},{"style":103},[1635],{"type":58,"value":143},{"type":52,"tag":80,"props":1637,"children":1638},{"class":82,"line":636},[1639,1643,1648,1652,1656,1660],{"type":52,"tag":80,"props":1640,"children":1641},{"style":97},[1642],{"type":58,"value":998},{"type":52,"tag":80,"props":1644,"children":1645},{"style":109},[1646],{"type":58,"value":1647}," opts",{"type":52,"tag":80,"props":1649,"children":1650},{"style":103},[1651],{"type":58,"value":182},{"type":52,"tag":80,"props":1653,"children":1654},{"style":185},[1655],{"type":58,"value":30},{"type":52,"tag":80,"props":1657,"children":1658},{"style":438},[1659],{"type":58,"value":193},{"type":52,"tag":80,"props":1661,"children":1662},{"style":103},[1663],{"type":58,"value":143},{"type":52,"tag":80,"props":1665,"children":1666},{"class":82,"line":695},[1667,1671,1675],{"type":52,"tag":80,"props":1668,"children":1669},{"style":103},[1670],{"type":58,"value":1052},{"type":52,"tag":80,"props":1672,"children":1673},{"style":109},[1674],{"type":58,"value":706},{"type":52,"tag":80,"props":1676,"children":1677},{"style":103},[1678],{"type":58,"value":143},{"type":52,"tag":80,"props":1680,"children":1681},{"class":82,"line":714},[1682],{"type":52,"tag":80,"props":1683,"children":1684},{"emptyLinePlaceholder":150},[1685],{"type":58,"value":153},{"type":52,"tag":80,"props":1687,"children":1688},{"class":82,"line":730},[1689,1693,1697,1701,1705,1709,1713,1717,1721],{"type":52,"tag":80,"props":1690,"children":1691},{"style":97},[1692],{"type":58,"value":214},{"type":52,"tag":80,"props":1694,"children":1695},{"style":160},[1696],{"type":58,"value":219},{"type":52,"tag":80,"props":1698,"children":1699},{"style":109},[1700],{"type":58,"value":414},{"type":52,"tag":80,"props":1702,"children":1703},{"style":103},[1704],{"type":58,"value":173},{"type":52,"tag":80,"props":1706,"children":1707},{"style":109},[1708],{"type":58,"value":233},{"type":52,"tag":80,"props":1710,"children":1711},{"style":103},[1712],{"type":58,"value":182},{"type":52,"tag":80,"props":1714,"children":1715},{"style":185},[1716],{"type":58,"value":242},{"type":52,"tag":80,"props":1718,"children":1719},{"style":109},[1720],{"type":58,"value":427},{"type":52,"tag":80,"props":1722,"children":1723},{"style":103},[1724],{"type":58,"value":432},{"type":52,"tag":80,"props":1726,"children":1727},{"class":82,"line":738},[1728,1732,1736],{"type":52,"tag":80,"props":1729,"children":1730},{"style":438},[1731],{"type":58,"value":441},{"type":52,"tag":80,"props":1733,"children":1734},{"style":103},[1735],{"type":58,"value":446},{"type":52,"tag":80,"props":1737,"children":1738},{"style":109},[1739],{"type":58,"value":1740}," baseProcedure\n",{"type":52,"tag":80,"props":1742,"children":1744},{"class":82,"line":1743},15,[1745,1749,1753,1757,1761,1765,1769,1773,1777,1781,1785,1789,1793,1797,1801],{"type":52,"tag":80,"props":1746,"children":1747},{"style":103},[1748],{"type":58,"value":459},{"type":52,"tag":80,"props":1750,"children":1751},{"style":185},[1752],{"type":58,"value":464},{"type":52,"tag":80,"props":1754,"children":1755},{"style":109},[1756],{"type":58,"value":469},{"type":52,"tag":80,"props":1758,"children":1759},{"style":103},[1760],{"type":58,"value":182},{"type":52,"tag":80,"props":1762,"children":1763},{"style":185},[1764],{"type":58,"value":478},{"type":52,"tag":80,"props":1766,"children":1767},{"style":109},[1768],{"type":58,"value":427},{"type":52,"tag":80,"props":1770,"children":1771},{"style":103},[1772],{"type":58,"value":487},{"type":52,"tag":80,"props":1774,"children":1775},{"style":438},[1776],{"type":58,"value":492},{"type":52,"tag":80,"props":1778,"children":1779},{"style":103},[1780],{"type":58,"value":446},{"type":52,"tag":80,"props":1782,"children":1783},{"style":109},[1784],{"type":58,"value":315},{"type":52,"tag":80,"props":1786,"children":1787},{"style":103},[1788],{"type":58,"value":182},{"type":52,"tag":80,"props":1790,"children":1791},{"style":185},[1792],{"type":58,"value":509},{"type":52,"tag":80,"props":1794,"children":1795},{"style":109},[1796],{"type":58,"value":514},{"type":52,"tag":80,"props":1798,"children":1799},{"style":103},[1800],{"type":58,"value":519},{"type":52,"tag":80,"props":1802,"children":1803},{"style":109},[1804],{"type":58,"value":524},{"type":52,"tag":80,"props":1806,"children":1808},{"class":82,"line":1807},16,[1809,1813,1817,1821,1825,1829,1833,1837],{"type":52,"tag":80,"props":1810,"children":1811},{"style":103},[1812],{"type":58,"value":459},{"type":52,"tag":80,"props":1814,"children":1815},{"style":185},[1816],{"type":58,"value":603},{"type":52,"tag":80,"props":1818,"children":1819},{"style":109},[1820],{"type":58,"value":427},{"type":52,"tag":80,"props":1822,"children":1823},{"style":103},[1824],{"type":58,"value":612},{"type":52,"tag":80,"props":1826,"children":1827},{"style":615},[1828],{"type":58,"value":618},{"type":52,"tag":80,"props":1830,"children":1831},{"style":103},[1832],{"type":58,"value":623},{"type":52,"tag":80,"props":1834,"children":1835},{"style":160},[1836],{"type":58,"value":628},{"type":52,"tag":80,"props":1838,"children":1839},{"style":103},[1840],{"type":58,"value":633},{"type":52,"tag":80,"props":1842,"children":1844},{"class":82,"line":1843},17,[1845,1849,1853,1857,1861,1865,1870,1874,1878,1882,1886,1890,1895,1899,1903,1907,1911,1915],{"type":52,"tag":80,"props":1846,"children":1847},{"style":97},[1848],{"type":58,"value":642},{"type":52,"tag":80,"props":1850,"children":1851},{"style":103},[1852],{"type":58,"value":106},{"type":52,"tag":80,"props":1854,"children":1855},{"style":438},[1856],{"type":58,"value":562},{"type":52,"tag":80,"props":1858,"children":1859},{"style":103},[1860],{"type":58,"value":446},{"type":52,"tag":80,"props":1862,"children":1863},{"style":103},[1864],{"type":58,"value":659},{"type":52,"tag":80,"props":1866,"children":1867},{"style":130},[1868],{"type":58,"value":1869},"Hello ",{"type":52,"tag":80,"props":1871,"children":1872},{"style":103},[1873],{"type":58,"value":669},{"type":52,"tag":80,"props":1875,"children":1876},{"style":109},[1877],{"type":58,"value":464},{"type":52,"tag":80,"props":1879,"children":1880},{"style":103},[1881],{"type":58,"value":182},{"type":52,"tag":80,"props":1883,"children":1884},{"style":109},[1885],{"type":58,"value":682},{"type":52,"tag":80,"props":1887,"children":1888},{"style":103},[1889],{"type":58,"value":519},{"type":52,"tag":80,"props":1891,"children":1892},{"style":130},[1893],{"type":58,"value":1894},", from ",{"type":52,"tag":80,"props":1896,"children":1897},{"style":103},[1898],{"type":58,"value":669},{"type":52,"tag":80,"props":1900,"children":1901},{"style":109},[1902],{"type":58,"value":464},{"type":52,"tag":80,"props":1904,"children":1905},{"style":103},[1906],{"type":58,"value":182},{"type":52,"tag":80,"props":1908,"children":1909},{"style":109},[1910],{"type":58,"value":1623},{"type":52,"tag":80,"props":1912,"children":1913},{"style":103},[1914],{"type":58,"value":687},{"type":52,"tag":80,"props":1916,"children":1917},{"style":103},[1918],{"type":58,"value":692},{"type":52,"tag":80,"props":1920,"children":1922},{"class":82,"line":1921},18,[1923,1927,1931],{"type":52,"tag":80,"props":1924,"children":1925},{"style":103},[1926],{"type":58,"value":701},{"type":52,"tag":80,"props":1928,"children":1929},{"style":109},[1930],{"type":58,"value":706},{"type":52,"tag":80,"props":1932,"children":1933},{"style":103},[1934],{"type":58,"value":711},{"type":52,"tag":80,"props":1936,"children":1938},{"class":82,"line":1937},19,[1939,1943,1947],{"type":52,"tag":80,"props":1940,"children":1941},{"style":103},[1942],{"type":58,"value":519},{"type":52,"tag":80,"props":1944,"children":1945},{"style":109},[1946],{"type":58,"value":706},{"type":52,"tag":80,"props":1948,"children":1949},{"style":103},[1950],{"type":58,"value":143},{"type":52,"tag":1952,"props":1953,"children":1954},"p",{},[1955,1957,1963,1965,1971],{"type":58,"value":1956},"Multiple ",{"type":52,"tag":76,"props":1958,"children":1960},{"className":1959},[],[1961],{"type":58,"value":1962},".input()",{"type":58,"value":1964}," calls merge object properties; the final input type is ",{"type":52,"tag":76,"props":1966,"children":1968},{"className":1967},[],[1969],{"type":58,"value":1970},"{ townName: string; name: string }",{"type":58,"value":182},{"type":52,"tag":781,"props":1973,"children":1975},{"id":1974},"output-validation",[1976],{"type":58,"value":1977},"Output validation",{"type":52,"tag":68,"props":1979,"children":1981},{"className":70,"code":1980,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  hello: publicProcedure\n    .output(z.object({ greeting: z.string() }))\n    .query(() => {\n      return { greeting: 'hello world' };\n    }),\n});\n",[1982],{"type":52,"tag":76,"props":1983,"children":1984},{"__ignoreMap":73},[1985,2024,2071,2078,2109,2124,2187,2214,2250,2265],{"type":52,"tag":80,"props":1986,"children":1987},{"class":82,"line":83},[1988,1992,1996,2000,2004,2008,2012,2016,2020],{"type":52,"tag":80,"props":1989,"children":1990},{"style":97},[1991],{"type":58,"value":100},{"type":52,"tag":80,"props":1993,"children":1994},{"style":103},[1995],{"type":58,"value":106},{"type":52,"tag":80,"props":1997,"children":1998},{"style":109},[1999],{"type":58,"value":315},{"type":52,"tag":80,"props":2001,"children":2002},{"style":103},[2003],{"type":58,"value":117},{"type":52,"tag":80,"props":2005,"children":2006},{"style":97},[2007],{"type":58,"value":122},{"type":52,"tag":80,"props":2009,"children":2010},{"style":103},[2011],{"type":58,"value":127},{"type":52,"tag":80,"props":2013,"children":2014},{"style":130},[2015],{"type":58,"value":332},{"type":52,"tag":80,"props":2017,"children":2018},{"style":103},[2019],{"type":58,"value":138},{"type":52,"tag":80,"props":2021,"children":2022},{"style":103},[2023],{"type":58,"value":143},{"type":52,"tag":80,"props":2025,"children":2026},{"class":82,"line":93},[2027,2031,2035,2039,2043,2047,2051,2055,2059,2063,2067],{"type":52,"tag":80,"props":2028,"children":2029},{"style":97},[2030],{"type":58,"value":100},{"type":52,"tag":80,"props":2032,"children":2033},{"style":103},[2034],{"type":58,"value":106},{"type":52,"tag":80,"props":2036,"children":2037},{"style":109},[2038],{"type":58,"value":356},{"type":52,"tag":80,"props":2040,"children":2041},{"style":103},[2042],{"type":58,"value":361},{"type":52,"tag":80,"props":2044,"children":2045},{"style":109},[2046],{"type":58,"value":366},{"type":52,"tag":80,"props":2048,"children":2049},{"style":103},[2050],{"type":58,"value":117},{"type":52,"tag":80,"props":2052,"children":2053},{"style":97},[2054],{"type":58,"value":122},{"type":52,"tag":80,"props":2056,"children":2057},{"style":103},[2058],{"type":58,"value":127},{"type":52,"tag":80,"props":2060,"children":2061},{"style":130},[2062],{"type":58,"value":383},{"type":52,"tag":80,"props":2064,"children":2065},{"style":103},[2066],{"type":58,"value":138},{"type":52,"tag":80,"props":2068,"children":2069},{"style":103},[2070],{"type":58,"value":143},{"type":52,"tag":80,"props":2072,"children":2073},{"class":82,"line":146},[2074],{"type":52,"tag":80,"props":2075,"children":2076},{"emptyLinePlaceholder":150},[2077],{"type":58,"value":153},{"type":52,"tag":80,"props":2079,"children":2080},{"class":82,"line":156},[2081,2085,2089,2093,2097,2101,2105],{"type":52,"tag":80,"props":2082,"children":2083},{"style":97},[2084],{"type":58,"value":214},{"type":52,"tag":80,"props":2086,"children":2087},{"style":160},[2088],{"type":58,"value":219},{"type":52,"tag":80,"props":2090,"children":2091},{"style":109},[2092],{"type":58,"value":414},{"type":52,"tag":80,"props":2094,"children":2095},{"style":103},[2096],{"type":58,"value":173},{"type":52,"tag":80,"props":2098,"children":2099},{"style":185},[2100],{"type":58,"value":366},{"type":52,"tag":80,"props":2102,"children":2103},{"style":109},[2104],{"type":58,"value":427},{"type":52,"tag":80,"props":2106,"children":2107},{"style":103},[2108],{"type":58,"value":432},{"type":52,"tag":80,"props":2110,"children":2111},{"class":82,"line":200},[2112,2116,2120],{"type":52,"tag":80,"props":2113,"children":2114},{"style":438},[2115],{"type":58,"value":441},{"type":52,"tag":80,"props":2117,"children":2118},{"style":103},[2119],{"type":58,"value":446},{"type":52,"tag":80,"props":2121,"children":2122},{"style":109},[2123],{"type":58,"value":451},{"type":52,"tag":80,"props":2125,"children":2126},{"class":82,"line":208},[2127,2131,2135,2139,2143,2147,2151,2155,2159,2163,2167,2171,2175,2179,2183],{"type":52,"tag":80,"props":2128,"children":2129},{"style":103},[2130],{"type":58,"value":459},{"type":52,"tag":80,"props":2132,"children":2133},{"style":185},[2134],{"type":58,"value":537},{"type":52,"tag":80,"props":2136,"children":2137},{"style":109},[2138],{"type":58,"value":469},{"type":52,"tag":80,"props":2140,"children":2141},{"style":103},[2142],{"type":58,"value":182},{"type":52,"tag":80,"props":2144,"children":2145},{"style":185},[2146],{"type":58,"value":478},{"type":52,"tag":80,"props":2148,"children":2149},{"style":109},[2150],{"type":58,"value":427},{"type":52,"tag":80,"props":2152,"children":2153},{"style":103},[2154],{"type":58,"value":487},{"type":52,"tag":80,"props":2156,"children":2157},{"style":438},[2158],{"type":58,"value":562},{"type":52,"tag":80,"props":2160,"children":2161},{"style":103},[2162],{"type":58,"value":446},{"type":52,"tag":80,"props":2164,"children":2165},{"style":109},[2166],{"type":58,"value":315},{"type":52,"tag":80,"props":2168,"children":2169},{"style":103},[2170],{"type":58,"value":182},{"type":52,"tag":80,"props":2172,"children":2173},{"style":185},[2174],{"type":58,"value":509},{"type":52,"tag":80,"props":2176,"children":2177},{"style":109},[2178],{"type":58,"value":514},{"type":52,"tag":80,"props":2180,"children":2181},{"style":103},[2182],{"type":58,"value":519},{"type":52,"tag":80,"props":2184,"children":2185},{"style":109},[2186],{"type":58,"value":524},{"type":52,"tag":80,"props":2188,"children":2189},{"class":82,"line":249},[2190,2194,2198,2202,2206,2210],{"type":52,"tag":80,"props":2191,"children":2192},{"style":103},[2193],{"type":58,"value":459},{"type":52,"tag":80,"props":2195,"children":2196},{"style":185},[2197],{"type":58,"value":603},{"type":52,"tag":80,"props":2199,"children":2200},{"style":109},[2201],{"type":58,"value":427},{"type":52,"tag":80,"props":2203,"children":2204},{"style":103},[2205],{"type":58,"value":193},{"type":52,"tag":80,"props":2207,"children":2208},{"style":160},[2209],{"type":58,"value":628},{"type":52,"tag":80,"props":2211,"children":2212},{"style":103},[2213],{"type":58,"value":633},{"type":52,"tag":80,"props":2215,"children":2216},{"class":82,"line":527},[2217,2221,2225,2229,2233,2237,2242,2246],{"type":52,"tag":80,"props":2218,"children":2219},{"style":97},[2220],{"type":58,"value":642},{"type":52,"tag":80,"props":2222,"children":2223},{"style":103},[2224],{"type":58,"value":106},{"type":52,"tag":80,"props":2226,"children":2227},{"style":438},[2228],{"type":58,"value":562},{"type":52,"tag":80,"props":2230,"children":2231},{"style":103},[2232],{"type":58,"value":446},{"type":52,"tag":80,"props":2234,"children":2235},{"style":103},[2236],{"type":58,"value":127},{"type":52,"tag":80,"props":2238,"children":2239},{"style":130},[2240],{"type":58,"value":2241},"hello world",{"type":52,"tag":80,"props":2243,"children":2244},{"style":103},[2245],{"type":58,"value":138},{"type":52,"tag":80,"props":2247,"children":2248},{"style":103},[2249],{"type":58,"value":692},{"type":52,"tag":80,"props":2251,"children":2252},{"class":82,"line":593},[2253,2257,2261],{"type":52,"tag":80,"props":2254,"children":2255},{"style":103},[2256],{"type":58,"value":701},{"type":52,"tag":80,"props":2258,"children":2259},{"style":109},[2260],{"type":58,"value":706},{"type":52,"tag":80,"props":2262,"children":2263},{"style":103},[2264],{"type":58,"value":711},{"type":52,"tag":80,"props":2266,"children":2267},{"class":82,"line":636},[2268,2272,2276],{"type":52,"tag":80,"props":2269,"children":2270},{"style":103},[2271],{"type":58,"value":519},{"type":52,"tag":80,"props":2273,"children":2274},{"style":109},[2275],{"type":58,"value":706},{"type":52,"tag":80,"props":2277,"children":2278},{"style":103},[2279],{"type":58,"value":143},{"type":52,"tag":1952,"props":2281,"children":2282},{},[2283],{"type":58,"value":2284},"Output validation catches mismatches between your return type and the expected shape, useful for untrusted data sources.",{"type":52,"tag":781,"props":2286,"children":2288},{"id":2287},"custom-validator-function-no-library",[2289],{"type":58,"value":2290},"Custom validator function (no library)",{"type":52,"tag":68,"props":2292,"children":2294},{"className":70,"code":2293,"language":72,"meta":73,"style":73},"import { initTRPC } from '@trpc\u002Fserver';\n\nconst t = initTRPC.create();\n\nexport const appRouter = t.router({\n  hello: t.procedure\n    .input((value): string => {\n      if (typeof value === 'string') return value;\n      throw new Error('Input is not a string');\n    })\n    .output((value): string => {\n      if (typeof value === 'string') return value;\n      throw new Error('Output is not a string');\n    })\n    .query(({ input }) => {\n      return `hello ${input}`;\n    }),\n});\n",[2295],{"type":52,"tag":76,"props":2296,"children":2297},{"__ignoreMap":73},[2298,2337,2344,2379,2386,2425,2448,2490,2548,2591,2603,2642,2693,2733,2744,2779,2810,2825],{"type":52,"tag":80,"props":2299,"children":2300},{"class":82,"line":83},[2301,2305,2309,2313,2317,2321,2325,2329,2333],{"type":52,"tag":80,"props":2302,"children":2303},{"style":97},[2304],{"type":58,"value":100},{"type":52,"tag":80,"props":2306,"children":2307},{"style":103},[2308],{"type":58,"value":106},{"type":52,"tag":80,"props":2310,"children":2311},{"style":109},[2312],{"type":58,"value":112},{"type":52,"tag":80,"props":2314,"children":2315},{"style":103},[2316],{"type":58,"value":117},{"type":52,"tag":80,"props":2318,"children":2319},{"style":97},[2320],{"type":58,"value":122},{"type":52,"tag":80,"props":2322,"children":2323},{"style":103},[2324],{"type":58,"value":127},{"type":52,"tag":80,"props":2326,"children":2327},{"style":130},[2328],{"type":58,"value":133},{"type":52,"tag":80,"props":2330,"children":2331},{"style":103},[2332],{"type":58,"value":138},{"type":52,"tag":80,"props":2334,"children":2335},{"style":103},[2336],{"type":58,"value":143},{"type":52,"tag":80,"props":2338,"children":2339},{"class":82,"line":93},[2340],{"type":52,"tag":80,"props":2341,"children":2342},{"emptyLinePlaceholder":150},[2343],{"type":58,"value":153},{"type":52,"tag":80,"props":2345,"children":2346},{"class":82,"line":146},[2347,2351,2355,2359,2363,2367,2371,2375],{"type":52,"tag":80,"props":2348,"children":2349},{"style":160},[2350],{"type":58,"value":163},{"type":52,"tag":80,"props":2352,"children":2353},{"style":109},[2354],{"type":58,"value":168},{"type":52,"tag":80,"props":2356,"children":2357},{"style":103},[2358],{"type":58,"value":173},{"type":52,"tag":80,"props":2360,"children":2361},{"style":109},[2362],{"type":58,"value":112},{"type":52,"tag":80,"props":2364,"children":2365},{"style":103},[2366],{"type":58,"value":182},{"type":52,"tag":80,"props":2368,"children":2369},{"style":185},[2370],{"type":58,"value":188},{"type":52,"tag":80,"props":2372,"children":2373},{"style":109},[2374],{"type":58,"value":193},{"type":52,"tag":80,"props":2376,"children":2377},{"style":103},[2378],{"type":58,"value":143},{"type":52,"tag":80,"props":2380,"children":2381},{"class":82,"line":156},[2382],{"type":52,"tag":80,"props":2383,"children":2384},{"emptyLinePlaceholder":150},[2385],{"type":58,"value":153},{"type":52,"tag":80,"props":2387,"children":2388},{"class":82,"line":200},[2389,2393,2397,2401,2405,2409,2413,2417,2421],{"type":52,"tag":80,"props":2390,"children":2391},{"style":97},[2392],{"type":58,"value":214},{"type":52,"tag":80,"props":2394,"children":2395},{"style":160},[2396],{"type":58,"value":219},{"type":52,"tag":80,"props":2398,"children":2399},{"style":109},[2400],{"type":58,"value":414},{"type":52,"tag":80,"props":2402,"children":2403},{"style":103},[2404],{"type":58,"value":173},{"type":52,"tag":80,"props":2406,"children":2407},{"style":109},[2408],{"type":58,"value":233},{"type":52,"tag":80,"props":2410,"children":2411},{"style":103},[2412],{"type":58,"value":182},{"type":52,"tag":80,"props":2414,"children":2415},{"style":185},[2416],{"type":58,"value":242},{"type":52,"tag":80,"props":2418,"children":2419},{"style":109},[2420],{"type":58,"value":427},{"type":52,"tag":80,"props":2422,"children":2423},{"style":103},[2424],{"type":58,"value":432},{"type":52,"tag":80,"props":2426,"children":2427},{"class":82,"line":208},[2428,2432,2436,2440,2444],{"type":52,"tag":80,"props":2429,"children":2430},{"style":438},[2431],{"type":58,"value":441},{"type":52,"tag":80,"props":2433,"children":2434},{"style":103},[2435],{"type":58,"value":446},{"type":52,"tag":80,"props":2437,"children":2438},{"style":109},[2439],{"type":58,"value":233},{"type":52,"tag":80,"props":2441,"children":2442},{"style":103},[2443],{"type":58,"value":182},{"type":52,"tag":80,"props":2445,"children":2446},{"style":109},[2447],{"type":58,"value":1465},{"type":52,"tag":80,"props":2449,"children":2450},{"class":82,"line":249},[2451,2455,2459,2463,2467,2472,2477,2482,2486],{"type":52,"tag":80,"props":2452,"children":2453},{"style":103},[2454],{"type":58,"value":459},{"type":52,"tag":80,"props":2456,"children":2457},{"style":185},[2458],{"type":58,"value":464},{"type":52,"tag":80,"props":2460,"children":2461},{"style":109},[2462],{"type":58,"value":427},{"type":52,"tag":80,"props":2464,"children":2465},{"style":103},[2466],{"type":58,"value":427},{"type":52,"tag":80,"props":2468,"children":2469},{"style":615},[2470],{"type":58,"value":2471},"value",{"type":52,"tag":80,"props":2473,"children":2474},{"style":103},[2475],{"type":58,"value":2476},"):",{"type":52,"tag":80,"props":2478,"children":2479},{"style":751},[2480],{"type":58,"value":2481}," string",{"type":52,"tag":80,"props":2483,"children":2484},{"style":160},[2485],{"type":58,"value":628},{"type":52,"tag":80,"props":2487,"children":2488},{"style":103},[2489],{"type":58,"value":633},{"type":52,"tag":80,"props":2491,"children":2492},{"class":82,"line":527},[2493,2498,2503,2508,2513,2518,2522,2526,2530,2535,2540,2544],{"type":52,"tag":80,"props":2494,"children":2495},{"style":97},[2496],{"type":58,"value":2497},"      if",{"type":52,"tag":80,"props":2499,"children":2500},{"style":438},[2501],{"type":58,"value":2502}," (",{"type":52,"tag":80,"props":2504,"children":2505},{"style":103},[2506],{"type":58,"value":2507},"typeof",{"type":52,"tag":80,"props":2509,"children":2510},{"style":109},[2511],{"type":58,"value":2512}," value",{"type":52,"tag":80,"props":2514,"children":2515},{"style":103},[2516],{"type":58,"value":2517}," ===",{"type":52,"tag":80,"props":2519,"children":2520},{"style":103},[2521],{"type":58,"value":127},{"type":52,"tag":80,"props":2523,"children":2524},{"style":130},[2525],{"type":58,"value":509},{"type":52,"tag":80,"props":2527,"children":2528},{"style":103},[2529],{"type":58,"value":138},{"type":52,"tag":80,"props":2531,"children":2532},{"style":438},[2533],{"type":58,"value":2534},") ",{"type":52,"tag":80,"props":2536,"children":2537},{"style":97},[2538],{"type":58,"value":2539},"return",{"type":52,"tag":80,"props":2541,"children":2542},{"style":109},[2543],{"type":58,"value":2512},{"type":52,"tag":80,"props":2545,"children":2546},{"style":103},[2547],{"type":58,"value":143},{"type":52,"tag":80,"props":2549,"children":2550},{"class":82,"line":593},[2551,2556,2561,2566,2570,2574,2579,2583,2587],{"type":52,"tag":80,"props":2552,"children":2553},{"style":97},[2554],{"type":58,"value":2555},"      throw",{"type":52,"tag":80,"props":2557,"children":2558},{"style":103},[2559],{"type":58,"value":2560}," new",{"type":52,"tag":80,"props":2562,"children":2563},{"style":185},[2564],{"type":58,"value":2565}," Error",{"type":52,"tag":80,"props":2567,"children":2568},{"style":438},[2569],{"type":58,"value":427},{"type":52,"tag":80,"props":2571,"children":2572},{"style":103},[2573],{"type":58,"value":138},{"type":52,"tag":80,"props":2575,"children":2576},{"style":130},[2577],{"type":58,"value":2578},"Input is not a string",{"type":52,"tag":80,"props":2580,"children":2581},{"style":103},[2582],{"type":58,"value":138},{"type":52,"tag":80,"props":2584,"children":2585},{"style":438},[2586],{"type":58,"value":706},{"type":52,"tag":80,"props":2588,"children":2589},{"style":103},[2590],{"type":58,"value":143},{"type":52,"tag":80,"props":2592,"children":2593},{"class":82,"line":636},[2594,2598],{"type":52,"tag":80,"props":2595,"children":2596},{"style":103},[2597],{"type":58,"value":701},{"type":52,"tag":80,"props":2599,"children":2600},{"style":109},[2601],{"type":58,"value":2602},")\n",{"type":52,"tag":80,"props":2604,"children":2605},{"class":82,"line":695},[2606,2610,2614,2618,2622,2626,2630,2634,2638],{"type":52,"tag":80,"props":2607,"children":2608},{"style":103},[2609],{"type":58,"value":459},{"type":52,"tag":80,"props":2611,"children":2612},{"style":185},[2613],{"type":58,"value":537},{"type":52,"tag":80,"props":2615,"children":2616},{"style":109},[2617],{"type":58,"value":427},{"type":52,"tag":80,"props":2619,"children":2620},{"style":103},[2621],{"type":58,"value":427},{"type":52,"tag":80,"props":2623,"children":2624},{"style":615},[2625],{"type":58,"value":2471},{"type":52,"tag":80,"props":2627,"children":2628},{"style":103},[2629],{"type":58,"value":2476},{"type":52,"tag":80,"props":2631,"children":2632},{"style":751},[2633],{"type":58,"value":2481},{"type":52,"tag":80,"props":2635,"children":2636},{"style":160},[2637],{"type":58,"value":628},{"type":52,"tag":80,"props":2639,"children":2640},{"style":103},[2641],{"type":58,"value":633},{"type":52,"tag":80,"props":2643,"children":2644},{"class":82,"line":714},[2645,2649,2653,2657,2661,2665,2669,2673,2677,2681,2685,2689],{"type":52,"tag":80,"props":2646,"children":2647},{"style":97},[2648],{"type":58,"value":2497},{"type":52,"tag":80,"props":2650,"children":2651},{"style":438},[2652],{"type":58,"value":2502},{"type":52,"tag":80,"props":2654,"children":2655},{"style":103},[2656],{"type":58,"value":2507},{"type":52,"tag":80,"props":2658,"children":2659},{"style":109},[2660],{"type":58,"value":2512},{"type":52,"tag":80,"props":2662,"children":2663},{"style":103},[2664],{"type":58,"value":2517},{"type":52,"tag":80,"props":2666,"children":2667},{"style":103},[2668],{"type":58,"value":127},{"type":52,"tag":80,"props":2670,"children":2671},{"style":130},[2672],{"type":58,"value":509},{"type":52,"tag":80,"props":2674,"children":2675},{"style":103},[2676],{"type":58,"value":138},{"type":52,"tag":80,"props":2678,"children":2679},{"style":438},[2680],{"type":58,"value":2534},{"type":52,"tag":80,"props":2682,"children":2683},{"style":97},[2684],{"type":58,"value":2539},{"type":52,"tag":80,"props":2686,"children":2687},{"style":109},[2688],{"type":58,"value":2512},{"type":52,"tag":80,"props":2690,"children":2691},{"style":103},[2692],{"type":58,"value":143},{"type":52,"tag":80,"props":2694,"children":2695},{"class":82,"line":730},[2696,2700,2704,2708,2712,2716,2721,2725,2729],{"type":52,"tag":80,"props":2697,"children":2698},{"style":97},[2699],{"type":58,"value":2555},{"type":52,"tag":80,"props":2701,"children":2702},{"style":103},[2703],{"type":58,"value":2560},{"type":52,"tag":80,"props":2705,"children":2706},{"style":185},[2707],{"type":58,"value":2565},{"type":52,"tag":80,"props":2709,"children":2710},{"style":438},[2711],{"type":58,"value":427},{"type":52,"tag":80,"props":2713,"children":2714},{"style":103},[2715],{"type":58,"value":138},{"type":52,"tag":80,"props":2717,"children":2718},{"style":130},[2719],{"type":58,"value":2720},"Output is not a string",{"type":52,"tag":80,"props":2722,"children":2723},{"style":103},[2724],{"type":58,"value":138},{"type":52,"tag":80,"props":2726,"children":2727},{"style":438},[2728],{"type":58,"value":706},{"type":52,"tag":80,"props":2730,"children":2731},{"style":103},[2732],{"type":58,"value":143},{"type":52,"tag":80,"props":2734,"children":2735},{"class":82,"line":738},[2736,2740],{"type":52,"tag":80,"props":2737,"children":2738},{"style":103},[2739],{"type":58,"value":701},{"type":52,"tag":80,"props":2741,"children":2742},{"style":109},[2743],{"type":58,"value":2602},{"type":52,"tag":80,"props":2745,"children":2746},{"class":82,"line":1743},[2747,2751,2755,2759,2763,2767,2771,2775],{"type":52,"tag":80,"props":2748,"children":2749},{"style":103},[2750],{"type":58,"value":459},{"type":52,"tag":80,"props":2752,"children":2753},{"style":185},[2754],{"type":58,"value":603},{"type":52,"tag":80,"props":2756,"children":2757},{"style":109},[2758],{"type":58,"value":427},{"type":52,"tag":80,"props":2760,"children":2761},{"style":103},[2762],{"type":58,"value":612},{"type":52,"tag":80,"props":2764,"children":2765},{"style":615},[2766],{"type":58,"value":618},{"type":52,"tag":80,"props":2768,"children":2769},{"style":103},[2770],{"type":58,"value":623},{"type":52,"tag":80,"props":2772,"children":2773},{"style":160},[2774],{"type":58,"value":628},{"type":52,"tag":80,"props":2776,"children":2777},{"style":103},[2778],{"type":58,"value":633},{"type":52,"tag":80,"props":2780,"children":2781},{"class":82,"line":1807},[2782,2786,2790,2794,2798,2802,2806],{"type":52,"tag":80,"props":2783,"children":2784},{"style":97},[2785],{"type":58,"value":642},{"type":52,"tag":80,"props":2787,"children":2788},{"style":103},[2789],{"type":58,"value":659},{"type":52,"tag":80,"props":2791,"children":2792},{"style":130},[2793],{"type":58,"value":664},{"type":52,"tag":80,"props":2795,"children":2796},{"style":103},[2797],{"type":58,"value":669},{"type":52,"tag":80,"props":2799,"children":2800},{"style":109},[2801],{"type":58,"value":464},{"type":52,"tag":80,"props":2803,"children":2804},{"style":103},[2805],{"type":58,"value":687},{"type":52,"tag":80,"props":2807,"children":2808},{"style":103},[2809],{"type":58,"value":143},{"type":52,"tag":80,"props":2811,"children":2812},{"class":82,"line":1843},[2813,2817,2821],{"type":52,"tag":80,"props":2814,"children":2815},{"style":103},[2816],{"type":58,"value":701},{"type":52,"tag":80,"props":2818,"children":2819},{"style":109},[2820],{"type":58,"value":706},{"type":52,"tag":80,"props":2822,"children":2823},{"style":103},[2824],{"type":58,"value":711},{"type":52,"tag":80,"props":2826,"children":2827},{"class":82,"line":1921},[2828,2832,2836],{"type":52,"tag":80,"props":2829,"children":2830},{"style":103},[2831],{"type":58,"value":519},{"type":52,"tag":80,"props":2833,"children":2834},{"style":109},[2835],{"type":58,"value":706},{"type":52,"tag":80,"props":2837,"children":2838},{"style":103},[2839],{"type":58,"value":143},{"type":52,"tag":61,"props":2841,"children":2843},{"id":2842},"common-mistakes",[2844],{"type":58,"value":2845},"Common Mistakes",{"type":52,"tag":781,"props":2847,"children":2849},{"id":2848},"medium-chaining-non-object-inputs",[2850,2855],{"type":52,"tag":80,"props":2851,"children":2852},{},[2853],{"type":58,"value":2854},"MEDIUM",{"type":58,"value":2856}," Chaining non-object inputs",{"type":52,"tag":1952,"props":2858,"children":2859},{},[2860],{"type":58,"value":2861},"Wrong:",{"type":52,"tag":68,"props":2863,"children":2865},{"className":70,"code":2864,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure.input(z.string()).input(z.number());\n",[2866],{"type":52,"tag":76,"props":2867,"children":2868},{"__ignoreMap":73},[2869,2908,2947,2954],{"type":52,"tag":80,"props":2870,"children":2871},{"class":82,"line":83},[2872,2876,2880,2884,2888,2892,2896,2900,2904],{"type":52,"tag":80,"props":2873,"children":2874},{"style":97},[2875],{"type":58,"value":100},{"type":52,"tag":80,"props":2877,"children":2878},{"style":103},[2879],{"type":58,"value":106},{"type":52,"tag":80,"props":2881,"children":2882},{"style":109},[2883],{"type":58,"value":315},{"type":52,"tag":80,"props":2885,"children":2886},{"style":103},[2887],{"type":58,"value":117},{"type":52,"tag":80,"props":2889,"children":2890},{"style":97},[2891],{"type":58,"value":122},{"type":52,"tag":80,"props":2893,"children":2894},{"style":103},[2895],{"type":58,"value":127},{"type":52,"tag":80,"props":2897,"children":2898},{"style":130},[2899],{"type":58,"value":332},{"type":52,"tag":80,"props":2901,"children":2902},{"style":103},[2903],{"type":58,"value":138},{"type":52,"tag":80,"props":2905,"children":2906},{"style":103},[2907],{"type":58,"value":143},{"type":52,"tag":80,"props":2909,"children":2910},{"class":82,"line":93},[2911,2915,2919,2923,2927,2931,2935,2939,2943],{"type":52,"tag":80,"props":2912,"children":2913},{"style":97},[2914],{"type":58,"value":100},{"type":52,"tag":80,"props":2916,"children":2917},{"style":103},[2918],{"type":58,"value":106},{"type":52,"tag":80,"props":2920,"children":2921},{"style":109},[2922],{"type":58,"value":356},{"type":52,"tag":80,"props":2924,"children":2925},{"style":103},[2926],{"type":58,"value":117},{"type":52,"tag":80,"props":2928,"children":2929},{"style":97},[2930],{"type":58,"value":122},{"type":52,"tag":80,"props":2932,"children":2933},{"style":103},[2934],{"type":58,"value":127},{"type":52,"tag":80,"props":2936,"children":2937},{"style":130},[2938],{"type":58,"value":383},{"type":52,"tag":80,"props":2940,"children":2941},{"style":103},[2942],{"type":58,"value":138},{"type":52,"tag":80,"props":2944,"children":2945},{"style":103},[2946],{"type":58,"value":143},{"type":52,"tag":80,"props":2948,"children":2949},{"class":82,"line":146},[2950],{"type":52,"tag":80,"props":2951,"children":2952},{"emptyLinePlaceholder":150},[2953],{"type":58,"value":153},{"type":52,"tag":80,"props":2955,"children":2956},{"class":82,"line":156},[2957,2961,2966,2970,2974,2978,2982,2986,2990,2994,2998,3002,3006,3010,3014,3019,3023],{"type":52,"tag":80,"props":2958,"children":2959},{"style":160},[2960],{"type":58,"value":163},{"type":52,"tag":80,"props":2962,"children":2963},{"style":109},[2964],{"type":58,"value":2965}," proc ",{"type":52,"tag":80,"props":2967,"children":2968},{"style":103},[2969],{"type":58,"value":173},{"type":52,"tag":80,"props":2971,"children":2972},{"style":109},[2973],{"type":58,"value":356},{"type":52,"tag":80,"props":2975,"children":2976},{"style":103},[2977],{"type":58,"value":182},{"type":52,"tag":80,"props":2979,"children":2980},{"style":185},[2981],{"type":58,"value":464},{"type":52,"tag":80,"props":2983,"children":2984},{"style":109},[2985],{"type":58,"value":469},{"type":52,"tag":80,"props":2987,"children":2988},{"style":103},[2989],{"type":58,"value":182},{"type":52,"tag":80,"props":2991,"children":2992},{"style":185},[2993],{"type":58,"value":509},{"type":52,"tag":80,"props":2995,"children":2996},{"style":109},[2997],{"type":58,"value":958},{"type":52,"tag":80,"props":2999,"children":3000},{"style":103},[3001],{"type":58,"value":182},{"type":52,"tag":80,"props":3003,"children":3004},{"style":185},[3005],{"type":58,"value":464},{"type":52,"tag":80,"props":3007,"children":3008},{"style":109},[3009],{"type":58,"value":469},{"type":52,"tag":80,"props":3011,"children":3012},{"style":103},[3013],{"type":58,"value":182},{"type":52,"tag":80,"props":3015,"children":3016},{"style":185},[3017],{"type":58,"value":3018},"number",{"type":52,"tag":80,"props":3020,"children":3021},{"style":109},[3022],{"type":58,"value":958},{"type":52,"tag":80,"props":3024,"children":3025},{"style":103},[3026],{"type":58,"value":143},{"type":52,"tag":1952,"props":3028,"children":3029},{},[3030],{"type":58,"value":3031},"Correct:",{"type":52,"tag":68,"props":3033,"children":3035},{"className":70,"code":3034,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .input(z.object({ name: z.string() }))\n  .input(z.object({ age: z.number() }));\n",[3036],{"type":52,"tag":76,"props":3037,"children":3038},{"__ignoreMap":73},[3039,3078,3117,3124,3143,3206],{"type":52,"tag":80,"props":3040,"children":3041},{"class":82,"line":83},[3042,3046,3050,3054,3058,3062,3066,3070,3074],{"type":52,"tag":80,"props":3043,"children":3044},{"style":97},[3045],{"type":58,"value":100},{"type":52,"tag":80,"props":3047,"children":3048},{"style":103},[3049],{"type":58,"value":106},{"type":52,"tag":80,"props":3051,"children":3052},{"style":109},[3053],{"type":58,"value":315},{"type":52,"tag":80,"props":3055,"children":3056},{"style":103},[3057],{"type":58,"value":117},{"type":52,"tag":80,"props":3059,"children":3060},{"style":97},[3061],{"type":58,"value":122},{"type":52,"tag":80,"props":3063,"children":3064},{"style":103},[3065],{"type":58,"value":127},{"type":52,"tag":80,"props":3067,"children":3068},{"style":130},[3069],{"type":58,"value":332},{"type":52,"tag":80,"props":3071,"children":3072},{"style":103},[3073],{"type":58,"value":138},{"type":52,"tag":80,"props":3075,"children":3076},{"style":103},[3077],{"type":58,"value":143},{"type":52,"tag":80,"props":3079,"children":3080},{"class":82,"line":93},[3081,3085,3089,3093,3097,3101,3105,3109,3113],{"type":52,"tag":80,"props":3082,"children":3083},{"style":97},[3084],{"type":58,"value":100},{"type":52,"tag":80,"props":3086,"children":3087},{"style":103},[3088],{"type":58,"value":106},{"type":52,"tag":80,"props":3090,"children":3091},{"style":109},[3092],{"type":58,"value":356},{"type":52,"tag":80,"props":3094,"children":3095},{"style":103},[3096],{"type":58,"value":117},{"type":52,"tag":80,"props":3098,"children":3099},{"style":97},[3100],{"type":58,"value":122},{"type":52,"tag":80,"props":3102,"children":3103},{"style":103},[3104],{"type":58,"value":127},{"type":52,"tag":80,"props":3106,"children":3107},{"style":130},[3108],{"type":58,"value":383},{"type":52,"tag":80,"props":3110,"children":3111},{"style":103},[3112],{"type":58,"value":138},{"type":52,"tag":80,"props":3114,"children":3115},{"style":103},[3116],{"type":58,"value":143},{"type":52,"tag":80,"props":3118,"children":3119},{"class":82,"line":146},[3120],{"type":52,"tag":80,"props":3121,"children":3122},{"emptyLinePlaceholder":150},[3123],{"type":58,"value":153},{"type":52,"tag":80,"props":3125,"children":3126},{"class":82,"line":156},[3127,3131,3135,3139],{"type":52,"tag":80,"props":3128,"children":3129},{"style":160},[3130],{"type":58,"value":163},{"type":52,"tag":80,"props":3132,"children":3133},{"style":109},[3134],{"type":58,"value":2965},{"type":52,"tag":80,"props":3136,"children":3137},{"style":103},[3138],{"type":58,"value":173},{"type":52,"tag":80,"props":3140,"children":3141},{"style":109},[3142],{"type":58,"value":451},{"type":52,"tag":80,"props":3144,"children":3145},{"class":82,"line":200},[3146,3150,3154,3158,3162,3166,3170,3174,3178,3182,3186,3190,3194,3198,3202],{"type":52,"tag":80,"props":3147,"children":3148},{"style":103},[3149],{"type":58,"value":1473},{"type":52,"tag":80,"props":3151,"children":3152},{"style":185},[3153],{"type":58,"value":464},{"type":52,"tag":80,"props":3155,"children":3156},{"style":109},[3157],{"type":58,"value":469},{"type":52,"tag":80,"props":3159,"children":3160},{"style":103},[3161],{"type":58,"value":182},{"type":52,"tag":80,"props":3163,"children":3164},{"style":185},[3165],{"type":58,"value":478},{"type":52,"tag":80,"props":3167,"children":3168},{"style":109},[3169],{"type":58,"value":427},{"type":52,"tag":80,"props":3171,"children":3172},{"style":103},[3173],{"type":58,"value":487},{"type":52,"tag":80,"props":3175,"children":3176},{"style":438},[3177],{"type":58,"value":492},{"type":52,"tag":80,"props":3179,"children":3180},{"style":103},[3181],{"type":58,"value":446},{"type":52,"tag":80,"props":3183,"children":3184},{"style":109},[3185],{"type":58,"value":315},{"type":52,"tag":80,"props":3187,"children":3188},{"style":103},[3189],{"type":58,"value":182},{"type":52,"tag":80,"props":3191,"children":3192},{"style":185},[3193],{"type":58,"value":509},{"type":52,"tag":80,"props":3195,"children":3196},{"style":109},[3197],{"type":58,"value":514},{"type":52,"tag":80,"props":3199,"children":3200},{"style":103},[3201],{"type":58,"value":519},{"type":52,"tag":80,"props":3203,"children":3204},{"style":109},[3205],{"type":58,"value":524},{"type":52,"tag":80,"props":3207,"children":3208},{"class":82,"line":208},[3209,3213,3217,3221,3225,3229,3233,3237,3242,3246,3250,3254,3258,3262,3266,3271],{"type":52,"tag":80,"props":3210,"children":3211},{"style":103},[3212],{"type":58,"value":1473},{"type":52,"tag":80,"props":3214,"children":3215},{"style":185},[3216],{"type":58,"value":464},{"type":52,"tag":80,"props":3218,"children":3219},{"style":109},[3220],{"type":58,"value":469},{"type":52,"tag":80,"props":3222,"children":3223},{"style":103},[3224],{"type":58,"value":182},{"type":52,"tag":80,"props":3226,"children":3227},{"style":185},[3228],{"type":58,"value":478},{"type":52,"tag":80,"props":3230,"children":3231},{"style":109},[3232],{"type":58,"value":427},{"type":52,"tag":80,"props":3234,"children":3235},{"style":103},[3236],{"type":58,"value":487},{"type":52,"tag":80,"props":3238,"children":3239},{"style":438},[3240],{"type":58,"value":3241}," age",{"type":52,"tag":80,"props":3243,"children":3244},{"style":103},[3245],{"type":58,"value":446},{"type":52,"tag":80,"props":3247,"children":3248},{"style":109},[3249],{"type":58,"value":315},{"type":52,"tag":80,"props":3251,"children":3252},{"style":103},[3253],{"type":58,"value":182},{"type":52,"tag":80,"props":3255,"children":3256},{"style":185},[3257],{"type":58,"value":3018},{"type":52,"tag":80,"props":3259,"children":3260},{"style":109},[3261],{"type":58,"value":514},{"type":52,"tag":80,"props":3263,"children":3264},{"style":103},[3265],{"type":58,"value":519},{"type":52,"tag":80,"props":3267,"children":3268},{"style":109},[3269],{"type":58,"value":3270},"))",{"type":52,"tag":80,"props":3272,"children":3273},{"style":103},[3274],{"type":58,"value":143},{"type":52,"tag":1952,"props":3276,"children":3277},{},[3278,3279,3284],{"type":58,"value":1956},{"type":52,"tag":76,"props":3280,"children":3282},{"className":3281},[],[3283],{"type":58,"value":1962},{"type":58,"value":3285}," calls merge object properties; non-object schemas (string, number, array) cannot be merged and produce type errors.",{"type":52,"tag":1952,"props":3287,"children":3288},{},[3289],{"type":58,"value":3290},"Source: www\u002Fdocs\u002Fserver\u002Fvalidators.md",{"type":52,"tag":781,"props":3292,"children":3294},{"id":3293},"medium-output-validation-failure-returns-500",[3295,3299],{"type":52,"tag":80,"props":3296,"children":3297},{},[3298],{"type":58,"value":2854},{"type":58,"value":3300}," Output validation failure returns 500",{"type":52,"tag":1952,"props":3302,"children":3303},{},[3304],{"type":58,"value":2861},{"type":52,"tag":68,"props":3306,"children":3308},{"className":70,"code":3307,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .output(z.object({ id: z.string() }))\n  .query(() => ({ id: 123 }));\n",[3309],{"type":52,"tag":76,"props":3310,"children":3311},{"__ignoreMap":73},[3312,3351,3390,3397,3416,3479],{"type":52,"tag":80,"props":3313,"children":3314},{"class":82,"line":83},[3315,3319,3323,3327,3331,3335,3339,3343,3347],{"type":52,"tag":80,"props":3316,"children":3317},{"style":97},[3318],{"type":58,"value":100},{"type":52,"tag":80,"props":3320,"children":3321},{"style":103},[3322],{"type":58,"value":106},{"type":52,"tag":80,"props":3324,"children":3325},{"style":109},[3326],{"type":58,"value":315},{"type":52,"tag":80,"props":3328,"children":3329},{"style":103},[3330],{"type":58,"value":117},{"type":52,"tag":80,"props":3332,"children":3333},{"style":97},[3334],{"type":58,"value":122},{"type":52,"tag":80,"props":3336,"children":3337},{"style":103},[3338],{"type":58,"value":127},{"type":52,"tag":80,"props":3340,"children":3341},{"style":130},[3342],{"type":58,"value":332},{"type":52,"tag":80,"props":3344,"children":3345},{"style":103},[3346],{"type":58,"value":138},{"type":52,"tag":80,"props":3348,"children":3349},{"style":103},[3350],{"type":58,"value":143},{"type":52,"tag":80,"props":3352,"children":3353},{"class":82,"line":93},[3354,3358,3362,3366,3370,3374,3378,3382,3386],{"type":52,"tag":80,"props":3355,"children":3356},{"style":97},[3357],{"type":58,"value":100},{"type":52,"tag":80,"props":3359,"children":3360},{"style":103},[3361],{"type":58,"value":106},{"type":52,"tag":80,"props":3363,"children":3364},{"style":109},[3365],{"type":58,"value":356},{"type":52,"tag":80,"props":3367,"children":3368},{"style":103},[3369],{"type":58,"value":117},{"type":52,"tag":80,"props":3371,"children":3372},{"style":97},[3373],{"type":58,"value":122},{"type":52,"tag":80,"props":3375,"children":3376},{"style":103},[3377],{"type":58,"value":127},{"type":52,"tag":80,"props":3379,"children":3380},{"style":130},[3381],{"type":58,"value":383},{"type":52,"tag":80,"props":3383,"children":3384},{"style":103},[3385],{"type":58,"value":138},{"type":52,"tag":80,"props":3387,"children":3388},{"style":103},[3389],{"type":58,"value":143},{"type":52,"tag":80,"props":3391,"children":3392},{"class":82,"line":146},[3393],{"type":52,"tag":80,"props":3394,"children":3395},{"emptyLinePlaceholder":150},[3396],{"type":58,"value":153},{"type":52,"tag":80,"props":3398,"children":3399},{"class":82,"line":156},[3400,3404,3408,3412],{"type":52,"tag":80,"props":3401,"children":3402},{"style":160},[3403],{"type":58,"value":163},{"type":52,"tag":80,"props":3405,"children":3406},{"style":109},[3407],{"type":58,"value":2965},{"type":52,"tag":80,"props":3409,"children":3410},{"style":103},[3411],{"type":58,"value":173},{"type":52,"tag":80,"props":3413,"children":3414},{"style":109},[3415],{"type":58,"value":451},{"type":52,"tag":80,"props":3417,"children":3418},{"class":82,"line":200},[3419,3423,3427,3431,3435,3439,3443,3447,3451,3455,3459,3463,3467,3471,3475],{"type":52,"tag":80,"props":3420,"children":3421},{"style":103},[3422],{"type":58,"value":1473},{"type":52,"tag":80,"props":3424,"children":3425},{"style":185},[3426],{"type":58,"value":537},{"type":52,"tag":80,"props":3428,"children":3429},{"style":109},[3430],{"type":58,"value":469},{"type":52,"tag":80,"props":3432,"children":3433},{"style":103},[3434],{"type":58,"value":182},{"type":52,"tag":80,"props":3436,"children":3437},{"style":185},[3438],{"type":58,"value":478},{"type":52,"tag":80,"props":3440,"children":3441},{"style":109},[3442],{"type":58,"value":427},{"type":52,"tag":80,"props":3444,"children":3445},{"style":103},[3446],{"type":58,"value":487},{"type":52,"tag":80,"props":3448,"children":3449},{"style":438},[3450],{"type":58,"value":1007},{"type":52,"tag":80,"props":3452,"children":3453},{"style":103},[3454],{"type":58,"value":446},{"type":52,"tag":80,"props":3456,"children":3457},{"style":109},[3458],{"type":58,"value":315},{"type":52,"tag":80,"props":3460,"children":3461},{"style":103},[3462],{"type":58,"value":182},{"type":52,"tag":80,"props":3464,"children":3465},{"style":185},[3466],{"type":58,"value":509},{"type":52,"tag":80,"props":3468,"children":3469},{"style":109},[3470],{"type":58,"value":514},{"type":52,"tag":80,"props":3472,"children":3473},{"style":103},[3474],{"type":58,"value":519},{"type":52,"tag":80,"props":3476,"children":3477},{"style":109},[3478],{"type":58,"value":524},{"type":52,"tag":80,"props":3480,"children":3481},{"class":82,"line":208},[3482,3486,3490,3494,3498,3502,3506,3510,3514,3518,3524,3528,3532],{"type":52,"tag":80,"props":3483,"children":3484},{"style":103},[3485],{"type":58,"value":1473},{"type":52,"tag":80,"props":3487,"children":3488},{"style":185},[3489],{"type":58,"value":603},{"type":52,"tag":80,"props":3491,"children":3492},{"style":109},[3493],{"type":58,"value":427},{"type":52,"tag":80,"props":3495,"children":3496},{"style":103},[3497],{"type":58,"value":193},{"type":52,"tag":80,"props":3499,"children":3500},{"style":160},[3501],{"type":58,"value":628},{"type":52,"tag":80,"props":3503,"children":3504},{"style":109},[3505],{"type":58,"value":2502},{"type":52,"tag":80,"props":3507,"children":3508},{"style":103},[3509],{"type":58,"value":487},{"type":52,"tag":80,"props":3511,"children":3512},{"style":438},[3513],{"type":58,"value":1007},{"type":52,"tag":80,"props":3515,"children":3516},{"style":103},[3517],{"type":58,"value":446},{"type":52,"tag":80,"props":3519,"children":3521},{"style":3520},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[3522],{"type":58,"value":3523}," 123",{"type":52,"tag":80,"props":3525,"children":3526},{"style":103},[3527],{"type":58,"value":117},{"type":52,"tag":80,"props":3529,"children":3530},{"style":109},[3531],{"type":58,"value":3270},{"type":52,"tag":80,"props":3533,"children":3534},{"style":103},[3535],{"type":58,"value":143},{"type":52,"tag":1952,"props":3537,"children":3538},{},[3539],{"type":58,"value":3031},{"type":52,"tag":68,"props":3541,"children":3543},{"className":70,"code":3542,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .output(z.object({ id: z.string() }))\n  .query(() => ({ id: '123' }));\n",[3544],{"type":52,"tag":76,"props":3545,"children":3546},{"__ignoreMap":73},[3547,3586,3625,3632,3651,3714],{"type":52,"tag":80,"props":3548,"children":3549},{"class":82,"line":83},[3550,3554,3558,3562,3566,3570,3574,3578,3582],{"type":52,"tag":80,"props":3551,"children":3552},{"style":97},[3553],{"type":58,"value":100},{"type":52,"tag":80,"props":3555,"children":3556},{"style":103},[3557],{"type":58,"value":106},{"type":52,"tag":80,"props":3559,"children":3560},{"style":109},[3561],{"type":58,"value":315},{"type":52,"tag":80,"props":3563,"children":3564},{"style":103},[3565],{"type":58,"value":117},{"type":52,"tag":80,"props":3567,"children":3568},{"style":97},[3569],{"type":58,"value":122},{"type":52,"tag":80,"props":3571,"children":3572},{"style":103},[3573],{"type":58,"value":127},{"type":52,"tag":80,"props":3575,"children":3576},{"style":130},[3577],{"type":58,"value":332},{"type":52,"tag":80,"props":3579,"children":3580},{"style":103},[3581],{"type":58,"value":138},{"type":52,"tag":80,"props":3583,"children":3584},{"style":103},[3585],{"type":58,"value":143},{"type":52,"tag":80,"props":3587,"children":3588},{"class":82,"line":93},[3589,3593,3597,3601,3605,3609,3613,3617,3621],{"type":52,"tag":80,"props":3590,"children":3591},{"style":97},[3592],{"type":58,"value":100},{"type":52,"tag":80,"props":3594,"children":3595},{"style":103},[3596],{"type":58,"value":106},{"type":52,"tag":80,"props":3598,"children":3599},{"style":109},[3600],{"type":58,"value":356},{"type":52,"tag":80,"props":3602,"children":3603},{"style":103},[3604],{"type":58,"value":117},{"type":52,"tag":80,"props":3606,"children":3607},{"style":97},[3608],{"type":58,"value":122},{"type":52,"tag":80,"props":3610,"children":3611},{"style":103},[3612],{"type":58,"value":127},{"type":52,"tag":80,"props":3614,"children":3615},{"style":130},[3616],{"type":58,"value":383},{"type":52,"tag":80,"props":3618,"children":3619},{"style":103},[3620],{"type":58,"value":138},{"type":52,"tag":80,"props":3622,"children":3623},{"style":103},[3624],{"type":58,"value":143},{"type":52,"tag":80,"props":3626,"children":3627},{"class":82,"line":146},[3628],{"type":52,"tag":80,"props":3629,"children":3630},{"emptyLinePlaceholder":150},[3631],{"type":58,"value":153},{"type":52,"tag":80,"props":3633,"children":3634},{"class":82,"line":156},[3635,3639,3643,3647],{"type":52,"tag":80,"props":3636,"children":3637},{"style":160},[3638],{"type":58,"value":163},{"type":52,"tag":80,"props":3640,"children":3641},{"style":109},[3642],{"type":58,"value":2965},{"type":52,"tag":80,"props":3644,"children":3645},{"style":103},[3646],{"type":58,"value":173},{"type":52,"tag":80,"props":3648,"children":3649},{"style":109},[3650],{"type":58,"value":451},{"type":52,"tag":80,"props":3652,"children":3653},{"class":82,"line":200},[3654,3658,3662,3666,3670,3674,3678,3682,3686,3690,3694,3698,3702,3706,3710],{"type":52,"tag":80,"props":3655,"children":3656},{"style":103},[3657],{"type":58,"value":1473},{"type":52,"tag":80,"props":3659,"children":3660},{"style":185},[3661],{"type":58,"value":537},{"type":52,"tag":80,"props":3663,"children":3664},{"style":109},[3665],{"type":58,"value":469},{"type":52,"tag":80,"props":3667,"children":3668},{"style":103},[3669],{"type":58,"value":182},{"type":52,"tag":80,"props":3671,"children":3672},{"style":185},[3673],{"type":58,"value":478},{"type":52,"tag":80,"props":3675,"children":3676},{"style":109},[3677],{"type":58,"value":427},{"type":52,"tag":80,"props":3679,"children":3680},{"style":103},[3681],{"type":58,"value":487},{"type":52,"tag":80,"props":3683,"children":3684},{"style":438},[3685],{"type":58,"value":1007},{"type":52,"tag":80,"props":3687,"children":3688},{"style":103},[3689],{"type":58,"value":446},{"type":52,"tag":80,"props":3691,"children":3692},{"style":109},[3693],{"type":58,"value":315},{"type":52,"tag":80,"props":3695,"children":3696},{"style":103},[3697],{"type":58,"value":182},{"type":52,"tag":80,"props":3699,"children":3700},{"style":185},[3701],{"type":58,"value":509},{"type":52,"tag":80,"props":3703,"children":3704},{"style":109},[3705],{"type":58,"value":514},{"type":52,"tag":80,"props":3707,"children":3708},{"style":103},[3709],{"type":58,"value":519},{"type":52,"tag":80,"props":3711,"children":3712},{"style":109},[3713],{"type":58,"value":524},{"type":52,"tag":80,"props":3715,"children":3716},{"class":82,"line":208},[3717,3721,3725,3729,3733,3737,3741,3745,3749,3753,3757,3762,3766,3770,3774],{"type":52,"tag":80,"props":3718,"children":3719},{"style":103},[3720],{"type":58,"value":1473},{"type":52,"tag":80,"props":3722,"children":3723},{"style":185},[3724],{"type":58,"value":603},{"type":52,"tag":80,"props":3726,"children":3727},{"style":109},[3728],{"type":58,"value":427},{"type":52,"tag":80,"props":3730,"children":3731},{"style":103},[3732],{"type":58,"value":193},{"type":52,"tag":80,"props":3734,"children":3735},{"style":160},[3736],{"type":58,"value":628},{"type":52,"tag":80,"props":3738,"children":3739},{"style":109},[3740],{"type":58,"value":2502},{"type":52,"tag":80,"props":3742,"children":3743},{"style":103},[3744],{"type":58,"value":487},{"type":52,"tag":80,"props":3746,"children":3747},{"style":438},[3748],{"type":58,"value":1007},{"type":52,"tag":80,"props":3750,"children":3751},{"style":103},[3752],{"type":58,"value":446},{"type":52,"tag":80,"props":3754,"children":3755},{"style":103},[3756],{"type":58,"value":127},{"type":52,"tag":80,"props":3758,"children":3759},{"style":130},[3760],{"type":58,"value":3761},"123",{"type":52,"tag":80,"props":3763,"children":3764},{"style":103},[3765],{"type":58,"value":138},{"type":52,"tag":80,"props":3767,"children":3768},{"style":103},[3769],{"type":58,"value":117},{"type":52,"tag":80,"props":3771,"children":3772},{"style":109},[3773],{"type":58,"value":3270},{"type":52,"tag":80,"props":3775,"children":3776},{"style":103},[3777],{"type":58,"value":143},{"type":52,"tag":1952,"props":3779,"children":3780},{},[3781,3783,3789],{"type":58,"value":3782},"If ",{"type":52,"tag":76,"props":3784,"children":3786},{"className":3785},[],[3787],{"type":58,"value":3788},".output()",{"type":58,"value":3790}," validation fails, tRPC returns INTERNAL_SERVER_ERROR (500), not BAD_REQUEST, because the server produced invalid data.",{"type":52,"tag":1952,"props":3792,"children":3793},{},[3794],{"type":58,"value":3290},{"type":52,"tag":781,"props":3796,"children":3798},{"id":3797},"high-using-cursor-zoptional-without-nullable-for-infinite-queries",[3799,3804],{"type":52,"tag":80,"props":3800,"children":3801},{},[3802],{"type":58,"value":3803},"HIGH",{"type":58,"value":3805}," Using cursor: z.optional() without nullable for infinite queries",{"type":52,"tag":1952,"props":3807,"children":3808},{},[3809],{"type":58,"value":2861},{"type":52,"tag":68,"props":3811,"children":3813},{"className":70,"code":3812,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .input(z.object({ cursor: z.string().optional() }))\n  .query(({ input }) => {\n    return { items: [], nextCursor: input.cursor };\n  });\n",[3814],{"type":52,"tag":76,"props":3815,"children":3816},{"__ignoreMap":73},[3817,3856,3895,3902,3921,3998,4033,4088],{"type":52,"tag":80,"props":3818,"children":3819},{"class":82,"line":83},[3820,3824,3828,3832,3836,3840,3844,3848,3852],{"type":52,"tag":80,"props":3821,"children":3822},{"style":97},[3823],{"type":58,"value":100},{"type":52,"tag":80,"props":3825,"children":3826},{"style":103},[3827],{"type":58,"value":106},{"type":52,"tag":80,"props":3829,"children":3830},{"style":109},[3831],{"type":58,"value":315},{"type":52,"tag":80,"props":3833,"children":3834},{"style":103},[3835],{"type":58,"value":117},{"type":52,"tag":80,"props":3837,"children":3838},{"style":97},[3839],{"type":58,"value":122},{"type":52,"tag":80,"props":3841,"children":3842},{"style":103},[3843],{"type":58,"value":127},{"type":52,"tag":80,"props":3845,"children":3846},{"style":130},[3847],{"type":58,"value":332},{"type":52,"tag":80,"props":3849,"children":3850},{"style":103},[3851],{"type":58,"value":138},{"type":52,"tag":80,"props":3853,"children":3854},{"style":103},[3855],{"type":58,"value":143},{"type":52,"tag":80,"props":3857,"children":3858},{"class":82,"line":93},[3859,3863,3867,3871,3875,3879,3883,3887,3891],{"type":52,"tag":80,"props":3860,"children":3861},{"style":97},[3862],{"type":58,"value":100},{"type":52,"tag":80,"props":3864,"children":3865},{"style":103},[3866],{"type":58,"value":106},{"type":52,"tag":80,"props":3868,"children":3869},{"style":109},[3870],{"type":58,"value":356},{"type":52,"tag":80,"props":3872,"children":3873},{"style":103},[3874],{"type":58,"value":117},{"type":52,"tag":80,"props":3876,"children":3877},{"style":97},[3878],{"type":58,"value":122},{"type":52,"tag":80,"props":3880,"children":3881},{"style":103},[3882],{"type":58,"value":127},{"type":52,"tag":80,"props":3884,"children":3885},{"style":130},[3886],{"type":58,"value":383},{"type":52,"tag":80,"props":3888,"children":3889},{"style":103},[3890],{"type":58,"value":138},{"type":52,"tag":80,"props":3892,"children":3893},{"style":103},[3894],{"type":58,"value":143},{"type":52,"tag":80,"props":3896,"children":3897},{"class":82,"line":146},[3898],{"type":52,"tag":80,"props":3899,"children":3900},{"emptyLinePlaceholder":150},[3901],{"type":58,"value":153},{"type":52,"tag":80,"props":3903,"children":3904},{"class":82,"line":156},[3905,3909,3913,3917],{"type":52,"tag":80,"props":3906,"children":3907},{"style":160},[3908],{"type":58,"value":163},{"type":52,"tag":80,"props":3910,"children":3911},{"style":109},[3912],{"type":58,"value":2965},{"type":52,"tag":80,"props":3914,"children":3915},{"style":103},[3916],{"type":58,"value":173},{"type":52,"tag":80,"props":3918,"children":3919},{"style":109},[3920],{"type":58,"value":451},{"type":52,"tag":80,"props":3922,"children":3923},{"class":82,"line":200},[3924,3928,3932,3936,3940,3944,3948,3952,3957,3961,3965,3969,3973,3977,3981,3986,3990,3994],{"type":52,"tag":80,"props":3925,"children":3926},{"style":103},[3927],{"type":58,"value":1473},{"type":52,"tag":80,"props":3929,"children":3930},{"style":185},[3931],{"type":58,"value":464},{"type":52,"tag":80,"props":3933,"children":3934},{"style":109},[3935],{"type":58,"value":469},{"type":52,"tag":80,"props":3937,"children":3938},{"style":103},[3939],{"type":58,"value":182},{"type":52,"tag":80,"props":3941,"children":3942},{"style":185},[3943],{"type":58,"value":478},{"type":52,"tag":80,"props":3945,"children":3946},{"style":109},[3947],{"type":58,"value":427},{"type":52,"tag":80,"props":3949,"children":3950},{"style":103},[3951],{"type":58,"value":487},{"type":52,"tag":80,"props":3953,"children":3954},{"style":438},[3955],{"type":58,"value":3956}," cursor",{"type":52,"tag":80,"props":3958,"children":3959},{"style":103},[3960],{"type":58,"value":446},{"type":52,"tag":80,"props":3962,"children":3963},{"style":109},[3964],{"type":58,"value":315},{"type":52,"tag":80,"props":3966,"children":3967},{"style":103},[3968],{"type":58,"value":182},{"type":52,"tag":80,"props":3970,"children":3971},{"style":185},[3972],{"type":58,"value":509},{"type":52,"tag":80,"props":3974,"children":3975},{"style":109},[3976],{"type":58,"value":193},{"type":52,"tag":80,"props":3978,"children":3979},{"style":103},[3980],{"type":58,"value":182},{"type":52,"tag":80,"props":3982,"children":3983},{"style":185},[3984],{"type":58,"value":3985},"optional",{"type":52,"tag":80,"props":3987,"children":3988},{"style":109},[3989],{"type":58,"value":514},{"type":52,"tag":80,"props":3991,"children":3992},{"style":103},[3993],{"type":58,"value":519},{"type":52,"tag":80,"props":3995,"children":3996},{"style":109},[3997],{"type":58,"value":524},{"type":52,"tag":80,"props":3999,"children":4000},{"class":82,"line":208},[4001,4005,4009,4013,4017,4021,4025,4029],{"type":52,"tag":80,"props":4002,"children":4003},{"style":103},[4004],{"type":58,"value":1473},{"type":52,"tag":80,"props":4006,"children":4007},{"style":185},[4008],{"type":58,"value":603},{"type":52,"tag":80,"props":4010,"children":4011},{"style":109},[4012],{"type":58,"value":427},{"type":52,"tag":80,"props":4014,"children":4015},{"style":103},[4016],{"type":58,"value":612},{"type":52,"tag":80,"props":4018,"children":4019},{"style":615},[4020],{"type":58,"value":618},{"type":52,"tag":80,"props":4022,"children":4023},{"style":103},[4024],{"type":58,"value":623},{"type":52,"tag":80,"props":4026,"children":4027},{"style":160},[4028],{"type":58,"value":628},{"type":52,"tag":80,"props":4030,"children":4031},{"style":103},[4032],{"type":58,"value":633},{"type":52,"tag":80,"props":4034,"children":4035},{"class":82,"line":249},[4036,4040,4044,4049,4053,4058,4062,4067,4071,4075,4079,4084],{"type":52,"tag":80,"props":4037,"children":4038},{"style":97},[4039],{"type":58,"value":998},{"type":52,"tag":80,"props":4041,"children":4042},{"style":103},[4043],{"type":58,"value":106},{"type":52,"tag":80,"props":4045,"children":4046},{"style":438},[4047],{"type":58,"value":4048}," items",{"type":52,"tag":80,"props":4050,"children":4051},{"style":103},[4052],{"type":58,"value":446},{"type":52,"tag":80,"props":4054,"children":4055},{"style":438},[4056],{"type":58,"value":4057}," []",{"type":52,"tag":80,"props":4059,"children":4060},{"style":103},[4061],{"type":58,"value":361},{"type":52,"tag":80,"props":4063,"children":4064},{"style":438},[4065],{"type":58,"value":4066}," nextCursor",{"type":52,"tag":80,"props":4068,"children":4069},{"style":103},[4070],{"type":58,"value":446},{"type":52,"tag":80,"props":4072,"children":4073},{"style":109},[4074],{"type":58,"value":618},{"type":52,"tag":80,"props":4076,"children":4077},{"style":103},[4078],{"type":58,"value":182},{"type":52,"tag":80,"props":4080,"children":4081},{"style":109},[4082],{"type":58,"value":4083},"cursor",{"type":52,"tag":80,"props":4085,"children":4086},{"style":103},[4087],{"type":58,"value":692},{"type":52,"tag":80,"props":4089,"children":4090},{"class":82,"line":527},[4091,4095,4099],{"type":52,"tag":80,"props":4092,"children":4093},{"style":103},[4094],{"type":58,"value":1052},{"type":52,"tag":80,"props":4096,"children":4097},{"style":109},[4098],{"type":58,"value":706},{"type":52,"tag":80,"props":4100,"children":4101},{"style":103},[4102],{"type":58,"value":143},{"type":52,"tag":1952,"props":4104,"children":4105},{},[4106],{"type":58,"value":3031},{"type":52,"tag":68,"props":4108,"children":4110},{"className":70,"code":4109,"language":72,"meta":73,"style":73},"import { z } from 'zod';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nconst proc = publicProcedure\n  .input(z.object({ cursor: z.string().nullish() }))\n  .query(({ input }) => {\n    return { items: [], nextCursor: input.cursor };\n  });\n",[4111],{"type":52,"tag":76,"props":4112,"children":4113},{"__ignoreMap":73},[4114,4153,4192,4199,4218,4294,4329,4380],{"type":52,"tag":80,"props":4115,"children":4116},{"class":82,"line":83},[4117,4121,4125,4129,4133,4137,4141,4145,4149],{"type":52,"tag":80,"props":4118,"children":4119},{"style":97},[4120],{"type":58,"value":100},{"type":52,"tag":80,"props":4122,"children":4123},{"style":103},[4124],{"type":58,"value":106},{"type":52,"tag":80,"props":4126,"children":4127},{"style":109},[4128],{"type":58,"value":315},{"type":52,"tag":80,"props":4130,"children":4131},{"style":103},[4132],{"type":58,"value":117},{"type":52,"tag":80,"props":4134,"children":4135},{"style":97},[4136],{"type":58,"value":122},{"type":52,"tag":80,"props":4138,"children":4139},{"style":103},[4140],{"type":58,"value":127},{"type":52,"tag":80,"props":4142,"children":4143},{"style":130},[4144],{"type":58,"value":332},{"type":52,"tag":80,"props":4146,"children":4147},{"style":103},[4148],{"type":58,"value":138},{"type":52,"tag":80,"props":4150,"children":4151},{"style":103},[4152],{"type":58,"value":143},{"type":52,"tag":80,"props":4154,"children":4155},{"class":82,"line":93},[4156,4160,4164,4168,4172,4176,4180,4184,4188],{"type":52,"tag":80,"props":4157,"children":4158},{"style":97},[4159],{"type":58,"value":100},{"type":52,"tag":80,"props":4161,"children":4162},{"style":103},[4163],{"type":58,"value":106},{"type":52,"tag":80,"props":4165,"children":4166},{"style":109},[4167],{"type":58,"value":356},{"type":52,"tag":80,"props":4169,"children":4170},{"style":103},[4171],{"type":58,"value":117},{"type":52,"tag":80,"props":4173,"children":4174},{"style":97},[4175],{"type":58,"value":122},{"type":52,"tag":80,"props":4177,"children":4178},{"style":103},[4179],{"type":58,"value":127},{"type":52,"tag":80,"props":4181,"children":4182},{"style":130},[4183],{"type":58,"value":383},{"type":52,"tag":80,"props":4185,"children":4186},{"style":103},[4187],{"type":58,"value":138},{"type":52,"tag":80,"props":4189,"children":4190},{"style":103},[4191],{"type":58,"value":143},{"type":52,"tag":80,"props":4193,"children":4194},{"class":82,"line":146},[4195],{"type":52,"tag":80,"props":4196,"children":4197},{"emptyLinePlaceholder":150},[4198],{"type":58,"value":153},{"type":52,"tag":80,"props":4200,"children":4201},{"class":82,"line":156},[4202,4206,4210,4214],{"type":52,"tag":80,"props":4203,"children":4204},{"style":160},[4205],{"type":58,"value":163},{"type":52,"tag":80,"props":4207,"children":4208},{"style":109},[4209],{"type":58,"value":2965},{"type":52,"tag":80,"props":4211,"children":4212},{"style":103},[4213],{"type":58,"value":173},{"type":52,"tag":80,"props":4215,"children":4216},{"style":109},[4217],{"type":58,"value":451},{"type":52,"tag":80,"props":4219,"children":4220},{"class":82,"line":200},[4221,4225,4229,4233,4237,4241,4245,4249,4253,4257,4261,4265,4269,4273,4277,4282,4286,4290],{"type":52,"tag":80,"props":4222,"children":4223},{"style":103},[4224],{"type":58,"value":1473},{"type":52,"tag":80,"props":4226,"children":4227},{"style":185},[4228],{"type":58,"value":464},{"type":52,"tag":80,"props":4230,"children":4231},{"style":109},[4232],{"type":58,"value":469},{"type":52,"tag":80,"props":4234,"children":4235},{"style":103},[4236],{"type":58,"value":182},{"type":52,"tag":80,"props":4238,"children":4239},{"style":185},[4240],{"type":58,"value":478},{"type":52,"tag":80,"props":4242,"children":4243},{"style":109},[4244],{"type":58,"value":427},{"type":52,"tag":80,"props":4246,"children":4247},{"style":103},[4248],{"type":58,"value":487},{"type":52,"tag":80,"props":4250,"children":4251},{"style":438},[4252],{"type":58,"value":3956},{"type":52,"tag":80,"props":4254,"children":4255},{"style":103},[4256],{"type":58,"value":446},{"type":52,"tag":80,"props":4258,"children":4259},{"style":109},[4260],{"type":58,"value":315},{"type":52,"tag":80,"props":4262,"children":4263},{"style":103},[4264],{"type":58,"value":182},{"type":52,"tag":80,"props":4266,"children":4267},{"style":185},[4268],{"type":58,"value":509},{"type":52,"tag":80,"props":4270,"children":4271},{"style":109},[4272],{"type":58,"value":193},{"type":52,"tag":80,"props":4274,"children":4275},{"style":103},[4276],{"type":58,"value":182},{"type":52,"tag":80,"props":4278,"children":4279},{"style":185},[4280],{"type":58,"value":4281},"nullish",{"type":52,"tag":80,"props":4283,"children":4284},{"style":109},[4285],{"type":58,"value":514},{"type":52,"tag":80,"props":4287,"children":4288},{"style":103},[4289],{"type":58,"value":519},{"type":52,"tag":80,"props":4291,"children":4292},{"style":109},[4293],{"type":58,"value":524},{"type":52,"tag":80,"props":4295,"children":4296},{"class":82,"line":208},[4297,4301,4305,4309,4313,4317,4321,4325],{"type":52,"tag":80,"props":4298,"children":4299},{"style":103},[4300],{"type":58,"value":1473},{"type":52,"tag":80,"props":4302,"children":4303},{"style":185},[4304],{"type":58,"value":603},{"type":52,"tag":80,"props":4306,"children":4307},{"style":109},[4308],{"type":58,"value":427},{"type":52,"tag":80,"props":4310,"children":4311},{"style":103},[4312],{"type":58,"value":612},{"type":52,"tag":80,"props":4314,"children":4315},{"style":615},[4316],{"type":58,"value":618},{"type":52,"tag":80,"props":4318,"children":4319},{"style":103},[4320],{"type":58,"value":623},{"type":52,"tag":80,"props":4322,"children":4323},{"style":160},[4324],{"type":58,"value":628},{"type":52,"tag":80,"props":4326,"children":4327},{"style":103},[4328],{"type":58,"value":633},{"type":52,"tag":80,"props":4330,"children":4331},{"class":82,"line":249},[4332,4336,4340,4344,4348,4352,4356,4360,4364,4368,4372,4376],{"type":52,"tag":80,"props":4333,"children":4334},{"style":97},[4335],{"type":58,"value":998},{"type":52,"tag":80,"props":4337,"children":4338},{"style":103},[4339],{"type":58,"value":106},{"type":52,"tag":80,"props":4341,"children":4342},{"style":438},[4343],{"type":58,"value":4048},{"type":52,"tag":80,"props":4345,"children":4346},{"style":103},[4347],{"type":58,"value":446},{"type":52,"tag":80,"props":4349,"children":4350},{"style":438},[4351],{"type":58,"value":4057},{"type":52,"tag":80,"props":4353,"children":4354},{"style":103},[4355],{"type":58,"value":361},{"type":52,"tag":80,"props":4357,"children":4358},{"style":438},[4359],{"type":58,"value":4066},{"type":52,"tag":80,"props":4361,"children":4362},{"style":103},[4363],{"type":58,"value":446},{"type":52,"tag":80,"props":4365,"children":4366},{"style":109},[4367],{"type":58,"value":618},{"type":52,"tag":80,"props":4369,"children":4370},{"style":103},[4371],{"type":58,"value":182},{"type":52,"tag":80,"props":4373,"children":4374},{"style":109},[4375],{"type":58,"value":4083},{"type":52,"tag":80,"props":4377,"children":4378},{"style":103},[4379],{"type":58,"value":692},{"type":52,"tag":80,"props":4381,"children":4382},{"class":82,"line":527},[4383,4387,4391],{"type":52,"tag":80,"props":4384,"children":4385},{"style":103},[4386],{"type":58,"value":1052},{"type":52,"tag":80,"props":4388,"children":4389},{"style":109},[4390],{"type":58,"value":706},{"type":52,"tag":80,"props":4392,"children":4393},{"style":103},[4394],{"type":58,"value":143},{"type":52,"tag":1952,"props":4396,"children":4397},{},[4398,4400,4406,4408,4414,4416,4422,4424,4430],{"type":58,"value":4399},"React Query internally passes ",{"type":52,"tag":76,"props":4401,"children":4403},{"className":4402},[],[4404],{"type":58,"value":4405},"cursor: undefined",{"type":58,"value":4407}," during invalidation refetch; using ",{"type":52,"tag":76,"props":4409,"children":4411},{"className":4410},[],[4412],{"type":58,"value":4413},".optional()",{"type":58,"value":4415}," without ",{"type":52,"tag":76,"props":4417,"children":4419},{"className":4418},[],[4420],{"type":58,"value":4421},".nullable()",{"type":58,"value":4423}," can fail validation. Use ",{"type":52,"tag":76,"props":4425,"children":4427},{"className":4426},[],[4428],{"type":58,"value":4429},".nullish()",{"type":58,"value":4431}," instead.",{"type":52,"tag":1952,"props":4433,"children":4434},{},[4435,4437],{"type":58,"value":4436},"Source: ",{"type":52,"tag":4438,"props":4439,"children":4443},"a",{"href":4440,"rel":4441},"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F6862",[4442],"nofollow",[4444],{"type":58,"value":4440},{"type":52,"tag":61,"props":4446,"children":4448},{"id":4447},"see-also",[4449],{"type":58,"value":4450},"See Also",{"type":52,"tag":4452,"props":4453,"children":4454},"ul",{},[4455,4466,4477,4487],{"type":52,"tag":4456,"props":4457,"children":4458},"li",{},[4459,4464],{"type":52,"tag":76,"props":4460,"children":4462},{"className":4461},[],[4463],{"type":58,"value":44},{"type":58,"value":4465}," -- initTRPC, routers, procedures",{"type":52,"tag":4456,"props":4467,"children":4468},{},[4469,4475],{"type":52,"tag":76,"props":4470,"children":4472},{"className":4471},[],[4473],{"type":58,"value":4474},"error-handling",{"type":58,"value":4476}," -- how validation errors surface as BAD_REQUEST",{"type":52,"tag":4456,"props":4478,"children":4479},{},[4480,4485],{"type":52,"tag":76,"props":4481,"children":4483},{"className":4482},[],[4484],{"type":58,"value":4474},{"type":58,"value":4486}," -- errorFormatter to expose Zod field errors",{"type":52,"tag":4456,"props":4488,"children":4489},{},[4490,4496],{"type":52,"tag":76,"props":4491,"children":4493},{"className":4492},[],[4494],{"type":58,"value":4495},"middlewares",{"type":58,"value":4497}," -- use input chaining with middleware base procedures",{"type":52,"tag":4499,"props":4500,"children":4501},"style",{},[4502],{"type":58,"value":4503},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4505,"total":4608},[4506,4521,4534,4547,4567,4580,4594],{"slug":4507,"name":4507,"fn":4508,"description":4509,"org":4510,"tags":4511,"stars":23,"repoUrl":24,"updatedAt":4520},"adapter-aws-lambda","deploy tRPC APIs on AWS Lambda","Deploy tRPC on AWS Lambda with awsLambdaRequestHandler() from @trpc\u002Fserver\u002Fadapters\u002Faws-lambda for API Gateway v1 (REST, APIGatewayProxyEvent) and v2 (HTTP, APIGatewayProxyEventV2), and Lambda Function URLs. Enable response streaming with awsLambdaStreamingRequestHandler() wrapped in awslambda.streamifyResponse(). CreateAWSLambdaContextOptions provides event and context for context creation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4512,4515,4518,4519],{"name":4513,"slug":4514,"type":15},"API Development","api-development",{"name":4516,"slug":4517,"type":15},"AWS","aws",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:05.451869",{"slug":4522,"name":4522,"fn":4523,"description":4524,"org":4525,"tags":4526,"stars":23,"repoUrl":24,"updatedAt":4533},"adapter-express","mount tRPC as Express middleware","Mount tRPC as Express middleware with createExpressMiddleware() from @trpc\u002Fserver\u002Fadapters\u002Fexpress. Access Express req\u002Fres in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('\u002Ftrpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4527,4528,4529,4532],{"name":4513,"slug":4514,"type":15},{"name":17,"slug":18,"type":15},{"name":4530,"slug":4531,"type":15},"Express","express",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.274248",{"slug":4535,"name":4535,"fn":4536,"description":4537,"org":4538,"tags":4539,"stars":23,"repoUrl":24,"updatedAt":4546},"adapter-fastify","mount tRPC as a Fastify plugin","Mount tRPC as a Fastify plugin with fastifyTRPCPlugin from @trpc\u002Fserver\u002Fadapters\u002Ffastify. Configure prefix, trpcOptions (router, createContext, onError). Enable WebSocket subscriptions with useWSS and @fastify\u002Fwebsocket. Set routerOptions.maxParamLength for batch requests. Requires Fastify v5+. FastifyTRPCPluginOptions for type-safe onError. CreateFastifyContextOptions provides req, res.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4540,4541,4542,4545],{"name":4513,"slug":4514,"type":15},{"name":17,"slug":18,"type":15},{"name":4543,"slug":4544,"type":15},"Fastify","fastify",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.746621",{"slug":4548,"name":4548,"fn":4549,"description":4550,"org":4551,"tags":4552,"stars":23,"repoUrl":24,"updatedAt":4566},"adapter-fetch","deploy tRPC on edge runtimes","Deploy tRPC on WinterCG-compliant edge runtimes with fetchRequestHandler() from @trpc\u002Fserver\u002Fadapters\u002Ffetch. Supports Cloudflare Workers, Deno Deploy, Vercel Edge Runtime, Astro, Remix, SolidStart. FetchCreateContextFnOptions provides req (Request) and resHeaders (Headers) for context creation. The endpoint option must match the URL path prefix where the handler is mounted.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4553,4556,4559,4562,4563],{"name":4554,"slug":4555,"type":15},"Cloudflare","cloudflare",{"name":4557,"slug":4558,"type":15},"Deployment","deployment",{"name":4560,"slug":4561,"type":15},"Edge","edge",{"name":9,"slug":8,"type":15},{"name":4564,"slug":4565,"type":15},"Vercel","vercel","2026-07-18T05:46:50.548228",{"slug":4568,"name":4568,"fn":4569,"description":4570,"org":4571,"tags":4572,"stars":23,"repoUrl":24,"updatedAt":4579},"adapter-standalone","mount tRPC on Node.js servers","Mount tRPC on Node.js built-in HTTP server with createHTTPServer() from @trpc\u002Fserver\u002Fadapters\u002Fstandalone, createHTTPHandler() for custom http.createServer, createHTTP2Handler() for HTTP\u002F2 with TLS. Configure basePath to slice URL prefix, CORS via the cors npm package passed as middleware option. CreateHTTPContextOptions provides req and res for context creation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4573,4574,4575,4578],{"name":4513,"slug":4514,"type":15},{"name":17,"slug":18,"type":15},{"name":4576,"slug":4577,"type":15},"Node.js","node-js",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:58.093869",{"slug":4581,"name":4581,"fn":4582,"description":4583,"org":4584,"tags":4585,"stars":23,"repoUrl":24,"updatedAt":4593},"auth","implement authentication in tRPC applications","Implement JWT\u002Fcookie authentication and authorization in tRPC using createContext for user extraction, t.middleware with opts.next({ ctx }) for context narrowing to non-null user, protectedProcedure base pattern, client-side Authorization headers via httpBatchLink headers(), WebSocket connectionParams, and SSE auth via cookies or EventSource polyfill custom headers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4586,4588,4591,4592],{"name":4587,"slug":4581,"type":15},"Auth",{"name":4589,"slug":4590,"type":15},"Authentication","authentication",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.347628",{"slug":4595,"name":4595,"fn":4596,"description":4597,"org":4598,"tags":4599,"stars":23,"repoUrl":24,"updatedAt":4607},"caching","configure HTTP caching for tRPC queries","Set HTTP cache headers on tRPC query responses via responseMeta callback for CDN and browser caching. Configure Cache-Control, s-maxage, stale-while-revalidate. Handle caching with batching and authenticated requests. Avoid caching mutations, errors, and authenticated responses.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4600,4601,4603,4606],{"name":17,"slug":18,"type":15},{"name":4602,"slug":4595,"type":15},"Caching",{"name":4604,"slug":4605,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.86443",24,{"items":4610,"total":4608},[4611,4618,4625,4632,4640,4647,4654,4661,4673,4685,4695,4706],{"slug":4507,"name":4507,"fn":4508,"description":4509,"org":4612,"tags":4613,"stars":23,"repoUrl":24,"updatedAt":4520},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4614,4615,4616,4617],{"name":4513,"slug":4514,"type":15},{"name":4516,"slug":4517,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"slug":4522,"name":4522,"fn":4523,"description":4524,"org":4619,"tags":4620,"stars":23,"repoUrl":24,"updatedAt":4533},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4621,4622,4623,4624],{"name":4513,"slug":4514,"type":15},{"name":17,"slug":18,"type":15},{"name":4530,"slug":4531,"type":15},{"name":9,"slug":8,"type":15},{"slug":4535,"name":4535,"fn":4536,"description":4537,"org":4626,"tags":4627,"stars":23,"repoUrl":24,"updatedAt":4546},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4628,4629,4630,4631],{"name":4513,"slug":4514,"type":15},{"name":17,"slug":18,"type":15},{"name":4543,"slug":4544,"type":15},{"name":9,"slug":8,"type":15},{"slug":4548,"name":4548,"fn":4549,"description":4550,"org":4633,"tags":4634,"stars":23,"repoUrl":24,"updatedAt":4566},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4635,4636,4637,4638,4639],{"name":4554,"slug":4555,"type":15},{"name":4557,"slug":4558,"type":15},{"name":4560,"slug":4561,"type":15},{"name":9,"slug":8,"type":15},{"name":4564,"slug":4565,"type":15},{"slug":4568,"name":4568,"fn":4569,"description":4570,"org":4641,"tags":4642,"stars":23,"repoUrl":24,"updatedAt":4579},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4643,4644,4645,4646],{"name":4513,"slug":4514,"type":15},{"name":17,"slug":18,"type":15},{"name":4576,"slug":4577,"type":15},{"name":9,"slug":8,"type":15},{"slug":4581,"name":4581,"fn":4582,"description":4583,"org":4648,"tags":4649,"stars":23,"repoUrl":24,"updatedAt":4593},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4650,4651,4652,4653],{"name":4587,"slug":4581,"type":15},{"name":4589,"slug":4590,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"slug":4595,"name":4595,"fn":4596,"description":4597,"org":4655,"tags":4656,"stars":23,"repoUrl":24,"updatedAt":4607},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4657,4658,4659,4660],{"name":17,"slug":18,"type":15},{"name":4602,"slug":4595,"type":15},{"name":4604,"slug":4605,"type":15},{"name":9,"slug":8,"type":15},{"slug":4662,"name":4662,"fn":4663,"description":4664,"org":4665,"tags":4666,"stars":23,"repoUrl":24,"updatedAt":4672},"client-setup","set up vanilla tRPC clients","Create a vanilla tRPC client with createTRPCClient\u003CAppRouter>(), configure link chain with httpBatchLink\u002FhttpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4667,4668,4671],{"name":4513,"slug":4514,"type":15},{"name":4669,"slug":4670,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},"2026-07-18T05:48:11.437946",{"slug":4474,"name":4474,"fn":4674,"description":4675,"org":4676,"tags":4677,"stars":23,"repoUrl":24,"updatedAt":4684},"implement typed error handling in tRPC","Throw typed errors with TRPCError and error codes (NOT_FOUND, UNAUTHORIZED, BAD_REQUEST, INTERNAL_SERVER_ERROR), configure errorFormatter for client-side Zod error display, handle errors globally with onError callback, map tRPC errors to HTTP status codes with getHTTPStatusCodeFromError().\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4678,4679,4682,4683],{"name":17,"slug":18,"type":15},{"name":4680,"slug":4681,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":20,"slug":21,"type":15},"2026-07-18T05:46:52.798151",{"slug":4686,"name":4686,"fn":4687,"description":4688,"org":4689,"tags":4690,"stars":23,"repoUrl":24,"updatedAt":4694},"links","configure tRPC client link chains","Configure the tRPC client link chain: httpLink, httpBatchLink, httpBatchStreamLink, splitLink, loggerLink, wsLink, createWSClient, httpSubscriptionLink, unstable_localLink, retryLink. Choose the right terminating link. Route subscriptions via splitLink. Build custom links for SOA routing. Link options: url, headers, transformer, maxURLLength, maxItems, connectionParams, EventSource ponyfill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4691,4692,4693],{"name":4513,"slug":4514,"type":15},{"name":4669,"slug":4670,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:06.847309",{"slug":4495,"name":4495,"fn":4696,"description":4697,"org":4698,"tags":4699,"stars":23,"repoUrl":24,"updatedAt":4705},"compose middleware for tRPC procedures","Create and compose tRPC middleware with t.procedure.use(), extend context via opts.next({ ctx }), build reusable middleware with .concat() and .unstable_pipe(), define base procedures like publicProcedure and authedProcedure. Access raw input with getRawInput(). Logging, timing, OTEL tracing patterns.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4700,4701,4704],{"name":17,"slug":18,"type":15},{"name":4702,"slug":4703,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:49.132255",{"slug":4707,"name":4707,"fn":4708,"description":4709,"org":4710,"tags":4711,"stars":23,"repoUrl":24,"updatedAt":4719},"nextjs-app-router","implement tRPC in Next.js App Router","Full end-to-end tRPC setup for Next.js App Router. Covers route handler with fetchRequestHandler (GET + POST exports), TRPCProvider with QueryClientProvider, createTRPCOptionsProxy for RSC prefetching, HydrateClient\u002FHydrationBoundary for hydration, useSuspenseQuery for Suspense, and server-side callers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4712,4713,4714,4717,4718],{"name":17,"slug":18,"type":15},{"name":4669,"slug":4670,"type":15},{"name":4715,"slug":4716,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":20,"slug":21,"type":15},"2026-07-18T05:47:10.468453"]