[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trpc-subscriptions":3,"mdc--5is49q-key":40,"related-org-trpc-subscriptions":7034,"related-repo-trpc-subscriptions":7197},{"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":35,"sourceUrl":38,"mdContent":39},"subscriptions","set up real-time tRPC event subscriptions","Set up real-time event streams with async generator subscriptions using .subscription(async function*() { yield }). SSE via httpSubscriptionLink is recommended over WebSocket. Use tracked(id, data) from @trpc\u002Fserver for reconnection recovery with lastEventId. WebSocket via wsLink and createWSClient from @trpc\u002Fclient, applyWSSHandler from @trpc\u002Fserver\u002Fadapters\u002Fws. Configure SSE ping with initTRPC.create({ sse: { ping: { enabled, intervalMs } } }). AbortSignal via opts.signal for cleanup. splitLink to route subscriptions.\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,20],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":17,"slug":18,"type":15},"WebSockets","websockets",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"Real-time","real-time",40424,"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc","2026-07-18T05:46:50.058886",null,1636,[29,30,31,32,33,34],"api","next","nextjs","prisma","react","typescript",{"repoUrl":24,"stars":23,"forks":27,"topics":36,"description":37},[29,30,31,32,33,34],"🧙‍♀️  Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ","https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Ftree\u002FHEAD\u002Fpackages\u002Fserver\u002Fskills\u002Fsubscriptions","---\nname: subscriptions\ndescription: >\n  Set up real-time event streams with async generator subscriptions using\n  .subscription(async function*() { yield }). SSE via httpSubscriptionLink is\n  recommended over WebSocket. Use tracked(id, data) from @trpc\u002Fserver for\n  reconnection recovery with lastEventId. WebSocket via wsLink and\n  createWSClient from @trpc\u002Fclient, applyWSSHandler from @trpc\u002Fserver\u002Fadapters\u002Fws. Configure SSE ping with\n  initTRPC.create({ sse: { ping: { enabled, intervalMs } } }). AbortSignal\n  via opts.signal for cleanup. splitLink to route subscriptions.\ntype: core\nlibrary: trpc\nlibrary_version: '11.16.0'\nrequires:\n  - server-setup\n  - links\nsources:\n  - www\u002Fdocs\u002Fserver\u002Fsubscriptions.md\n  - www\u002Fdocs\u002Fserver\u002Fwebsockets.md\n  - www\u002Fdocs\u002Fclient\u002Flinks\u002FhttpSubscriptionLink.md\n  - www\u002Fdocs\u002Fclient\u002Flinks\u002FwsLink.md\n  - packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Fsse.ts\n  - packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Ftracked.ts\n  - examples\u002Fstandalone-server\u002Fsrc\u002Fserver.ts\n---\n\n# tRPC — Subscriptions\n\n## Setup\n\nSSE is recommended for most subscription use cases. It is simpler to set up and does not require a WebSocket server.\n\n### Server\n\n```ts\n\u002F\u002F server.ts\nimport EventEmitter, { on } from 'node:events';\nimport { initTRPC, tracked } from '@trpc\u002Fserver';\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { z } from 'zod';\n\nconst t = initTRPC.create({\n  sse: {\n    ping: {\n      enabled: true,\n      intervalMs: 2000,\n    },\n    client: {\n      reconnectAfterInactivityMs: 5000,\n    },\n  },\n});\n\ntype Post = { id: string; title: string };\nconst ee = new EventEmitter();\n\nconst appRouter = t.router({\n  onPostAdd: t.procedure\n    .input(z.object({ lastEventId: z.string().nullish() }).optional())\n    .subscription(async function* (opts) {\n      for await (const [data] of on(ee, 'add', { signal: opts.signal })) {\n        const post = data as Post;\n        yield tracked(post.id, post);\n      }\n    }),\n});\n\nexport type AppRouter = typeof appRouter;\n\ncreateHTTPServer({\n  router: appRouter,\n  createContext() {\n    return {};\n  },\n}).listen(3000);\n```\n\n### Client (SSE)\n\n```ts\n\u002F\u002F client.ts\nimport {\n  createTRPCClient,\n  httpBatchLink,\n  httpSubscriptionLink,\n  splitLink,\n} from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst trpc = createTRPCClient\u003CAppRouter>({\n  links: [\n    splitLink({\n      condition: (op) => op.type === 'subscription',\n      true: httpSubscriptionLink({ url: 'http:\u002F\u002Flocalhost:3000' }),\n      false: httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' }),\n    }),\n  ],\n});\n\nconst subscription = trpc.onPostAdd.subscribe(\n  { lastEventId: null },\n  {\n    onData(post) {\n      console.log('New post:', post);\n    },\n    onError(err) {\n      console.error('Subscription error:', err);\n    },\n  },\n);\n\n\u002F\u002F To stop:\n\u002F\u002F subscription.unsubscribe();\n```\n\n## Core Patterns\n\n### tracked() for reconnection recovery\n\n```ts\nimport EventEmitter, { on } from 'node:events';\nimport { initTRPC, tracked } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\nconst ee = new EventEmitter();\n\nconst appRouter = t.router({\n  onPostAdd: t.procedure\n    .input(z.object({ lastEventId: z.string().nullish() }).optional())\n    .subscription(async function* (opts) {\n      const iterable = on(ee, 'add', { signal: opts.signal });\n\n      if (opts.input?.lastEventId) {\n        \u002F\u002F Fetch and yield events since lastEventId from your database\n        \u002F\u002F const missed = await db.post.findMany({ where: { id: { gt: opts.input.lastEventId } } });\n        \u002F\u002F for (const post of missed) { yield tracked(post.id, post); }\n      }\n\n      for await (const [data] of iterable) {\n        yield tracked(data.id, data);\n      }\n    }),\n});\n```\n\nWhen using `tracked(id, data)`, the client automatically sends `lastEventId` on reconnection. For SSE this is part of the EventSource spec; for WebSocket, `wsLink` handles it.\n\n### Polling loop subscription\n\n```ts\nimport { initTRPC, tracked } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  onNewItems: t.procedure\n    .input(z.object({ lastEventId: z.coerce.date().nullish() }))\n    .subscription(async function* (opts) {\n      let cursor = opts.input?.lastEventId ?? null;\n\n      while (!opts.signal?.aborted) {\n        const items = await db.item.findMany({\n          where: cursor ? { createdAt: { gt: cursor } } : undefined,\n          orderBy: { createdAt: 'asc' },\n        });\n\n        for (const item of items) {\n          yield tracked(item.createdAt.toJSON(), item);\n          cursor = item.createdAt;\n        }\n\n        await new Promise((r) => setTimeout(r, 1000));\n      }\n    }),\n});\n```\n\n### WebSocket setup (when bidirectional communication is required)\n\n```ts\n\u002F\u002F server\nimport { applyWSSHandler } from '@trpc\u002Fserver\u002Fadapters\u002Fws';\nimport { WebSocketServer } from 'ws';\nimport { appRouter } from '.\u002Frouter';\n\nconst wss = new WebSocketServer({ port: 3001 });\nconst handler = applyWSSHandler({\n  wss,\n  router: appRouter,\n  createContext() {\n    return {};\n  },\n  keepAlive: {\n    enabled: true,\n    pingMs: 30000,\n    pongWaitMs: 5000,\n  },\n});\n\nprocess.on('SIGTERM', () => {\n  handler.broadcastReconnectNotification();\n  wss.close();\n});\n```\n\n```ts\n\u002F\u002F client\nimport {\n  createTRPCClient,\n  createWSClient,\n  httpBatchLink,\n  splitLink,\n  wsLink,\n} from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst wsClient = createWSClient({ url: 'ws:\u002F\u002Flocalhost:3001' });\n\nconst trpc = createTRPCClient\u003CAppRouter>({\n  links: [\n    splitLink({\n      condition: (op) => op.type === 'subscription',\n      true: wsLink({ client: wsClient }),\n      false: httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' }),\n    }),\n  ],\n});\n```\n\n### Cleanup with try...finally\n\n```ts\nconst appRouter = t.router({\n  events: t.procedure.subscription(async function* (opts) {\n    const cleanup = registerListener();\n    try {\n      for await (const [data] of on(ee, 'event', { signal: opts.signal })) {\n        yield data;\n      }\n    } finally {\n      cleanup();\n    }\n  }),\n});\n```\n\ntRPC invokes `.return()` on the generator when the subscription stops, triggering the `finally` block.\n\n## Common Mistakes\n\n### HIGH Using Observable instead of async generator\n\nWrong:\n\n```ts\nimport { observable } from '@trpc\u002Fserver\u002Fobservable';\n\nt.procedure.subscription(({ input }) => {\n  return observable((emit) => {\n    emit.next(data);\n  });\n});\n```\n\nCorrect:\n\n```ts\nt.procedure.subscription(async function* ({ input, signal }) {\n  for await (const [data] of on(ee, 'event', { signal })) {\n    yield data;\n  }\n});\n```\n\nObservable subscriptions are deprecated and will be removed in v12. Use async generator syntax (`async function*`).\n\nSource: packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002FprocedureBuilder.ts\n\n### MEDIUM Empty string as tracked event ID\n\nWrong:\n\n```ts\nyield tracked('', data);\n```\n\nCorrect:\n\n```ts\nyield tracked(event.id.toString(), data);\n```\n\n`tracked()` throws if the ID is an empty string because it conflicts with SSE \"no id\" semantics.\n\nSource: packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Ftracked.ts\n\n### HIGH Fetching history before setting up event listener\n\nWrong:\n\n```ts\nt.procedure.subscription(async function* (opts) {\n  const history = await db.getEvents(); \u002F\u002F events may fire here and be lost\n  yield* history;\n  for await (const event of listener) {\n    yield event;\n  }\n});\n```\n\nCorrect:\n\n```ts\nt.procedure.subscription(async function* (opts) {\n  const iterable = on(ee, 'event', { signal: opts.signal }); \u002F\u002F listen first\n  const history = await db.getEvents();\n  for (const item of history) {\n    yield tracked(item.id, item);\n  }\n  for await (const [event] of iterable) {\n    yield tracked(event.id, event);\n  }\n});\n```\n\nIf you fetch historical data before setting up the event listener, events emitted between the fetch and listener setup are lost.\n\nSource: www\u002Fdocs\u002Fserver\u002Fsubscriptions.md\n\n### MEDIUM SSE ping interval >= client reconnect interval\n\nWrong:\n\n```ts\ninitTRPC.create({\n  sse: {\n    ping: { enabled: true, intervalMs: 10000 },\n    client: { reconnectAfterInactivityMs: 5000 },\n  },\n});\n```\n\nCorrect:\n\n```ts\ninitTRPC.create({\n  sse: {\n    ping: { enabled: true, intervalMs: 2000 },\n    client: { reconnectAfterInactivityMs: 5000 },\n  },\n});\n```\n\nIf the server ping interval is >= the client reconnect timeout, the client disconnects thinking the connection is dead before receiving a ping.\n\nSource: packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Fsse.ts\n\n### HIGH Sending custom headers with SSE without EventSource polyfill\n\nWrong:\n\n```ts\nhttpSubscriptionLink({\n  url: 'http:\u002F\u002Flocalhost:3000',\n  \u002F\u002F Native EventSource does not support custom headers\n});\n```\n\nCorrect:\n\n```ts\nimport { EventSourcePolyfill } from 'event-source-polyfill';\n\nhttpSubscriptionLink({\n  url: 'http:\u002F\u002Flocalhost:3000',\n  EventSource: EventSourcePolyfill,\n  eventSourceOptions: async () => ({\n    headers: { authorization: 'Bearer token' },\n  }),\n});\n```\n\nThe native EventSource API does not support custom headers. Use an EventSource polyfill and pass it via the `EventSource` option on `httpSubscriptionLink`.\n\nSource: www\u002Fdocs\u002Fclient\u002Flinks\u002FhttpSubscriptionLink.md\n\n### MEDIUM Choosing WebSocket when SSE would suffice\n\nSSE (`httpSubscriptionLink`) is recommended for most subscription use cases. WebSockets add complexity (connection management, reconnection, keepalive, separate server process). Only use `wsLink` when bidirectional communication or WebSocket-specific features are required.\n\nSource: maintainer interview\n\n### MEDIUM WebSocket subscription stale inputs on reconnect\n\nWhen a WebSocket reconnects, subscriptions re-send the original input parameters. There is no hook to re-evaluate inputs on reconnect, which can cause stale data. Consider using `tracked()` with `lastEventId` to mitigate this.\n\nSource: https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F4122\n\n## See Also\n\n- **links** -- `splitLink`, `httpSubscriptionLink`, `wsLink`, `httpBatchLink`\n- **auth** -- authenticating subscription connections (connectionParams, cookies, EventSource polyfill headers)\n- **server-setup** -- `initTRPC.create()` SSE configuration options\n- **adapter-fastify** -- WebSocket subscriptions via `@fastify\u002Fwebsocket` and `useWSS`\n",{"data":41,"body":55},{"name":4,"description":6,"type":42,"library":8,"library_version":43,"requires":44,"sources":47},"core","11.16.0",[45,46],"server-setup","links",[48,49,50,51,52,53,54],"www\u002Fdocs\u002Fserver\u002Fsubscriptions.md","www\u002Fdocs\u002Fserver\u002Fwebsockets.md","www\u002Fdocs\u002Fclient\u002Flinks\u002FhttpSubscriptionLink.md","www\u002Fdocs\u002Fclient\u002Flinks\u002FwsLink.md","packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Fsse.ts","packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Ftracked.ts","examples\u002Fstandalone-server\u002Fsrc\u002Fserver.ts",{"type":56,"children":57},"root",[58,67,74,80,87,1267,1273,2015,2021,2027,2735,2763,2769,3627,3633,4148,4650,4656,5002,5023,5029,5035,5040,5245,5250,5448,5461,5466,5472,5476,5517,5521,5577,5588,5593,5599,5603,5810,5814,6200,6205,6210,6216,6220,6370,6374,6519,6524,6529,6535,6539,6613,6617,6839,6858,6863,6869,6888,6893,6899,6918,6931,6937,7028],{"type":59,"tag":60,"props":61,"children":63},"element","h1",{"id":62},"trpc-subscriptions",[64],{"type":65,"value":66},"text","tRPC — Subscriptions",{"type":59,"tag":68,"props":69,"children":71},"h2",{"id":70},"setup",[72],{"type":65,"value":73},"Setup",{"type":59,"tag":75,"props":76,"children":77},"p",{},[78],{"type":65,"value":79},"SSE is recommended for most subscription use cases. It is simpler to set up and does not require a WebSocket server.",{"type":59,"tag":81,"props":82,"children":84},"h3",{"id":83},"server",[85],{"type":65,"value":86},"Server",{"type":59,"tag":88,"props":89,"children":94},"pre",{"className":90,"code":91,"language":92,"meta":93,"style":93},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server.ts\nimport EventEmitter, { on } from 'node:events';\nimport { initTRPC, tracked } from '@trpc\u002Fserver';\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { z } from 'zod';\n\nconst t = initTRPC.create({\n  sse: {\n    ping: {\n      enabled: true,\n      intervalMs: 2000,\n    },\n    client: {\n      reconnectAfterInactivityMs: 5000,\n    },\n  },\n});\n\ntype Post = { id: string; title: string };\nconst ee = new EventEmitter();\n\nconst appRouter = t.router({\n  onPostAdd: t.procedure\n    .input(z.object({ lastEventId: z.string().nullish() }).optional())\n    .subscription(async function* (opts) {\n      for await (const [data] of on(ee, 'add', { signal: opts.signal })) {\n        const post = data as Post;\n        yield tracked(post.id, post);\n      }\n    }),\n});\n\nexport type AppRouter = typeof appRouter;\n\ncreateHTTPServer({\n  router: appRouter,\n  createContext() {\n    return {};\n  },\n}).listen(3000);\n","ts","",[95],{"type":59,"tag":96,"props":97,"children":98},"code",{"__ignoreMap":93},[99,111,174,225,267,309,319,364,384,401,425,448,457,474,496,504,513,531,539,600,635,643,682,708,807,858,974,1010,1057,1066,1083,1099,1107,1144,1152,1169,1190,1207,1221,1229],{"type":59,"tag":100,"props":101,"children":104},"span",{"class":102,"line":103},"line",1,[105],{"type":59,"tag":100,"props":106,"children":108},{"style":107},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[109],{"type":65,"value":110},"\u002F\u002F server.ts\n",{"type":59,"tag":100,"props":112,"children":114},{"class":102,"line":113},2,[115,121,127,133,138,143,148,153,158,164,169],{"type":59,"tag":100,"props":116,"children":118},{"style":117},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[119],{"type":65,"value":120},"import",{"type":59,"tag":100,"props":122,"children":124},{"style":123},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[125],{"type":65,"value":126}," EventEmitter",{"type":59,"tag":100,"props":128,"children":130},{"style":129},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[131],{"type":65,"value":132},",",{"type":59,"tag":100,"props":134,"children":135},{"style":129},[136],{"type":65,"value":137}," {",{"type":59,"tag":100,"props":139,"children":140},{"style":123},[141],{"type":65,"value":142}," on",{"type":59,"tag":100,"props":144,"children":145},{"style":129},[146],{"type":65,"value":147}," }",{"type":59,"tag":100,"props":149,"children":150},{"style":117},[151],{"type":65,"value":152}," from",{"type":59,"tag":100,"props":154,"children":155},{"style":129},[156],{"type":65,"value":157}," '",{"type":59,"tag":100,"props":159,"children":161},{"style":160},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[162],{"type":65,"value":163},"node:events",{"type":59,"tag":100,"props":165,"children":166},{"style":129},[167],{"type":65,"value":168},"'",{"type":59,"tag":100,"props":170,"children":171},{"style":129},[172],{"type":65,"value":173},";\n",{"type":59,"tag":100,"props":175,"children":177},{"class":102,"line":176},3,[178,182,186,191,195,200,204,208,212,217,221],{"type":59,"tag":100,"props":179,"children":180},{"style":117},[181],{"type":65,"value":120},{"type":59,"tag":100,"props":183,"children":184},{"style":129},[185],{"type":65,"value":137},{"type":59,"tag":100,"props":187,"children":188},{"style":123},[189],{"type":65,"value":190}," initTRPC",{"type":59,"tag":100,"props":192,"children":193},{"style":129},[194],{"type":65,"value":132},{"type":59,"tag":100,"props":196,"children":197},{"style":123},[198],{"type":65,"value":199}," tracked",{"type":59,"tag":100,"props":201,"children":202},{"style":129},[203],{"type":65,"value":147},{"type":59,"tag":100,"props":205,"children":206},{"style":117},[207],{"type":65,"value":152},{"type":59,"tag":100,"props":209,"children":210},{"style":129},[211],{"type":65,"value":157},{"type":59,"tag":100,"props":213,"children":214},{"style":160},[215],{"type":65,"value":216},"@trpc\u002Fserver",{"type":59,"tag":100,"props":218,"children":219},{"style":129},[220],{"type":65,"value":168},{"type":59,"tag":100,"props":222,"children":223},{"style":129},[224],{"type":65,"value":173},{"type":59,"tag":100,"props":226,"children":228},{"class":102,"line":227},4,[229,233,237,242,246,250,254,259,263],{"type":59,"tag":100,"props":230,"children":231},{"style":117},[232],{"type":65,"value":120},{"type":59,"tag":100,"props":234,"children":235},{"style":129},[236],{"type":65,"value":137},{"type":59,"tag":100,"props":238,"children":239},{"style":123},[240],{"type":65,"value":241}," createHTTPServer",{"type":59,"tag":100,"props":243,"children":244},{"style":129},[245],{"type":65,"value":147},{"type":59,"tag":100,"props":247,"children":248},{"style":117},[249],{"type":65,"value":152},{"type":59,"tag":100,"props":251,"children":252},{"style":129},[253],{"type":65,"value":157},{"type":59,"tag":100,"props":255,"children":256},{"style":160},[257],{"type":65,"value":258},"@trpc\u002Fserver\u002Fadapters\u002Fstandalone",{"type":59,"tag":100,"props":260,"children":261},{"style":129},[262],{"type":65,"value":168},{"type":59,"tag":100,"props":264,"children":265},{"style":129},[266],{"type":65,"value":173},{"type":59,"tag":100,"props":268,"children":270},{"class":102,"line":269},5,[271,275,279,284,288,292,296,301,305],{"type":59,"tag":100,"props":272,"children":273},{"style":117},[274],{"type":65,"value":120},{"type":59,"tag":100,"props":276,"children":277},{"style":129},[278],{"type":65,"value":137},{"type":59,"tag":100,"props":280,"children":281},{"style":123},[282],{"type":65,"value":283}," z",{"type":59,"tag":100,"props":285,"children":286},{"style":129},[287],{"type":65,"value":147},{"type":59,"tag":100,"props":289,"children":290},{"style":117},[291],{"type":65,"value":152},{"type":59,"tag":100,"props":293,"children":294},{"style":129},[295],{"type":65,"value":157},{"type":59,"tag":100,"props":297,"children":298},{"style":160},[299],{"type":65,"value":300},"zod",{"type":59,"tag":100,"props":302,"children":303},{"style":129},[304],{"type":65,"value":168},{"type":59,"tag":100,"props":306,"children":307},{"style":129},[308],{"type":65,"value":173},{"type":59,"tag":100,"props":310,"children":312},{"class":102,"line":311},6,[313],{"type":59,"tag":100,"props":314,"children":316},{"emptyLinePlaceholder":315},true,[317],{"type":65,"value":318},"\n",{"type":59,"tag":100,"props":320,"children":322},{"class":102,"line":321},7,[323,329,334,339,343,348,354,359],{"type":59,"tag":100,"props":324,"children":326},{"style":325},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[327],{"type":65,"value":328},"const",{"type":59,"tag":100,"props":330,"children":331},{"style":123},[332],{"type":65,"value":333}," t ",{"type":59,"tag":100,"props":335,"children":336},{"style":129},[337],{"type":65,"value":338},"=",{"type":59,"tag":100,"props":340,"children":341},{"style":123},[342],{"type":65,"value":190},{"type":59,"tag":100,"props":344,"children":345},{"style":129},[346],{"type":65,"value":347},".",{"type":59,"tag":100,"props":349,"children":351},{"style":350},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[352],{"type":65,"value":353},"create",{"type":59,"tag":100,"props":355,"children":356},{"style":123},[357],{"type":65,"value":358},"(",{"type":59,"tag":100,"props":360,"children":361},{"style":129},[362],{"type":65,"value":363},"{\n",{"type":59,"tag":100,"props":365,"children":367},{"class":102,"line":366},8,[368,374,379],{"type":59,"tag":100,"props":369,"children":371},{"style":370},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[372],{"type":65,"value":373},"  sse",{"type":59,"tag":100,"props":375,"children":376},{"style":129},[377],{"type":65,"value":378},":",{"type":59,"tag":100,"props":380,"children":381},{"style":129},[382],{"type":65,"value":383}," {\n",{"type":59,"tag":100,"props":385,"children":387},{"class":102,"line":386},9,[388,393,397],{"type":59,"tag":100,"props":389,"children":390},{"style":370},[391],{"type":65,"value":392},"    ping",{"type":59,"tag":100,"props":394,"children":395},{"style":129},[396],{"type":65,"value":378},{"type":59,"tag":100,"props":398,"children":399},{"style":129},[400],{"type":65,"value":383},{"type":59,"tag":100,"props":402,"children":404},{"class":102,"line":403},10,[405,410,414,420],{"type":59,"tag":100,"props":406,"children":407},{"style":370},[408],{"type":65,"value":409},"      enabled",{"type":59,"tag":100,"props":411,"children":412},{"style":129},[413],{"type":65,"value":378},{"type":59,"tag":100,"props":415,"children":417},{"style":416},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[418],{"type":65,"value":419}," true",{"type":59,"tag":100,"props":421,"children":422},{"style":129},[423],{"type":65,"value":424},",\n",{"type":59,"tag":100,"props":426,"children":428},{"class":102,"line":427},11,[429,434,438,444],{"type":59,"tag":100,"props":430,"children":431},{"style":370},[432],{"type":65,"value":433},"      intervalMs",{"type":59,"tag":100,"props":435,"children":436},{"style":129},[437],{"type":65,"value":378},{"type":59,"tag":100,"props":439,"children":441},{"style":440},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[442],{"type":65,"value":443}," 2000",{"type":59,"tag":100,"props":445,"children":446},{"style":129},[447],{"type":65,"value":424},{"type":59,"tag":100,"props":449,"children":451},{"class":102,"line":450},12,[452],{"type":59,"tag":100,"props":453,"children":454},{"style":129},[455],{"type":65,"value":456},"    },\n",{"type":59,"tag":100,"props":458,"children":460},{"class":102,"line":459},13,[461,466,470],{"type":59,"tag":100,"props":462,"children":463},{"style":370},[464],{"type":65,"value":465},"    client",{"type":59,"tag":100,"props":467,"children":468},{"style":129},[469],{"type":65,"value":378},{"type":59,"tag":100,"props":471,"children":472},{"style":129},[473],{"type":65,"value":383},{"type":59,"tag":100,"props":475,"children":477},{"class":102,"line":476},14,[478,483,487,492],{"type":59,"tag":100,"props":479,"children":480},{"style":370},[481],{"type":65,"value":482},"      reconnectAfterInactivityMs",{"type":59,"tag":100,"props":484,"children":485},{"style":129},[486],{"type":65,"value":378},{"type":59,"tag":100,"props":488,"children":489},{"style":440},[490],{"type":65,"value":491}," 5000",{"type":59,"tag":100,"props":493,"children":494},{"style":129},[495],{"type":65,"value":424},{"type":59,"tag":100,"props":497,"children":499},{"class":102,"line":498},15,[500],{"type":59,"tag":100,"props":501,"children":502},{"style":129},[503],{"type":65,"value":456},{"type":59,"tag":100,"props":505,"children":507},{"class":102,"line":506},16,[508],{"type":59,"tag":100,"props":509,"children":510},{"style":129},[511],{"type":65,"value":512},"  },\n",{"type":59,"tag":100,"props":514,"children":516},{"class":102,"line":515},17,[517,522,527],{"type":59,"tag":100,"props":518,"children":519},{"style":129},[520],{"type":65,"value":521},"}",{"type":59,"tag":100,"props":523,"children":524},{"style":123},[525],{"type":65,"value":526},")",{"type":59,"tag":100,"props":528,"children":529},{"style":129},[530],{"type":65,"value":173},{"type":59,"tag":100,"props":532,"children":534},{"class":102,"line":533},18,[535],{"type":59,"tag":100,"props":536,"children":537},{"emptyLinePlaceholder":315},[538],{"type":65,"value":318},{"type":59,"tag":100,"props":540,"children":542},{"class":102,"line":541},19,[543,548,554,559,563,568,572,577,582,587,591,595],{"type":59,"tag":100,"props":544,"children":545},{"style":325},[546],{"type":65,"value":547},"type",{"type":59,"tag":100,"props":549,"children":551},{"style":550},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[552],{"type":65,"value":553}," Post",{"type":59,"tag":100,"props":555,"children":556},{"style":129},[557],{"type":65,"value":558}," =",{"type":59,"tag":100,"props":560,"children":561},{"style":129},[562],{"type":65,"value":137},{"type":59,"tag":100,"props":564,"children":565},{"style":370},[566],{"type":65,"value":567}," id",{"type":59,"tag":100,"props":569,"children":570},{"style":129},[571],{"type":65,"value":378},{"type":59,"tag":100,"props":573,"children":574},{"style":550},[575],{"type":65,"value":576}," string",{"type":59,"tag":100,"props":578,"children":579},{"style":129},[580],{"type":65,"value":581},";",{"type":59,"tag":100,"props":583,"children":584},{"style":370},[585],{"type":65,"value":586}," title",{"type":59,"tag":100,"props":588,"children":589},{"style":129},[590],{"type":65,"value":378},{"type":59,"tag":100,"props":592,"children":593},{"style":550},[594],{"type":65,"value":576},{"type":59,"tag":100,"props":596,"children":597},{"style":129},[598],{"type":65,"value":599}," };\n",{"type":59,"tag":100,"props":601,"children":603},{"class":102,"line":602},20,[604,608,613,617,622,626,631],{"type":59,"tag":100,"props":605,"children":606},{"style":325},[607],{"type":65,"value":328},{"type":59,"tag":100,"props":609,"children":610},{"style":123},[611],{"type":65,"value":612}," ee ",{"type":59,"tag":100,"props":614,"children":615},{"style":129},[616],{"type":65,"value":338},{"type":59,"tag":100,"props":618,"children":619},{"style":129},[620],{"type":65,"value":621}," new",{"type":59,"tag":100,"props":623,"children":624},{"style":350},[625],{"type":65,"value":126},{"type":59,"tag":100,"props":627,"children":628},{"style":123},[629],{"type":65,"value":630},"()",{"type":59,"tag":100,"props":632,"children":633},{"style":129},[634],{"type":65,"value":173},{"type":59,"tag":100,"props":636,"children":638},{"class":102,"line":637},21,[639],{"type":59,"tag":100,"props":640,"children":641},{"emptyLinePlaceholder":315},[642],{"type":65,"value":318},{"type":59,"tag":100,"props":644,"children":646},{"class":102,"line":645},22,[647,651,656,660,665,669,674,678],{"type":59,"tag":100,"props":648,"children":649},{"style":325},[650],{"type":65,"value":328},{"type":59,"tag":100,"props":652,"children":653},{"style":123},[654],{"type":65,"value":655}," appRouter ",{"type":59,"tag":100,"props":657,"children":658},{"style":129},[659],{"type":65,"value":338},{"type":59,"tag":100,"props":661,"children":662},{"style":123},[663],{"type":65,"value":664}," t",{"type":59,"tag":100,"props":666,"children":667},{"style":129},[668],{"type":65,"value":347},{"type":59,"tag":100,"props":670,"children":671},{"style":350},[672],{"type":65,"value":673},"router",{"type":59,"tag":100,"props":675,"children":676},{"style":123},[677],{"type":65,"value":358},{"type":59,"tag":100,"props":679,"children":680},{"style":129},[681],{"type":65,"value":363},{"type":59,"tag":100,"props":683,"children":685},{"class":102,"line":684},23,[686,691,695,699,703],{"type":59,"tag":100,"props":687,"children":688},{"style":370},[689],{"type":65,"value":690},"  onPostAdd",{"type":59,"tag":100,"props":692,"children":693},{"style":129},[694],{"type":65,"value":378},{"type":59,"tag":100,"props":696,"children":697},{"style":123},[698],{"type":65,"value":664},{"type":59,"tag":100,"props":700,"children":701},{"style":129},[702],{"type":65,"value":347},{"type":59,"tag":100,"props":704,"children":705},{"style":123},[706],{"type":65,"value":707},"procedure\n",{"type":59,"tag":100,"props":709,"children":711},{"class":102,"line":710},24,[712,717,722,727,731,736,740,745,750,754,758,762,767,771,775,780,785,789,793,797,802],{"type":59,"tag":100,"props":713,"children":714},{"style":129},[715],{"type":65,"value":716},"    .",{"type":59,"tag":100,"props":718,"children":719},{"style":350},[720],{"type":65,"value":721},"input",{"type":59,"tag":100,"props":723,"children":724},{"style":123},[725],{"type":65,"value":726},"(z",{"type":59,"tag":100,"props":728,"children":729},{"style":129},[730],{"type":65,"value":347},{"type":59,"tag":100,"props":732,"children":733},{"style":350},[734],{"type":65,"value":735},"object",{"type":59,"tag":100,"props":737,"children":738},{"style":123},[739],{"type":65,"value":358},{"type":59,"tag":100,"props":741,"children":742},{"style":129},[743],{"type":65,"value":744},"{",{"type":59,"tag":100,"props":746,"children":747},{"style":370},[748],{"type":65,"value":749}," lastEventId",{"type":59,"tag":100,"props":751,"children":752},{"style":129},[753],{"type":65,"value":378},{"type":59,"tag":100,"props":755,"children":756},{"style":123},[757],{"type":65,"value":283},{"type":59,"tag":100,"props":759,"children":760},{"style":129},[761],{"type":65,"value":347},{"type":59,"tag":100,"props":763,"children":764},{"style":350},[765],{"type":65,"value":766},"string",{"type":59,"tag":100,"props":768,"children":769},{"style":123},[770],{"type":65,"value":630},{"type":59,"tag":100,"props":772,"children":773},{"style":129},[774],{"type":65,"value":347},{"type":59,"tag":100,"props":776,"children":777},{"style":350},[778],{"type":65,"value":779},"nullish",{"type":59,"tag":100,"props":781,"children":782},{"style":123},[783],{"type":65,"value":784},"() ",{"type":59,"tag":100,"props":786,"children":787},{"style":129},[788],{"type":65,"value":521},{"type":59,"tag":100,"props":790,"children":791},{"style":123},[792],{"type":65,"value":526},{"type":59,"tag":100,"props":794,"children":795},{"style":129},[796],{"type":65,"value":347},{"type":59,"tag":100,"props":798,"children":799},{"style":350},[800],{"type":65,"value":801},"optional",{"type":59,"tag":100,"props":803,"children":804},{"style":123},[805],{"type":65,"value":806},"())\n",{"type":59,"tag":100,"props":808,"children":810},{"class":102,"line":809},25,[811,815,820,824,829,834,839,844,850,854],{"type":59,"tag":100,"props":812,"children":813},{"style":129},[814],{"type":65,"value":716},{"type":59,"tag":100,"props":816,"children":817},{"style":350},[818],{"type":65,"value":819},"subscription",{"type":59,"tag":100,"props":821,"children":822},{"style":123},[823],{"type":65,"value":358},{"type":59,"tag":100,"props":825,"children":826},{"style":325},[827],{"type":65,"value":828},"async",{"type":59,"tag":100,"props":830,"children":831},{"style":325},[832],{"type":65,"value":833}," function",{"type":59,"tag":100,"props":835,"children":836},{"style":129},[837],{"type":65,"value":838},"*",{"type":59,"tag":100,"props":840,"children":841},{"style":129},[842],{"type":65,"value":843}," (",{"type":59,"tag":100,"props":845,"children":847},{"style":846},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[848],{"type":65,"value":849},"opts",{"type":59,"tag":100,"props":851,"children":852},{"style":129},[853],{"type":65,"value":526},{"type":59,"tag":100,"props":855,"children":856},{"style":129},[857],{"type":65,"value":383},{"type":59,"tag":100,"props":859,"children":861},{"class":102,"line":860},26,[862,867,872,876,880,885,890,895,900,904,908,913,917,921,926,930,934,938,943,947,952,956,961,965,970],{"type":59,"tag":100,"props":863,"children":864},{"style":117},[865],{"type":65,"value":866},"      for",{"type":59,"tag":100,"props":868,"children":869},{"style":117},[870],{"type":65,"value":871}," await",{"type":59,"tag":100,"props":873,"children":874},{"style":370},[875],{"type":65,"value":843},{"type":59,"tag":100,"props":877,"children":878},{"style":325},[879],{"type":65,"value":328},{"type":59,"tag":100,"props":881,"children":882},{"style":129},[883],{"type":65,"value":884}," [",{"type":59,"tag":100,"props":886,"children":887},{"style":123},[888],{"type":65,"value":889},"data",{"type":59,"tag":100,"props":891,"children":892},{"style":129},[893],{"type":65,"value":894},"]",{"type":59,"tag":100,"props":896,"children":897},{"style":129},[898],{"type":65,"value":899}," of",{"type":59,"tag":100,"props":901,"children":902},{"style":350},[903],{"type":65,"value":142},{"type":59,"tag":100,"props":905,"children":906},{"style":370},[907],{"type":65,"value":358},{"type":59,"tag":100,"props":909,"children":910},{"style":123},[911],{"type":65,"value":912},"ee",{"type":59,"tag":100,"props":914,"children":915},{"style":129},[916],{"type":65,"value":132},{"type":59,"tag":100,"props":918,"children":919},{"style":129},[920],{"type":65,"value":157},{"type":59,"tag":100,"props":922,"children":923},{"style":160},[924],{"type":65,"value":925},"add",{"type":59,"tag":100,"props":927,"children":928},{"style":129},[929],{"type":65,"value":168},{"type":59,"tag":100,"props":931,"children":932},{"style":129},[933],{"type":65,"value":132},{"type":59,"tag":100,"props":935,"children":936},{"style":129},[937],{"type":65,"value":137},{"type":59,"tag":100,"props":939,"children":940},{"style":370},[941],{"type":65,"value":942}," signal",{"type":59,"tag":100,"props":944,"children":945},{"style":129},[946],{"type":65,"value":378},{"type":59,"tag":100,"props":948,"children":949},{"style":123},[950],{"type":65,"value":951}," opts",{"type":59,"tag":100,"props":953,"children":954},{"style":129},[955],{"type":65,"value":347},{"type":59,"tag":100,"props":957,"children":958},{"style":123},[959],{"type":65,"value":960},"signal",{"type":59,"tag":100,"props":962,"children":963},{"style":129},[964],{"type":65,"value":147},{"type":59,"tag":100,"props":966,"children":967},{"style":370},[968],{"type":65,"value":969},")) ",{"type":59,"tag":100,"props":971,"children":972},{"style":129},[973],{"type":65,"value":363},{"type":59,"tag":100,"props":975,"children":977},{"class":102,"line":976},27,[978,983,988,992,997,1002,1006],{"type":59,"tag":100,"props":979,"children":980},{"style":325},[981],{"type":65,"value":982},"        const",{"type":59,"tag":100,"props":984,"children":985},{"style":123},[986],{"type":65,"value":987}," post",{"type":59,"tag":100,"props":989,"children":990},{"style":129},[991],{"type":65,"value":558},{"type":59,"tag":100,"props":993,"children":994},{"style":123},[995],{"type":65,"value":996}," data",{"type":59,"tag":100,"props":998,"children":999},{"style":117},[1000],{"type":65,"value":1001}," as",{"type":59,"tag":100,"props":1003,"children":1004},{"style":550},[1005],{"type":65,"value":553},{"type":59,"tag":100,"props":1007,"children":1008},{"style":129},[1009],{"type":65,"value":173},{"type":59,"tag":100,"props":1011,"children":1013},{"class":102,"line":1012},28,[1014,1019,1023,1027,1032,1036,1041,1045,1049,1053],{"type":59,"tag":100,"props":1015,"children":1016},{"style":117},[1017],{"type":65,"value":1018},"        yield",{"type":59,"tag":100,"props":1020,"children":1021},{"style":350},[1022],{"type":65,"value":199},{"type":59,"tag":100,"props":1024,"children":1025},{"style":370},[1026],{"type":65,"value":358},{"type":59,"tag":100,"props":1028,"children":1029},{"style":123},[1030],{"type":65,"value":1031},"post",{"type":59,"tag":100,"props":1033,"children":1034},{"style":129},[1035],{"type":65,"value":347},{"type":59,"tag":100,"props":1037,"children":1038},{"style":123},[1039],{"type":65,"value":1040},"id",{"type":59,"tag":100,"props":1042,"children":1043},{"style":129},[1044],{"type":65,"value":132},{"type":59,"tag":100,"props":1046,"children":1047},{"style":123},[1048],{"type":65,"value":987},{"type":59,"tag":100,"props":1050,"children":1051},{"style":370},[1052],{"type":65,"value":526},{"type":59,"tag":100,"props":1054,"children":1055},{"style":129},[1056],{"type":65,"value":173},{"type":59,"tag":100,"props":1058,"children":1060},{"class":102,"line":1059},29,[1061],{"type":59,"tag":100,"props":1062,"children":1063},{"style":129},[1064],{"type":65,"value":1065},"      }\n",{"type":59,"tag":100,"props":1067,"children":1069},{"class":102,"line":1068},30,[1070,1075,1079],{"type":59,"tag":100,"props":1071,"children":1072},{"style":129},[1073],{"type":65,"value":1074},"    }",{"type":59,"tag":100,"props":1076,"children":1077},{"style":123},[1078],{"type":65,"value":526},{"type":59,"tag":100,"props":1080,"children":1081},{"style":129},[1082],{"type":65,"value":424},{"type":59,"tag":100,"props":1084,"children":1086},{"class":102,"line":1085},31,[1087,1091,1095],{"type":59,"tag":100,"props":1088,"children":1089},{"style":129},[1090],{"type":65,"value":521},{"type":59,"tag":100,"props":1092,"children":1093},{"style":123},[1094],{"type":65,"value":526},{"type":59,"tag":100,"props":1096,"children":1097},{"style":129},[1098],{"type":65,"value":173},{"type":59,"tag":100,"props":1100,"children":1102},{"class":102,"line":1101},32,[1103],{"type":59,"tag":100,"props":1104,"children":1105},{"emptyLinePlaceholder":315},[1106],{"type":65,"value":318},{"type":59,"tag":100,"props":1108,"children":1110},{"class":102,"line":1109},33,[1111,1116,1121,1126,1130,1135,1140],{"type":59,"tag":100,"props":1112,"children":1113},{"style":117},[1114],{"type":65,"value":1115},"export",{"type":59,"tag":100,"props":1117,"children":1118},{"style":325},[1119],{"type":65,"value":1120}," type",{"type":59,"tag":100,"props":1122,"children":1123},{"style":550},[1124],{"type":65,"value":1125}," AppRouter",{"type":59,"tag":100,"props":1127,"children":1128},{"style":129},[1129],{"type":65,"value":558},{"type":59,"tag":100,"props":1131,"children":1132},{"style":129},[1133],{"type":65,"value":1134}," typeof",{"type":59,"tag":100,"props":1136,"children":1137},{"style":123},[1138],{"type":65,"value":1139}," appRouter",{"type":59,"tag":100,"props":1141,"children":1142},{"style":129},[1143],{"type":65,"value":173},{"type":59,"tag":100,"props":1145,"children":1147},{"class":102,"line":1146},34,[1148],{"type":59,"tag":100,"props":1149,"children":1150},{"emptyLinePlaceholder":315},[1151],{"type":65,"value":318},{"type":59,"tag":100,"props":1153,"children":1155},{"class":102,"line":1154},35,[1156,1161,1165],{"type":59,"tag":100,"props":1157,"children":1158},{"style":350},[1159],{"type":65,"value":1160},"createHTTPServer",{"type":59,"tag":100,"props":1162,"children":1163},{"style":123},[1164],{"type":65,"value":358},{"type":59,"tag":100,"props":1166,"children":1167},{"style":129},[1168],{"type":65,"value":363},{"type":59,"tag":100,"props":1170,"children":1172},{"class":102,"line":1171},36,[1173,1178,1182,1186],{"type":59,"tag":100,"props":1174,"children":1175},{"style":370},[1176],{"type":65,"value":1177},"  router",{"type":59,"tag":100,"props":1179,"children":1180},{"style":129},[1181],{"type":65,"value":378},{"type":59,"tag":100,"props":1183,"children":1184},{"style":123},[1185],{"type":65,"value":1139},{"type":59,"tag":100,"props":1187,"children":1188},{"style":129},[1189],{"type":65,"value":424},{"type":59,"tag":100,"props":1191,"children":1193},{"class":102,"line":1192},37,[1194,1199,1203],{"type":59,"tag":100,"props":1195,"children":1196},{"style":370},[1197],{"type":65,"value":1198},"  createContext",{"type":59,"tag":100,"props":1200,"children":1201},{"style":129},[1202],{"type":65,"value":630},{"type":59,"tag":100,"props":1204,"children":1205},{"style":129},[1206],{"type":65,"value":383},{"type":59,"tag":100,"props":1208,"children":1210},{"class":102,"line":1209},38,[1211,1216],{"type":59,"tag":100,"props":1212,"children":1213},{"style":117},[1214],{"type":65,"value":1215},"    return",{"type":59,"tag":100,"props":1217,"children":1218},{"style":129},[1219],{"type":65,"value":1220}," {};\n",{"type":59,"tag":100,"props":1222,"children":1224},{"class":102,"line":1223},39,[1225],{"type":59,"tag":100,"props":1226,"children":1227},{"style":129},[1228],{"type":65,"value":512},{"type":59,"tag":100,"props":1230,"children":1232},{"class":102,"line":1231},40,[1233,1237,1241,1245,1250,1254,1259,1263],{"type":59,"tag":100,"props":1234,"children":1235},{"style":129},[1236],{"type":65,"value":521},{"type":59,"tag":100,"props":1238,"children":1239},{"style":123},[1240],{"type":65,"value":526},{"type":59,"tag":100,"props":1242,"children":1243},{"style":129},[1244],{"type":65,"value":347},{"type":59,"tag":100,"props":1246,"children":1247},{"style":350},[1248],{"type":65,"value":1249},"listen",{"type":59,"tag":100,"props":1251,"children":1252},{"style":123},[1253],{"type":65,"value":358},{"type":59,"tag":100,"props":1255,"children":1256},{"style":440},[1257],{"type":65,"value":1258},"3000",{"type":59,"tag":100,"props":1260,"children":1261},{"style":123},[1262],{"type":65,"value":526},{"type":59,"tag":100,"props":1264,"children":1265},{"style":129},[1266],{"type":65,"value":173},{"type":59,"tag":81,"props":1268,"children":1270},{"id":1269},"client-sse",[1271],{"type":65,"value":1272},"Client (SSE)",{"type":59,"tag":88,"props":1274,"children":1276},{"className":90,"code":1275,"language":92,"meta":93,"style":93},"\u002F\u002F client.ts\nimport {\n  createTRPCClient,\n  httpBatchLink,\n  httpSubscriptionLink,\n  splitLink,\n} from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst trpc = createTRPCClient\u003CAppRouter>({\n  links: [\n    splitLink({\n      condition: (op) => op.type === 'subscription',\n      true: httpSubscriptionLink({ url: 'http:\u002F\u002Flocalhost:3000' }),\n      false: httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' }),\n    }),\n  ],\n});\n\nconst subscription = trpc.onPostAdd.subscribe(\n  { lastEventId: null },\n  {\n    onData(post) {\n      console.log('New post:', post);\n    },\n    onError(err) {\n      console.error('Subscription error:', err);\n    },\n  },\n);\n\n\u002F\u002F To stop:\n\u002F\u002F subscription.unsubscribe();\n",[1277],{"type":59,"tag":96,"props":1278,"children":1279},{"__ignoreMap":93},[1280,1288,1299,1311,1323,1335,1347,1375,1419,1426,1470,1487,1503,1568,1627,1684,1699,1711,1726,1733,1777,1803,1811,1835,1885,1892,1917,1967,1974,1981,1992,1999,2007],{"type":59,"tag":100,"props":1281,"children":1282},{"class":102,"line":103},[1283],{"type":59,"tag":100,"props":1284,"children":1285},{"style":107},[1286],{"type":65,"value":1287},"\u002F\u002F client.ts\n",{"type":59,"tag":100,"props":1289,"children":1290},{"class":102,"line":113},[1291,1295],{"type":59,"tag":100,"props":1292,"children":1293},{"style":117},[1294],{"type":65,"value":120},{"type":59,"tag":100,"props":1296,"children":1297},{"style":129},[1298],{"type":65,"value":383},{"type":59,"tag":100,"props":1300,"children":1301},{"class":102,"line":176},[1302,1307],{"type":59,"tag":100,"props":1303,"children":1304},{"style":123},[1305],{"type":65,"value":1306},"  createTRPCClient",{"type":59,"tag":100,"props":1308,"children":1309},{"style":129},[1310],{"type":65,"value":424},{"type":59,"tag":100,"props":1312,"children":1313},{"class":102,"line":227},[1314,1319],{"type":59,"tag":100,"props":1315,"children":1316},{"style":123},[1317],{"type":65,"value":1318},"  httpBatchLink",{"type":59,"tag":100,"props":1320,"children":1321},{"style":129},[1322],{"type":65,"value":424},{"type":59,"tag":100,"props":1324,"children":1325},{"class":102,"line":269},[1326,1331],{"type":59,"tag":100,"props":1327,"children":1328},{"style":123},[1329],{"type":65,"value":1330},"  httpSubscriptionLink",{"type":59,"tag":100,"props":1332,"children":1333},{"style":129},[1334],{"type":65,"value":424},{"type":59,"tag":100,"props":1336,"children":1337},{"class":102,"line":311},[1338,1343],{"type":59,"tag":100,"props":1339,"children":1340},{"style":123},[1341],{"type":65,"value":1342},"  splitLink",{"type":59,"tag":100,"props":1344,"children":1345},{"style":129},[1346],{"type":65,"value":424},{"type":59,"tag":100,"props":1348,"children":1349},{"class":102,"line":321},[1350,1354,1358,1362,1367,1371],{"type":59,"tag":100,"props":1351,"children":1352},{"style":129},[1353],{"type":65,"value":521},{"type":59,"tag":100,"props":1355,"children":1356},{"style":117},[1357],{"type":65,"value":152},{"type":59,"tag":100,"props":1359,"children":1360},{"style":129},[1361],{"type":65,"value":157},{"type":59,"tag":100,"props":1363,"children":1364},{"style":160},[1365],{"type":65,"value":1366},"@trpc\u002Fclient",{"type":59,"tag":100,"props":1368,"children":1369},{"style":129},[1370],{"type":65,"value":168},{"type":59,"tag":100,"props":1372,"children":1373},{"style":129},[1374],{"type":65,"value":173},{"type":59,"tag":100,"props":1376,"children":1377},{"class":102,"line":366},[1378,1382,1386,1390,1394,1398,1402,1406,1411,1415],{"type":59,"tag":100,"props":1379,"children":1380},{"style":117},[1381],{"type":65,"value":120},{"type":59,"tag":100,"props":1383,"children":1384},{"style":117},[1385],{"type":65,"value":1120},{"type":59,"tag":100,"props":1387,"children":1388},{"style":129},[1389],{"type":65,"value":137},{"type":59,"tag":100,"props":1391,"children":1392},{"style":123},[1393],{"type":65,"value":1125},{"type":59,"tag":100,"props":1395,"children":1396},{"style":129},[1397],{"type":65,"value":147},{"type":59,"tag":100,"props":1399,"children":1400},{"style":117},[1401],{"type":65,"value":152},{"type":59,"tag":100,"props":1403,"children":1404},{"style":129},[1405],{"type":65,"value":157},{"type":59,"tag":100,"props":1407,"children":1408},{"style":160},[1409],{"type":65,"value":1410},".\u002Fserver",{"type":59,"tag":100,"props":1412,"children":1413},{"style":129},[1414],{"type":65,"value":168},{"type":59,"tag":100,"props":1416,"children":1417},{"style":129},[1418],{"type":65,"value":173},{"type":59,"tag":100,"props":1420,"children":1421},{"class":102,"line":386},[1422],{"type":59,"tag":100,"props":1423,"children":1424},{"emptyLinePlaceholder":315},[1425],{"type":65,"value":318},{"type":59,"tag":100,"props":1427,"children":1428},{"class":102,"line":403},[1429,1433,1438,1442,1447,1452,1457,1462,1466],{"type":59,"tag":100,"props":1430,"children":1431},{"style":325},[1432],{"type":65,"value":328},{"type":59,"tag":100,"props":1434,"children":1435},{"style":123},[1436],{"type":65,"value":1437}," trpc ",{"type":59,"tag":100,"props":1439,"children":1440},{"style":129},[1441],{"type":65,"value":338},{"type":59,"tag":100,"props":1443,"children":1444},{"style":350},[1445],{"type":65,"value":1446}," createTRPCClient",{"type":59,"tag":100,"props":1448,"children":1449},{"style":129},[1450],{"type":65,"value":1451},"\u003C",{"type":59,"tag":100,"props":1453,"children":1454},{"style":550},[1455],{"type":65,"value":1456},"AppRouter",{"type":59,"tag":100,"props":1458,"children":1459},{"style":129},[1460],{"type":65,"value":1461},">",{"type":59,"tag":100,"props":1463,"children":1464},{"style":123},[1465],{"type":65,"value":358},{"type":59,"tag":100,"props":1467,"children":1468},{"style":129},[1469],{"type":65,"value":363},{"type":59,"tag":100,"props":1471,"children":1472},{"class":102,"line":427},[1473,1478,1482],{"type":59,"tag":100,"props":1474,"children":1475},{"style":370},[1476],{"type":65,"value":1477},"  links",{"type":59,"tag":100,"props":1479,"children":1480},{"style":129},[1481],{"type":65,"value":378},{"type":59,"tag":100,"props":1483,"children":1484},{"style":123},[1485],{"type":65,"value":1486}," [\n",{"type":59,"tag":100,"props":1488,"children":1489},{"class":102,"line":450},[1490,1495,1499],{"type":59,"tag":100,"props":1491,"children":1492},{"style":350},[1493],{"type":65,"value":1494},"    splitLink",{"type":59,"tag":100,"props":1496,"children":1497},{"style":123},[1498],{"type":65,"value":358},{"type":59,"tag":100,"props":1500,"children":1501},{"style":129},[1502],{"type":65,"value":363},{"type":59,"tag":100,"props":1504,"children":1505},{"class":102,"line":459},[1506,1511,1515,1519,1524,1528,1533,1538,1542,1547,1552,1556,1560,1564],{"type":59,"tag":100,"props":1507,"children":1508},{"style":350},[1509],{"type":65,"value":1510},"      condition",{"type":59,"tag":100,"props":1512,"children":1513},{"style":129},[1514],{"type":65,"value":378},{"type":59,"tag":100,"props":1516,"children":1517},{"style":129},[1518],{"type":65,"value":843},{"type":59,"tag":100,"props":1520,"children":1521},{"style":846},[1522],{"type":65,"value":1523},"op",{"type":59,"tag":100,"props":1525,"children":1526},{"style":129},[1527],{"type":65,"value":526},{"type":59,"tag":100,"props":1529,"children":1530},{"style":325},[1531],{"type":65,"value":1532}," =>",{"type":59,"tag":100,"props":1534,"children":1535},{"style":123},[1536],{"type":65,"value":1537}," op",{"type":59,"tag":100,"props":1539,"children":1540},{"style":129},[1541],{"type":65,"value":347},{"type":59,"tag":100,"props":1543,"children":1544},{"style":123},[1545],{"type":65,"value":1546},"type ",{"type":59,"tag":100,"props":1548,"children":1549},{"style":129},[1550],{"type":65,"value":1551},"===",{"type":59,"tag":100,"props":1553,"children":1554},{"style":129},[1555],{"type":65,"value":157},{"type":59,"tag":100,"props":1557,"children":1558},{"style":160},[1559],{"type":65,"value":819},{"type":59,"tag":100,"props":1561,"children":1562},{"style":129},[1563],{"type":65,"value":168},{"type":59,"tag":100,"props":1565,"children":1566},{"style":129},[1567],{"type":65,"value":424},{"type":59,"tag":100,"props":1569,"children":1570},{"class":102,"line":476},[1571,1576,1580,1585,1589,1593,1598,1602,1606,1611,1615,1619,1623],{"type":59,"tag":100,"props":1572,"children":1573},{"style":370},[1574],{"type":65,"value":1575},"      true",{"type":59,"tag":100,"props":1577,"children":1578},{"style":129},[1579],{"type":65,"value":378},{"type":59,"tag":100,"props":1581,"children":1582},{"style":350},[1583],{"type":65,"value":1584}," httpSubscriptionLink",{"type":59,"tag":100,"props":1586,"children":1587},{"style":123},[1588],{"type":65,"value":358},{"type":59,"tag":100,"props":1590,"children":1591},{"style":129},[1592],{"type":65,"value":744},{"type":59,"tag":100,"props":1594,"children":1595},{"style":370},[1596],{"type":65,"value":1597}," url",{"type":59,"tag":100,"props":1599,"children":1600},{"style":129},[1601],{"type":65,"value":378},{"type":59,"tag":100,"props":1603,"children":1604},{"style":129},[1605],{"type":65,"value":157},{"type":59,"tag":100,"props":1607,"children":1608},{"style":160},[1609],{"type":65,"value":1610},"http:\u002F\u002Flocalhost:3000",{"type":59,"tag":100,"props":1612,"children":1613},{"style":129},[1614],{"type":65,"value":168},{"type":59,"tag":100,"props":1616,"children":1617},{"style":129},[1618],{"type":65,"value":147},{"type":59,"tag":100,"props":1620,"children":1621},{"style":123},[1622],{"type":65,"value":526},{"type":59,"tag":100,"props":1624,"children":1625},{"style":129},[1626],{"type":65,"value":424},{"type":59,"tag":100,"props":1628,"children":1629},{"class":102,"line":498},[1630,1635,1639,1644,1648,1652,1656,1660,1664,1668,1672,1676,1680],{"type":59,"tag":100,"props":1631,"children":1632},{"style":370},[1633],{"type":65,"value":1634},"      false",{"type":59,"tag":100,"props":1636,"children":1637},{"style":129},[1638],{"type":65,"value":378},{"type":59,"tag":100,"props":1640,"children":1641},{"style":350},[1642],{"type":65,"value":1643}," httpBatchLink",{"type":59,"tag":100,"props":1645,"children":1646},{"style":123},[1647],{"type":65,"value":358},{"type":59,"tag":100,"props":1649,"children":1650},{"style":129},[1651],{"type":65,"value":744},{"type":59,"tag":100,"props":1653,"children":1654},{"style":370},[1655],{"type":65,"value":1597},{"type":59,"tag":100,"props":1657,"children":1658},{"style":129},[1659],{"type":65,"value":378},{"type":59,"tag":100,"props":1661,"children":1662},{"style":129},[1663],{"type":65,"value":157},{"type":59,"tag":100,"props":1665,"children":1666},{"style":160},[1667],{"type":65,"value":1610},{"type":59,"tag":100,"props":1669,"children":1670},{"style":129},[1671],{"type":65,"value":168},{"type":59,"tag":100,"props":1673,"children":1674},{"style":129},[1675],{"type":65,"value":147},{"type":59,"tag":100,"props":1677,"children":1678},{"style":123},[1679],{"type":65,"value":526},{"type":59,"tag":100,"props":1681,"children":1682},{"style":129},[1683],{"type":65,"value":424},{"type":59,"tag":100,"props":1685,"children":1686},{"class":102,"line":506},[1687,1691,1695],{"type":59,"tag":100,"props":1688,"children":1689},{"style":129},[1690],{"type":65,"value":1074},{"type":59,"tag":100,"props":1692,"children":1693},{"style":123},[1694],{"type":65,"value":526},{"type":59,"tag":100,"props":1696,"children":1697},{"style":129},[1698],{"type":65,"value":424},{"type":59,"tag":100,"props":1700,"children":1701},{"class":102,"line":515},[1702,1707],{"type":59,"tag":100,"props":1703,"children":1704},{"style":123},[1705],{"type":65,"value":1706},"  ]",{"type":59,"tag":100,"props":1708,"children":1709},{"style":129},[1710],{"type":65,"value":424},{"type":59,"tag":100,"props":1712,"children":1713},{"class":102,"line":533},[1714,1718,1722],{"type":59,"tag":100,"props":1715,"children":1716},{"style":129},[1717],{"type":65,"value":521},{"type":59,"tag":100,"props":1719,"children":1720},{"style":123},[1721],{"type":65,"value":526},{"type":59,"tag":100,"props":1723,"children":1724},{"style":129},[1725],{"type":65,"value":173},{"type":59,"tag":100,"props":1727,"children":1728},{"class":102,"line":541},[1729],{"type":59,"tag":100,"props":1730,"children":1731},{"emptyLinePlaceholder":315},[1732],{"type":65,"value":318},{"type":59,"tag":100,"props":1734,"children":1735},{"class":102,"line":602},[1736,1740,1745,1749,1754,1758,1763,1767,1772],{"type":59,"tag":100,"props":1737,"children":1738},{"style":325},[1739],{"type":65,"value":328},{"type":59,"tag":100,"props":1741,"children":1742},{"style":123},[1743],{"type":65,"value":1744}," subscription ",{"type":59,"tag":100,"props":1746,"children":1747},{"style":129},[1748],{"type":65,"value":338},{"type":59,"tag":100,"props":1750,"children":1751},{"style":123},[1752],{"type":65,"value":1753}," trpc",{"type":59,"tag":100,"props":1755,"children":1756},{"style":129},[1757],{"type":65,"value":347},{"type":59,"tag":100,"props":1759,"children":1760},{"style":123},[1761],{"type":65,"value":1762},"onPostAdd",{"type":59,"tag":100,"props":1764,"children":1765},{"style":129},[1766],{"type":65,"value":347},{"type":59,"tag":100,"props":1768,"children":1769},{"style":350},[1770],{"type":65,"value":1771},"subscribe",{"type":59,"tag":100,"props":1773,"children":1774},{"style":123},[1775],{"type":65,"value":1776},"(\n",{"type":59,"tag":100,"props":1778,"children":1779},{"class":102,"line":637},[1780,1785,1789,1793,1798],{"type":59,"tag":100,"props":1781,"children":1782},{"style":129},[1783],{"type":65,"value":1784},"  {",{"type":59,"tag":100,"props":1786,"children":1787},{"style":370},[1788],{"type":65,"value":749},{"type":59,"tag":100,"props":1790,"children":1791},{"style":129},[1792],{"type":65,"value":378},{"type":59,"tag":100,"props":1794,"children":1795},{"style":129},[1796],{"type":65,"value":1797}," null",{"type":59,"tag":100,"props":1799,"children":1800},{"style":129},[1801],{"type":65,"value":1802}," },\n",{"type":59,"tag":100,"props":1804,"children":1805},{"class":102,"line":645},[1806],{"type":59,"tag":100,"props":1807,"children":1808},{"style":129},[1809],{"type":65,"value":1810},"  {\n",{"type":59,"tag":100,"props":1812,"children":1813},{"class":102,"line":684},[1814,1819,1823,1827,1831],{"type":59,"tag":100,"props":1815,"children":1816},{"style":370},[1817],{"type":65,"value":1818},"    onData",{"type":59,"tag":100,"props":1820,"children":1821},{"style":129},[1822],{"type":65,"value":358},{"type":59,"tag":100,"props":1824,"children":1825},{"style":846},[1826],{"type":65,"value":1031},{"type":59,"tag":100,"props":1828,"children":1829},{"style":129},[1830],{"type":65,"value":526},{"type":59,"tag":100,"props":1832,"children":1833},{"style":129},[1834],{"type":65,"value":383},{"type":59,"tag":100,"props":1836,"children":1837},{"class":102,"line":710},[1838,1843,1847,1852,1856,1860,1865,1869,1873,1877,1881],{"type":59,"tag":100,"props":1839,"children":1840},{"style":123},[1841],{"type":65,"value":1842},"      console",{"type":59,"tag":100,"props":1844,"children":1845},{"style":129},[1846],{"type":65,"value":347},{"type":59,"tag":100,"props":1848,"children":1849},{"style":350},[1850],{"type":65,"value":1851},"log",{"type":59,"tag":100,"props":1853,"children":1854},{"style":370},[1855],{"type":65,"value":358},{"type":59,"tag":100,"props":1857,"children":1858},{"style":129},[1859],{"type":65,"value":168},{"type":59,"tag":100,"props":1861,"children":1862},{"style":160},[1863],{"type":65,"value":1864},"New post:",{"type":59,"tag":100,"props":1866,"children":1867},{"style":129},[1868],{"type":65,"value":168},{"type":59,"tag":100,"props":1870,"children":1871},{"style":129},[1872],{"type":65,"value":132},{"type":59,"tag":100,"props":1874,"children":1875},{"style":123},[1876],{"type":65,"value":987},{"type":59,"tag":100,"props":1878,"children":1879},{"style":370},[1880],{"type":65,"value":526},{"type":59,"tag":100,"props":1882,"children":1883},{"style":129},[1884],{"type":65,"value":173},{"type":59,"tag":100,"props":1886,"children":1887},{"class":102,"line":809},[1888],{"type":59,"tag":100,"props":1889,"children":1890},{"style":129},[1891],{"type":65,"value":456},{"type":59,"tag":100,"props":1893,"children":1894},{"class":102,"line":860},[1895,1900,1904,1909,1913],{"type":59,"tag":100,"props":1896,"children":1897},{"style":370},[1898],{"type":65,"value":1899},"    onError",{"type":59,"tag":100,"props":1901,"children":1902},{"style":129},[1903],{"type":65,"value":358},{"type":59,"tag":100,"props":1905,"children":1906},{"style":846},[1907],{"type":65,"value":1908},"err",{"type":59,"tag":100,"props":1910,"children":1911},{"style":129},[1912],{"type":65,"value":526},{"type":59,"tag":100,"props":1914,"children":1915},{"style":129},[1916],{"type":65,"value":383},{"type":59,"tag":100,"props":1918,"children":1919},{"class":102,"line":976},[1920,1924,1928,1933,1937,1941,1946,1950,1954,1959,1963],{"type":59,"tag":100,"props":1921,"children":1922},{"style":123},[1923],{"type":65,"value":1842},{"type":59,"tag":100,"props":1925,"children":1926},{"style":129},[1927],{"type":65,"value":347},{"type":59,"tag":100,"props":1929,"children":1930},{"style":350},[1931],{"type":65,"value":1932},"error",{"type":59,"tag":100,"props":1934,"children":1935},{"style":370},[1936],{"type":65,"value":358},{"type":59,"tag":100,"props":1938,"children":1939},{"style":129},[1940],{"type":65,"value":168},{"type":59,"tag":100,"props":1942,"children":1943},{"style":160},[1944],{"type":65,"value":1945},"Subscription error:",{"type":59,"tag":100,"props":1947,"children":1948},{"style":129},[1949],{"type":65,"value":168},{"type":59,"tag":100,"props":1951,"children":1952},{"style":129},[1953],{"type":65,"value":132},{"type":59,"tag":100,"props":1955,"children":1956},{"style":123},[1957],{"type":65,"value":1958}," err",{"type":59,"tag":100,"props":1960,"children":1961},{"style":370},[1962],{"type":65,"value":526},{"type":59,"tag":100,"props":1964,"children":1965},{"style":129},[1966],{"type":65,"value":173},{"type":59,"tag":100,"props":1968,"children":1969},{"class":102,"line":1012},[1970],{"type":59,"tag":100,"props":1971,"children":1972},{"style":129},[1973],{"type":65,"value":456},{"type":59,"tag":100,"props":1975,"children":1976},{"class":102,"line":1059},[1977],{"type":59,"tag":100,"props":1978,"children":1979},{"style":129},[1980],{"type":65,"value":512},{"type":59,"tag":100,"props":1982,"children":1983},{"class":102,"line":1068},[1984,1988],{"type":59,"tag":100,"props":1985,"children":1986},{"style":123},[1987],{"type":65,"value":526},{"type":59,"tag":100,"props":1989,"children":1990},{"style":129},[1991],{"type":65,"value":173},{"type":59,"tag":100,"props":1993,"children":1994},{"class":102,"line":1085},[1995],{"type":59,"tag":100,"props":1996,"children":1997},{"emptyLinePlaceholder":315},[1998],{"type":65,"value":318},{"type":59,"tag":100,"props":2000,"children":2001},{"class":102,"line":1101},[2002],{"type":59,"tag":100,"props":2003,"children":2004},{"style":107},[2005],{"type":65,"value":2006},"\u002F\u002F To stop:\n",{"type":59,"tag":100,"props":2008,"children":2009},{"class":102,"line":1109},[2010],{"type":59,"tag":100,"props":2011,"children":2012},{"style":107},[2013],{"type":65,"value":2014},"\u002F\u002F subscription.unsubscribe();\n",{"type":59,"tag":68,"props":2016,"children":2018},{"id":2017},"core-patterns",[2019],{"type":65,"value":2020},"Core Patterns",{"type":59,"tag":81,"props":2022,"children":2024},{"id":2023},"tracked-for-reconnection-recovery",[2025],{"type":65,"value":2026},"tracked() for reconnection recovery",{"type":59,"tag":88,"props":2028,"children":2030},{"className":90,"code":2029,"language":92,"meta":93,"style":93},"import EventEmitter, { on } from 'node:events';\nimport { initTRPC, tracked } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\nconst ee = new EventEmitter();\n\nconst appRouter = t.router({\n  onPostAdd: t.procedure\n    .input(z.object({ lastEventId: z.string().nullish() }).optional())\n    .subscription(async function* (opts) {\n      const iterable = on(ee, 'add', { signal: opts.signal });\n\n      if (opts.input?.lastEventId) {\n        \u002F\u002F Fetch and yield events since lastEventId from your database\n        \u002F\u002F const missed = await db.post.findMany({ where: { id: { gt: opts.input.lastEventId } } });\n        \u002F\u002F for (const post of missed) { yield tracked(post.id, post); }\n      }\n\n      for await (const [data] of iterable) {\n        yield tracked(data.id, data);\n      }\n    }),\n});\n",[2031],{"type":59,"tag":96,"props":2032,"children":2033},{"__ignoreMap":93},[2034,2081,2128,2167,2174,2209,2240,2247,2282,2305,2392,2435,2520,2527,2570,2578,2586,2594,2601,2608,2655,2698,2705,2720],{"type":59,"tag":100,"props":2035,"children":2036},{"class":102,"line":103},[2037,2041,2045,2049,2053,2057,2061,2065,2069,2073,2077],{"type":59,"tag":100,"props":2038,"children":2039},{"style":117},[2040],{"type":65,"value":120},{"type":59,"tag":100,"props":2042,"children":2043},{"style":123},[2044],{"type":65,"value":126},{"type":59,"tag":100,"props":2046,"children":2047},{"style":129},[2048],{"type":65,"value":132},{"type":59,"tag":100,"props":2050,"children":2051},{"style":129},[2052],{"type":65,"value":137},{"type":59,"tag":100,"props":2054,"children":2055},{"style":123},[2056],{"type":65,"value":142},{"type":59,"tag":100,"props":2058,"children":2059},{"style":129},[2060],{"type":65,"value":147},{"type":59,"tag":100,"props":2062,"children":2063},{"style":117},[2064],{"type":65,"value":152},{"type":59,"tag":100,"props":2066,"children":2067},{"style":129},[2068],{"type":65,"value":157},{"type":59,"tag":100,"props":2070,"children":2071},{"style":160},[2072],{"type":65,"value":163},{"type":59,"tag":100,"props":2074,"children":2075},{"style":129},[2076],{"type":65,"value":168},{"type":59,"tag":100,"props":2078,"children":2079},{"style":129},[2080],{"type":65,"value":173},{"type":59,"tag":100,"props":2082,"children":2083},{"class":102,"line":113},[2084,2088,2092,2096,2100,2104,2108,2112,2116,2120,2124],{"type":59,"tag":100,"props":2085,"children":2086},{"style":117},[2087],{"type":65,"value":120},{"type":59,"tag":100,"props":2089,"children":2090},{"style":129},[2091],{"type":65,"value":137},{"type":59,"tag":100,"props":2093,"children":2094},{"style":123},[2095],{"type":65,"value":190},{"type":59,"tag":100,"props":2097,"children":2098},{"style":129},[2099],{"type":65,"value":132},{"type":59,"tag":100,"props":2101,"children":2102},{"style":123},[2103],{"type":65,"value":199},{"type":59,"tag":100,"props":2105,"children":2106},{"style":129},[2107],{"type":65,"value":147},{"type":59,"tag":100,"props":2109,"children":2110},{"style":117},[2111],{"type":65,"value":152},{"type":59,"tag":100,"props":2113,"children":2114},{"style":129},[2115],{"type":65,"value":157},{"type":59,"tag":100,"props":2117,"children":2118},{"style":160},[2119],{"type":65,"value":216},{"type":59,"tag":100,"props":2121,"children":2122},{"style":129},[2123],{"type":65,"value":168},{"type":59,"tag":100,"props":2125,"children":2126},{"style":129},[2127],{"type":65,"value":173},{"type":59,"tag":100,"props":2129,"children":2130},{"class":102,"line":176},[2131,2135,2139,2143,2147,2151,2155,2159,2163],{"type":59,"tag":100,"props":2132,"children":2133},{"style":117},[2134],{"type":65,"value":120},{"type":59,"tag":100,"props":2136,"children":2137},{"style":129},[2138],{"type":65,"value":137},{"type":59,"tag":100,"props":2140,"children":2141},{"style":123},[2142],{"type":65,"value":283},{"type":59,"tag":100,"props":2144,"children":2145},{"style":129},[2146],{"type":65,"value":147},{"type":59,"tag":100,"props":2148,"children":2149},{"style":117},[2150],{"type":65,"value":152},{"type":59,"tag":100,"props":2152,"children":2153},{"style":129},[2154],{"type":65,"value":157},{"type":59,"tag":100,"props":2156,"children":2157},{"style":160},[2158],{"type":65,"value":300},{"type":59,"tag":100,"props":2160,"children":2161},{"style":129},[2162],{"type":65,"value":168},{"type":59,"tag":100,"props":2164,"children":2165},{"style":129},[2166],{"type":65,"value":173},{"type":59,"tag":100,"props":2168,"children":2169},{"class":102,"line":227},[2170],{"type":59,"tag":100,"props":2171,"children":2172},{"emptyLinePlaceholder":315},[2173],{"type":65,"value":318},{"type":59,"tag":100,"props":2175,"children":2176},{"class":102,"line":269},[2177,2181,2185,2189,2193,2197,2201,2205],{"type":59,"tag":100,"props":2178,"children":2179},{"style":325},[2180],{"type":65,"value":328},{"type":59,"tag":100,"props":2182,"children":2183},{"style":123},[2184],{"type":65,"value":333},{"type":59,"tag":100,"props":2186,"children":2187},{"style":129},[2188],{"type":65,"value":338},{"type":59,"tag":100,"props":2190,"children":2191},{"style":123},[2192],{"type":65,"value":190},{"type":59,"tag":100,"props":2194,"children":2195},{"style":129},[2196],{"type":65,"value":347},{"type":59,"tag":100,"props":2198,"children":2199},{"style":350},[2200],{"type":65,"value":353},{"type":59,"tag":100,"props":2202,"children":2203},{"style":123},[2204],{"type":65,"value":630},{"type":59,"tag":100,"props":2206,"children":2207},{"style":129},[2208],{"type":65,"value":173},{"type":59,"tag":100,"props":2210,"children":2211},{"class":102,"line":311},[2212,2216,2220,2224,2228,2232,2236],{"type":59,"tag":100,"props":2213,"children":2214},{"style":325},[2215],{"type":65,"value":328},{"type":59,"tag":100,"props":2217,"children":2218},{"style":123},[2219],{"type":65,"value":612},{"type":59,"tag":100,"props":2221,"children":2222},{"style":129},[2223],{"type":65,"value":338},{"type":59,"tag":100,"props":2225,"children":2226},{"style":129},[2227],{"type":65,"value":621},{"type":59,"tag":100,"props":2229,"children":2230},{"style":350},[2231],{"type":65,"value":126},{"type":59,"tag":100,"props":2233,"children":2234},{"style":123},[2235],{"type":65,"value":630},{"type":59,"tag":100,"props":2237,"children":2238},{"style":129},[2239],{"type":65,"value":173},{"type":59,"tag":100,"props":2241,"children":2242},{"class":102,"line":321},[2243],{"type":59,"tag":100,"props":2244,"children":2245},{"emptyLinePlaceholder":315},[2246],{"type":65,"value":318},{"type":59,"tag":100,"props":2248,"children":2249},{"class":102,"line":366},[2250,2254,2258,2262,2266,2270,2274,2278],{"type":59,"tag":100,"props":2251,"children":2252},{"style":325},[2253],{"type":65,"value":328},{"type":59,"tag":100,"props":2255,"children":2256},{"style":123},[2257],{"type":65,"value":655},{"type":59,"tag":100,"props":2259,"children":2260},{"style":129},[2261],{"type":65,"value":338},{"type":59,"tag":100,"props":2263,"children":2264},{"style":123},[2265],{"type":65,"value":664},{"type":59,"tag":100,"props":2267,"children":2268},{"style":129},[2269],{"type":65,"value":347},{"type":59,"tag":100,"props":2271,"children":2272},{"style":350},[2273],{"type":65,"value":673},{"type":59,"tag":100,"props":2275,"children":2276},{"style":123},[2277],{"type":65,"value":358},{"type":59,"tag":100,"props":2279,"children":2280},{"style":129},[2281],{"type":65,"value":363},{"type":59,"tag":100,"props":2283,"children":2284},{"class":102,"line":386},[2285,2289,2293,2297,2301],{"type":59,"tag":100,"props":2286,"children":2287},{"style":370},[2288],{"type":65,"value":690},{"type":59,"tag":100,"props":2290,"children":2291},{"style":129},[2292],{"type":65,"value":378},{"type":59,"tag":100,"props":2294,"children":2295},{"style":123},[2296],{"type":65,"value":664},{"type":59,"tag":100,"props":2298,"children":2299},{"style":129},[2300],{"type":65,"value":347},{"type":59,"tag":100,"props":2302,"children":2303},{"style":123},[2304],{"type":65,"value":707},{"type":59,"tag":100,"props":2306,"children":2307},{"class":102,"line":403},[2308,2312,2316,2320,2324,2328,2332,2336,2340,2344,2348,2352,2356,2360,2364,2368,2372,2376,2380,2384,2388],{"type":59,"tag":100,"props":2309,"children":2310},{"style":129},[2311],{"type":65,"value":716},{"type":59,"tag":100,"props":2313,"children":2314},{"style":350},[2315],{"type":65,"value":721},{"type":59,"tag":100,"props":2317,"children":2318},{"style":123},[2319],{"type":65,"value":726},{"type":59,"tag":100,"props":2321,"children":2322},{"style":129},[2323],{"type":65,"value":347},{"type":59,"tag":100,"props":2325,"children":2326},{"style":350},[2327],{"type":65,"value":735},{"type":59,"tag":100,"props":2329,"children":2330},{"style":123},[2331],{"type":65,"value":358},{"type":59,"tag":100,"props":2333,"children":2334},{"style":129},[2335],{"type":65,"value":744},{"type":59,"tag":100,"props":2337,"children":2338},{"style":370},[2339],{"type":65,"value":749},{"type":59,"tag":100,"props":2341,"children":2342},{"style":129},[2343],{"type":65,"value":378},{"type":59,"tag":100,"props":2345,"children":2346},{"style":123},[2347],{"type":65,"value":283},{"type":59,"tag":100,"props":2349,"children":2350},{"style":129},[2351],{"type":65,"value":347},{"type":59,"tag":100,"props":2353,"children":2354},{"style":350},[2355],{"type":65,"value":766},{"type":59,"tag":100,"props":2357,"children":2358},{"style":123},[2359],{"type":65,"value":630},{"type":59,"tag":100,"props":2361,"children":2362},{"style":129},[2363],{"type":65,"value":347},{"type":59,"tag":100,"props":2365,"children":2366},{"style":350},[2367],{"type":65,"value":779},{"type":59,"tag":100,"props":2369,"children":2370},{"style":123},[2371],{"type":65,"value":784},{"type":59,"tag":100,"props":2373,"children":2374},{"style":129},[2375],{"type":65,"value":521},{"type":59,"tag":100,"props":2377,"children":2378},{"style":123},[2379],{"type":65,"value":526},{"type":59,"tag":100,"props":2381,"children":2382},{"style":129},[2383],{"type":65,"value":347},{"type":59,"tag":100,"props":2385,"children":2386},{"style":350},[2387],{"type":65,"value":801},{"type":59,"tag":100,"props":2389,"children":2390},{"style":123},[2391],{"type":65,"value":806},{"type":59,"tag":100,"props":2393,"children":2394},{"class":102,"line":427},[2395,2399,2403,2407,2411,2415,2419,2423,2427,2431],{"type":59,"tag":100,"props":2396,"children":2397},{"style":129},[2398],{"type":65,"value":716},{"type":59,"tag":100,"props":2400,"children":2401},{"style":350},[2402],{"type":65,"value":819},{"type":59,"tag":100,"props":2404,"children":2405},{"style":123},[2406],{"type":65,"value":358},{"type":59,"tag":100,"props":2408,"children":2409},{"style":325},[2410],{"type":65,"value":828},{"type":59,"tag":100,"props":2412,"children":2413},{"style":325},[2414],{"type":65,"value":833},{"type":59,"tag":100,"props":2416,"children":2417},{"style":129},[2418],{"type":65,"value":838},{"type":59,"tag":100,"props":2420,"children":2421},{"style":129},[2422],{"type":65,"value":843},{"type":59,"tag":100,"props":2424,"children":2425},{"style":846},[2426],{"type":65,"value":849},{"type":59,"tag":100,"props":2428,"children":2429},{"style":129},[2430],{"type":65,"value":526},{"type":59,"tag":100,"props":2432,"children":2433},{"style":129},[2434],{"type":65,"value":383},{"type":59,"tag":100,"props":2436,"children":2437},{"class":102,"line":450},[2438,2443,2448,2452,2456,2460,2464,2468,2472,2476,2480,2484,2488,2492,2496,2500,2504,2508,2512,2516],{"type":59,"tag":100,"props":2439,"children":2440},{"style":325},[2441],{"type":65,"value":2442},"      const",{"type":59,"tag":100,"props":2444,"children":2445},{"style":123},[2446],{"type":65,"value":2447}," iterable",{"type":59,"tag":100,"props":2449,"children":2450},{"style":129},[2451],{"type":65,"value":558},{"type":59,"tag":100,"props":2453,"children":2454},{"style":350},[2455],{"type":65,"value":142},{"type":59,"tag":100,"props":2457,"children":2458},{"style":370},[2459],{"type":65,"value":358},{"type":59,"tag":100,"props":2461,"children":2462},{"style":123},[2463],{"type":65,"value":912},{"type":59,"tag":100,"props":2465,"children":2466},{"style":129},[2467],{"type":65,"value":132},{"type":59,"tag":100,"props":2469,"children":2470},{"style":129},[2471],{"type":65,"value":157},{"type":59,"tag":100,"props":2473,"children":2474},{"style":160},[2475],{"type":65,"value":925},{"type":59,"tag":100,"props":2477,"children":2478},{"style":129},[2479],{"type":65,"value":168},{"type":59,"tag":100,"props":2481,"children":2482},{"style":129},[2483],{"type":65,"value":132},{"type":59,"tag":100,"props":2485,"children":2486},{"style":129},[2487],{"type":65,"value":137},{"type":59,"tag":100,"props":2489,"children":2490},{"style":370},[2491],{"type":65,"value":942},{"type":59,"tag":100,"props":2493,"children":2494},{"style":129},[2495],{"type":65,"value":378},{"type":59,"tag":100,"props":2497,"children":2498},{"style":123},[2499],{"type":65,"value":951},{"type":59,"tag":100,"props":2501,"children":2502},{"style":129},[2503],{"type":65,"value":347},{"type":59,"tag":100,"props":2505,"children":2506},{"style":123},[2507],{"type":65,"value":960},{"type":59,"tag":100,"props":2509,"children":2510},{"style":129},[2511],{"type":65,"value":147},{"type":59,"tag":100,"props":2513,"children":2514},{"style":370},[2515],{"type":65,"value":526},{"type":59,"tag":100,"props":2517,"children":2518},{"style":129},[2519],{"type":65,"value":173},{"type":59,"tag":100,"props":2521,"children":2522},{"class":102,"line":459},[2523],{"type":59,"tag":100,"props":2524,"children":2525},{"emptyLinePlaceholder":315},[2526],{"type":65,"value":318},{"type":59,"tag":100,"props":2528,"children":2529},{"class":102,"line":476},[2530,2535,2539,2543,2547,2551,2556,2561,2566],{"type":59,"tag":100,"props":2531,"children":2532},{"style":117},[2533],{"type":65,"value":2534},"      if",{"type":59,"tag":100,"props":2536,"children":2537},{"style":370},[2538],{"type":65,"value":843},{"type":59,"tag":100,"props":2540,"children":2541},{"style":123},[2542],{"type":65,"value":849},{"type":59,"tag":100,"props":2544,"children":2545},{"style":129},[2546],{"type":65,"value":347},{"type":59,"tag":100,"props":2548,"children":2549},{"style":123},[2550],{"type":65,"value":721},{"type":59,"tag":100,"props":2552,"children":2553},{"style":129},[2554],{"type":65,"value":2555},"?.",{"type":59,"tag":100,"props":2557,"children":2558},{"style":123},[2559],{"type":65,"value":2560},"lastEventId",{"type":59,"tag":100,"props":2562,"children":2563},{"style":370},[2564],{"type":65,"value":2565},") ",{"type":59,"tag":100,"props":2567,"children":2568},{"style":129},[2569],{"type":65,"value":363},{"type":59,"tag":100,"props":2571,"children":2572},{"class":102,"line":498},[2573],{"type":59,"tag":100,"props":2574,"children":2575},{"style":107},[2576],{"type":65,"value":2577},"        \u002F\u002F Fetch and yield events since lastEventId from your database\n",{"type":59,"tag":100,"props":2579,"children":2580},{"class":102,"line":506},[2581],{"type":59,"tag":100,"props":2582,"children":2583},{"style":107},[2584],{"type":65,"value":2585},"        \u002F\u002F const missed = await db.post.findMany({ where: { id: { gt: opts.input.lastEventId } } });\n",{"type":59,"tag":100,"props":2587,"children":2588},{"class":102,"line":515},[2589],{"type":59,"tag":100,"props":2590,"children":2591},{"style":107},[2592],{"type":65,"value":2593},"        \u002F\u002F for (const post of missed) { yield tracked(post.id, post); }\n",{"type":59,"tag":100,"props":2595,"children":2596},{"class":102,"line":533},[2597],{"type":59,"tag":100,"props":2598,"children":2599},{"style":129},[2600],{"type":65,"value":1065},{"type":59,"tag":100,"props":2602,"children":2603},{"class":102,"line":541},[2604],{"type":59,"tag":100,"props":2605,"children":2606},{"emptyLinePlaceholder":315},[2607],{"type":65,"value":318},{"type":59,"tag":100,"props":2609,"children":2610},{"class":102,"line":602},[2611,2615,2619,2623,2627,2631,2635,2639,2643,2647,2651],{"type":59,"tag":100,"props":2612,"children":2613},{"style":117},[2614],{"type":65,"value":866},{"type":59,"tag":100,"props":2616,"children":2617},{"style":117},[2618],{"type":65,"value":871},{"type":59,"tag":100,"props":2620,"children":2621},{"style":370},[2622],{"type":65,"value":843},{"type":59,"tag":100,"props":2624,"children":2625},{"style":325},[2626],{"type":65,"value":328},{"type":59,"tag":100,"props":2628,"children":2629},{"style":129},[2630],{"type":65,"value":884},{"type":59,"tag":100,"props":2632,"children":2633},{"style":123},[2634],{"type":65,"value":889},{"type":59,"tag":100,"props":2636,"children":2637},{"style":129},[2638],{"type":65,"value":894},{"type":59,"tag":100,"props":2640,"children":2641},{"style":129},[2642],{"type":65,"value":899},{"type":59,"tag":100,"props":2644,"children":2645},{"style":123},[2646],{"type":65,"value":2447},{"type":59,"tag":100,"props":2648,"children":2649},{"style":370},[2650],{"type":65,"value":2565},{"type":59,"tag":100,"props":2652,"children":2653},{"style":129},[2654],{"type":65,"value":363},{"type":59,"tag":100,"props":2656,"children":2657},{"class":102,"line":637},[2658,2662,2666,2670,2674,2678,2682,2686,2690,2694],{"type":59,"tag":100,"props":2659,"children":2660},{"style":117},[2661],{"type":65,"value":1018},{"type":59,"tag":100,"props":2663,"children":2664},{"style":350},[2665],{"type":65,"value":199},{"type":59,"tag":100,"props":2667,"children":2668},{"style":370},[2669],{"type":65,"value":358},{"type":59,"tag":100,"props":2671,"children":2672},{"style":123},[2673],{"type":65,"value":889},{"type":59,"tag":100,"props":2675,"children":2676},{"style":129},[2677],{"type":65,"value":347},{"type":59,"tag":100,"props":2679,"children":2680},{"style":123},[2681],{"type":65,"value":1040},{"type":59,"tag":100,"props":2683,"children":2684},{"style":129},[2685],{"type":65,"value":132},{"type":59,"tag":100,"props":2687,"children":2688},{"style":123},[2689],{"type":65,"value":996},{"type":59,"tag":100,"props":2691,"children":2692},{"style":370},[2693],{"type":65,"value":526},{"type":59,"tag":100,"props":2695,"children":2696},{"style":129},[2697],{"type":65,"value":173},{"type":59,"tag":100,"props":2699,"children":2700},{"class":102,"line":645},[2701],{"type":59,"tag":100,"props":2702,"children":2703},{"style":129},[2704],{"type":65,"value":1065},{"type":59,"tag":100,"props":2706,"children":2707},{"class":102,"line":684},[2708,2712,2716],{"type":59,"tag":100,"props":2709,"children":2710},{"style":129},[2711],{"type":65,"value":1074},{"type":59,"tag":100,"props":2713,"children":2714},{"style":123},[2715],{"type":65,"value":526},{"type":59,"tag":100,"props":2717,"children":2718},{"style":129},[2719],{"type":65,"value":424},{"type":59,"tag":100,"props":2721,"children":2722},{"class":102,"line":710},[2723,2727,2731],{"type":59,"tag":100,"props":2724,"children":2725},{"style":129},[2726],{"type":65,"value":521},{"type":59,"tag":100,"props":2728,"children":2729},{"style":123},[2730],{"type":65,"value":526},{"type":59,"tag":100,"props":2732,"children":2733},{"style":129},[2734],{"type":65,"value":173},{"type":59,"tag":75,"props":2736,"children":2737},{},[2738,2740,2746,2748,2753,2755,2761],{"type":65,"value":2739},"When using ",{"type":59,"tag":96,"props":2741,"children":2743},{"className":2742},[],[2744],{"type":65,"value":2745},"tracked(id, data)",{"type":65,"value":2747},", the client automatically sends ",{"type":59,"tag":96,"props":2749,"children":2751},{"className":2750},[],[2752],{"type":65,"value":2560},{"type":65,"value":2754}," on reconnection. For SSE this is part of the EventSource spec; for WebSocket, ",{"type":59,"tag":96,"props":2756,"children":2758},{"className":2757},[],[2759],{"type":65,"value":2760},"wsLink",{"type":65,"value":2762}," handles it.",{"type":59,"tag":81,"props":2764,"children":2766},{"id":2765},"polling-loop-subscription",[2767],{"type":65,"value":2768},"Polling loop subscription",{"type":59,"tag":88,"props":2770,"children":2772},{"className":90,"code":2771,"language":92,"meta":93,"style":93},"import { initTRPC, tracked } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  onNewItems: t.procedure\n    .input(z.object({ lastEventId: z.coerce.date().nullish() }))\n    .subscription(async function* (opts) {\n      let cursor = opts.input?.lastEventId ?? null;\n\n      while (!opts.signal?.aborted) {\n        const items = await db.item.findMany({\n          where: cursor ? { createdAt: { gt: cursor } } : undefined,\n          orderBy: { createdAt: 'asc' },\n        });\n\n        for (const item of items) {\n          yield tracked(item.createdAt.toJSON(), item);\n          cursor = item.createdAt;\n        }\n\n        await new Promise((r) => setTimeout(r, 1000));\n      }\n    }),\n});\n",[2773],{"type":59,"tag":96,"props":2774,"children":2775},{"__ignoreMap":93},[2776,2823,2862,2869,2904,2911,2946,2970,3056,3099,3146,3153,3199,3250,3319,3360,3376,3383,3420,3478,3506,3514,3521,3590,3597,3612],{"type":59,"tag":100,"props":2777,"children":2778},{"class":102,"line":103},[2779,2783,2787,2791,2795,2799,2803,2807,2811,2815,2819],{"type":59,"tag":100,"props":2780,"children":2781},{"style":117},[2782],{"type":65,"value":120},{"type":59,"tag":100,"props":2784,"children":2785},{"style":129},[2786],{"type":65,"value":137},{"type":59,"tag":100,"props":2788,"children":2789},{"style":123},[2790],{"type":65,"value":190},{"type":59,"tag":100,"props":2792,"children":2793},{"style":129},[2794],{"type":65,"value":132},{"type":59,"tag":100,"props":2796,"children":2797},{"style":123},[2798],{"type":65,"value":199},{"type":59,"tag":100,"props":2800,"children":2801},{"style":129},[2802],{"type":65,"value":147},{"type":59,"tag":100,"props":2804,"children":2805},{"style":117},[2806],{"type":65,"value":152},{"type":59,"tag":100,"props":2808,"children":2809},{"style":129},[2810],{"type":65,"value":157},{"type":59,"tag":100,"props":2812,"children":2813},{"style":160},[2814],{"type":65,"value":216},{"type":59,"tag":100,"props":2816,"children":2817},{"style":129},[2818],{"type":65,"value":168},{"type":59,"tag":100,"props":2820,"children":2821},{"style":129},[2822],{"type":65,"value":173},{"type":59,"tag":100,"props":2824,"children":2825},{"class":102,"line":113},[2826,2830,2834,2838,2842,2846,2850,2854,2858],{"type":59,"tag":100,"props":2827,"children":2828},{"style":117},[2829],{"type":65,"value":120},{"type":59,"tag":100,"props":2831,"children":2832},{"style":129},[2833],{"type":65,"value":137},{"type":59,"tag":100,"props":2835,"children":2836},{"style":123},[2837],{"type":65,"value":283},{"type":59,"tag":100,"props":2839,"children":2840},{"style":129},[2841],{"type":65,"value":147},{"type":59,"tag":100,"props":2843,"children":2844},{"style":117},[2845],{"type":65,"value":152},{"type":59,"tag":100,"props":2847,"children":2848},{"style":129},[2849],{"type":65,"value":157},{"type":59,"tag":100,"props":2851,"children":2852},{"style":160},[2853],{"type":65,"value":300},{"type":59,"tag":100,"props":2855,"children":2856},{"style":129},[2857],{"type":65,"value":168},{"type":59,"tag":100,"props":2859,"children":2860},{"style":129},[2861],{"type":65,"value":173},{"type":59,"tag":100,"props":2863,"children":2864},{"class":102,"line":176},[2865],{"type":59,"tag":100,"props":2866,"children":2867},{"emptyLinePlaceholder":315},[2868],{"type":65,"value":318},{"type":59,"tag":100,"props":2870,"children":2871},{"class":102,"line":227},[2872,2876,2880,2884,2888,2892,2896,2900],{"type":59,"tag":100,"props":2873,"children":2874},{"style":325},[2875],{"type":65,"value":328},{"type":59,"tag":100,"props":2877,"children":2878},{"style":123},[2879],{"type":65,"value":333},{"type":59,"tag":100,"props":2881,"children":2882},{"style":129},[2883],{"type":65,"value":338},{"type":59,"tag":100,"props":2885,"children":2886},{"style":123},[2887],{"type":65,"value":190},{"type":59,"tag":100,"props":2889,"children":2890},{"style":129},[2891],{"type":65,"value":347},{"type":59,"tag":100,"props":2893,"children":2894},{"style":350},[2895],{"type":65,"value":353},{"type":59,"tag":100,"props":2897,"children":2898},{"style":123},[2899],{"type":65,"value":630},{"type":59,"tag":100,"props":2901,"children":2902},{"style":129},[2903],{"type":65,"value":173},{"type":59,"tag":100,"props":2905,"children":2906},{"class":102,"line":269},[2907],{"type":59,"tag":100,"props":2908,"children":2909},{"emptyLinePlaceholder":315},[2910],{"type":65,"value":318},{"type":59,"tag":100,"props":2912,"children":2913},{"class":102,"line":311},[2914,2918,2922,2926,2930,2934,2938,2942],{"type":59,"tag":100,"props":2915,"children":2916},{"style":325},[2917],{"type":65,"value":328},{"type":59,"tag":100,"props":2919,"children":2920},{"style":123},[2921],{"type":65,"value":655},{"type":59,"tag":100,"props":2923,"children":2924},{"style":129},[2925],{"type":65,"value":338},{"type":59,"tag":100,"props":2927,"children":2928},{"style":123},[2929],{"type":65,"value":664},{"type":59,"tag":100,"props":2931,"children":2932},{"style":129},[2933],{"type":65,"value":347},{"type":59,"tag":100,"props":2935,"children":2936},{"style":350},[2937],{"type":65,"value":673},{"type":59,"tag":100,"props":2939,"children":2940},{"style":123},[2941],{"type":65,"value":358},{"type":59,"tag":100,"props":2943,"children":2944},{"style":129},[2945],{"type":65,"value":363},{"type":59,"tag":100,"props":2947,"children":2948},{"class":102,"line":321},[2949,2954,2958,2962,2966],{"type":59,"tag":100,"props":2950,"children":2951},{"style":370},[2952],{"type":65,"value":2953},"  onNewItems",{"type":59,"tag":100,"props":2955,"children":2956},{"style":129},[2957],{"type":65,"value":378},{"type":59,"tag":100,"props":2959,"children":2960},{"style":123},[2961],{"type":65,"value":664},{"type":59,"tag":100,"props":2963,"children":2964},{"style":129},[2965],{"type":65,"value":347},{"type":59,"tag":100,"props":2967,"children":2968},{"style":123},[2969],{"type":65,"value":707},{"type":59,"tag":100,"props":2971,"children":2972},{"class":102,"line":366},[2973,2977,2981,2985,2989,2993,2997,3001,3005,3009,3013,3017,3022,3026,3031,3035,3039,3043,3047,3051],{"type":59,"tag":100,"props":2974,"children":2975},{"style":129},[2976],{"type":65,"value":716},{"type":59,"tag":100,"props":2978,"children":2979},{"style":350},[2980],{"type":65,"value":721},{"type":59,"tag":100,"props":2982,"children":2983},{"style":123},[2984],{"type":65,"value":726},{"type":59,"tag":100,"props":2986,"children":2987},{"style":129},[2988],{"type":65,"value":347},{"type":59,"tag":100,"props":2990,"children":2991},{"style":350},[2992],{"type":65,"value":735},{"type":59,"tag":100,"props":2994,"children":2995},{"style":123},[2996],{"type":65,"value":358},{"type":59,"tag":100,"props":2998,"children":2999},{"style":129},[3000],{"type":65,"value":744},{"type":59,"tag":100,"props":3002,"children":3003},{"style":370},[3004],{"type":65,"value":749},{"type":59,"tag":100,"props":3006,"children":3007},{"style":129},[3008],{"type":65,"value":378},{"type":59,"tag":100,"props":3010,"children":3011},{"style":123},[3012],{"type":65,"value":283},{"type":59,"tag":100,"props":3014,"children":3015},{"style":129},[3016],{"type":65,"value":347},{"type":59,"tag":100,"props":3018,"children":3019},{"style":123},[3020],{"type":65,"value":3021},"coerce",{"type":59,"tag":100,"props":3023,"children":3024},{"style":129},[3025],{"type":65,"value":347},{"type":59,"tag":100,"props":3027,"children":3028},{"style":350},[3029],{"type":65,"value":3030},"date",{"type":59,"tag":100,"props":3032,"children":3033},{"style":123},[3034],{"type":65,"value":630},{"type":59,"tag":100,"props":3036,"children":3037},{"style":129},[3038],{"type":65,"value":347},{"type":59,"tag":100,"props":3040,"children":3041},{"style":350},[3042],{"type":65,"value":779},{"type":59,"tag":100,"props":3044,"children":3045},{"style":123},[3046],{"type":65,"value":784},{"type":59,"tag":100,"props":3048,"children":3049},{"style":129},[3050],{"type":65,"value":521},{"type":59,"tag":100,"props":3052,"children":3053},{"style":123},[3054],{"type":65,"value":3055},"))\n",{"type":59,"tag":100,"props":3057,"children":3058},{"class":102,"line":386},[3059,3063,3067,3071,3075,3079,3083,3087,3091,3095],{"type":59,"tag":100,"props":3060,"children":3061},{"style":129},[3062],{"type":65,"value":716},{"type":59,"tag":100,"props":3064,"children":3065},{"style":350},[3066],{"type":65,"value":819},{"type":59,"tag":100,"props":3068,"children":3069},{"style":123},[3070],{"type":65,"value":358},{"type":59,"tag":100,"props":3072,"children":3073},{"style":325},[3074],{"type":65,"value":828},{"type":59,"tag":100,"props":3076,"children":3077},{"style":325},[3078],{"type":65,"value":833},{"type":59,"tag":100,"props":3080,"children":3081},{"style":129},[3082],{"type":65,"value":838},{"type":59,"tag":100,"props":3084,"children":3085},{"style":129},[3086],{"type":65,"value":843},{"type":59,"tag":100,"props":3088,"children":3089},{"style":846},[3090],{"type":65,"value":849},{"type":59,"tag":100,"props":3092,"children":3093},{"style":129},[3094],{"type":65,"value":526},{"type":59,"tag":100,"props":3096,"children":3097},{"style":129},[3098],{"type":65,"value":383},{"type":59,"tag":100,"props":3100,"children":3101},{"class":102,"line":403},[3102,3107,3112,3116,3120,3124,3128,3132,3136,3141],{"type":59,"tag":100,"props":3103,"children":3104},{"style":325},[3105],{"type":65,"value":3106},"      let",{"type":59,"tag":100,"props":3108,"children":3109},{"style":123},[3110],{"type":65,"value":3111}," cursor",{"type":59,"tag":100,"props":3113,"children":3114},{"style":129},[3115],{"type":65,"value":558},{"type":59,"tag":100,"props":3117,"children":3118},{"style":123},[3119],{"type":65,"value":951},{"type":59,"tag":100,"props":3121,"children":3122},{"style":129},[3123],{"type":65,"value":347},{"type":59,"tag":100,"props":3125,"children":3126},{"style":123},[3127],{"type":65,"value":721},{"type":59,"tag":100,"props":3129,"children":3130},{"style":129},[3131],{"type":65,"value":2555},{"type":59,"tag":100,"props":3133,"children":3134},{"style":123},[3135],{"type":65,"value":2560},{"type":59,"tag":100,"props":3137,"children":3138},{"style":129},[3139],{"type":65,"value":3140}," ??",{"type":59,"tag":100,"props":3142,"children":3143},{"style":129},[3144],{"type":65,"value":3145}," null;\n",{"type":59,"tag":100,"props":3147,"children":3148},{"class":102,"line":427},[3149],{"type":59,"tag":100,"props":3150,"children":3151},{"emptyLinePlaceholder":315},[3152],{"type":65,"value":318},{"type":59,"tag":100,"props":3154,"children":3155},{"class":102,"line":450},[3156,3161,3165,3170,3174,3178,3182,3186,3191,3195],{"type":59,"tag":100,"props":3157,"children":3158},{"style":117},[3159],{"type":65,"value":3160},"      while",{"type":59,"tag":100,"props":3162,"children":3163},{"style":370},[3164],{"type":65,"value":843},{"type":59,"tag":100,"props":3166,"children":3167},{"style":129},[3168],{"type":65,"value":3169},"!",{"type":59,"tag":100,"props":3171,"children":3172},{"style":123},[3173],{"type":65,"value":849},{"type":59,"tag":100,"props":3175,"children":3176},{"style":129},[3177],{"type":65,"value":347},{"type":59,"tag":100,"props":3179,"children":3180},{"style":123},[3181],{"type":65,"value":960},{"type":59,"tag":100,"props":3183,"children":3184},{"style":129},[3185],{"type":65,"value":2555},{"type":59,"tag":100,"props":3187,"children":3188},{"style":123},[3189],{"type":65,"value":3190},"aborted",{"type":59,"tag":100,"props":3192,"children":3193},{"style":370},[3194],{"type":65,"value":2565},{"type":59,"tag":100,"props":3196,"children":3197},{"style":129},[3198],{"type":65,"value":363},{"type":59,"tag":100,"props":3200,"children":3201},{"class":102,"line":459},[3202,3206,3211,3215,3219,3224,3228,3233,3237,3242,3246],{"type":59,"tag":100,"props":3203,"children":3204},{"style":325},[3205],{"type":65,"value":982},{"type":59,"tag":100,"props":3207,"children":3208},{"style":123},[3209],{"type":65,"value":3210}," items",{"type":59,"tag":100,"props":3212,"children":3213},{"style":129},[3214],{"type":65,"value":558},{"type":59,"tag":100,"props":3216,"children":3217},{"style":117},[3218],{"type":65,"value":871},{"type":59,"tag":100,"props":3220,"children":3221},{"style":123},[3222],{"type":65,"value":3223}," db",{"type":59,"tag":100,"props":3225,"children":3226},{"style":129},[3227],{"type":65,"value":347},{"type":59,"tag":100,"props":3229,"children":3230},{"style":123},[3231],{"type":65,"value":3232},"item",{"type":59,"tag":100,"props":3234,"children":3235},{"style":129},[3236],{"type":65,"value":347},{"type":59,"tag":100,"props":3238,"children":3239},{"style":350},[3240],{"type":65,"value":3241},"findMany",{"type":59,"tag":100,"props":3243,"children":3244},{"style":370},[3245],{"type":65,"value":358},{"type":59,"tag":100,"props":3247,"children":3248},{"style":129},[3249],{"type":65,"value":363},{"type":59,"tag":100,"props":3251,"children":3252},{"class":102,"line":476},[3253,3258,3262,3266,3271,3275,3280,3284,3288,3293,3297,3301,3305,3309,3314],{"type":59,"tag":100,"props":3254,"children":3255},{"style":370},[3256],{"type":65,"value":3257},"          where",{"type":59,"tag":100,"props":3259,"children":3260},{"style":129},[3261],{"type":65,"value":378},{"type":59,"tag":100,"props":3263,"children":3264},{"style":123},[3265],{"type":65,"value":3111},{"type":59,"tag":100,"props":3267,"children":3268},{"style":129},[3269],{"type":65,"value":3270}," ?",{"type":59,"tag":100,"props":3272,"children":3273},{"style":129},[3274],{"type":65,"value":137},{"type":59,"tag":100,"props":3276,"children":3277},{"style":370},[3278],{"type":65,"value":3279}," createdAt",{"type":59,"tag":100,"props":3281,"children":3282},{"style":129},[3283],{"type":65,"value":378},{"type":59,"tag":100,"props":3285,"children":3286},{"style":129},[3287],{"type":65,"value":137},{"type":59,"tag":100,"props":3289,"children":3290},{"style":370},[3291],{"type":65,"value":3292}," gt",{"type":59,"tag":100,"props":3294,"children":3295},{"style":129},[3296],{"type":65,"value":378},{"type":59,"tag":100,"props":3298,"children":3299},{"style":123},[3300],{"type":65,"value":3111},{"type":59,"tag":100,"props":3302,"children":3303},{"style":129},[3304],{"type":65,"value":147},{"type":59,"tag":100,"props":3306,"children":3307},{"style":129},[3308],{"type":65,"value":147},{"type":59,"tag":100,"props":3310,"children":3311},{"style":129},[3312],{"type":65,"value":3313}," :",{"type":59,"tag":100,"props":3315,"children":3316},{"style":129},[3317],{"type":65,"value":3318}," undefined,\n",{"type":59,"tag":100,"props":3320,"children":3321},{"class":102,"line":498},[3322,3327,3331,3335,3339,3343,3347,3352,3356],{"type":59,"tag":100,"props":3323,"children":3324},{"style":370},[3325],{"type":65,"value":3326},"          orderBy",{"type":59,"tag":100,"props":3328,"children":3329},{"style":129},[3330],{"type":65,"value":378},{"type":59,"tag":100,"props":3332,"children":3333},{"style":129},[3334],{"type":65,"value":137},{"type":59,"tag":100,"props":3336,"children":3337},{"style":370},[3338],{"type":65,"value":3279},{"type":59,"tag":100,"props":3340,"children":3341},{"style":129},[3342],{"type":65,"value":378},{"type":59,"tag":100,"props":3344,"children":3345},{"style":129},[3346],{"type":65,"value":157},{"type":59,"tag":100,"props":3348,"children":3349},{"style":160},[3350],{"type":65,"value":3351},"asc",{"type":59,"tag":100,"props":3353,"children":3354},{"style":129},[3355],{"type":65,"value":168},{"type":59,"tag":100,"props":3357,"children":3358},{"style":129},[3359],{"type":65,"value":1802},{"type":59,"tag":100,"props":3361,"children":3362},{"class":102,"line":506},[3363,3368,3372],{"type":59,"tag":100,"props":3364,"children":3365},{"style":129},[3366],{"type":65,"value":3367},"        }",{"type":59,"tag":100,"props":3369,"children":3370},{"style":370},[3371],{"type":65,"value":526},{"type":59,"tag":100,"props":3373,"children":3374},{"style":129},[3375],{"type":65,"value":173},{"type":59,"tag":100,"props":3377,"children":3378},{"class":102,"line":515},[3379],{"type":59,"tag":100,"props":3380,"children":3381},{"emptyLinePlaceholder":315},[3382],{"type":65,"value":318},{"type":59,"tag":100,"props":3384,"children":3385},{"class":102,"line":533},[3386,3391,3395,3399,3404,3408,3412,3416],{"type":59,"tag":100,"props":3387,"children":3388},{"style":117},[3389],{"type":65,"value":3390},"        for",{"type":59,"tag":100,"props":3392,"children":3393},{"style":370},[3394],{"type":65,"value":843},{"type":59,"tag":100,"props":3396,"children":3397},{"style":325},[3398],{"type":65,"value":328},{"type":59,"tag":100,"props":3400,"children":3401},{"style":123},[3402],{"type":65,"value":3403}," item",{"type":59,"tag":100,"props":3405,"children":3406},{"style":129},[3407],{"type":65,"value":899},{"type":59,"tag":100,"props":3409,"children":3410},{"style":123},[3411],{"type":65,"value":3210},{"type":59,"tag":100,"props":3413,"children":3414},{"style":370},[3415],{"type":65,"value":2565},{"type":59,"tag":100,"props":3417,"children":3418},{"style":129},[3419],{"type":65,"value":363},{"type":59,"tag":100,"props":3421,"children":3422},{"class":102,"line":541},[3423,3428,3432,3436,3440,3444,3449,3453,3458,3462,3466,3470,3474],{"type":59,"tag":100,"props":3424,"children":3425},{"style":117},[3426],{"type":65,"value":3427},"          yield",{"type":59,"tag":100,"props":3429,"children":3430},{"style":350},[3431],{"type":65,"value":199},{"type":59,"tag":100,"props":3433,"children":3434},{"style":370},[3435],{"type":65,"value":358},{"type":59,"tag":100,"props":3437,"children":3438},{"style":123},[3439],{"type":65,"value":3232},{"type":59,"tag":100,"props":3441,"children":3442},{"style":129},[3443],{"type":65,"value":347},{"type":59,"tag":100,"props":3445,"children":3446},{"style":123},[3447],{"type":65,"value":3448},"createdAt",{"type":59,"tag":100,"props":3450,"children":3451},{"style":129},[3452],{"type":65,"value":347},{"type":59,"tag":100,"props":3454,"children":3455},{"style":350},[3456],{"type":65,"value":3457},"toJSON",{"type":59,"tag":100,"props":3459,"children":3460},{"style":370},[3461],{"type":65,"value":630},{"type":59,"tag":100,"props":3463,"children":3464},{"style":129},[3465],{"type":65,"value":132},{"type":59,"tag":100,"props":3467,"children":3468},{"style":123},[3469],{"type":65,"value":3403},{"type":59,"tag":100,"props":3471,"children":3472},{"style":370},[3473],{"type":65,"value":526},{"type":59,"tag":100,"props":3475,"children":3476},{"style":129},[3477],{"type":65,"value":173},{"type":59,"tag":100,"props":3479,"children":3480},{"class":102,"line":602},[3481,3486,3490,3494,3498,3502],{"type":59,"tag":100,"props":3482,"children":3483},{"style":123},[3484],{"type":65,"value":3485},"          cursor",{"type":59,"tag":100,"props":3487,"children":3488},{"style":129},[3489],{"type":65,"value":558},{"type":59,"tag":100,"props":3491,"children":3492},{"style":123},[3493],{"type":65,"value":3403},{"type":59,"tag":100,"props":3495,"children":3496},{"style":129},[3497],{"type":65,"value":347},{"type":59,"tag":100,"props":3499,"children":3500},{"style":123},[3501],{"type":65,"value":3448},{"type":59,"tag":100,"props":3503,"children":3504},{"style":129},[3505],{"type":65,"value":173},{"type":59,"tag":100,"props":3507,"children":3508},{"class":102,"line":637},[3509],{"type":59,"tag":100,"props":3510,"children":3511},{"style":129},[3512],{"type":65,"value":3513},"        }\n",{"type":59,"tag":100,"props":3515,"children":3516},{"class":102,"line":645},[3517],{"type":59,"tag":100,"props":3518,"children":3519},{"emptyLinePlaceholder":315},[3520],{"type":65,"value":318},{"type":59,"tag":100,"props":3522,"children":3523},{"class":102,"line":684},[3524,3529,3533,3538,3542,3546,3551,3555,3559,3564,3568,3572,3576,3581,3586],{"type":59,"tag":100,"props":3525,"children":3526},{"style":117},[3527],{"type":65,"value":3528},"        await",{"type":59,"tag":100,"props":3530,"children":3531},{"style":129},[3532],{"type":65,"value":621},{"type":59,"tag":100,"props":3534,"children":3535},{"style":550},[3536],{"type":65,"value":3537}," Promise",{"type":59,"tag":100,"props":3539,"children":3540},{"style":370},[3541],{"type":65,"value":358},{"type":59,"tag":100,"props":3543,"children":3544},{"style":129},[3545],{"type":65,"value":358},{"type":59,"tag":100,"props":3547,"children":3548},{"style":846},[3549],{"type":65,"value":3550},"r",{"type":59,"tag":100,"props":3552,"children":3553},{"style":129},[3554],{"type":65,"value":526},{"type":59,"tag":100,"props":3556,"children":3557},{"style":325},[3558],{"type":65,"value":1532},{"type":59,"tag":100,"props":3560,"children":3561},{"style":350},[3562],{"type":65,"value":3563}," setTimeout",{"type":59,"tag":100,"props":3565,"children":3566},{"style":370},[3567],{"type":65,"value":358},{"type":59,"tag":100,"props":3569,"children":3570},{"style":123},[3571],{"type":65,"value":3550},{"type":59,"tag":100,"props":3573,"children":3574},{"style":129},[3575],{"type":65,"value":132},{"type":59,"tag":100,"props":3577,"children":3578},{"style":440},[3579],{"type":65,"value":3580}," 1000",{"type":59,"tag":100,"props":3582,"children":3583},{"style":370},[3584],{"type":65,"value":3585},"))",{"type":59,"tag":100,"props":3587,"children":3588},{"style":129},[3589],{"type":65,"value":173},{"type":59,"tag":100,"props":3591,"children":3592},{"class":102,"line":710},[3593],{"type":59,"tag":100,"props":3594,"children":3595},{"style":129},[3596],{"type":65,"value":1065},{"type":59,"tag":100,"props":3598,"children":3599},{"class":102,"line":809},[3600,3604,3608],{"type":59,"tag":100,"props":3601,"children":3602},{"style":129},[3603],{"type":65,"value":1074},{"type":59,"tag":100,"props":3605,"children":3606},{"style":123},[3607],{"type":65,"value":526},{"type":59,"tag":100,"props":3609,"children":3610},{"style":129},[3611],{"type":65,"value":424},{"type":59,"tag":100,"props":3613,"children":3614},{"class":102,"line":860},[3615,3619,3623],{"type":59,"tag":100,"props":3616,"children":3617},{"style":129},[3618],{"type":65,"value":521},{"type":59,"tag":100,"props":3620,"children":3621},{"style":123},[3622],{"type":65,"value":526},{"type":59,"tag":100,"props":3624,"children":3625},{"style":129},[3626],{"type":65,"value":173},{"type":59,"tag":81,"props":3628,"children":3630},{"id":3629},"websocket-setup-when-bidirectional-communication-is-required",[3631],{"type":65,"value":3632},"WebSocket setup (when bidirectional communication is required)",{"type":59,"tag":88,"props":3634,"children":3636},{"className":90,"code":3635,"language":92,"meta":93,"style":93},"\u002F\u002F server\nimport { applyWSSHandler } from '@trpc\u002Fserver\u002Fadapters\u002Fws';\nimport { WebSocketServer } from 'ws';\nimport { appRouter } from '.\u002Frouter';\n\nconst wss = new WebSocketServer({ port: 3001 });\nconst handler = applyWSSHandler({\n  wss,\n  router: appRouter,\n  createContext() {\n    return {};\n  },\n  keepAlive: {\n    enabled: true,\n    pingMs: 30000,\n    pongWaitMs: 5000,\n  },\n});\n\nprocess.on('SIGTERM', () => {\n  handler.broadcastReconnectNotification();\n  wss.close();\n});\n",[3637],{"type":59,"tag":96,"props":3638,"children":3639},{"__ignoreMap":93},[3640,3648,3689,3730,3770,3777,3835,3863,3875,3894,3909,3920,3927,3943,3963,3984,4004,4011,4026,4033,4084,4109,4133],{"type":59,"tag":100,"props":3641,"children":3642},{"class":102,"line":103},[3643],{"type":59,"tag":100,"props":3644,"children":3645},{"style":107},[3646],{"type":65,"value":3647},"\u002F\u002F server\n",{"type":59,"tag":100,"props":3649,"children":3650},{"class":102,"line":113},[3651,3655,3659,3664,3668,3672,3676,3681,3685],{"type":59,"tag":100,"props":3652,"children":3653},{"style":117},[3654],{"type":65,"value":120},{"type":59,"tag":100,"props":3656,"children":3657},{"style":129},[3658],{"type":65,"value":137},{"type":59,"tag":100,"props":3660,"children":3661},{"style":123},[3662],{"type":65,"value":3663}," applyWSSHandler",{"type":59,"tag":100,"props":3665,"children":3666},{"style":129},[3667],{"type":65,"value":147},{"type":59,"tag":100,"props":3669,"children":3670},{"style":117},[3671],{"type":65,"value":152},{"type":59,"tag":100,"props":3673,"children":3674},{"style":129},[3675],{"type":65,"value":157},{"type":59,"tag":100,"props":3677,"children":3678},{"style":160},[3679],{"type":65,"value":3680},"@trpc\u002Fserver\u002Fadapters\u002Fws",{"type":59,"tag":100,"props":3682,"children":3683},{"style":129},[3684],{"type":65,"value":168},{"type":59,"tag":100,"props":3686,"children":3687},{"style":129},[3688],{"type":65,"value":173},{"type":59,"tag":100,"props":3690,"children":3691},{"class":102,"line":176},[3692,3696,3700,3705,3709,3713,3717,3722,3726],{"type":59,"tag":100,"props":3693,"children":3694},{"style":117},[3695],{"type":65,"value":120},{"type":59,"tag":100,"props":3697,"children":3698},{"style":129},[3699],{"type":65,"value":137},{"type":59,"tag":100,"props":3701,"children":3702},{"style":123},[3703],{"type":65,"value":3704}," WebSocketServer",{"type":59,"tag":100,"props":3706,"children":3707},{"style":129},[3708],{"type":65,"value":147},{"type":59,"tag":100,"props":3710,"children":3711},{"style":117},[3712],{"type":65,"value":152},{"type":59,"tag":100,"props":3714,"children":3715},{"style":129},[3716],{"type":65,"value":157},{"type":59,"tag":100,"props":3718,"children":3719},{"style":160},[3720],{"type":65,"value":3721},"ws",{"type":59,"tag":100,"props":3723,"children":3724},{"style":129},[3725],{"type":65,"value":168},{"type":59,"tag":100,"props":3727,"children":3728},{"style":129},[3729],{"type":65,"value":173},{"type":59,"tag":100,"props":3731,"children":3732},{"class":102,"line":227},[3733,3737,3741,3745,3749,3753,3757,3762,3766],{"type":59,"tag":100,"props":3734,"children":3735},{"style":117},[3736],{"type":65,"value":120},{"type":59,"tag":100,"props":3738,"children":3739},{"style":129},[3740],{"type":65,"value":137},{"type":59,"tag":100,"props":3742,"children":3743},{"style":123},[3744],{"type":65,"value":1139},{"type":59,"tag":100,"props":3746,"children":3747},{"style":129},[3748],{"type":65,"value":147},{"type":59,"tag":100,"props":3750,"children":3751},{"style":117},[3752],{"type":65,"value":152},{"type":59,"tag":100,"props":3754,"children":3755},{"style":129},[3756],{"type":65,"value":157},{"type":59,"tag":100,"props":3758,"children":3759},{"style":160},[3760],{"type":65,"value":3761},".\u002Frouter",{"type":59,"tag":100,"props":3763,"children":3764},{"style":129},[3765],{"type":65,"value":168},{"type":59,"tag":100,"props":3767,"children":3768},{"style":129},[3769],{"type":65,"value":173},{"type":59,"tag":100,"props":3771,"children":3772},{"class":102,"line":269},[3773],{"type":59,"tag":100,"props":3774,"children":3775},{"emptyLinePlaceholder":315},[3776],{"type":65,"value":318},{"type":59,"tag":100,"props":3778,"children":3779},{"class":102,"line":311},[3780,3784,3789,3793,3797,3801,3805,3809,3814,3818,3823,3827,3831],{"type":59,"tag":100,"props":3781,"children":3782},{"style":325},[3783],{"type":65,"value":328},{"type":59,"tag":100,"props":3785,"children":3786},{"style":123},[3787],{"type":65,"value":3788}," wss ",{"type":59,"tag":100,"props":3790,"children":3791},{"style":129},[3792],{"type":65,"value":338},{"type":59,"tag":100,"props":3794,"children":3795},{"style":129},[3796],{"type":65,"value":621},{"type":59,"tag":100,"props":3798,"children":3799},{"style":350},[3800],{"type":65,"value":3704},{"type":59,"tag":100,"props":3802,"children":3803},{"style":123},[3804],{"type":65,"value":358},{"type":59,"tag":100,"props":3806,"children":3807},{"style":129},[3808],{"type":65,"value":744},{"type":59,"tag":100,"props":3810,"children":3811},{"style":370},[3812],{"type":65,"value":3813}," port",{"type":59,"tag":100,"props":3815,"children":3816},{"style":129},[3817],{"type":65,"value":378},{"type":59,"tag":100,"props":3819,"children":3820},{"style":440},[3821],{"type":65,"value":3822}," 3001",{"type":59,"tag":100,"props":3824,"children":3825},{"style":129},[3826],{"type":65,"value":147},{"type":59,"tag":100,"props":3828,"children":3829},{"style":123},[3830],{"type":65,"value":526},{"type":59,"tag":100,"props":3832,"children":3833},{"style":129},[3834],{"type":65,"value":173},{"type":59,"tag":100,"props":3836,"children":3837},{"class":102,"line":321},[3838,3842,3847,3851,3855,3859],{"type":59,"tag":100,"props":3839,"children":3840},{"style":325},[3841],{"type":65,"value":328},{"type":59,"tag":100,"props":3843,"children":3844},{"style":123},[3845],{"type":65,"value":3846}," handler ",{"type":59,"tag":100,"props":3848,"children":3849},{"style":129},[3850],{"type":65,"value":338},{"type":59,"tag":100,"props":3852,"children":3853},{"style":350},[3854],{"type":65,"value":3663},{"type":59,"tag":100,"props":3856,"children":3857},{"style":123},[3858],{"type":65,"value":358},{"type":59,"tag":100,"props":3860,"children":3861},{"style":129},[3862],{"type":65,"value":363},{"type":59,"tag":100,"props":3864,"children":3865},{"class":102,"line":366},[3866,3871],{"type":59,"tag":100,"props":3867,"children":3868},{"style":123},[3869],{"type":65,"value":3870},"  wss",{"type":59,"tag":100,"props":3872,"children":3873},{"style":129},[3874],{"type":65,"value":424},{"type":59,"tag":100,"props":3876,"children":3877},{"class":102,"line":386},[3878,3882,3886,3890],{"type":59,"tag":100,"props":3879,"children":3880},{"style":370},[3881],{"type":65,"value":1177},{"type":59,"tag":100,"props":3883,"children":3884},{"style":129},[3885],{"type":65,"value":378},{"type":59,"tag":100,"props":3887,"children":3888},{"style":123},[3889],{"type":65,"value":1139},{"type":59,"tag":100,"props":3891,"children":3892},{"style":129},[3893],{"type":65,"value":424},{"type":59,"tag":100,"props":3895,"children":3896},{"class":102,"line":403},[3897,3901,3905],{"type":59,"tag":100,"props":3898,"children":3899},{"style":370},[3900],{"type":65,"value":1198},{"type":59,"tag":100,"props":3902,"children":3903},{"style":129},[3904],{"type":65,"value":630},{"type":59,"tag":100,"props":3906,"children":3907},{"style":129},[3908],{"type":65,"value":383},{"type":59,"tag":100,"props":3910,"children":3911},{"class":102,"line":427},[3912,3916],{"type":59,"tag":100,"props":3913,"children":3914},{"style":117},[3915],{"type":65,"value":1215},{"type":59,"tag":100,"props":3917,"children":3918},{"style":129},[3919],{"type":65,"value":1220},{"type":59,"tag":100,"props":3921,"children":3922},{"class":102,"line":450},[3923],{"type":59,"tag":100,"props":3924,"children":3925},{"style":129},[3926],{"type":65,"value":512},{"type":59,"tag":100,"props":3928,"children":3929},{"class":102,"line":459},[3930,3935,3939],{"type":59,"tag":100,"props":3931,"children":3932},{"style":370},[3933],{"type":65,"value":3934},"  keepAlive",{"type":59,"tag":100,"props":3936,"children":3937},{"style":129},[3938],{"type":65,"value":378},{"type":59,"tag":100,"props":3940,"children":3941},{"style":129},[3942],{"type":65,"value":383},{"type":59,"tag":100,"props":3944,"children":3945},{"class":102,"line":476},[3946,3951,3955,3959],{"type":59,"tag":100,"props":3947,"children":3948},{"style":370},[3949],{"type":65,"value":3950},"    enabled",{"type":59,"tag":100,"props":3952,"children":3953},{"style":129},[3954],{"type":65,"value":378},{"type":59,"tag":100,"props":3956,"children":3957},{"style":416},[3958],{"type":65,"value":419},{"type":59,"tag":100,"props":3960,"children":3961},{"style":129},[3962],{"type":65,"value":424},{"type":59,"tag":100,"props":3964,"children":3965},{"class":102,"line":498},[3966,3971,3975,3980],{"type":59,"tag":100,"props":3967,"children":3968},{"style":370},[3969],{"type":65,"value":3970},"    pingMs",{"type":59,"tag":100,"props":3972,"children":3973},{"style":129},[3974],{"type":65,"value":378},{"type":59,"tag":100,"props":3976,"children":3977},{"style":440},[3978],{"type":65,"value":3979}," 30000",{"type":59,"tag":100,"props":3981,"children":3982},{"style":129},[3983],{"type":65,"value":424},{"type":59,"tag":100,"props":3985,"children":3986},{"class":102,"line":506},[3987,3992,3996,4000],{"type":59,"tag":100,"props":3988,"children":3989},{"style":370},[3990],{"type":65,"value":3991},"    pongWaitMs",{"type":59,"tag":100,"props":3993,"children":3994},{"style":129},[3995],{"type":65,"value":378},{"type":59,"tag":100,"props":3997,"children":3998},{"style":440},[3999],{"type":65,"value":491},{"type":59,"tag":100,"props":4001,"children":4002},{"style":129},[4003],{"type":65,"value":424},{"type":59,"tag":100,"props":4005,"children":4006},{"class":102,"line":515},[4007],{"type":59,"tag":100,"props":4008,"children":4009},{"style":129},[4010],{"type":65,"value":512},{"type":59,"tag":100,"props":4012,"children":4013},{"class":102,"line":533},[4014,4018,4022],{"type":59,"tag":100,"props":4015,"children":4016},{"style":129},[4017],{"type":65,"value":521},{"type":59,"tag":100,"props":4019,"children":4020},{"style":123},[4021],{"type":65,"value":526},{"type":59,"tag":100,"props":4023,"children":4024},{"style":129},[4025],{"type":65,"value":173},{"type":59,"tag":100,"props":4027,"children":4028},{"class":102,"line":541},[4029],{"type":59,"tag":100,"props":4030,"children":4031},{"emptyLinePlaceholder":315},[4032],{"type":65,"value":318},{"type":59,"tag":100,"props":4034,"children":4035},{"class":102,"line":602},[4036,4041,4045,4050,4054,4058,4063,4067,4071,4076,4080],{"type":59,"tag":100,"props":4037,"children":4038},{"style":123},[4039],{"type":65,"value":4040},"process",{"type":59,"tag":100,"props":4042,"children":4043},{"style":129},[4044],{"type":65,"value":347},{"type":59,"tag":100,"props":4046,"children":4047},{"style":350},[4048],{"type":65,"value":4049},"on",{"type":59,"tag":100,"props":4051,"children":4052},{"style":123},[4053],{"type":65,"value":358},{"type":59,"tag":100,"props":4055,"children":4056},{"style":129},[4057],{"type":65,"value":168},{"type":59,"tag":100,"props":4059,"children":4060},{"style":160},[4061],{"type":65,"value":4062},"SIGTERM",{"type":59,"tag":100,"props":4064,"children":4065},{"style":129},[4066],{"type":65,"value":168},{"type":59,"tag":100,"props":4068,"children":4069},{"style":129},[4070],{"type":65,"value":132},{"type":59,"tag":100,"props":4072,"children":4073},{"style":129},[4074],{"type":65,"value":4075}," ()",{"type":59,"tag":100,"props":4077,"children":4078},{"style":325},[4079],{"type":65,"value":1532},{"type":59,"tag":100,"props":4081,"children":4082},{"style":129},[4083],{"type":65,"value":383},{"type":59,"tag":100,"props":4085,"children":4086},{"class":102,"line":637},[4087,4092,4096,4101,4105],{"type":59,"tag":100,"props":4088,"children":4089},{"style":123},[4090],{"type":65,"value":4091},"  handler",{"type":59,"tag":100,"props":4093,"children":4094},{"style":129},[4095],{"type":65,"value":347},{"type":59,"tag":100,"props":4097,"children":4098},{"style":350},[4099],{"type":65,"value":4100},"broadcastReconnectNotification",{"type":59,"tag":100,"props":4102,"children":4103},{"style":370},[4104],{"type":65,"value":630},{"type":59,"tag":100,"props":4106,"children":4107},{"style":129},[4108],{"type":65,"value":173},{"type":59,"tag":100,"props":4110,"children":4111},{"class":102,"line":645},[4112,4116,4120,4125,4129],{"type":59,"tag":100,"props":4113,"children":4114},{"style":123},[4115],{"type":65,"value":3870},{"type":59,"tag":100,"props":4117,"children":4118},{"style":129},[4119],{"type":65,"value":347},{"type":59,"tag":100,"props":4121,"children":4122},{"style":350},[4123],{"type":65,"value":4124},"close",{"type":59,"tag":100,"props":4126,"children":4127},{"style":370},[4128],{"type":65,"value":630},{"type":59,"tag":100,"props":4130,"children":4131},{"style":129},[4132],{"type":65,"value":173},{"type":59,"tag":100,"props":4134,"children":4135},{"class":102,"line":684},[4136,4140,4144],{"type":59,"tag":100,"props":4137,"children":4138},{"style":129},[4139],{"type":65,"value":521},{"type":59,"tag":100,"props":4141,"children":4142},{"style":123},[4143],{"type":65,"value":526},{"type":59,"tag":100,"props":4145,"children":4146},{"style":129},[4147],{"type":65,"value":173},{"type":59,"tag":88,"props":4149,"children":4151},{"className":90,"code":4150,"language":92,"meta":93,"style":93},"\u002F\u002F client\nimport {\n  createTRPCClient,\n  createWSClient,\n  httpBatchLink,\n  splitLink,\n  wsLink,\n} from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst wsClient = createWSClient({ url: 'ws:\u002F\u002Flocalhost:3001' });\n\nconst trpc = createTRPCClient\u003CAppRouter>({\n  links: [\n    splitLink({\n      condition: (op) => op.type === 'subscription',\n      true: wsLink({ client: wsClient }),\n      false: httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' }),\n    }),\n  ],\n});\n",[4152],{"type":59,"tag":96,"props":4153,"children":4154},{"__ignoreMap":93},[4155,4163,4174,4185,4197,4208,4219,4231,4258,4301,4308,4370,4377,4416,4431,4446,4505,4554,4609,4624,4635],{"type":59,"tag":100,"props":4156,"children":4157},{"class":102,"line":103},[4158],{"type":59,"tag":100,"props":4159,"children":4160},{"style":107},[4161],{"type":65,"value":4162},"\u002F\u002F client\n",{"type":59,"tag":100,"props":4164,"children":4165},{"class":102,"line":113},[4166,4170],{"type":59,"tag":100,"props":4167,"children":4168},{"style":117},[4169],{"type":65,"value":120},{"type":59,"tag":100,"props":4171,"children":4172},{"style":129},[4173],{"type":65,"value":383},{"type":59,"tag":100,"props":4175,"children":4176},{"class":102,"line":176},[4177,4181],{"type":59,"tag":100,"props":4178,"children":4179},{"style":123},[4180],{"type":65,"value":1306},{"type":59,"tag":100,"props":4182,"children":4183},{"style":129},[4184],{"type":65,"value":424},{"type":59,"tag":100,"props":4186,"children":4187},{"class":102,"line":227},[4188,4193],{"type":59,"tag":100,"props":4189,"children":4190},{"style":123},[4191],{"type":65,"value":4192},"  createWSClient",{"type":59,"tag":100,"props":4194,"children":4195},{"style":129},[4196],{"type":65,"value":424},{"type":59,"tag":100,"props":4198,"children":4199},{"class":102,"line":269},[4200,4204],{"type":59,"tag":100,"props":4201,"children":4202},{"style":123},[4203],{"type":65,"value":1318},{"type":59,"tag":100,"props":4205,"children":4206},{"style":129},[4207],{"type":65,"value":424},{"type":59,"tag":100,"props":4209,"children":4210},{"class":102,"line":311},[4211,4215],{"type":59,"tag":100,"props":4212,"children":4213},{"style":123},[4214],{"type":65,"value":1342},{"type":59,"tag":100,"props":4216,"children":4217},{"style":129},[4218],{"type":65,"value":424},{"type":59,"tag":100,"props":4220,"children":4221},{"class":102,"line":321},[4222,4227],{"type":59,"tag":100,"props":4223,"children":4224},{"style":123},[4225],{"type":65,"value":4226},"  wsLink",{"type":59,"tag":100,"props":4228,"children":4229},{"style":129},[4230],{"type":65,"value":424},{"type":59,"tag":100,"props":4232,"children":4233},{"class":102,"line":366},[4234,4238,4242,4246,4250,4254],{"type":59,"tag":100,"props":4235,"children":4236},{"style":129},[4237],{"type":65,"value":521},{"type":59,"tag":100,"props":4239,"children":4240},{"style":117},[4241],{"type":65,"value":152},{"type":59,"tag":100,"props":4243,"children":4244},{"style":129},[4245],{"type":65,"value":157},{"type":59,"tag":100,"props":4247,"children":4248},{"style":160},[4249],{"type":65,"value":1366},{"type":59,"tag":100,"props":4251,"children":4252},{"style":129},[4253],{"type":65,"value":168},{"type":59,"tag":100,"props":4255,"children":4256},{"style":129},[4257],{"type":65,"value":173},{"type":59,"tag":100,"props":4259,"children":4260},{"class":102,"line":386},[4261,4265,4269,4273,4277,4281,4285,4289,4293,4297],{"type":59,"tag":100,"props":4262,"children":4263},{"style":117},[4264],{"type":65,"value":120},{"type":59,"tag":100,"props":4266,"children":4267},{"style":117},[4268],{"type":65,"value":1120},{"type":59,"tag":100,"props":4270,"children":4271},{"style":129},[4272],{"type":65,"value":137},{"type":59,"tag":100,"props":4274,"children":4275},{"style":123},[4276],{"type":65,"value":1125},{"type":59,"tag":100,"props":4278,"children":4279},{"style":129},[4280],{"type":65,"value":147},{"type":59,"tag":100,"props":4282,"children":4283},{"style":117},[4284],{"type":65,"value":152},{"type":59,"tag":100,"props":4286,"children":4287},{"style":129},[4288],{"type":65,"value":157},{"type":59,"tag":100,"props":4290,"children":4291},{"style":160},[4292],{"type":65,"value":1410},{"type":59,"tag":100,"props":4294,"children":4295},{"style":129},[4296],{"type":65,"value":168},{"type":59,"tag":100,"props":4298,"children":4299},{"style":129},[4300],{"type":65,"value":173},{"type":59,"tag":100,"props":4302,"children":4303},{"class":102,"line":403},[4304],{"type":59,"tag":100,"props":4305,"children":4306},{"emptyLinePlaceholder":315},[4307],{"type":65,"value":318},{"type":59,"tag":100,"props":4309,"children":4310},{"class":102,"line":427},[4311,4315,4320,4324,4329,4333,4337,4341,4345,4349,4354,4358,4362,4366],{"type":59,"tag":100,"props":4312,"children":4313},{"style":325},[4314],{"type":65,"value":328},{"type":59,"tag":100,"props":4316,"children":4317},{"style":123},[4318],{"type":65,"value":4319}," wsClient ",{"type":59,"tag":100,"props":4321,"children":4322},{"style":129},[4323],{"type":65,"value":338},{"type":59,"tag":100,"props":4325,"children":4326},{"style":350},[4327],{"type":65,"value":4328}," createWSClient",{"type":59,"tag":100,"props":4330,"children":4331},{"style":123},[4332],{"type":65,"value":358},{"type":59,"tag":100,"props":4334,"children":4335},{"style":129},[4336],{"type":65,"value":744},{"type":59,"tag":100,"props":4338,"children":4339},{"style":370},[4340],{"type":65,"value":1597},{"type":59,"tag":100,"props":4342,"children":4343},{"style":129},[4344],{"type":65,"value":378},{"type":59,"tag":100,"props":4346,"children":4347},{"style":129},[4348],{"type":65,"value":157},{"type":59,"tag":100,"props":4350,"children":4351},{"style":160},[4352],{"type":65,"value":4353},"ws:\u002F\u002Flocalhost:3001",{"type":59,"tag":100,"props":4355,"children":4356},{"style":129},[4357],{"type":65,"value":168},{"type":59,"tag":100,"props":4359,"children":4360},{"style":129},[4361],{"type":65,"value":147},{"type":59,"tag":100,"props":4363,"children":4364},{"style":123},[4365],{"type":65,"value":526},{"type":59,"tag":100,"props":4367,"children":4368},{"style":129},[4369],{"type":65,"value":173},{"type":59,"tag":100,"props":4371,"children":4372},{"class":102,"line":450},[4373],{"type":59,"tag":100,"props":4374,"children":4375},{"emptyLinePlaceholder":315},[4376],{"type":65,"value":318},{"type":59,"tag":100,"props":4378,"children":4379},{"class":102,"line":459},[4380,4384,4388,4392,4396,4400,4404,4408,4412],{"type":59,"tag":100,"props":4381,"children":4382},{"style":325},[4383],{"type":65,"value":328},{"type":59,"tag":100,"props":4385,"children":4386},{"style":123},[4387],{"type":65,"value":1437},{"type":59,"tag":100,"props":4389,"children":4390},{"style":129},[4391],{"type":65,"value":338},{"type":59,"tag":100,"props":4393,"children":4394},{"style":350},[4395],{"type":65,"value":1446},{"type":59,"tag":100,"props":4397,"children":4398},{"style":129},[4399],{"type":65,"value":1451},{"type":59,"tag":100,"props":4401,"children":4402},{"style":550},[4403],{"type":65,"value":1456},{"type":59,"tag":100,"props":4405,"children":4406},{"style":129},[4407],{"type":65,"value":1461},{"type":59,"tag":100,"props":4409,"children":4410},{"style":123},[4411],{"type":65,"value":358},{"type":59,"tag":100,"props":4413,"children":4414},{"style":129},[4415],{"type":65,"value":363},{"type":59,"tag":100,"props":4417,"children":4418},{"class":102,"line":476},[4419,4423,4427],{"type":59,"tag":100,"props":4420,"children":4421},{"style":370},[4422],{"type":65,"value":1477},{"type":59,"tag":100,"props":4424,"children":4425},{"style":129},[4426],{"type":65,"value":378},{"type":59,"tag":100,"props":4428,"children":4429},{"style":123},[4430],{"type":65,"value":1486},{"type":59,"tag":100,"props":4432,"children":4433},{"class":102,"line":498},[4434,4438,4442],{"type":59,"tag":100,"props":4435,"children":4436},{"style":350},[4437],{"type":65,"value":1494},{"type":59,"tag":100,"props":4439,"children":4440},{"style":123},[4441],{"type":65,"value":358},{"type":59,"tag":100,"props":4443,"children":4444},{"style":129},[4445],{"type":65,"value":363},{"type":59,"tag":100,"props":4447,"children":4448},{"class":102,"line":506},[4449,4453,4457,4461,4465,4469,4473,4477,4481,4485,4489,4493,4497,4501],{"type":59,"tag":100,"props":4450,"children":4451},{"style":350},[4452],{"type":65,"value":1510},{"type":59,"tag":100,"props":4454,"children":4455},{"style":129},[4456],{"type":65,"value":378},{"type":59,"tag":100,"props":4458,"children":4459},{"style":129},[4460],{"type":65,"value":843},{"type":59,"tag":100,"props":4462,"children":4463},{"style":846},[4464],{"type":65,"value":1523},{"type":59,"tag":100,"props":4466,"children":4467},{"style":129},[4468],{"type":65,"value":526},{"type":59,"tag":100,"props":4470,"children":4471},{"style":325},[4472],{"type":65,"value":1532},{"type":59,"tag":100,"props":4474,"children":4475},{"style":123},[4476],{"type":65,"value":1537},{"type":59,"tag":100,"props":4478,"children":4479},{"style":129},[4480],{"type":65,"value":347},{"type":59,"tag":100,"props":4482,"children":4483},{"style":123},[4484],{"type":65,"value":1546},{"type":59,"tag":100,"props":4486,"children":4487},{"style":129},[4488],{"type":65,"value":1551},{"type":59,"tag":100,"props":4490,"children":4491},{"style":129},[4492],{"type":65,"value":157},{"type":59,"tag":100,"props":4494,"children":4495},{"style":160},[4496],{"type":65,"value":819},{"type":59,"tag":100,"props":4498,"children":4499},{"style":129},[4500],{"type":65,"value":168},{"type":59,"tag":100,"props":4502,"children":4503},{"style":129},[4504],{"type":65,"value":424},{"type":59,"tag":100,"props":4506,"children":4507},{"class":102,"line":515},[4508,4512,4516,4521,4525,4529,4534,4538,4542,4546,4550],{"type":59,"tag":100,"props":4509,"children":4510},{"style":370},[4511],{"type":65,"value":1575},{"type":59,"tag":100,"props":4513,"children":4514},{"style":129},[4515],{"type":65,"value":378},{"type":59,"tag":100,"props":4517,"children":4518},{"style":350},[4519],{"type":65,"value":4520}," wsLink",{"type":59,"tag":100,"props":4522,"children":4523},{"style":123},[4524],{"type":65,"value":358},{"type":59,"tag":100,"props":4526,"children":4527},{"style":129},[4528],{"type":65,"value":744},{"type":59,"tag":100,"props":4530,"children":4531},{"style":370},[4532],{"type":65,"value":4533}," client",{"type":59,"tag":100,"props":4535,"children":4536},{"style":129},[4537],{"type":65,"value":378},{"type":59,"tag":100,"props":4539,"children":4540},{"style":123},[4541],{"type":65,"value":4319},{"type":59,"tag":100,"props":4543,"children":4544},{"style":129},[4545],{"type":65,"value":521},{"type":59,"tag":100,"props":4547,"children":4548},{"style":123},[4549],{"type":65,"value":526},{"type":59,"tag":100,"props":4551,"children":4552},{"style":129},[4553],{"type":65,"value":424},{"type":59,"tag":100,"props":4555,"children":4556},{"class":102,"line":533},[4557,4561,4565,4569,4573,4577,4581,4585,4589,4593,4597,4601,4605],{"type":59,"tag":100,"props":4558,"children":4559},{"style":370},[4560],{"type":65,"value":1634},{"type":59,"tag":100,"props":4562,"children":4563},{"style":129},[4564],{"type":65,"value":378},{"type":59,"tag":100,"props":4566,"children":4567},{"style":350},[4568],{"type":65,"value":1643},{"type":59,"tag":100,"props":4570,"children":4571},{"style":123},[4572],{"type":65,"value":358},{"type":59,"tag":100,"props":4574,"children":4575},{"style":129},[4576],{"type":65,"value":744},{"type":59,"tag":100,"props":4578,"children":4579},{"style":370},[4580],{"type":65,"value":1597},{"type":59,"tag":100,"props":4582,"children":4583},{"style":129},[4584],{"type":65,"value":378},{"type":59,"tag":100,"props":4586,"children":4587},{"style":129},[4588],{"type":65,"value":157},{"type":59,"tag":100,"props":4590,"children":4591},{"style":160},[4592],{"type":65,"value":1610},{"type":59,"tag":100,"props":4594,"children":4595},{"style":129},[4596],{"type":65,"value":168},{"type":59,"tag":100,"props":4598,"children":4599},{"style":129},[4600],{"type":65,"value":147},{"type":59,"tag":100,"props":4602,"children":4603},{"style":123},[4604],{"type":65,"value":526},{"type":59,"tag":100,"props":4606,"children":4607},{"style":129},[4608],{"type":65,"value":424},{"type":59,"tag":100,"props":4610,"children":4611},{"class":102,"line":541},[4612,4616,4620],{"type":59,"tag":100,"props":4613,"children":4614},{"style":129},[4615],{"type":65,"value":1074},{"type":59,"tag":100,"props":4617,"children":4618},{"style":123},[4619],{"type":65,"value":526},{"type":59,"tag":100,"props":4621,"children":4622},{"style":129},[4623],{"type":65,"value":424},{"type":59,"tag":100,"props":4625,"children":4626},{"class":102,"line":602},[4627,4631],{"type":59,"tag":100,"props":4628,"children":4629},{"style":123},[4630],{"type":65,"value":1706},{"type":59,"tag":100,"props":4632,"children":4633},{"style":129},[4634],{"type":65,"value":424},{"type":59,"tag":100,"props":4636,"children":4637},{"class":102,"line":637},[4638,4642,4646],{"type":59,"tag":100,"props":4639,"children":4640},{"style":129},[4641],{"type":65,"value":521},{"type":59,"tag":100,"props":4643,"children":4644},{"style":123},[4645],{"type":65,"value":526},{"type":59,"tag":100,"props":4647,"children":4648},{"style":129},[4649],{"type":65,"value":173},{"type":59,"tag":81,"props":4651,"children":4653},{"id":4652},"cleanup-with-tryfinally",[4654],{"type":65,"value":4655},"Cleanup with try...finally",{"type":59,"tag":88,"props":4657,"children":4659},{"className":90,"code":4658,"language":92,"meta":93,"style":93},"const appRouter = t.router({\n  events: t.procedure.subscription(async function* (opts) {\n    const cleanup = registerListener();\n    try {\n      for await (const [data] of on(ee, 'event', { signal: opts.signal })) {\n        yield data;\n      }\n    } finally {\n      cleanup();\n    }\n  }),\n});\n",[4660],{"type":59,"tag":96,"props":4661,"children":4662},{"__ignoreMap":93},[4663,4698,4763,4793,4805,4909,4924,4931,4947,4963,4971,4987],{"type":59,"tag":100,"props":4664,"children":4665},{"class":102,"line":103},[4666,4670,4674,4678,4682,4686,4690,4694],{"type":59,"tag":100,"props":4667,"children":4668},{"style":325},[4669],{"type":65,"value":328},{"type":59,"tag":100,"props":4671,"children":4672},{"style":123},[4673],{"type":65,"value":655},{"type":59,"tag":100,"props":4675,"children":4676},{"style":129},[4677],{"type":65,"value":338},{"type":59,"tag":100,"props":4679,"children":4680},{"style":123},[4681],{"type":65,"value":664},{"type":59,"tag":100,"props":4683,"children":4684},{"style":129},[4685],{"type":65,"value":347},{"type":59,"tag":100,"props":4687,"children":4688},{"style":350},[4689],{"type":65,"value":673},{"type":59,"tag":100,"props":4691,"children":4692},{"style":123},[4693],{"type":65,"value":358},{"type":59,"tag":100,"props":4695,"children":4696},{"style":129},[4697],{"type":65,"value":363},{"type":59,"tag":100,"props":4699,"children":4700},{"class":102,"line":113},[4701,4706,4710,4714,4718,4723,4727,4731,4735,4739,4743,4747,4751,4755,4759],{"type":59,"tag":100,"props":4702,"children":4703},{"style":370},[4704],{"type":65,"value":4705},"  events",{"type":59,"tag":100,"props":4707,"children":4708},{"style":129},[4709],{"type":65,"value":378},{"type":59,"tag":100,"props":4711,"children":4712},{"style":123},[4713],{"type":65,"value":664},{"type":59,"tag":100,"props":4715,"children":4716},{"style":129},[4717],{"type":65,"value":347},{"type":59,"tag":100,"props":4719,"children":4720},{"style":123},[4721],{"type":65,"value":4722},"procedure",{"type":59,"tag":100,"props":4724,"children":4725},{"style":129},[4726],{"type":65,"value":347},{"type":59,"tag":100,"props":4728,"children":4729},{"style":350},[4730],{"type":65,"value":819},{"type":59,"tag":100,"props":4732,"children":4733},{"style":123},[4734],{"type":65,"value":358},{"type":59,"tag":100,"props":4736,"children":4737},{"style":325},[4738],{"type":65,"value":828},{"type":59,"tag":100,"props":4740,"children":4741},{"style":325},[4742],{"type":65,"value":833},{"type":59,"tag":100,"props":4744,"children":4745},{"style":129},[4746],{"type":65,"value":838},{"type":59,"tag":100,"props":4748,"children":4749},{"style":129},[4750],{"type":65,"value":843},{"type":59,"tag":100,"props":4752,"children":4753},{"style":846},[4754],{"type":65,"value":849},{"type":59,"tag":100,"props":4756,"children":4757},{"style":129},[4758],{"type":65,"value":526},{"type":59,"tag":100,"props":4760,"children":4761},{"style":129},[4762],{"type":65,"value":383},{"type":59,"tag":100,"props":4764,"children":4765},{"class":102,"line":176},[4766,4771,4776,4780,4785,4789],{"type":59,"tag":100,"props":4767,"children":4768},{"style":325},[4769],{"type":65,"value":4770},"    const",{"type":59,"tag":100,"props":4772,"children":4773},{"style":123},[4774],{"type":65,"value":4775}," cleanup",{"type":59,"tag":100,"props":4777,"children":4778},{"style":129},[4779],{"type":65,"value":558},{"type":59,"tag":100,"props":4781,"children":4782},{"style":350},[4783],{"type":65,"value":4784}," registerListener",{"type":59,"tag":100,"props":4786,"children":4787},{"style":370},[4788],{"type":65,"value":630},{"type":59,"tag":100,"props":4790,"children":4791},{"style":129},[4792],{"type":65,"value":173},{"type":59,"tag":100,"props":4794,"children":4795},{"class":102,"line":227},[4796,4801],{"type":59,"tag":100,"props":4797,"children":4798},{"style":117},[4799],{"type":65,"value":4800},"    try",{"type":59,"tag":100,"props":4802,"children":4803},{"style":129},[4804],{"type":65,"value":383},{"type":59,"tag":100,"props":4806,"children":4807},{"class":102,"line":269},[4808,4812,4816,4820,4824,4828,4832,4836,4840,4844,4848,4852,4856,4860,4865,4869,4873,4877,4881,4885,4889,4893,4897,4901,4905],{"type":59,"tag":100,"props":4809,"children":4810},{"style":117},[4811],{"type":65,"value":866},{"type":59,"tag":100,"props":4813,"children":4814},{"style":117},[4815],{"type":65,"value":871},{"type":59,"tag":100,"props":4817,"children":4818},{"style":370},[4819],{"type":65,"value":843},{"type":59,"tag":100,"props":4821,"children":4822},{"style":325},[4823],{"type":65,"value":328},{"type":59,"tag":100,"props":4825,"children":4826},{"style":129},[4827],{"type":65,"value":884},{"type":59,"tag":100,"props":4829,"children":4830},{"style":123},[4831],{"type":65,"value":889},{"type":59,"tag":100,"props":4833,"children":4834},{"style":129},[4835],{"type":65,"value":894},{"type":59,"tag":100,"props":4837,"children":4838},{"style":129},[4839],{"type":65,"value":899},{"type":59,"tag":100,"props":4841,"children":4842},{"style":350},[4843],{"type":65,"value":142},{"type":59,"tag":100,"props":4845,"children":4846},{"style":370},[4847],{"type":65,"value":358},{"type":59,"tag":100,"props":4849,"children":4850},{"style":123},[4851],{"type":65,"value":912},{"type":59,"tag":100,"props":4853,"children":4854},{"style":129},[4855],{"type":65,"value":132},{"type":59,"tag":100,"props":4857,"children":4858},{"style":129},[4859],{"type":65,"value":157},{"type":59,"tag":100,"props":4861,"children":4862},{"style":160},[4863],{"type":65,"value":4864},"event",{"type":59,"tag":100,"props":4866,"children":4867},{"style":129},[4868],{"type":65,"value":168},{"type":59,"tag":100,"props":4870,"children":4871},{"style":129},[4872],{"type":65,"value":132},{"type":59,"tag":100,"props":4874,"children":4875},{"style":129},[4876],{"type":65,"value":137},{"type":59,"tag":100,"props":4878,"children":4879},{"style":370},[4880],{"type":65,"value":942},{"type":59,"tag":100,"props":4882,"children":4883},{"style":129},[4884],{"type":65,"value":378},{"type":59,"tag":100,"props":4886,"children":4887},{"style":123},[4888],{"type":65,"value":951},{"type":59,"tag":100,"props":4890,"children":4891},{"style":129},[4892],{"type":65,"value":347},{"type":59,"tag":100,"props":4894,"children":4895},{"style":123},[4896],{"type":65,"value":960},{"type":59,"tag":100,"props":4898,"children":4899},{"style":129},[4900],{"type":65,"value":147},{"type":59,"tag":100,"props":4902,"children":4903},{"style":370},[4904],{"type":65,"value":969},{"type":59,"tag":100,"props":4906,"children":4907},{"style":129},[4908],{"type":65,"value":363},{"type":59,"tag":100,"props":4910,"children":4911},{"class":102,"line":311},[4912,4916,4920],{"type":59,"tag":100,"props":4913,"children":4914},{"style":117},[4915],{"type":65,"value":1018},{"type":59,"tag":100,"props":4917,"children":4918},{"style":123},[4919],{"type":65,"value":996},{"type":59,"tag":100,"props":4921,"children":4922},{"style":129},[4923],{"type":65,"value":173},{"type":59,"tag":100,"props":4925,"children":4926},{"class":102,"line":321},[4927],{"type":59,"tag":100,"props":4928,"children":4929},{"style":129},[4930],{"type":65,"value":1065},{"type":59,"tag":100,"props":4932,"children":4933},{"class":102,"line":366},[4934,4938,4943],{"type":59,"tag":100,"props":4935,"children":4936},{"style":129},[4937],{"type":65,"value":1074},{"type":59,"tag":100,"props":4939,"children":4940},{"style":117},[4941],{"type":65,"value":4942}," finally",{"type":59,"tag":100,"props":4944,"children":4945},{"style":129},[4946],{"type":65,"value":383},{"type":59,"tag":100,"props":4948,"children":4949},{"class":102,"line":386},[4950,4955,4959],{"type":59,"tag":100,"props":4951,"children":4952},{"style":350},[4953],{"type":65,"value":4954},"      cleanup",{"type":59,"tag":100,"props":4956,"children":4957},{"style":370},[4958],{"type":65,"value":630},{"type":59,"tag":100,"props":4960,"children":4961},{"style":129},[4962],{"type":65,"value":173},{"type":59,"tag":100,"props":4964,"children":4965},{"class":102,"line":403},[4966],{"type":59,"tag":100,"props":4967,"children":4968},{"style":129},[4969],{"type":65,"value":4970},"    }\n",{"type":59,"tag":100,"props":4972,"children":4973},{"class":102,"line":427},[4974,4979,4983],{"type":59,"tag":100,"props":4975,"children":4976},{"style":129},[4977],{"type":65,"value":4978},"  }",{"type":59,"tag":100,"props":4980,"children":4981},{"style":123},[4982],{"type":65,"value":526},{"type":59,"tag":100,"props":4984,"children":4985},{"style":129},[4986],{"type":65,"value":424},{"type":59,"tag":100,"props":4988,"children":4989},{"class":102,"line":450},[4990,4994,4998],{"type":59,"tag":100,"props":4991,"children":4992},{"style":129},[4993],{"type":65,"value":521},{"type":59,"tag":100,"props":4995,"children":4996},{"style":123},[4997],{"type":65,"value":526},{"type":59,"tag":100,"props":4999,"children":5000},{"style":129},[5001],{"type":65,"value":173},{"type":59,"tag":75,"props":5003,"children":5004},{},[5005,5007,5013,5015,5021],{"type":65,"value":5006},"tRPC invokes ",{"type":59,"tag":96,"props":5008,"children":5010},{"className":5009},[],[5011],{"type":65,"value":5012},".return()",{"type":65,"value":5014}," on the generator when the subscription stops, triggering the ",{"type":59,"tag":96,"props":5016,"children":5018},{"className":5017},[],[5019],{"type":65,"value":5020},"finally",{"type":65,"value":5022}," block.",{"type":59,"tag":68,"props":5024,"children":5026},{"id":5025},"common-mistakes",[5027],{"type":65,"value":5028},"Common Mistakes",{"type":59,"tag":81,"props":5030,"children":5032},{"id":5031},"high-using-observable-instead-of-async-generator",[5033],{"type":65,"value":5034},"HIGH Using Observable instead of async generator",{"type":59,"tag":75,"props":5036,"children":5037},{},[5038],{"type":65,"value":5039},"Wrong:",{"type":59,"tag":88,"props":5041,"children":5043},{"className":90,"code":5042,"language":92,"meta":93,"style":93},"import { observable } from '@trpc\u002Fserver\u002Fobservable';\n\nt.procedure.subscription(({ input }) => {\n  return observable((emit) => {\n    emit.next(data);\n  });\n});\n",[5044],{"type":59,"tag":96,"props":5045,"children":5046},{"__ignoreMap":93},[5047,5088,5095,5146,5183,5215,5230],{"type":59,"tag":100,"props":5048,"children":5049},{"class":102,"line":103},[5050,5054,5058,5063,5067,5071,5075,5080,5084],{"type":59,"tag":100,"props":5051,"children":5052},{"style":117},[5053],{"type":65,"value":120},{"type":59,"tag":100,"props":5055,"children":5056},{"style":129},[5057],{"type":65,"value":137},{"type":59,"tag":100,"props":5059,"children":5060},{"style":123},[5061],{"type":65,"value":5062}," observable",{"type":59,"tag":100,"props":5064,"children":5065},{"style":129},[5066],{"type":65,"value":147},{"type":59,"tag":100,"props":5068,"children":5069},{"style":117},[5070],{"type":65,"value":152},{"type":59,"tag":100,"props":5072,"children":5073},{"style":129},[5074],{"type":65,"value":157},{"type":59,"tag":100,"props":5076,"children":5077},{"style":160},[5078],{"type":65,"value":5079},"@trpc\u002Fserver\u002Fobservable",{"type":59,"tag":100,"props":5081,"children":5082},{"style":129},[5083],{"type":65,"value":168},{"type":59,"tag":100,"props":5085,"children":5086},{"style":129},[5087],{"type":65,"value":173},{"type":59,"tag":100,"props":5089,"children":5090},{"class":102,"line":113},[5091],{"type":59,"tag":100,"props":5092,"children":5093},{"emptyLinePlaceholder":315},[5094],{"type":65,"value":318},{"type":59,"tag":100,"props":5096,"children":5097},{"class":102,"line":176},[5098,5103,5107,5111,5115,5119,5123,5128,5133,5138,5142],{"type":59,"tag":100,"props":5099,"children":5100},{"style":123},[5101],{"type":65,"value":5102},"t",{"type":59,"tag":100,"props":5104,"children":5105},{"style":129},[5106],{"type":65,"value":347},{"type":59,"tag":100,"props":5108,"children":5109},{"style":123},[5110],{"type":65,"value":4722},{"type":59,"tag":100,"props":5112,"children":5113},{"style":129},[5114],{"type":65,"value":347},{"type":59,"tag":100,"props":5116,"children":5117},{"style":350},[5118],{"type":65,"value":819},{"type":59,"tag":100,"props":5120,"children":5121},{"style":123},[5122],{"type":65,"value":358},{"type":59,"tag":100,"props":5124,"children":5125},{"style":129},[5126],{"type":65,"value":5127},"({",{"type":59,"tag":100,"props":5129,"children":5130},{"style":846},[5131],{"type":65,"value":5132}," input",{"type":59,"tag":100,"props":5134,"children":5135},{"style":129},[5136],{"type":65,"value":5137}," })",{"type":59,"tag":100,"props":5139,"children":5140},{"style":325},[5141],{"type":65,"value":1532},{"type":59,"tag":100,"props":5143,"children":5144},{"style":129},[5145],{"type":65,"value":383},{"type":59,"tag":100,"props":5147,"children":5148},{"class":102,"line":227},[5149,5154,5158,5162,5166,5171,5175,5179],{"type":59,"tag":100,"props":5150,"children":5151},{"style":117},[5152],{"type":65,"value":5153},"  return",{"type":59,"tag":100,"props":5155,"children":5156},{"style":350},[5157],{"type":65,"value":5062},{"type":59,"tag":100,"props":5159,"children":5160},{"style":370},[5161],{"type":65,"value":358},{"type":59,"tag":100,"props":5163,"children":5164},{"style":129},[5165],{"type":65,"value":358},{"type":59,"tag":100,"props":5167,"children":5168},{"style":846},[5169],{"type":65,"value":5170},"emit",{"type":59,"tag":100,"props":5172,"children":5173},{"style":129},[5174],{"type":65,"value":526},{"type":59,"tag":100,"props":5176,"children":5177},{"style":325},[5178],{"type":65,"value":1532},{"type":59,"tag":100,"props":5180,"children":5181},{"style":129},[5182],{"type":65,"value":383},{"type":59,"tag":100,"props":5184,"children":5185},{"class":102,"line":269},[5186,5191,5195,5199,5203,5207,5211],{"type":59,"tag":100,"props":5187,"children":5188},{"style":123},[5189],{"type":65,"value":5190},"    emit",{"type":59,"tag":100,"props":5192,"children":5193},{"style":129},[5194],{"type":65,"value":347},{"type":59,"tag":100,"props":5196,"children":5197},{"style":350},[5198],{"type":65,"value":30},{"type":59,"tag":100,"props":5200,"children":5201},{"style":370},[5202],{"type":65,"value":358},{"type":59,"tag":100,"props":5204,"children":5205},{"style":123},[5206],{"type":65,"value":889},{"type":59,"tag":100,"props":5208,"children":5209},{"style":370},[5210],{"type":65,"value":526},{"type":59,"tag":100,"props":5212,"children":5213},{"style":129},[5214],{"type":65,"value":173},{"type":59,"tag":100,"props":5216,"children":5217},{"class":102,"line":311},[5218,5222,5226],{"type":59,"tag":100,"props":5219,"children":5220},{"style":129},[5221],{"type":65,"value":4978},{"type":59,"tag":100,"props":5223,"children":5224},{"style":370},[5225],{"type":65,"value":526},{"type":59,"tag":100,"props":5227,"children":5228},{"style":129},[5229],{"type":65,"value":173},{"type":59,"tag":100,"props":5231,"children":5232},{"class":102,"line":321},[5233,5237,5241],{"type":59,"tag":100,"props":5234,"children":5235},{"style":129},[5236],{"type":65,"value":521},{"type":59,"tag":100,"props":5238,"children":5239},{"style":123},[5240],{"type":65,"value":526},{"type":59,"tag":100,"props":5242,"children":5243},{"style":129},[5244],{"type":65,"value":173},{"type":59,"tag":75,"props":5246,"children":5247},{},[5248],{"type":65,"value":5249},"Correct:",{"type":59,"tag":88,"props":5251,"children":5253},{"className":90,"code":5252,"language":92,"meta":93,"style":93},"t.procedure.subscription(async function* ({ input, signal }) {\n  for await (const [data] of on(ee, 'event', { signal })) {\n    yield data;\n  }\n});\n",[5254],{"type":59,"tag":96,"props":5255,"children":5256},{"__ignoreMap":93},[5257,5321,5409,5425,5433],{"type":59,"tag":100,"props":5258,"children":5259},{"class":102,"line":103},[5260,5264,5268,5272,5276,5280,5284,5288,5292,5296,5301,5305,5309,5313,5317],{"type":59,"tag":100,"props":5261,"children":5262},{"style":123},[5263],{"type":65,"value":5102},{"type":59,"tag":100,"props":5265,"children":5266},{"style":129},[5267],{"type":65,"value":347},{"type":59,"tag":100,"props":5269,"children":5270},{"style":123},[5271],{"type":65,"value":4722},{"type":59,"tag":100,"props":5273,"children":5274},{"style":129},[5275],{"type":65,"value":347},{"type":59,"tag":100,"props":5277,"children":5278},{"style":350},[5279],{"type":65,"value":819},{"type":59,"tag":100,"props":5281,"children":5282},{"style":123},[5283],{"type":65,"value":358},{"type":59,"tag":100,"props":5285,"children":5286},{"style":325},[5287],{"type":65,"value":828},{"type":59,"tag":100,"props":5289,"children":5290},{"style":325},[5291],{"type":65,"value":833},{"type":59,"tag":100,"props":5293,"children":5294},{"style":129},[5295],{"type":65,"value":838},{"type":59,"tag":100,"props":5297,"children":5298},{"style":129},[5299],{"type":65,"value":5300}," ({",{"type":59,"tag":100,"props":5302,"children":5303},{"style":846},[5304],{"type":65,"value":5132},{"type":59,"tag":100,"props":5306,"children":5307},{"style":129},[5308],{"type":65,"value":132},{"type":59,"tag":100,"props":5310,"children":5311},{"style":846},[5312],{"type":65,"value":942},{"type":59,"tag":100,"props":5314,"children":5315},{"style":129},[5316],{"type":65,"value":5137},{"type":59,"tag":100,"props":5318,"children":5319},{"style":129},[5320],{"type":65,"value":383},{"type":59,"tag":100,"props":5322,"children":5323},{"class":102,"line":113},[5324,5329,5333,5337,5341,5345,5349,5353,5357,5361,5365,5369,5373,5377,5381,5385,5389,5393,5397,5401,5405],{"type":59,"tag":100,"props":5325,"children":5326},{"style":117},[5327],{"type":65,"value":5328},"  for",{"type":59,"tag":100,"props":5330,"children":5331},{"style":117},[5332],{"type":65,"value":871},{"type":59,"tag":100,"props":5334,"children":5335},{"style":370},[5336],{"type":65,"value":843},{"type":59,"tag":100,"props":5338,"children":5339},{"style":325},[5340],{"type":65,"value":328},{"type":59,"tag":100,"props":5342,"children":5343},{"style":129},[5344],{"type":65,"value":884},{"type":59,"tag":100,"props":5346,"children":5347},{"style":123},[5348],{"type":65,"value":889},{"type":59,"tag":100,"props":5350,"children":5351},{"style":129},[5352],{"type":65,"value":894},{"type":59,"tag":100,"props":5354,"children":5355},{"style":129},[5356],{"type":65,"value":899},{"type":59,"tag":100,"props":5358,"children":5359},{"style":350},[5360],{"type":65,"value":142},{"type":59,"tag":100,"props":5362,"children":5363},{"style":370},[5364],{"type":65,"value":358},{"type":59,"tag":100,"props":5366,"children":5367},{"style":123},[5368],{"type":65,"value":912},{"type":59,"tag":100,"props":5370,"children":5371},{"style":129},[5372],{"type":65,"value":132},{"type":59,"tag":100,"props":5374,"children":5375},{"style":129},[5376],{"type":65,"value":157},{"type":59,"tag":100,"props":5378,"children":5379},{"style":160},[5380],{"type":65,"value":4864},{"type":59,"tag":100,"props":5382,"children":5383},{"style":129},[5384],{"type":65,"value":168},{"type":59,"tag":100,"props":5386,"children":5387},{"style":129},[5388],{"type":65,"value":132},{"type":59,"tag":100,"props":5390,"children":5391},{"style":129},[5392],{"type":65,"value":137},{"type":59,"tag":100,"props":5394,"children":5395},{"style":123},[5396],{"type":65,"value":942},{"type":59,"tag":100,"props":5398,"children":5399},{"style":129},[5400],{"type":65,"value":147},{"type":59,"tag":100,"props":5402,"children":5403},{"style":370},[5404],{"type":65,"value":969},{"type":59,"tag":100,"props":5406,"children":5407},{"style":129},[5408],{"type":65,"value":363},{"type":59,"tag":100,"props":5410,"children":5411},{"class":102,"line":176},[5412,5417,5421],{"type":59,"tag":100,"props":5413,"children":5414},{"style":117},[5415],{"type":65,"value":5416},"    yield",{"type":59,"tag":100,"props":5418,"children":5419},{"style":123},[5420],{"type":65,"value":996},{"type":59,"tag":100,"props":5422,"children":5423},{"style":129},[5424],{"type":65,"value":173},{"type":59,"tag":100,"props":5426,"children":5427},{"class":102,"line":227},[5428],{"type":59,"tag":100,"props":5429,"children":5430},{"style":129},[5431],{"type":65,"value":5432},"  }\n",{"type":59,"tag":100,"props":5434,"children":5435},{"class":102,"line":269},[5436,5440,5444],{"type":59,"tag":100,"props":5437,"children":5438},{"style":129},[5439],{"type":65,"value":521},{"type":59,"tag":100,"props":5441,"children":5442},{"style":123},[5443],{"type":65,"value":526},{"type":59,"tag":100,"props":5445,"children":5446},{"style":129},[5447],{"type":65,"value":173},{"type":59,"tag":75,"props":5449,"children":5450},{},[5451,5453,5459],{"type":65,"value":5452},"Observable subscriptions are deprecated and will be removed in v12. Use async generator syntax (",{"type":59,"tag":96,"props":5454,"children":5456},{"className":5455},[],[5457],{"type":65,"value":5458},"async function*",{"type":65,"value":5460},").",{"type":59,"tag":75,"props":5462,"children":5463},{},[5464],{"type":65,"value":5465},"Source: packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002FprocedureBuilder.ts",{"type":59,"tag":81,"props":5467,"children":5469},{"id":5468},"medium-empty-string-as-tracked-event-id",[5470],{"type":65,"value":5471},"MEDIUM Empty string as tracked event ID",{"type":59,"tag":75,"props":5473,"children":5474},{},[5475],{"type":65,"value":5039},{"type":59,"tag":88,"props":5477,"children":5479},{"className":90,"code":5478,"language":92,"meta":93,"style":93},"yield tracked('', data);\n",[5480],{"type":59,"tag":96,"props":5481,"children":5482},{"__ignoreMap":93},[5483],{"type":59,"tag":100,"props":5484,"children":5485},{"class":102,"line":103},[5486,5491,5495,5499,5504,5508,5513],{"type":59,"tag":100,"props":5487,"children":5488},{"style":117},[5489],{"type":65,"value":5490},"yield",{"type":59,"tag":100,"props":5492,"children":5493},{"style":350},[5494],{"type":65,"value":199},{"type":59,"tag":100,"props":5496,"children":5497},{"style":123},[5498],{"type":65,"value":358},{"type":59,"tag":100,"props":5500,"children":5501},{"style":129},[5502],{"type":65,"value":5503},"''",{"type":59,"tag":100,"props":5505,"children":5506},{"style":129},[5507],{"type":65,"value":132},{"type":59,"tag":100,"props":5509,"children":5510},{"style":123},[5511],{"type":65,"value":5512}," data)",{"type":59,"tag":100,"props":5514,"children":5515},{"style":129},[5516],{"type":65,"value":173},{"type":59,"tag":75,"props":5518,"children":5519},{},[5520],{"type":65,"value":5249},{"type":59,"tag":88,"props":5522,"children":5524},{"className":90,"code":5523,"language":92,"meta":93,"style":93},"yield tracked(event.id.toString(), data);\n",[5525],{"type":59,"tag":96,"props":5526,"children":5527},{"__ignoreMap":93},[5528],{"type":59,"tag":100,"props":5529,"children":5530},{"class":102,"line":103},[5531,5535,5539,5544,5548,5552,5556,5561,5565,5569,5573],{"type":59,"tag":100,"props":5532,"children":5533},{"style":117},[5534],{"type":65,"value":5490},{"type":59,"tag":100,"props":5536,"children":5537},{"style":350},[5538],{"type":65,"value":199},{"type":59,"tag":100,"props":5540,"children":5541},{"style":123},[5542],{"type":65,"value":5543},"(event",{"type":59,"tag":100,"props":5545,"children":5546},{"style":129},[5547],{"type":65,"value":347},{"type":59,"tag":100,"props":5549,"children":5550},{"style":123},[5551],{"type":65,"value":1040},{"type":59,"tag":100,"props":5553,"children":5554},{"style":129},[5555],{"type":65,"value":347},{"type":59,"tag":100,"props":5557,"children":5558},{"style":350},[5559],{"type":65,"value":5560},"toString",{"type":59,"tag":100,"props":5562,"children":5563},{"style":123},[5564],{"type":65,"value":630},{"type":59,"tag":100,"props":5566,"children":5567},{"style":129},[5568],{"type":65,"value":132},{"type":59,"tag":100,"props":5570,"children":5571},{"style":123},[5572],{"type":65,"value":5512},{"type":59,"tag":100,"props":5574,"children":5575},{"style":129},[5576],{"type":65,"value":173},{"type":59,"tag":75,"props":5578,"children":5579},{},[5580,5586],{"type":59,"tag":96,"props":5581,"children":5583},{"className":5582},[],[5584],{"type":65,"value":5585},"tracked()",{"type":65,"value":5587}," throws if the ID is an empty string because it conflicts with SSE \"no id\" semantics.",{"type":59,"tag":75,"props":5589,"children":5590},{},[5591],{"type":65,"value":5592},"Source: packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Ftracked.ts",{"type":59,"tag":81,"props":5594,"children":5596},{"id":5595},"high-fetching-history-before-setting-up-event-listener",[5597],{"type":65,"value":5598},"HIGH Fetching history before setting up event listener",{"type":59,"tag":75,"props":5600,"children":5601},{},[5602],{"type":65,"value":5039},{"type":59,"tag":88,"props":5604,"children":5606},{"className":90,"code":5605,"language":92,"meta":93,"style":93},"t.procedure.subscription(async function* (opts) {\n  const history = await db.getEvents(); \u002F\u002F events may fire here and be lost\n  yield* history;\n  for await (const event of listener) {\n    yield event;\n  }\n});\n",[5607],{"type":59,"tag":96,"props":5608,"children":5609},{"__ignoreMap":93},[5610,5665,5712,5732,5773,5788,5795],{"type":59,"tag":100,"props":5611,"children":5612},{"class":102,"line":103},[5613,5617,5621,5625,5629,5633,5637,5641,5645,5649,5653,5657,5661],{"type":59,"tag":100,"props":5614,"children":5615},{"style":123},[5616],{"type":65,"value":5102},{"type":59,"tag":100,"props":5618,"children":5619},{"style":129},[5620],{"type":65,"value":347},{"type":59,"tag":100,"props":5622,"children":5623},{"style":123},[5624],{"type":65,"value":4722},{"type":59,"tag":100,"props":5626,"children":5627},{"style":129},[5628],{"type":65,"value":347},{"type":59,"tag":100,"props":5630,"children":5631},{"style":350},[5632],{"type":65,"value":819},{"type":59,"tag":100,"props":5634,"children":5635},{"style":123},[5636],{"type":65,"value":358},{"type":59,"tag":100,"props":5638,"children":5639},{"style":325},[5640],{"type":65,"value":828},{"type":59,"tag":100,"props":5642,"children":5643},{"style":325},[5644],{"type":65,"value":833},{"type":59,"tag":100,"props":5646,"children":5647},{"style":129},[5648],{"type":65,"value":838},{"type":59,"tag":100,"props":5650,"children":5651},{"style":129},[5652],{"type":65,"value":843},{"type":59,"tag":100,"props":5654,"children":5655},{"style":846},[5656],{"type":65,"value":849},{"type":59,"tag":100,"props":5658,"children":5659},{"style":129},[5660],{"type":65,"value":526},{"type":59,"tag":100,"props":5662,"children":5663},{"style":129},[5664],{"type":65,"value":383},{"type":59,"tag":100,"props":5666,"children":5667},{"class":102,"line":113},[5668,5673,5678,5682,5686,5690,5694,5699,5703,5707],{"type":59,"tag":100,"props":5669,"children":5670},{"style":325},[5671],{"type":65,"value":5672},"  const",{"type":59,"tag":100,"props":5674,"children":5675},{"style":123},[5676],{"type":65,"value":5677}," history",{"type":59,"tag":100,"props":5679,"children":5680},{"style":129},[5681],{"type":65,"value":558},{"type":59,"tag":100,"props":5683,"children":5684},{"style":117},[5685],{"type":65,"value":871},{"type":59,"tag":100,"props":5687,"children":5688},{"style":123},[5689],{"type":65,"value":3223},{"type":59,"tag":100,"props":5691,"children":5692},{"style":129},[5693],{"type":65,"value":347},{"type":59,"tag":100,"props":5695,"children":5696},{"style":350},[5697],{"type":65,"value":5698},"getEvents",{"type":59,"tag":100,"props":5700,"children":5701},{"style":370},[5702],{"type":65,"value":630},{"type":59,"tag":100,"props":5704,"children":5705},{"style":129},[5706],{"type":65,"value":581},{"type":59,"tag":100,"props":5708,"children":5709},{"style":107},[5710],{"type":65,"value":5711}," \u002F\u002F events may fire here and be lost\n",{"type":59,"tag":100,"props":5713,"children":5714},{"class":102,"line":176},[5715,5720,5724,5728],{"type":59,"tag":100,"props":5716,"children":5717},{"style":117},[5718],{"type":65,"value":5719},"  yield",{"type":59,"tag":100,"props":5721,"children":5722},{"style":129},[5723],{"type":65,"value":838},{"type":59,"tag":100,"props":5725,"children":5726},{"style":123},[5727],{"type":65,"value":5677},{"type":59,"tag":100,"props":5729,"children":5730},{"style":129},[5731],{"type":65,"value":173},{"type":59,"tag":100,"props":5733,"children":5734},{"class":102,"line":227},[5735,5739,5743,5747,5751,5756,5760,5765,5769],{"type":59,"tag":100,"props":5736,"children":5737},{"style":117},[5738],{"type":65,"value":5328},{"type":59,"tag":100,"props":5740,"children":5741},{"style":117},[5742],{"type":65,"value":871},{"type":59,"tag":100,"props":5744,"children":5745},{"style":370},[5746],{"type":65,"value":843},{"type":59,"tag":100,"props":5748,"children":5749},{"style":325},[5750],{"type":65,"value":328},{"type":59,"tag":100,"props":5752,"children":5753},{"style":123},[5754],{"type":65,"value":5755}," event",{"type":59,"tag":100,"props":5757,"children":5758},{"style":129},[5759],{"type":65,"value":899},{"type":59,"tag":100,"props":5761,"children":5762},{"style":123},[5763],{"type":65,"value":5764}," listener",{"type":59,"tag":100,"props":5766,"children":5767},{"style":370},[5768],{"type":65,"value":2565},{"type":59,"tag":100,"props":5770,"children":5771},{"style":129},[5772],{"type":65,"value":363},{"type":59,"tag":100,"props":5774,"children":5775},{"class":102,"line":269},[5776,5780,5784],{"type":59,"tag":100,"props":5777,"children":5778},{"style":117},[5779],{"type":65,"value":5416},{"type":59,"tag":100,"props":5781,"children":5782},{"style":123},[5783],{"type":65,"value":5755},{"type":59,"tag":100,"props":5785,"children":5786},{"style":129},[5787],{"type":65,"value":173},{"type":59,"tag":100,"props":5789,"children":5790},{"class":102,"line":311},[5791],{"type":59,"tag":100,"props":5792,"children":5793},{"style":129},[5794],{"type":65,"value":5432},{"type":59,"tag":100,"props":5796,"children":5797},{"class":102,"line":321},[5798,5802,5806],{"type":59,"tag":100,"props":5799,"children":5800},{"style":129},[5801],{"type":65,"value":521},{"type":59,"tag":100,"props":5803,"children":5804},{"style":123},[5805],{"type":65,"value":526},{"type":59,"tag":100,"props":5807,"children":5808},{"style":129},[5809],{"type":65,"value":173},{"type":59,"tag":75,"props":5811,"children":5812},{},[5813],{"type":65,"value":5249},{"type":59,"tag":88,"props":5815,"children":5817},{"className":90,"code":5816,"language":92,"meta":93,"style":93},"t.procedure.subscription(async function* (opts) {\n  const iterable = on(ee, 'event', { signal: opts.signal }); \u002F\u002F listen first\n  const history = await db.getEvents();\n  for (const item of history) {\n    yield tracked(item.id, item);\n  }\n  for await (const [event] of iterable) {\n    yield tracked(event.id, event);\n  }\n});\n",[5818],{"type":59,"tag":96,"props":5819,"children":5820},{"__ignoreMap":93},[5821,5876,5964,6003,6038,6081,6088,6135,6178,6185],{"type":59,"tag":100,"props":5822,"children":5823},{"class":102,"line":103},[5824,5828,5832,5836,5840,5844,5848,5852,5856,5860,5864,5868,5872],{"type":59,"tag":100,"props":5825,"children":5826},{"style":123},[5827],{"type":65,"value":5102},{"type":59,"tag":100,"props":5829,"children":5830},{"style":129},[5831],{"type":65,"value":347},{"type":59,"tag":100,"props":5833,"children":5834},{"style":123},[5835],{"type":65,"value":4722},{"type":59,"tag":100,"props":5837,"children":5838},{"style":129},[5839],{"type":65,"value":347},{"type":59,"tag":100,"props":5841,"children":5842},{"style":350},[5843],{"type":65,"value":819},{"type":59,"tag":100,"props":5845,"children":5846},{"style":123},[5847],{"type":65,"value":358},{"type":59,"tag":100,"props":5849,"children":5850},{"style":325},[5851],{"type":65,"value":828},{"type":59,"tag":100,"props":5853,"children":5854},{"style":325},[5855],{"type":65,"value":833},{"type":59,"tag":100,"props":5857,"children":5858},{"style":129},[5859],{"type":65,"value":838},{"type":59,"tag":100,"props":5861,"children":5862},{"style":129},[5863],{"type":65,"value":843},{"type":59,"tag":100,"props":5865,"children":5866},{"style":846},[5867],{"type":65,"value":849},{"type":59,"tag":100,"props":5869,"children":5870},{"style":129},[5871],{"type":65,"value":526},{"type":59,"tag":100,"props":5873,"children":5874},{"style":129},[5875],{"type":65,"value":383},{"type":59,"tag":100,"props":5877,"children":5878},{"class":102,"line":113},[5879,5883,5887,5891,5895,5899,5903,5907,5911,5915,5919,5923,5927,5931,5935,5939,5943,5947,5951,5955,5959],{"type":59,"tag":100,"props":5880,"children":5881},{"style":325},[5882],{"type":65,"value":5672},{"type":59,"tag":100,"props":5884,"children":5885},{"style":123},[5886],{"type":65,"value":2447},{"type":59,"tag":100,"props":5888,"children":5889},{"style":129},[5890],{"type":65,"value":558},{"type":59,"tag":100,"props":5892,"children":5893},{"style":350},[5894],{"type":65,"value":142},{"type":59,"tag":100,"props":5896,"children":5897},{"style":370},[5898],{"type":65,"value":358},{"type":59,"tag":100,"props":5900,"children":5901},{"style":123},[5902],{"type":65,"value":912},{"type":59,"tag":100,"props":5904,"children":5905},{"style":129},[5906],{"type":65,"value":132},{"type":59,"tag":100,"props":5908,"children":5909},{"style":129},[5910],{"type":65,"value":157},{"type":59,"tag":100,"props":5912,"children":5913},{"style":160},[5914],{"type":65,"value":4864},{"type":59,"tag":100,"props":5916,"children":5917},{"style":129},[5918],{"type":65,"value":168},{"type":59,"tag":100,"props":5920,"children":5921},{"style":129},[5922],{"type":65,"value":132},{"type":59,"tag":100,"props":5924,"children":5925},{"style":129},[5926],{"type":65,"value":137},{"type":59,"tag":100,"props":5928,"children":5929},{"style":370},[5930],{"type":65,"value":942},{"type":59,"tag":100,"props":5932,"children":5933},{"style":129},[5934],{"type":65,"value":378},{"type":59,"tag":100,"props":5936,"children":5937},{"style":123},[5938],{"type":65,"value":951},{"type":59,"tag":100,"props":5940,"children":5941},{"style":129},[5942],{"type":65,"value":347},{"type":59,"tag":100,"props":5944,"children":5945},{"style":123},[5946],{"type":65,"value":960},{"type":59,"tag":100,"props":5948,"children":5949},{"style":129},[5950],{"type":65,"value":147},{"type":59,"tag":100,"props":5952,"children":5953},{"style":370},[5954],{"type":65,"value":526},{"type":59,"tag":100,"props":5956,"children":5957},{"style":129},[5958],{"type":65,"value":581},{"type":59,"tag":100,"props":5960,"children":5961},{"style":107},[5962],{"type":65,"value":5963}," \u002F\u002F listen first\n",{"type":59,"tag":100,"props":5965,"children":5966},{"class":102,"line":176},[5967,5971,5975,5979,5983,5987,5991,5995,5999],{"type":59,"tag":100,"props":5968,"children":5969},{"style":325},[5970],{"type":65,"value":5672},{"type":59,"tag":100,"props":5972,"children":5973},{"style":123},[5974],{"type":65,"value":5677},{"type":59,"tag":100,"props":5976,"children":5977},{"style":129},[5978],{"type":65,"value":558},{"type":59,"tag":100,"props":5980,"children":5981},{"style":117},[5982],{"type":65,"value":871},{"type":59,"tag":100,"props":5984,"children":5985},{"style":123},[5986],{"type":65,"value":3223},{"type":59,"tag":100,"props":5988,"children":5989},{"style":129},[5990],{"type":65,"value":347},{"type":59,"tag":100,"props":5992,"children":5993},{"style":350},[5994],{"type":65,"value":5698},{"type":59,"tag":100,"props":5996,"children":5997},{"style":370},[5998],{"type":65,"value":630},{"type":59,"tag":100,"props":6000,"children":6001},{"style":129},[6002],{"type":65,"value":173},{"type":59,"tag":100,"props":6004,"children":6005},{"class":102,"line":227},[6006,6010,6014,6018,6022,6026,6030,6034],{"type":59,"tag":100,"props":6007,"children":6008},{"style":117},[6009],{"type":65,"value":5328},{"type":59,"tag":100,"props":6011,"children":6012},{"style":370},[6013],{"type":65,"value":843},{"type":59,"tag":100,"props":6015,"children":6016},{"style":325},[6017],{"type":65,"value":328},{"type":59,"tag":100,"props":6019,"children":6020},{"style":123},[6021],{"type":65,"value":3403},{"type":59,"tag":100,"props":6023,"children":6024},{"style":129},[6025],{"type":65,"value":899},{"type":59,"tag":100,"props":6027,"children":6028},{"style":123},[6029],{"type":65,"value":5677},{"type":59,"tag":100,"props":6031,"children":6032},{"style":370},[6033],{"type":65,"value":2565},{"type":59,"tag":100,"props":6035,"children":6036},{"style":129},[6037],{"type":65,"value":363},{"type":59,"tag":100,"props":6039,"children":6040},{"class":102,"line":269},[6041,6045,6049,6053,6057,6061,6065,6069,6073,6077],{"type":59,"tag":100,"props":6042,"children":6043},{"style":117},[6044],{"type":65,"value":5416},{"type":59,"tag":100,"props":6046,"children":6047},{"style":350},[6048],{"type":65,"value":199},{"type":59,"tag":100,"props":6050,"children":6051},{"style":370},[6052],{"type":65,"value":358},{"type":59,"tag":100,"props":6054,"children":6055},{"style":123},[6056],{"type":65,"value":3232},{"type":59,"tag":100,"props":6058,"children":6059},{"style":129},[6060],{"type":65,"value":347},{"type":59,"tag":100,"props":6062,"children":6063},{"style":123},[6064],{"type":65,"value":1040},{"type":59,"tag":100,"props":6066,"children":6067},{"style":129},[6068],{"type":65,"value":132},{"type":59,"tag":100,"props":6070,"children":6071},{"style":123},[6072],{"type":65,"value":3403},{"type":59,"tag":100,"props":6074,"children":6075},{"style":370},[6076],{"type":65,"value":526},{"type":59,"tag":100,"props":6078,"children":6079},{"style":129},[6080],{"type":65,"value":173},{"type":59,"tag":100,"props":6082,"children":6083},{"class":102,"line":311},[6084],{"type":59,"tag":100,"props":6085,"children":6086},{"style":129},[6087],{"type":65,"value":5432},{"type":59,"tag":100,"props":6089,"children":6090},{"class":102,"line":321},[6091,6095,6099,6103,6107,6111,6115,6119,6123,6127,6131],{"type":59,"tag":100,"props":6092,"children":6093},{"style":117},[6094],{"type":65,"value":5328},{"type":59,"tag":100,"props":6096,"children":6097},{"style":117},[6098],{"type":65,"value":871},{"type":59,"tag":100,"props":6100,"children":6101},{"style":370},[6102],{"type":65,"value":843},{"type":59,"tag":100,"props":6104,"children":6105},{"style":325},[6106],{"type":65,"value":328},{"type":59,"tag":100,"props":6108,"children":6109},{"style":129},[6110],{"type":65,"value":884},{"type":59,"tag":100,"props":6112,"children":6113},{"style":123},[6114],{"type":65,"value":4864},{"type":59,"tag":100,"props":6116,"children":6117},{"style":129},[6118],{"type":65,"value":894},{"type":59,"tag":100,"props":6120,"children":6121},{"style":129},[6122],{"type":65,"value":899},{"type":59,"tag":100,"props":6124,"children":6125},{"style":123},[6126],{"type":65,"value":2447},{"type":59,"tag":100,"props":6128,"children":6129},{"style":370},[6130],{"type":65,"value":2565},{"type":59,"tag":100,"props":6132,"children":6133},{"style":129},[6134],{"type":65,"value":363},{"type":59,"tag":100,"props":6136,"children":6137},{"class":102,"line":366},[6138,6142,6146,6150,6154,6158,6162,6166,6170,6174],{"type":59,"tag":100,"props":6139,"children":6140},{"style":117},[6141],{"type":65,"value":5416},{"type":59,"tag":100,"props":6143,"children":6144},{"style":350},[6145],{"type":65,"value":199},{"type":59,"tag":100,"props":6147,"children":6148},{"style":370},[6149],{"type":65,"value":358},{"type":59,"tag":100,"props":6151,"children":6152},{"style":123},[6153],{"type":65,"value":4864},{"type":59,"tag":100,"props":6155,"children":6156},{"style":129},[6157],{"type":65,"value":347},{"type":59,"tag":100,"props":6159,"children":6160},{"style":123},[6161],{"type":65,"value":1040},{"type":59,"tag":100,"props":6163,"children":6164},{"style":129},[6165],{"type":65,"value":132},{"type":59,"tag":100,"props":6167,"children":6168},{"style":123},[6169],{"type":65,"value":5755},{"type":59,"tag":100,"props":6171,"children":6172},{"style":370},[6173],{"type":65,"value":526},{"type":59,"tag":100,"props":6175,"children":6176},{"style":129},[6177],{"type":65,"value":173},{"type":59,"tag":100,"props":6179,"children":6180},{"class":102,"line":386},[6181],{"type":59,"tag":100,"props":6182,"children":6183},{"style":129},[6184],{"type":65,"value":5432},{"type":59,"tag":100,"props":6186,"children":6187},{"class":102,"line":403},[6188,6192,6196],{"type":59,"tag":100,"props":6189,"children":6190},{"style":129},[6191],{"type":65,"value":521},{"type":59,"tag":100,"props":6193,"children":6194},{"style":123},[6195],{"type":65,"value":526},{"type":59,"tag":100,"props":6197,"children":6198},{"style":129},[6199],{"type":65,"value":173},{"type":59,"tag":75,"props":6201,"children":6202},{},[6203],{"type":65,"value":6204},"If you fetch historical data before setting up the event listener, events emitted between the fetch and listener setup are lost.",{"type":59,"tag":75,"props":6206,"children":6207},{},[6208],{"type":65,"value":6209},"Source: www\u002Fdocs\u002Fserver\u002Fsubscriptions.md",{"type":59,"tag":81,"props":6211,"children":6213},{"id":6212},"medium-sse-ping-interval-client-reconnect-interval",[6214],{"type":65,"value":6215},"MEDIUM SSE ping interval >= client reconnect interval",{"type":59,"tag":75,"props":6217,"children":6218},{},[6219],{"type":65,"value":5039},{"type":59,"tag":88,"props":6221,"children":6223},{"className":90,"code":6222,"language":92,"meta":93,"style":93},"initTRPC.create({\n  sse: {\n    ping: { enabled: true, intervalMs: 10000 },\n    client: { reconnectAfterInactivityMs: 5000 },\n  },\n});\n",[6224],{"type":59,"tag":96,"props":6225,"children":6226},{"__ignoreMap":93},[6227,6251,6266,6316,6348,6355],{"type":59,"tag":100,"props":6228,"children":6229},{"class":102,"line":103},[6230,6235,6239,6243,6247],{"type":59,"tag":100,"props":6231,"children":6232},{"style":123},[6233],{"type":65,"value":6234},"initTRPC",{"type":59,"tag":100,"props":6236,"children":6237},{"style":129},[6238],{"type":65,"value":347},{"type":59,"tag":100,"props":6240,"children":6241},{"style":350},[6242],{"type":65,"value":353},{"type":59,"tag":100,"props":6244,"children":6245},{"style":123},[6246],{"type":65,"value":358},{"type":59,"tag":100,"props":6248,"children":6249},{"style":129},[6250],{"type":65,"value":363},{"type":59,"tag":100,"props":6252,"children":6253},{"class":102,"line":113},[6254,6258,6262],{"type":59,"tag":100,"props":6255,"children":6256},{"style":370},[6257],{"type":65,"value":373},{"type":59,"tag":100,"props":6259,"children":6260},{"style":129},[6261],{"type":65,"value":378},{"type":59,"tag":100,"props":6263,"children":6264},{"style":129},[6265],{"type":65,"value":383},{"type":59,"tag":100,"props":6267,"children":6268},{"class":102,"line":176},[6269,6273,6277,6281,6286,6290,6294,6298,6303,6307,6312],{"type":59,"tag":100,"props":6270,"children":6271},{"style":370},[6272],{"type":65,"value":392},{"type":59,"tag":100,"props":6274,"children":6275},{"style":129},[6276],{"type":65,"value":378},{"type":59,"tag":100,"props":6278,"children":6279},{"style":129},[6280],{"type":65,"value":137},{"type":59,"tag":100,"props":6282,"children":6283},{"style":370},[6284],{"type":65,"value":6285}," enabled",{"type":59,"tag":100,"props":6287,"children":6288},{"style":129},[6289],{"type":65,"value":378},{"type":59,"tag":100,"props":6291,"children":6292},{"style":416},[6293],{"type":65,"value":419},{"type":59,"tag":100,"props":6295,"children":6296},{"style":129},[6297],{"type":65,"value":132},{"type":59,"tag":100,"props":6299,"children":6300},{"style":370},[6301],{"type":65,"value":6302}," intervalMs",{"type":59,"tag":100,"props":6304,"children":6305},{"style":129},[6306],{"type":65,"value":378},{"type":59,"tag":100,"props":6308,"children":6309},{"style":440},[6310],{"type":65,"value":6311}," 10000",{"type":59,"tag":100,"props":6313,"children":6314},{"style":129},[6315],{"type":65,"value":1802},{"type":59,"tag":100,"props":6317,"children":6318},{"class":102,"line":227},[6319,6323,6327,6331,6336,6340,6344],{"type":59,"tag":100,"props":6320,"children":6321},{"style":370},[6322],{"type":65,"value":465},{"type":59,"tag":100,"props":6324,"children":6325},{"style":129},[6326],{"type":65,"value":378},{"type":59,"tag":100,"props":6328,"children":6329},{"style":129},[6330],{"type":65,"value":137},{"type":59,"tag":100,"props":6332,"children":6333},{"style":370},[6334],{"type":65,"value":6335}," reconnectAfterInactivityMs",{"type":59,"tag":100,"props":6337,"children":6338},{"style":129},[6339],{"type":65,"value":378},{"type":59,"tag":100,"props":6341,"children":6342},{"style":440},[6343],{"type":65,"value":491},{"type":59,"tag":100,"props":6345,"children":6346},{"style":129},[6347],{"type":65,"value":1802},{"type":59,"tag":100,"props":6349,"children":6350},{"class":102,"line":269},[6351],{"type":59,"tag":100,"props":6352,"children":6353},{"style":129},[6354],{"type":65,"value":512},{"type":59,"tag":100,"props":6356,"children":6357},{"class":102,"line":311},[6358,6362,6366],{"type":59,"tag":100,"props":6359,"children":6360},{"style":129},[6361],{"type":65,"value":521},{"type":59,"tag":100,"props":6363,"children":6364},{"style":123},[6365],{"type":65,"value":526},{"type":59,"tag":100,"props":6367,"children":6368},{"style":129},[6369],{"type":65,"value":173},{"type":59,"tag":75,"props":6371,"children":6372},{},[6373],{"type":65,"value":5249},{"type":59,"tag":88,"props":6375,"children":6377},{"className":90,"code":6376,"language":92,"meta":93,"style":93},"initTRPC.create({\n  sse: {\n    ping: { enabled: true, intervalMs: 2000 },\n    client: { reconnectAfterInactivityMs: 5000 },\n  },\n});\n",[6378],{"type":59,"tag":96,"props":6379,"children":6380},{"__ignoreMap":93},[6381,6404,6419,6466,6497,6504],{"type":59,"tag":100,"props":6382,"children":6383},{"class":102,"line":103},[6384,6388,6392,6396,6400],{"type":59,"tag":100,"props":6385,"children":6386},{"style":123},[6387],{"type":65,"value":6234},{"type":59,"tag":100,"props":6389,"children":6390},{"style":129},[6391],{"type":65,"value":347},{"type":59,"tag":100,"props":6393,"children":6394},{"style":350},[6395],{"type":65,"value":353},{"type":59,"tag":100,"props":6397,"children":6398},{"style":123},[6399],{"type":65,"value":358},{"type":59,"tag":100,"props":6401,"children":6402},{"style":129},[6403],{"type":65,"value":363},{"type":59,"tag":100,"props":6405,"children":6406},{"class":102,"line":113},[6407,6411,6415],{"type":59,"tag":100,"props":6408,"children":6409},{"style":370},[6410],{"type":65,"value":373},{"type":59,"tag":100,"props":6412,"children":6413},{"style":129},[6414],{"type":65,"value":378},{"type":59,"tag":100,"props":6416,"children":6417},{"style":129},[6418],{"type":65,"value":383},{"type":59,"tag":100,"props":6420,"children":6421},{"class":102,"line":176},[6422,6426,6430,6434,6438,6442,6446,6450,6454,6458,6462],{"type":59,"tag":100,"props":6423,"children":6424},{"style":370},[6425],{"type":65,"value":392},{"type":59,"tag":100,"props":6427,"children":6428},{"style":129},[6429],{"type":65,"value":378},{"type":59,"tag":100,"props":6431,"children":6432},{"style":129},[6433],{"type":65,"value":137},{"type":59,"tag":100,"props":6435,"children":6436},{"style":370},[6437],{"type":65,"value":6285},{"type":59,"tag":100,"props":6439,"children":6440},{"style":129},[6441],{"type":65,"value":378},{"type":59,"tag":100,"props":6443,"children":6444},{"style":416},[6445],{"type":65,"value":419},{"type":59,"tag":100,"props":6447,"children":6448},{"style":129},[6449],{"type":65,"value":132},{"type":59,"tag":100,"props":6451,"children":6452},{"style":370},[6453],{"type":65,"value":6302},{"type":59,"tag":100,"props":6455,"children":6456},{"style":129},[6457],{"type":65,"value":378},{"type":59,"tag":100,"props":6459,"children":6460},{"style":440},[6461],{"type":65,"value":443},{"type":59,"tag":100,"props":6463,"children":6464},{"style":129},[6465],{"type":65,"value":1802},{"type":59,"tag":100,"props":6467,"children":6468},{"class":102,"line":227},[6469,6473,6477,6481,6485,6489,6493],{"type":59,"tag":100,"props":6470,"children":6471},{"style":370},[6472],{"type":65,"value":465},{"type":59,"tag":100,"props":6474,"children":6475},{"style":129},[6476],{"type":65,"value":378},{"type":59,"tag":100,"props":6478,"children":6479},{"style":129},[6480],{"type":65,"value":137},{"type":59,"tag":100,"props":6482,"children":6483},{"style":370},[6484],{"type":65,"value":6335},{"type":59,"tag":100,"props":6486,"children":6487},{"style":129},[6488],{"type":65,"value":378},{"type":59,"tag":100,"props":6490,"children":6491},{"style":440},[6492],{"type":65,"value":491},{"type":59,"tag":100,"props":6494,"children":6495},{"style":129},[6496],{"type":65,"value":1802},{"type":59,"tag":100,"props":6498,"children":6499},{"class":102,"line":269},[6500],{"type":59,"tag":100,"props":6501,"children":6502},{"style":129},[6503],{"type":65,"value":512},{"type":59,"tag":100,"props":6505,"children":6506},{"class":102,"line":311},[6507,6511,6515],{"type":59,"tag":100,"props":6508,"children":6509},{"style":129},[6510],{"type":65,"value":521},{"type":59,"tag":100,"props":6512,"children":6513},{"style":123},[6514],{"type":65,"value":526},{"type":59,"tag":100,"props":6516,"children":6517},{"style":129},[6518],{"type":65,"value":173},{"type":59,"tag":75,"props":6520,"children":6521},{},[6522],{"type":65,"value":6523},"If the server ping interval is >= the client reconnect timeout, the client disconnects thinking the connection is dead before receiving a ping.",{"type":59,"tag":75,"props":6525,"children":6526},{},[6527],{"type":65,"value":6528},"Source: packages\u002Fserver\u002Fsrc\u002Funstable-core-do-not-import\u002Fstream\u002Fsse.ts",{"type":59,"tag":81,"props":6530,"children":6532},{"id":6531},"high-sending-custom-headers-with-sse-without-eventsource-polyfill",[6533],{"type":65,"value":6534},"HIGH Sending custom headers with SSE without EventSource polyfill",{"type":59,"tag":75,"props":6536,"children":6537},{},[6538],{"type":65,"value":5039},{"type":59,"tag":88,"props":6540,"children":6542},{"className":90,"code":6541,"language":92,"meta":93,"style":93},"httpSubscriptionLink({\n  url: 'http:\u002F\u002Flocalhost:3000',\n  \u002F\u002F Native EventSource does not support custom headers\n});\n",[6543],{"type":59,"tag":96,"props":6544,"children":6545},{"__ignoreMap":93},[6546,6562,6590,6598],{"type":59,"tag":100,"props":6547,"children":6548},{"class":102,"line":103},[6549,6554,6558],{"type":59,"tag":100,"props":6550,"children":6551},{"style":350},[6552],{"type":65,"value":6553},"httpSubscriptionLink",{"type":59,"tag":100,"props":6555,"children":6556},{"style":123},[6557],{"type":65,"value":358},{"type":59,"tag":100,"props":6559,"children":6560},{"style":129},[6561],{"type":65,"value":363},{"type":59,"tag":100,"props":6563,"children":6564},{"class":102,"line":113},[6565,6570,6574,6578,6582,6586],{"type":59,"tag":100,"props":6566,"children":6567},{"style":370},[6568],{"type":65,"value":6569},"  url",{"type":59,"tag":100,"props":6571,"children":6572},{"style":129},[6573],{"type":65,"value":378},{"type":59,"tag":100,"props":6575,"children":6576},{"style":129},[6577],{"type":65,"value":157},{"type":59,"tag":100,"props":6579,"children":6580},{"style":160},[6581],{"type":65,"value":1610},{"type":59,"tag":100,"props":6583,"children":6584},{"style":129},[6585],{"type":65,"value":168},{"type":59,"tag":100,"props":6587,"children":6588},{"style":129},[6589],{"type":65,"value":424},{"type":59,"tag":100,"props":6591,"children":6592},{"class":102,"line":176},[6593],{"type":59,"tag":100,"props":6594,"children":6595},{"style":107},[6596],{"type":65,"value":6597},"  \u002F\u002F Native EventSource does not support custom headers\n",{"type":59,"tag":100,"props":6599,"children":6600},{"class":102,"line":227},[6601,6605,6609],{"type":59,"tag":100,"props":6602,"children":6603},{"style":129},[6604],{"type":65,"value":521},{"type":59,"tag":100,"props":6606,"children":6607},{"style":123},[6608],{"type":65,"value":526},{"type":59,"tag":100,"props":6610,"children":6611},{"style":129},[6612],{"type":65,"value":173},{"type":59,"tag":75,"props":6614,"children":6615},{},[6616],{"type":65,"value":5249},{"type":59,"tag":88,"props":6618,"children":6620},{"className":90,"code":6619,"language":92,"meta":93,"style":93},"import { EventSourcePolyfill } from 'event-source-polyfill';\n\nhttpSubscriptionLink({\n  url: 'http:\u002F\u002Flocalhost:3000',\n  EventSource: EventSourcePolyfill,\n  eventSourceOptions: async () => ({\n    headers: { authorization: 'Bearer token' },\n  }),\n});\n",[6621],{"type":59,"tag":96,"props":6622,"children":6623},{"__ignoreMap":93},[6624,6665,6672,6687,6714,6734,6767,6809,6824],{"type":59,"tag":100,"props":6625,"children":6626},{"class":102,"line":103},[6627,6631,6635,6640,6644,6648,6652,6657,6661],{"type":59,"tag":100,"props":6628,"children":6629},{"style":117},[6630],{"type":65,"value":120},{"type":59,"tag":100,"props":6632,"children":6633},{"style":129},[6634],{"type":65,"value":137},{"type":59,"tag":100,"props":6636,"children":6637},{"style":123},[6638],{"type":65,"value":6639}," EventSourcePolyfill",{"type":59,"tag":100,"props":6641,"children":6642},{"style":129},[6643],{"type":65,"value":147},{"type":59,"tag":100,"props":6645,"children":6646},{"style":117},[6647],{"type":65,"value":152},{"type":59,"tag":100,"props":6649,"children":6650},{"style":129},[6651],{"type":65,"value":157},{"type":59,"tag":100,"props":6653,"children":6654},{"style":160},[6655],{"type":65,"value":6656},"event-source-polyfill",{"type":59,"tag":100,"props":6658,"children":6659},{"style":129},[6660],{"type":65,"value":168},{"type":59,"tag":100,"props":6662,"children":6663},{"style":129},[6664],{"type":65,"value":173},{"type":59,"tag":100,"props":6666,"children":6667},{"class":102,"line":113},[6668],{"type":59,"tag":100,"props":6669,"children":6670},{"emptyLinePlaceholder":315},[6671],{"type":65,"value":318},{"type":59,"tag":100,"props":6673,"children":6674},{"class":102,"line":176},[6675,6679,6683],{"type":59,"tag":100,"props":6676,"children":6677},{"style":350},[6678],{"type":65,"value":6553},{"type":59,"tag":100,"props":6680,"children":6681},{"style":123},[6682],{"type":65,"value":358},{"type":59,"tag":100,"props":6684,"children":6685},{"style":129},[6686],{"type":65,"value":363},{"type":59,"tag":100,"props":6688,"children":6689},{"class":102,"line":227},[6690,6694,6698,6702,6706,6710],{"type":59,"tag":100,"props":6691,"children":6692},{"style":370},[6693],{"type":65,"value":6569},{"type":59,"tag":100,"props":6695,"children":6696},{"style":129},[6697],{"type":65,"value":378},{"type":59,"tag":100,"props":6699,"children":6700},{"style":129},[6701],{"type":65,"value":157},{"type":59,"tag":100,"props":6703,"children":6704},{"style":160},[6705],{"type":65,"value":1610},{"type":59,"tag":100,"props":6707,"children":6708},{"style":129},[6709],{"type":65,"value":168},{"type":59,"tag":100,"props":6711,"children":6712},{"style":129},[6713],{"type":65,"value":424},{"type":59,"tag":100,"props":6715,"children":6716},{"class":102,"line":269},[6717,6722,6726,6730],{"type":59,"tag":100,"props":6718,"children":6719},{"style":370},[6720],{"type":65,"value":6721},"  EventSource",{"type":59,"tag":100,"props":6723,"children":6724},{"style":129},[6725],{"type":65,"value":378},{"type":59,"tag":100,"props":6727,"children":6728},{"style":123},[6729],{"type":65,"value":6639},{"type":59,"tag":100,"props":6731,"children":6732},{"style":129},[6733],{"type":65,"value":424},{"type":59,"tag":100,"props":6735,"children":6736},{"class":102,"line":311},[6737,6742,6746,6751,6755,6759,6763],{"type":59,"tag":100,"props":6738,"children":6739},{"style":350},[6740],{"type":65,"value":6741},"  eventSourceOptions",{"type":59,"tag":100,"props":6743,"children":6744},{"style":129},[6745],{"type":65,"value":378},{"type":59,"tag":100,"props":6747,"children":6748},{"style":325},[6749],{"type":65,"value":6750}," async",{"type":59,"tag":100,"props":6752,"children":6753},{"style":129},[6754],{"type":65,"value":4075},{"type":59,"tag":100,"props":6756,"children":6757},{"style":325},[6758],{"type":65,"value":1532},{"type":59,"tag":100,"props":6760,"children":6761},{"style":123},[6762],{"type":65,"value":843},{"type":59,"tag":100,"props":6764,"children":6765},{"style":129},[6766],{"type":65,"value":363},{"type":59,"tag":100,"props":6768,"children":6769},{"class":102,"line":321},[6770,6775,6779,6783,6788,6792,6796,6801,6805],{"type":59,"tag":100,"props":6771,"children":6772},{"style":370},[6773],{"type":65,"value":6774},"    headers",{"type":59,"tag":100,"props":6776,"children":6777},{"style":129},[6778],{"type":65,"value":378},{"type":59,"tag":100,"props":6780,"children":6781},{"style":129},[6782],{"type":65,"value":137},{"type":59,"tag":100,"props":6784,"children":6785},{"style":370},[6786],{"type":65,"value":6787}," authorization",{"type":59,"tag":100,"props":6789,"children":6790},{"style":129},[6791],{"type":65,"value":378},{"type":59,"tag":100,"props":6793,"children":6794},{"style":129},[6795],{"type":65,"value":157},{"type":59,"tag":100,"props":6797,"children":6798},{"style":160},[6799],{"type":65,"value":6800},"Bearer token",{"type":59,"tag":100,"props":6802,"children":6803},{"style":129},[6804],{"type":65,"value":168},{"type":59,"tag":100,"props":6806,"children":6807},{"style":129},[6808],{"type":65,"value":1802},{"type":59,"tag":100,"props":6810,"children":6811},{"class":102,"line":366},[6812,6816,6820],{"type":59,"tag":100,"props":6813,"children":6814},{"style":129},[6815],{"type":65,"value":4978},{"type":59,"tag":100,"props":6817,"children":6818},{"style":123},[6819],{"type":65,"value":526},{"type":59,"tag":100,"props":6821,"children":6822},{"style":129},[6823],{"type":65,"value":424},{"type":59,"tag":100,"props":6825,"children":6826},{"class":102,"line":386},[6827,6831,6835],{"type":59,"tag":100,"props":6828,"children":6829},{"style":129},[6830],{"type":65,"value":521},{"type":59,"tag":100,"props":6832,"children":6833},{"style":123},[6834],{"type":65,"value":526},{"type":59,"tag":100,"props":6836,"children":6837},{"style":129},[6838],{"type":65,"value":173},{"type":59,"tag":75,"props":6840,"children":6841},{},[6842,6844,6850,6852,6857],{"type":65,"value":6843},"The native EventSource API does not support custom headers. Use an EventSource polyfill and pass it via the ",{"type":59,"tag":96,"props":6845,"children":6847},{"className":6846},[],[6848],{"type":65,"value":6849},"EventSource",{"type":65,"value":6851}," option on ",{"type":59,"tag":96,"props":6853,"children":6855},{"className":6854},[],[6856],{"type":65,"value":6553},{"type":65,"value":347},{"type":59,"tag":75,"props":6859,"children":6860},{},[6861],{"type":65,"value":6862},"Source: www\u002Fdocs\u002Fclient\u002Flinks\u002FhttpSubscriptionLink.md",{"type":59,"tag":81,"props":6864,"children":6866},{"id":6865},"medium-choosing-websocket-when-sse-would-suffice",[6867],{"type":65,"value":6868},"MEDIUM Choosing WebSocket when SSE would suffice",{"type":59,"tag":75,"props":6870,"children":6871},{},[6872,6874,6879,6881,6886],{"type":65,"value":6873},"SSE (",{"type":59,"tag":96,"props":6875,"children":6877},{"className":6876},[],[6878],{"type":65,"value":6553},{"type":65,"value":6880},") is recommended for most subscription use cases. WebSockets add complexity (connection management, reconnection, keepalive, separate server process). Only use ",{"type":59,"tag":96,"props":6882,"children":6884},{"className":6883},[],[6885],{"type":65,"value":2760},{"type":65,"value":6887}," when bidirectional communication or WebSocket-specific features are required.",{"type":59,"tag":75,"props":6889,"children":6890},{},[6891],{"type":65,"value":6892},"Source: maintainer interview",{"type":59,"tag":81,"props":6894,"children":6896},{"id":6895},"medium-websocket-subscription-stale-inputs-on-reconnect",[6897],{"type":65,"value":6898},"MEDIUM WebSocket subscription stale inputs on reconnect",{"type":59,"tag":75,"props":6900,"children":6901},{},[6902,6904,6909,6911,6916],{"type":65,"value":6903},"When a WebSocket reconnects, subscriptions re-send the original input parameters. There is no hook to re-evaluate inputs on reconnect, which can cause stale data. Consider using ",{"type":59,"tag":96,"props":6905,"children":6907},{"className":6906},[],[6908],{"type":65,"value":5585},{"type":65,"value":6910}," with ",{"type":59,"tag":96,"props":6912,"children":6914},{"className":6913},[],[6915],{"type":65,"value":2560},{"type":65,"value":6917}," to mitigate this.",{"type":59,"tag":75,"props":6919,"children":6920},{},[6921,6923],{"type":65,"value":6922},"Source: ",{"type":59,"tag":6924,"props":6925,"children":6929},"a",{"href":6926,"rel":6927},"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F4122",[6928],"nofollow",[6930],{"type":65,"value":6926},{"type":59,"tag":68,"props":6932,"children":6934},{"id":6933},"see-also",[6935],{"type":65,"value":6936},"See Also",{"type":59,"tag":6938,"props":6939,"children":6940},"ul",{},[6941,6978,6988,7004],{"type":59,"tag":6942,"props":6943,"children":6944},"li",{},[6945,6950,6952,6958,6960,6965,6966,6971,6972],{"type":59,"tag":6946,"props":6947,"children":6948},"strong",{},[6949],{"type":65,"value":46},{"type":65,"value":6951}," -- ",{"type":59,"tag":96,"props":6953,"children":6955},{"className":6954},[],[6956],{"type":65,"value":6957},"splitLink",{"type":65,"value":6959},", ",{"type":59,"tag":96,"props":6961,"children":6963},{"className":6962},[],[6964],{"type":65,"value":6553},{"type":65,"value":6959},{"type":59,"tag":96,"props":6967,"children":6969},{"className":6968},[],[6970],{"type":65,"value":2760},{"type":65,"value":6959},{"type":59,"tag":96,"props":6973,"children":6975},{"className":6974},[],[6976],{"type":65,"value":6977},"httpBatchLink",{"type":59,"tag":6942,"props":6979,"children":6980},{},[6981,6986],{"type":59,"tag":6946,"props":6982,"children":6983},{},[6984],{"type":65,"value":6985},"auth",{"type":65,"value":6987}," -- authenticating subscription connections (connectionParams, cookies, EventSource polyfill headers)",{"type":59,"tag":6942,"props":6989,"children":6990},{},[6991,6995,6996,7002],{"type":59,"tag":6946,"props":6992,"children":6993},{},[6994],{"type":65,"value":45},{"type":65,"value":6951},{"type":59,"tag":96,"props":6997,"children":6999},{"className":6998},[],[7000],{"type":65,"value":7001},"initTRPC.create()",{"type":65,"value":7003}," SSE configuration options",{"type":59,"tag":6942,"props":7005,"children":7006},{},[7007,7012,7014,7020,7022],{"type":59,"tag":6946,"props":7008,"children":7009},{},[7010],{"type":65,"value":7011},"adapter-fastify",{"type":65,"value":7013}," -- WebSocket subscriptions via ",{"type":59,"tag":96,"props":7015,"children":7017},{"className":7016},[],[7018],{"type":65,"value":7019},"@fastify\u002Fwebsocket",{"type":65,"value":7021}," and ",{"type":59,"tag":96,"props":7023,"children":7025},{"className":7024},[],[7026],{"type":65,"value":7027},"useWSS",{"type":59,"tag":7029,"props":7030,"children":7031},"style",{},[7032],{"type":65,"value":7033},"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":7035,"total":710},[7036,7051,7064,7076,7096,7109,7122,7136,7148,7162,7171,7183],{"slug":7037,"name":7037,"fn":7038,"description":7039,"org":7040,"tags":7041,"stars":23,"repoUrl":24,"updatedAt":7050},"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},[7042,7045,7048,7049],{"name":7043,"slug":7044,"type":15},"API Development","api-development",{"name":7046,"slug":7047,"type":15},"AWS","aws",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:05.451869",{"slug":7052,"name":7052,"fn":7053,"description":7054,"org":7055,"tags":7056,"stars":23,"repoUrl":24,"updatedAt":7063},"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},[7057,7058,7059,7062],{"name":7043,"slug":7044,"type":15},{"name":13,"slug":14,"type":15},{"name":7060,"slug":7061,"type":15},"Express","express",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.274248",{"slug":7011,"name":7011,"fn":7065,"description":7066,"org":7067,"tags":7068,"stars":23,"repoUrl":24,"updatedAt":7075},"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},[7069,7070,7071,7074],{"name":7043,"slug":7044,"type":15},{"name":13,"slug":14,"type":15},{"name":7072,"slug":7073,"type":15},"Fastify","fastify",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.746621",{"slug":7077,"name":7077,"fn":7078,"description":7079,"org":7080,"tags":7081,"stars":23,"repoUrl":24,"updatedAt":7095},"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},[7082,7085,7088,7091,7092],{"name":7083,"slug":7084,"type":15},"Cloudflare","cloudflare",{"name":7086,"slug":7087,"type":15},"Deployment","deployment",{"name":7089,"slug":7090,"type":15},"Edge","edge",{"name":9,"slug":8,"type":15},{"name":7093,"slug":7094,"type":15},"Vercel","vercel","2026-07-18T05:46:50.548228",{"slug":7097,"name":7097,"fn":7098,"description":7099,"org":7100,"tags":7101,"stars":23,"repoUrl":24,"updatedAt":7108},"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},[7102,7103,7104,7107],{"name":7043,"slug":7044,"type":15},{"name":13,"slug":14,"type":15},{"name":7105,"slug":7106,"type":15},"Node.js","node-js",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:58.093869",{"slug":6985,"name":6985,"fn":7110,"description":7111,"org":7112,"tags":7113,"stars":23,"repoUrl":24,"updatedAt":7121},"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},[7114,7116,7119,7120],{"name":7115,"slug":6985,"type":15},"Auth",{"name":7117,"slug":7118,"type":15},"Authentication","authentication",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.347628",{"slug":7123,"name":7123,"fn":7124,"description":7125,"org":7126,"tags":7127,"stars":23,"repoUrl":24,"updatedAt":7135},"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},[7128,7129,7131,7134],{"name":13,"slug":14,"type":15},{"name":7130,"slug":7123,"type":15},"Caching",{"name":7132,"slug":7133,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.86443",{"slug":7137,"name":7137,"fn":7138,"description":7139,"org":7140,"tags":7141,"stars":23,"repoUrl":24,"updatedAt":7147},"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},[7142,7143,7146],{"name":7043,"slug":7044,"type":15},{"name":7144,"slug":7145,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},"2026-07-18T05:48:11.437946",{"slug":7149,"name":7149,"fn":7150,"description":7151,"org":7152,"tags":7153,"stars":23,"repoUrl":24,"updatedAt":7161},"error-handling","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},[7154,7155,7158,7159],{"name":13,"slug":14,"type":15},{"name":7156,"slug":7157,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":7160,"slug":34,"type":15},"TypeScript","2026-07-18T05:46:52.798151",{"slug":46,"name":46,"fn":7163,"description":7164,"org":7165,"tags":7166,"stars":23,"repoUrl":24,"updatedAt":7170},"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},[7167,7168,7169],{"name":7043,"slug":7044,"type":15},{"name":7144,"slug":7145,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:06.847309",{"slug":7172,"name":7172,"fn":7173,"description":7174,"org":7175,"tags":7176,"stars":23,"repoUrl":24,"updatedAt":7182},"middlewares","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},[7177,7178,7181],{"name":13,"slug":14,"type":15},{"name":7179,"slug":7180,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:49.132255",{"slug":7184,"name":7184,"fn":7185,"description":7186,"org":7187,"tags":7188,"stars":23,"repoUrl":24,"updatedAt":7196},"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},[7189,7190,7191,7194,7195],{"name":13,"slug":14,"type":15},{"name":7144,"slug":7145,"type":15},{"name":7192,"slug":7193,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":7160,"slug":34,"type":15},"2026-07-18T05:47:10.468453",{"items":7198,"total":710},[7199,7206,7213,7220,7228,7235,7242],{"slug":7037,"name":7037,"fn":7038,"description":7039,"org":7200,"tags":7201,"stars":23,"repoUrl":24,"updatedAt":7050},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7202,7203,7204,7205],{"name":7043,"slug":7044,"type":15},{"name":7046,"slug":7047,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":7052,"name":7052,"fn":7053,"description":7054,"org":7207,"tags":7208,"stars":23,"repoUrl":24,"updatedAt":7063},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7209,7210,7211,7212],{"name":7043,"slug":7044,"type":15},{"name":13,"slug":14,"type":15},{"name":7060,"slug":7061,"type":15},{"name":9,"slug":8,"type":15},{"slug":7011,"name":7011,"fn":7065,"description":7066,"org":7214,"tags":7215,"stars":23,"repoUrl":24,"updatedAt":7075},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7216,7217,7218,7219],{"name":7043,"slug":7044,"type":15},{"name":13,"slug":14,"type":15},{"name":7072,"slug":7073,"type":15},{"name":9,"slug":8,"type":15},{"slug":7077,"name":7077,"fn":7078,"description":7079,"org":7221,"tags":7222,"stars":23,"repoUrl":24,"updatedAt":7095},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7223,7224,7225,7226,7227],{"name":7083,"slug":7084,"type":15},{"name":7086,"slug":7087,"type":15},{"name":7089,"slug":7090,"type":15},{"name":9,"slug":8,"type":15},{"name":7093,"slug":7094,"type":15},{"slug":7097,"name":7097,"fn":7098,"description":7099,"org":7229,"tags":7230,"stars":23,"repoUrl":24,"updatedAt":7108},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7231,7232,7233,7234],{"name":7043,"slug":7044,"type":15},{"name":13,"slug":14,"type":15},{"name":7105,"slug":7106,"type":15},{"name":9,"slug":8,"type":15},{"slug":6985,"name":6985,"fn":7110,"description":7111,"org":7236,"tags":7237,"stars":23,"repoUrl":24,"updatedAt":7121},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7238,7239,7240,7241],{"name":7115,"slug":6985,"type":15},{"name":7117,"slug":7118,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":7123,"name":7123,"fn":7124,"description":7125,"org":7243,"tags":7244,"stars":23,"repoUrl":24,"updatedAt":7135},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7245,7246,7247,7248],{"name":13,"slug":14,"type":15},{"name":7130,"slug":7123,"type":15},{"name":7132,"slug":7133,"type":15},{"name":9,"slug":8,"type":15}]