Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting response cookies #21

Open
anton-johansson opened this issue Mar 30, 2023 · 2 comments
Open

Setting response cookies #21

anton-johansson opened this issue Mar 30, 2023 · 2 comments

Comments

@anton-johansson
Copy link

anton-johansson commented Mar 30, 2023

Hey!

I'm messing around with this library, and realized that res from the example shows up as any for me. Any idea why? See below:

image

EDIT: The reason I'm asking is because I'd like to set a response cookie. I'm trying to create a tRPC procedure for logging in, and therefore I need to set a cookie. :)

@BlairCurrey
Copy link
Owner

Hi @anton-johansson, would you be able to paste a code snippet with more context, including how you are importing CreateTrpcKoaContextOptions? CreateTrpcKoaContextOptions was added in trpc-koa-adapter version 1.1.2. I tested against this locally and it is typed as expected when doing import { CreateTrpcKoaContextOptions } from 'trpc-koa-adapter';

@brncsk
Copy link

brncsk commented Aug 30, 2023

This depends on your version of @types/node as ServerResponse is not generic in @types/node@^16 . Installing @^18 solves the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants