vue-izitoast
vue-izitoast copied to clipboard
Make title and option fields optional for $toast
Is your feature request related to a problem? Please describe.
When using this plugin with typescript, I am unable to show the toasts because of Expected 3 arguments, but got 1 error. The 3 required parameters
- message
- title
- options
Describe the solution you'd like Most of the time 2nd and 3rd parameter are not used, rather configured during the installation
Describe alternatives you've considered Your typing structure should look this below
import 'vue-izitoast';
import { VueIzitoastOptions } from 'vue-izitoast';
import { PluginFunction } from 'vue';
export class VueIzitoast {
constructor(options?: VueIzitoastOptions);
static install(): PluginFunction<any>;
static init(Vue: Vue): void;
public show(message: string, title?: string, options?: VueIzitoastOptions): void;
public hide(toast: string | HTMLDivElement | null, options?: VueIzitoastOptions): void;
public progress(toast: string | HTMLDivElement | null, options?: VueIzitoastOptions, callback?: () => void): void;
public destroy(): void;
public info(message: string, title?: string, options?: VueIzitoastOptions): void;
public success(message: string, title?: string, options?: VueIzitoastOptions): void;
public warning(message: string, title?: string, options?: VueIzitoastOptions): void;
public error(message: string, title?: string, options?: VueIzitoastOptions): void;
public question(message: string, title?: string, options?: VueIzitoastOptions): void;
public on<CB>(eventName: string, callback: CB): void;
public off<CB>(eventName: string, callback: CB): void;
}
Additional context

@arthurvasconcelos any updates??
project dead
@usb248 can you help me in using module augmentation to fix this issue on my development environment?