From 7832b3ac0bc89a15e29e409c55a15b47e1098eca Mon Sep 17 00:00:00 2001 From: mertsincan Date: Thu, 2 Dec 2021 00:02:48 +0300 Subject: [PATCH] Fixed #1836 - For ToastService --- src/components/toastservice/ToastService.d.ts | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/toastservice/ToastService.d.ts b/src/components/toastservice/ToastService.d.ts index 1efd6e838..5b2aa17f3 100755 --- a/src/components/toastservice/ToastService.d.ts +++ b/src/components/toastservice/ToastService.d.ts @@ -1,12 +1,24 @@ -import Vue, { Plugin } from 'vue'; +import { Plugin } from 'vue'; +import { ToastMessageOptions } from '../toast'; declare const plugin: Plugin; export default plugin; -interface ToastServiceMethods { - add(message: any): any; - removeGroup(group: any): void; - removeAllGroups(): void; +export interface ToastServiceMethods { + /** + * Displays the message in a suitable Toast component. + * @param {ToastMessageOptions} message - Message instance. + */ + add: (message: ToastMessageOptions) => void; + /** + * Clears the messages that belongs to the group. + * @param {string} group - Name of the message group. + */ + removeGroup: (group: string) => void; + /** + * Clears all the messages. + */ + removeAllGroups: () => void; } declare module 'vue/types/vue' {