arthurvasconcelos / vue-izitoast

Elegant, responsive, flexible and lightweight notification plugin implemented for Vue 2 of iziToast

Home Page:https://arthurvasconcelos.com.br/vue-izitoast

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue.use(VueIzitoast, iziOptions) - No overloads matches this call

newhang opened this issue · comments

In typescript, I get this error.

No overload matches this call.
Overload 1 of 2, '(plugin: PluginObject | PluginFunction, options?: unknown): VueConstructor', gave the following error.
Argument of type 'typeof import("/Users/fernando/Documents/Elantana/Clientes/AV-Drop/SourceCodes/saas_ts/node_modules/vue-izitoast/src/types/index")' is not assignable to parameter of type 'PluginObject | PluginFunction'.
Property 'install' is missing in type 'typeof import("/Users/fernando/Documents/Elantana/Clientes/AV-Drop/SourceCodes/saas_ts/node_modules/vue-izitoast/src/types/index")' but required in type 'PluginObject'.
Overload 2 of 2, '(plugin: PluginObject | PluginFunction, ...options: any[]): VueConstructor', gave the following error.
Argument of type 'typeof import("/Users/fernando/Documents/Elantana/Clientes/AV-Drop/SourceCodes/saas_ts/node_modules/vue-izitoast/src/types/index")' is not assignable to parameter of type 'PluginObject | PluginFunction'.
Property 'install' is missing in type 'typeof import("/Users/fernando/Documents/Elantana/Clientes/AV-Drop/SourceCodes/saas_ts/node_modules/vue-izitoast/src/types/index")' but required in type 'PluginObject'.ts(2769)

How did you solved it?

So simple:
export const install: PluginFunction<{}>;

at the end of file index.d.ts