Can't use my custom roles

I am beginner in programming, so I am also new to better-auth, so sorry if my question look stupid.

I tried to use custom roles in my Next.js app.

They work as they should. But when I updated Next.js form 15.5.7 to 15.5.9 I get this error for function which is on uploaded photo:
No overload matches this call.
The last overload gave the following error.
Type 'Role' is not assignable to type '"user" | "admin" | ("user" | "admin")[] | undefined'.
Type '"employee"' is not assignable to type '"user" | "admin" | ("user" | "admin")[] | undefined'.


I want to ask is it me and I used custom roles in a bad way or there is a other reason?
image.png
image.png
image.png
Was this page helpful?