Closed adamjkb closed 11 months ago
Well it broke the notation because .ts file behave differently for .js so basically we cannot just let just Prisma infere the types from usage.
I tried to manually type the expected return value of client.$extends
gets back the inside the defineExtension
but to no avail.
Beside this, the repo is typed with the exception of return value of the API method. (They are a simple addition once the client extension's type is working).
Related issue on Prisma's repo: prisma/prisma#20128
Types at the moment aren't the best they could be. This is partly due to prisma latest version that broke types for extensions ~using the client callback~ (they are just broken across board). That said a lot of things can be done to improve type safesty (for example return types)