TypeScript Error: Extended Core Schema’s isAdmin Not Recognized on User

I’ve extended my Core schema to add an isAdmin: boolean flag to the User type and included the same “mac and resolve” middleware in my app to enforce admin checks. The application runs perfectly and correctly verifies a user’s admin status at runtime, but TypeScript still complains that user.isAdmin does not exist on type User. Has anyone encountered this before? What am I missing in my type declarations or module augmentation to get TypeScript to recognize the new isAdmin property? Any help would be greatly appreciated—thanks!
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?