Incorrect type errors

No idea if this is a trpc issue, but i'm having a bit of a nightmare with type errors. Nothing is showing up in vscode, but when I run eslint I'm getting a bunch of errors that shouldn't be showing. Has anyone seen anything like this before?
N
Nick367d ago
That’s typescript errors, most likely if VS Code isn’t also complaining you’ve got some project setup issue, like with tsconfig CLI is using a different setup from VS Code It’s probably right too, are you sure that User type has an ID on it?
M
magicspon367d ago
yup, id is definitely there
N
Nick367d ago
That’s an intersection type, and the TS error is complaining about the other side of the intersection Are you sure the code being blamed is actually using the full intersection type?
M
magicspon367d ago
i believe so... the weird thing is i have another project with exact same setup, with a bunch of the same files, but no complaints from running eslint/type checker
M
magicspon367d ago
i'm using a mono repo, each "package" extends from a single eslint config, and the tsconfig extends from a single tsconfig (at the root of the repo) using ts v 5.0.4,
M
magicspon367d ago
so very spoooky!
M
magicspon367d ago
progress... something to do with next-auth.d.ts https://next-auth.js.org/getting-started/typescript#module-augmentation
TypeScript | NextAuth.js
NextAuth.js has its own type definitions to use in your TypeScript projects safely. Even if you don't use TypeScript, IDEs like VSCode will pick this up to provide you with a better developer experience. While you are typing, you will get suggestions about what certain objects/functions look like, and sometimes links to documentation, examples, ...
M
magicspon367d ago
thanks for your responses
N
Nick367d ago
Paging @ixahmedxi as crazy config issues get slightly out of my own wheel house
M
magicspon367d ago
this is what i changed
M
magicspon367d ago
for some reason the next-auth module augmentation wasn't working as expected (https://next-auth.js.org/getting-started/typescript#module-augmentation)
TypeScript | NextAuth.js
NextAuth.js has its own type definitions to use in your TypeScript projects safely. Even if you don't use TypeScript, IDEs like VSCode will pick this up to provide you with a better developer experience. While you are typing, you will get suggestions about what certain objects/functions look like, and sometimes links to documentation, examples, ...
M
magicspon367d ago
BAAAAAAM!
AE
Ahmed Elsakaan367d ago
why do you need to declare your own session type?
AE
Ahmed Elsakaan367d ago
GitHub
create-t3-turbo/auth-options.ts at main · t3-oss/create-t3-turbo
Clean and simple starter repo using the T3 Stack along with Expo React Native - create-t3-turbo/auth-options.ts at main · t3-oss/create-t3-turbo
M
magicspon366d ago
because i'm adding extra stuff to it
More Posts
test post 2hello againquery debounceHey there ! I wonder if anyone could point me to a standard recipe to achieve query debouncing and Type of createServerSideHelpers?I'm currently trying to implement a helper for `getServerSideProps` to reduce duplication. It's stilhow to set request timeout in clientcreateProxyClient has no option about timeout like axios does. Just in one router request (query or trpc rate limitinghi I am currently having some problems with a race condition in my TRPC nextJS api. Essentially whtrpc pipe middlewareHey all. I'm currently trying to create a middle ware on endpoints using the new `pipe` API. This Has anyone ever used tRPC (with SSR) and i18n?No matter the lib (next-intl, next-i18n, next-translate), I simply stumble from one problem to anothNew to tRPC and Need Help with BasicsI made a new T3 app, but I don't quite understand how tRPC works, and I would love to get some help web socket keeps on disconnecting and connectingHi! Its my first time using web sockets. The first code snippet is my socket code. The second code sPagination QueryHi, I'm new for web dev and I'm moved to tRPC not so long I'm looking for example of pagination quEnrich the response object for TRPC endpointCurrently when I hit a trpc endpoint I get something like: ```typescript { result: { data:Can i fetch tRPC in different project@coco- : I Make a tRPC in my project. Can I use the enpoint api in different project ?Importing AppRouter types from an external repoI've got a production T3 app already in production. I've created a fresh expo app to start building TypeScript type for request object for route handlersSo far I've been writing my routes like: ```typescript export const router = t.router({ helloWorlTyped wrappers for proceduresI have a TRPC client with working queries and mutations. I wanted to create wrapper functions for alAre TRPC server procedures actual endpoints? Meaning can you directly do a `post` request to them?Lets say you have a public procedure called `getHelloWorld`, can you hit it by doing `localhost:3000TRPCClientError - No "query"-procedure on path "user.all"Im using react native expo, prisma, trpc and the postgres database is on railway I have run the follAm I the only one struggling with pnpm + TypeScript monorepo + trpc?Hello all, When using pnpm in a TypeScript monorepo without `node-linker`, I hit those errors: ```tRPC standalone server in monorepoHi, I'm using t3-stack monorepo as my base and I've swapped out NextJS backend for standalone HTTP Codemod to v10 is not modifying any fileHello 👋, I must be super dumb but running `pnpm dlx trpc-v10-migrate-codemod ` in my project isn't