ToastService .d.ts updated

pull/3711/head
Tuğçe Küçükoğlu 2023-03-07 11:00:59 +03:00
parent 00bd61d58d
commit fd4fef7679
2 changed files with 17 additions and 4 deletions

View File

@ -1,24 +1,37 @@
/**
*
* [Live Demo](https://www.primevue.org/toast/)
*
* @module toastservice
*
*/
import { Plugin } from 'vue'; import { Plugin } from 'vue';
import { ToastMessageOptions } from '../toast'; import { ToastMessageOptions } from '../toast';
declare const plugin: Plugin; declare const plugin: Plugin;
export default plugin; export default plugin;
/**
* Toast Service methods.
*
* @group Interfaces
*
*/
export interface ToastServiceMethods { export interface ToastServiceMethods {
/** /**
* Displays the message in a suitable Toast component. * Displays the message in a suitable Toast component.
* @param {ToastMessageOptions} message - Message instance. * @param {ToastMessageOptions} message - Message instance.
*/ */
add: (message: ToastMessageOptions) => void; add(message: ToastMessageOptions): void;
/** /**
* Clears the messages that belongs to the group. * Clears the messages that belongs to the group.
* @param {string} group - Name of the message group. * @param {string} group - Name of the message group.
*/ */
removeGroup: (group: string) => void; removeGroup(group: string): void;
/** /**
* Clears all the messages. * Clears all the messages.
*/ */
removeAllGroups: () => void; removeAllGroups(): void;
} }
declare module 'vue/types/vue' { declare module 'vue/types/vue' {

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Toast Component" header="Toast" description="Toast is used to display messages in an overlay." :componentDocs="docs" :apiDocs="['Toast']" /> <DocComponent title="Vue Toast Component" header="Toast" description="Toast is used to display messages in an overlay." :componentDocs="docs" :apiDocs="['Toast', 'ToastService']" />
</template> </template>
<script> <script>