Infer type before initializing betterAuth
I'm trying to create a class that to migrate our system to betterAuth, while keeping the current system in place for the time being.
I know what plugins are going to be enabled, but things like database password, appName and others will be passed in via configuration options
How do I correctly define the type for the authInstance so that I have access to all the plugins?
For example:
Solution:Jump to solution
I think I got it. Here's the diff of the changes I did
```diff
--- oldAuthClass.ts 2025-05-07 18:11:43
+++ authClass.ts 2025-05-07 18:12:53
@@ -1,5 +1,5 @@...
1 Reply
Solution
I think I got it. Here's the diff of the changes I did
The interesting part would be this
Have fun 😉