Installation
npm install --save @types/toastify-js
Summary
This package contains type definitions for toastify-js (https://github.com/apvarun/toastify-js#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/toastify-js.
declare namespace Toastify {
function reposition(): void;
interface Offset {
x: number | string;
y: number | string;
}
interface Options {
text?: string | undefined;
node?: Node | undefined;
duration?: number | undefined;
selector?: string | Node | undefined;
destination?: string | undefined;
newWindow?: boolean | undefined;
close?: boolean | undefined;
gravity?: 'top' | 'bottom' | undefined;
position?: 'left' | 'center' | 'right' | undefined;
backgroundColor?: string | undefined;
avatar?: string | undefined;
className?: string | undefined;
stopOnFocus?: boolean | undefined;
callback?: (() => void) | undefined;
onClick?: (() => void) | undefined;
offset?: Offset | undefined;
escapeMarkup?: boolean | undefined;
style?: { [cssRule: string]: string };
oldestFirst?: boolean | undefined;
}
}
declare function Toastify(
options?: Toastify.Options,
): {
showToast(): void;
};
export as namespace Toastify;
export = Toastify;
Additional Details
- Last updated: Thu, 16 Dec 2021 08:01:10 GMT
- Dependencies: none
- Global values:
Toastify
Credits
These definitions were written by adblanc, and Piotr Błażejewicz.