-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Labels
Description
What problem does this feature solve?
Add typings for Vue 3 Plugin options.
I'm currently writing a Firebase plugin for Vue 3, which requires some configuration (e.g. projectId, appId, etc.). It would be particularly useful to include the plugin options typings when filling up those required properties.
What does the proposed API look like?
Change the current typings of the App interface's use method from:
use(plugin: Plugin_2, ...options: any[]): this
to:
use<P extends Plugin_2>(plugin: P, options: Parameters<P extends PluginInstallFunction ? P : P['install']>[1]): this
use(plugin: Plugin_2): this
Shinigami92, Tahul and PixsaOJ