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 StartToastifyInstance {
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;
ariaLive?: "off" | "polite" | "assertive" | 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 class Toastify {
readonly options: StartToastifyInstance.Options;
readonly toastElement: Element | null;
showToast(): void;
hideToast(): void;
}
declare function StartToastifyInstance(options?: Toastify.Options): Toastify;
export as namespace Toastify;
export = StartToastifyInstance;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by adblanc, and Piotr Błażejewicz.