Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/toastr

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/toastr - npm Package Compare versions

Comparing version 2.1.37 to 2.1.38

678

toastr/index.d.ts

@@ -11,223 +11,223 @@ // Type definitions for Toastr 2.1.3

interface ToastrOptions {
/**
* Optionally override the animation easing to show or hide the toasts.
* swing and linear are built into jQuery.
* @default swing
*/
showEasing?: string;
/**
* Optionally override the animation easing to show or hide the toasts.
* swing and linear are built into jQuery.
* @default swing
*/
hideEasing?: string;
/**
* Use the jQuery show method of your choice.
* The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
* @default fadeIn
*/
showMethod?: string;
/**
* Use the jQuery hide method of your choice.
* The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
* @default fadeOut
*/
hideMethod?: string;
/**
* Should a close button be shown?
* @default undefined
*/
closeButton?: boolean;
/**
* CSS class the close button will be given.
* @default toast-close-button
*/
closeClass?: string;
/**
* Time in milliseconds the toast should take to hide, when the close button is clicked.
* Falls back to hide configuration.
* @default false
*/
closeDuration?: number;
/**
* The animation easing while hiding the toast, when the close button is clicked.
* Falls back to hide configuration.
* swing and linear are built into jQuery.
* @default false
*/
closeEasing?: string;
/**
* Use the jQuery show/hide method of your choice, when the close button is clicked.
* Falls back to hide configuration.
* The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
* @default false
*/
closeMethod?: string;
/**
* Set to false so that the toast hides event if hovered.
* @default true
*/
closeOnHover?: boolean;
/**
* Html for the close button.
*/
closeHtml?: string;
/**
* onCloseClick function callback, fired when the close button is clicked.
* Closing cannot be prevented by ev.stopPropagation() etc.
* @default undefined
*/
onCloseClick?: (ev: JQueryMouseEventObject) => void;
/**
* Should clicking on toast dismiss it?
* @default true
*/
tapToDismiss?: boolean;
/**
* CSS class the toast element will be given.
* @default toast
*/
toastClass?: string;
/**
* Id toast container will be given.
* @default toast-container
*/
containerId?: string;
/**
* Should debug details be outputted to the console?
* @default false
*/
debug?: boolean;
/**
* Time in milliseconds the toast should take to show.
* @default 300
*/
showDuration?: number;
/**
* onShown function callback.
* @default undefined
*/
onShown?: () => void;
/**
* Time in milliseconds the toast should take to hide.
* @default 1000
*/
hideDuration?: number;
/**
* onHidden function callback.
* @default undefined
*/
onHidden?: () => void;
/**
* Time in milliseconds the toast should be displayed after leaving mouse over.
* Set timeOut and extendedTimeOut to 0 to make it sticky.
* @default 1000
*/
extendedTimeOut?: number;
/**
* If specified, you must provide all classes.
*/
iconClasses?: {
/**
* Icon to use on error toasts.
* @default toast-error
*/
error: string;
/**
* Icon to use on info toasts.
* @default toast-info
*/
info: string;
/**
* Icon to use on success toasts.
* @default toast-success
*/
success: string;
/**
* Icon to use on warning toasts.
* @default toast-warning
*/
warning: string;
};
/**
* Icon to use for toast.
* @default toast-info
*/
iconClass?: string;
/**
* Where toast should be displayed.
* The default stylesheet covers:
* toast-top-left, toast-top-center, toast-top-right, toast-top-full-width,
* toast-bottom-left, toast-bottom-center, toast-bottom-right, toast-bottom-full-width
* @default toast-top-right
*/
positionClass?: string;
/**
* Time in milliseconds that the toast should be displayed.
* Set timeOut and extendedTimeOut to 0 to make it sticky.
* @default 5000
*/
timeOut?: number;
/**
* CSS class the title element will be given.
* @default toast-title
*/
titleClass?: string;
/**
* CSS class the message element will be given.
* @default toast-message
*/
messageClass?: string;
/**
* Set newest toast to appear on top.
* @default true
*/
newestOnTop?: boolean;
/**
* The element to put the toastr container
* @default body
*/
target?: string;
/**
* Rather than having identical toasts stack, set the preventDuplicates property to true.
* Duplicates are matched to the previous toast based on their message content.
* @default false
*/
preventDuplicates?: boolean;
/**
* Visually indicates how long before a toast expires.
* @default false
*/
progressBar?: boolean;
/**
* CSS class the progressbar element will be given.
* @default toast-progress
*/
progressClass?: string;
/**
* Function to execute on toast click. Closing cannot be prevented by ev.stopPropagation() etc.
* @default undefined
*/
onclick?: (ev: JQueryMouseEventObject) => void;
/**
* Should the title and message text be escaped?
* @default false
*/
escapeHtml?: boolean;
/**
* Flip the toastr to be displayed properly for right-to-left languages.
* @default false
*/
rtl?: boolean;
/**
* Optionally override the animation easing to show or hide the toasts.
* swing and linear are built into jQuery.
* @default swing
*/
showEasing?: string;
/**
* Optionally override the animation easing to show or hide the toasts.
* swing and linear are built into jQuery.
* @default swing
*/
hideEasing?: string;
/**
* Use the jQuery show method of your choice.
* The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
* @default fadeIn
*/
showMethod?: string;
/**
* Use the jQuery hide method of your choice.
* The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
* @default fadeOut
*/
hideMethod?: string;
/**
* Should a close button be shown?
* @default undefined
*/
closeButton?: boolean;
/**
* CSS class the close button will be given.
* @default toast-close-button
*/
closeClass?: string;
/**
* Time in milliseconds the toast should take to hide, when the close button is clicked.
* Falls back to hide configuration.
* @default false
*/
closeDuration?: number;
/**
* The animation easing while hiding the toast, when the close button is clicked.
* Falls back to hide configuration.
* swing and linear are built into jQuery.
* @default false
*/
closeEasing?: string;
/**
* Use the jQuery show/hide method of your choice, when the close button is clicked.
* Falls back to hide configuration.
* The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
* @default false
*/
closeMethod?: string;
/**
* Set to false so that the toast hides event if hovered.
* @default true
*/
closeOnHover?: boolean;
/**
* Html for the close button.
*/
closeHtml?: string;
/**
* onCloseClick function callback, fired when the close button is clicked.
* Closing cannot be prevented by ev.stopPropagation() etc.
* @default undefined
*/
onCloseClick?: (ev: JQueryMouseEventObject) => void;
/**
* Should clicking on toast dismiss it?
* @default true
*/
tapToDismiss?: boolean;
/**
* CSS class the toast element will be given.
* @default toast
*/
toastClass?: string;
/**
* Id toast container will be given.
* @default toast-container
*/
containerId?: string;
/**
* Should debug details be outputted to the console?
* @default false
*/
debug?: boolean;
/**
* Time in milliseconds the toast should take to show.
* @default 300
*/
showDuration?: number;
/**
* onShown function callback.
* @default undefined
*/
onShown?: () => void;
/**
* Time in milliseconds the toast should take to hide.
* @default 1000
*/
hideDuration?: number;
/**
* onHidden function callback.
* @default undefined
*/
onHidden?: () => void;
/**
* Time in milliseconds the toast should be displayed after leaving mouse over.
* Set timeOut and extendedTimeOut to 0 to make it sticky.
* @default 1000
*/
extendedTimeOut?: number;
/**
* If specified, you must provide all classes.
*/
iconClasses?: {
/**
* Icon to use on error toasts.
* @default toast-error
*/
error: string;
/**
* Icon to use on info toasts.
* @default toast-info
*/
info: string;
/**
* Icon to use on success toasts.
* @default toast-success
*/
success: string;
/**
* Icon to use on warning toasts.
* @default toast-warning
*/
warning: string;
};
/**
* Icon to use for toast.
* @default toast-info
*/
iconClass?: string;
/**
* Where toast should be displayed.
* The default stylesheet covers:
* toast-top-left, toast-top-center, toast-top-right, toast-top-full-width,
* toast-bottom-left, toast-bottom-center, toast-bottom-right, toast-bottom-full-width
* @default toast-top-right
*/
positionClass?: string;
/**
* Time in milliseconds that the toast should be displayed.
* Set timeOut and extendedTimeOut to 0 to make it sticky.
* @default 5000
*/
timeOut?: number;
/**
* CSS class the title element will be given.
* @default toast-title
*/
titleClass?: string;
/**
* CSS class the message element will be given.
* @default toast-message
*/
messageClass?: string;
/**
* Set newest toast to appear on top.
* @default true
*/
newestOnTop?: boolean;
/**
* The element to put the toastr container
* @default body
*/
target?: string;
/**
* Rather than having identical toasts stack, set the preventDuplicates property to true.
* Duplicates are matched to the previous toast based on their message content.
* @default false
*/
preventDuplicates?: boolean;
/**
* Visually indicates how long before a toast expires.
* @default false
*/
progressBar?: boolean;
/**
* CSS class the progressbar element will be given.
* @default toast-progress
*/
progressClass?: string;
/**
* Function to execute on toast click. Closing cannot be prevented by ev.stopPropagation() etc.
* @default undefined
*/
onclick?: (ev: JQueryMouseEventObject) => void;
/**
* Should the title and message text be escaped?
* @default false
*/
escapeHtml?: boolean;
/**
* Flip the toastr to be displayed properly for right-to-left languages.
* @default false
*/
rtl?: boolean;
}
interface ToastrDisplayMethod {
/**
* Create a toast
*
* @param message Message to display in toast
* @param title Title to display on toast
* @param overrides Option values for toast
*/
(message: string, title?: string, overrides?: ToastrOptions): JQuery;
/**
* Create a toast
*
* @param message Message to display in toast
* @param title Title to display on toast
* @param overrides Option values for toast
*/
(message: string, title?: string, overrides?: ToastrOptions): JQuery;
}

