t
tRPC
t
tRPC
Union ctx?
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
A
Alex / KATT 🐱
•
4/5/23, 4:19 PM
might work with
as const
as const
at the end
A
Alex / KATT 🐱
•
4/5/23, 4:19 PM
next({ctx: { ...} as const})
next({ctx: { ...} as const})
A
Alex / KATT 🐱
•
4/5/23, 4:24 PM
works if you define the ctx first and only call
next()
next()
once
:
https://stackblitz.com/edit/trpc-trpc-pfejir?file=src%2Fpages%2Fapi%2Ftrpc%2F[trpc].ts
StackBlitz
Trpc Next Minimal Starter Example (forked) - StackBlitz
Run official live example code for Trpc Next Minimal Starter
, created by Trpc on StackBlitz
as const
as const
next({ctx: { ...} as const})
next({ctx: { ...} as const})
next()
next()