typesafe generic wrapping of the supabase client
I'm trying to wrap the generic supabase client class in a typesafe way in my library. It seems the class has three type parameters with constraints, and my goal is to wrap them into a single type which I can pass around my library. I'm having trouble fulfilling the constraints even though I literally copy them into my wrapper type alias from the library.
Here is a minimal example of what I am trying to do (compiler error is highlighted in line 43 near the end): https://codesandbox.io/s/wrapped-generic-w-contraints-bzky59?file=/src/index.ts
Note
Here is a minimal example of what I am trying to do (compiler error is highlighted in line 43 near the end): https://codesandbox.io/s/wrapped-generic-w-contraints-bzky59?file=/src/index.ts
Note
- I had to copy some types from the supabase codebase since they are not exported; am I missing something or should the supabase team consider exporting these for the sake of library developers?