@@ -238,128 +238,128 @@

interface ToastMap {
/**
* The toast type.
*/
type: ToastrType;
/**
* The toast message.
*/
message: string;
/**
* The toast icon class.
*/
iconClass: string;
/**
* The toast title.
*/
title?: string;
/**
* Any override options specified when the toast was created.
*/
optionsOverride?: ToastrOptions;
/**
* The toast type.
*/
type: ToastrType;
/**
* The toast message.
*/
message: string;
/**
* The toast icon class.
*/
iconClass: string;
/**
* The toast title.
*/
title?: string;
/**
* Any override options specified when the toast was created.
*/
optionsOverride?: ToastrOptions;
}
interface ToastrResponse {
/**
* The internal toast id.
*/
toastId: number;
/**
* The current state of the toast.
*/
state: 'visible'|'hidden';
/**
* The datetime the toast was opened.
*/
startTime: Date;
/**
* The datetime the toast was closed, if the state is hidden.
*/
endTime?: Date;
/**
* The toastr options.
*/
options: ToastrOptions;
/**
* The event's toast details.
*/
map: ToastMap;
/**
* The internal toast id.
*/
toastId: number;
/**
* The current state of the toast.
*/
state: 'visible'|'hidden';
/**
* The datetime the toast was opened.
*/
startTime: Date;
/**
* The datetime the toast was closed, if the state is hidden.
*/
endTime?: Date;
/**
* The toastr options.
*/
options: ToastrOptions;
/**
* The event's toast details.
*/
map: ToastMap;
}
interface Toastr {
/**
* Clear toasts
*/
clear: {
/**
* Clear specific toast
*
* @param toast Toast to clear
* @param clearOptions force clearing a toast, ignoring focus
*/
(toast?: JQuery, clearOptions?: {force: boolean}): void;
};
/**
* Removes toasts (without animation)
*/
remove: {
/**
* Removes all toasts (without animation)
*/
(): void;
/**
* Removes specific toast (without animation)
*
* @param toast Toast to remove
*/
(toast: JQuery): void;
};
/**
* Create an error toast
*/
error: ToastrDisplayMethod;
/**
* Create an info toast
*/
info: ToastrDisplayMethod;
/**
* The toatsr options object
*/
options: ToastrOptions;
/**
* Create a success toast
*/
success: ToastrDisplayMethod;
/**
* Create a warning toast
*/
warning: ToastrDisplayMethod;
/**
* Get toastr version
*/
version: string;
/**
* Get or create a container.
*/
getContainer: {
/**
* Get the container by options.containerId.
*
* @param options Option values for the container
*/
(options?: ToastrOptions): JQuery,
/**
* Get the container by options.containerId.
* If it doesn't exist, it will be created according to options.
*
* @param options Option values for the container
* @param create Use true to create a container, if it doesn't exist
*/
(options: ToastrOptions, create: boolean): JQuery,
};
/**
* Register a callback to be called when a toast gets created or hidden.
*
* @param callback The function which will be passed the event details.
*/
subscribe: (callback: (response: ToastrResponse) => void) => void;
/**
* Clear toasts
*/
clear: {
/**
* Clear specific toast
*
* @param toast Toast to clear
* @param clearOptions force clearing a toast, ignoring focus
*/
(toast?: JQuery, clearOptions?: {force: boolean}): void;
};
/**
* Removes toasts (without animation)
*/
remove: {
/**
* Removes all toasts (without animation)
*/
(): void;
/**
* Removes specific toast (without animation)
*
* @param toast Toast to remove
*/
(toast: JQuery): void;
};
/**
* Create an error toast
*/
error: ToastrDisplayMethod;
/**
* Create an info toast
*/
info: ToastrDisplayMethod;
/**
* The toatsr options object
*/
options: ToastrOptions;
/**
* Create a success toast
*/
success: ToastrDisplayMethod;
/**
* Create a warning toast
*/
warning: ToastrDisplayMethod;
/**
* Get toastr version
*/
version: string;
/**
* Get or create a container.
*/
getContainer: {
/**
* Get the container by options.containerId.
*
* @param options Option values for the container
*/
(options?: ToastrOptions): JQuery,
/**
* Get the container by options.containerId.
* If it doesn't exist, it will be created according to options.
*
* @param options Option values for the container
* @param create Use true to create a container, if it doesn't exist
*/
(options: ToastrOptions, create: boolean): JQuery,
};
/**
* Register a callback to be called when a toast gets created or hidden.
*
* @param callback The function which will be passed the event details.
*/
subscribe: (callback: (response: ToastrResponse) => void) => void;
}

