Skip to content

Wasnt trpc 11 supported? #115

Answered by icflorescu
alanxp asked this question in Q&A
Discussion options

You must be logged in to vote

Some of the types in the examples were indeed deprecated, however this doesn't mean tRPC v11 is not supported.
Please make sure you understand basic concepts before attempting to use the tRPC ecosystem.

I have updated the examples - you can use these instead:

import type { RequestEvent } from '@sveltejs/kit';

export async function createContext(event: RequestEvent) {
  return {
    event // 👈 `event` is now available in your context
  };
}

export type Context = Awaited<ReturnType<typeof createContext>>;

Please note that tRPC v11 is still in beta.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by icflorescu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants