Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make title and option fields optional for $toast #55

Open
tbhaxor opened this issue Oct 28, 2020 · 3 comments
Open

Make title and option fields optional for $toast #55

tbhaxor opened this issue Oct 28, 2020 · 3 comments

Comments

@tbhaxor
Copy link

tbhaxor commented Oct 28, 2020

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

  1. message
  2. title
  3. 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

image

@tbhaxor
Copy link
Author

tbhaxor commented Nov 10, 2020

@arthurvasconcelos any updates??

@usb248
Copy link

usb248 commented Nov 10, 2020

project dead

@tbhaxor
Copy link
Author

tbhaxor commented Nov 11, 2020

@usb248 can you help me in using module augmentation to fix this issue on my development environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants