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?
![](https://utfs.io/f/662ab52e-8927-405c-9242-48cf970fabe9-1nq2cb.png)
![](https://utfs.io/f/329f0b31-7efa-4b3b-9c9f-10e728abc437-1nq2cb.png)
![](https://utfs.io/f/e83937d0-0115-45fb-abfa-5efdb534c262-1nq2cb.png)
15 Replies
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?
yup, id is definitely there
![](https://utfs.io/f/49b42a2e-d309-45ad-9fb3-d0349307d641-h4aba.19.04.png)
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?
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
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,
![](https://utfs.io/f/9d424f32-a68a-46d1-bc56-4857c81941f5-1nq2cb.png)
so very spoooky!
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, ...
thanks for your responses
Paging @ixahmedxi as crazy config issues get slightly out of my own wheel house
this is what i changed
![](https://utfs.io/f/13e2b857-9355-4b28-b3ed-5bae4ddc123e-1nq2cb.png)
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, ...
BAAAAAAM!
![](https://utfs.io/f/b1968a77-0fab-4367-8bff-72d24588264f-1nq2cb.png)
why do you need to declare your own session type?
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
because i'm adding extra stuff to it
![](https://utfs.io/f/16ccc3c9-f1e5-45d9-a3ad-3379a974adad-1tkh9.png)