@@ -369,3 +369,3 @@

declare module "toastr" {
export = toastr;
export = toastr;
}
{
"name": "@types/toastr",
"version": "2.1.37",
"version": "2.1.38",
"description": "TypeScript definitions for Toastr",

@@ -14,3 +14,3 @@ "license": "MIT",

"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -25,4 +25,4 @@ "type": "git",

},
"typesPublisherContentHash": "6fc25552e4265a361c889b874b6e652485601fce34b8a1a8743bf716a509bb43",
"typeScriptVersion": "2.3"
"typesPublisherContentHash": "f2eabb702e04c46d78ef137d4805059e38e3bc14bcb0ab1f3ee89893347bdd9e",
"typeScriptVersion": "3.0"
}

@@ -5,13 +5,13 @@ # Installation

# Summary
This package contains type definitions for Toastr ( https://github.com/CodeSeven/toastr ).
This package contains type definitions for Toastr (https://github.com/CodeSeven/toastr).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/toastr
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/toastr.
Additional Details
* Last updated: Wed, 03 Apr 2019 16:50:27 GMT
* Dependencies: @types/jquery
* Global values: toastr
### Additional Details
* Last updated: Fri, 15 May 2020 13:12:48 GMT
* Dependencies: [@types/jquery](https://npmjs.com/package/@types/jquery)
* Global values: `toastr`
# Credits
These definitions were written by Boris Yankov <https://github.com/borisyankov>.
These definitions were written by [Boris Yankov](https://github.com/borisyankov).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc