editor.js/src/components/modules/api/notifier.ts
George Berezhnoy b223d63c59
Revert "Release: 2.19 (#1341)" (#1363)
This reverts commit 78775703c9.
2020-10-13 00:03:00 +03:00

27 lines
703 B
TypeScript

import Module from '../../__module';
import { Notifier } from '../../../../types/api';
import { ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions } from 'codex-notifier';
/**
*
*/
export default class NotifierAPI extends Module {
/**
* Available methods
*/
public get methods(): Notifier {
return {
show: (options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions): void => this.show(options),
};
}
/**
* Show notification
*
* @param {NotifierOptions} options - message option
*/
public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions): void {
return this.Editor.Notifier.show(options);
}
}