@types/native-toast
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

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 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Michael Nahkies.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/native-toast

      Weekly Downloads

      53

      Version

      2.0.5

      License

      MIT

      Unpacked Size

      4.9 kB

      Total Files

      5

      Last publish

      Collaborators

      • types