npm.io
2.0.5 • Published 2 years ago

@types/native-toast

Licence
MIT
Version
2.0.5
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

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

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: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Michael Nahkies.