2.0.5 • Published 6 months ago
@types/native-toast v2.0.5
Installation
npm install --save @types/native-toast
Summary
This package contains type definitions for native-toast (https://github.com/egoist/native-toast).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/native-toast.
index.d.ts
// Type definitions for native-toast 2.0
// Project: https://github.com/egoist/native-toast
// Definitions by: Michael Nahkies <https://github.com/mnahkies>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare const toast: {
(options: toast.ToastOptions): toast.Toast,
success: (options: toast.ToastOptions) => toast.Toast,
warning: (options: toast.ToastOptions) => toast.Toast,
info: (options: toast.ToastOptions) => toast.Toast,
error: (options: toast.ToastOptions) => toast.Toast,
};
export = toast;
declare namespace toast {
interface ToastOptions {
message?: string | undefined;
position?: "center" | "west" | "east" | "south" | "south-west" | "south-east" | "north" | "north-west" | "north-east" | undefined;
timeout?: number | undefined;
el?: HTMLElement | undefined;
rounded?: boolean | undefined;
type?: "success" | "warning" | "info" | "error" | undefined;
debug?: boolean | undefined;
edge?: boolean | undefined;
icon?: boolean | undefined;
closeOnClick?: boolean | undefined;
elements?: HTMLElement[] | undefined;
}
interface Toast {
show(): void;
hide(): void;
destroy(): void;
}
}
Additional Details
- Last updated: Thu, 08 Jul 2021 18:51:09 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Michael Nahkies.