Need help with type issues on InferInsertModel and InferSelectModel
In the screenshot I have attached my
user
schema and I'm creating types for them using the InferInsertModel
and InferSelectModel
.
But however when I hover the type variables CreateUser
and User
I'm getting generic types instead of user schema type as you see in the second screenshot.
Am I doing anything wrong here?3 Replies
can you try
typeof user.$inferInsert
Also you already a post open for this problem there's no reason to create another oneCan you make sure you using the latest version of TS in your editor then restart the TS language server.