No typings for plugin options
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