@types/toastify-js
Advanced tools
Comparing version 1.9.0 to 1.9.1
// Type definitions for toastify-js 1.9 | ||
// Project: https://github.com/apvarun/toastify-js#readme | ||
// Definitions by: adblanc <https://github.com/adblanc> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
interface Offset { | ||
x: number | string; | ||
y: number | string; | ||
} | ||
declare namespace Toastify { | ||
function reposition(): void; | ||
interface ToastArgs { | ||
text?: string; | ||
node?: Node; | ||
duration?: number; | ||
selector?: string; | ||
destination?: string; | ||
newWindow?: boolean; | ||
close?: boolean; | ||
gravity?: 'top' | 'bottom'; | ||
position?: 'left' | 'center' | 'right'; | ||
backgroundColor?: string; | ||
stopOnFocus?: boolean; | ||
className?: string; | ||
offset?: Offset; | ||
onClick?: () => void; | ||
interface Offset { | ||
x: number | string; | ||
y: number | string; | ||
} | ||
interface Options { | ||
text?: string; | ||
node?: Node; | ||
duration?: number; | ||
selector?: string; | ||
destination?: string; | ||
newWindow?: boolean; | ||
close?: boolean; | ||
gravity?: 'top' | 'bottom'; | ||
position?: 'left' | 'center' | 'right'; | ||
backgroundColor?: string; | ||
/** | ||
* Image/icon to be shown before text | ||
*/ | ||
avatar?: string; | ||
className?: string; | ||
/** | ||
* @default true | ||
*/ | ||
stopOnFocus?: boolean; | ||
/** | ||
* Invoked when the toast is dismissed | ||
*/ | ||
callback?: () => void; | ||
onClick?: () => void; | ||
offset?: Offset; | ||
} | ||
} | ||
declare function Toastify( | ||
args?: ToastArgs, | ||
options?: Toastify.Options, | ||
): { | ||
@@ -34,2 +49,4 @@ showToast(): void; | ||
export as namespace Toastify; | ||
export = Toastify; |
{ | ||
"name": "@types/toastify-js", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "TypeScript definitions for toastify-js", | ||
@@ -11,2 +11,7 @@ "license": "MIT", | ||
"githubUsername": "adblanc" | ||
}, | ||
{ | ||
"name": "Piotr Błażejewicz", | ||
"url": "https://github.com/peterblazejewicz", | ||
"githubUsername": "peterblazejewicz" | ||
} | ||
@@ -23,4 +28,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "cc50011bdb03a6cbd3aae7fd8b23a047539b4488b5b932f5be0aafb719be0a2a", | ||
"typesPublisherContentHash": "a11aaab495a32eb9c490a22912c8b4673e4ddb13aa2a8d6a0144f1d306e66e9d", | ||
"typeScriptVersion": "3.2" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 09 Nov 2020 23:49:38 GMT | ||
* Last updated: Tue, 10 Nov 2020 00:22:55 GMT | ||
* Dependencies: none | ||
* Global values: none | ||
* Global values: `Toastify` | ||
# Credits | ||
These definitions were written by [adblanc](https://github.com/adblanc). | ||
These definitions were written by [adblanc](https://github.com/adblanc), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3864
46