From 4190c1de72c53cff39f4db1b13a7fd1d55438ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Helfensd=C3=B6rfer?= Date: Fri, 27 Jan 2017 20:03:15 +0100 Subject: [PATCH 1/2] Updated jquery.noty to current version --- jquery.noty/index.d.ts | 69 ++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/jquery.noty/index.d.ts b/jquery.noty/index.d.ts index 85fc2fca4c..c85db008fa 100644 --- a/jquery.noty/index.d.ts +++ b/jquery.noty/index.d.ts @@ -11,51 +11,60 @@ interface NotyOptions { theme?: string; type?: string; /** Text to show. Can be html or string. */ - text?: string; + text?: string; /** If you want to use queue feature set this true. */ - dismissQueue?: boolean; - /** The note`s optional template like '
' */ - template?: string; - animation?: NotyAnimationOptions; - /** Delay for closing event. Set false for sticky notifications */ - timeout?: any; - /** Adds notification to the beginning of queue when set to true */ - force?: boolean; - modal?: boolean; + dismissQueue?: boolean; + /** adds notification to the beginning of queue when set to true */ + force?: boolean; /** You can set max visible notification for dismissQueue true option */ maxVisible?: number; - /** To close all notifications before show */ - killer?: boolean; + /** The note`s optional template like '
' */ + template?: string; + /** Delay for closing event. Set false for sticky notifications */ + timeout?: any; + /** displays a progress bar */ + progressBar?: boolean; + + animation?: NotyAnimationOptions; + /** ['click', 'button', 'hover', 'backdrop'] // backdrop click will close all notifications */ closeWith?: any[]; + + /** if true adds an overlay */ + modal?: boolean; + /** if true closes all notifications and shows itself */ + killer?: boolean; + callback?: NotyCallbackOptions; - /** An array of buttons or false to hide them */ + + /** an array of buttons, for creating confirmation dialogs. */ buttons?: any; } interface NotyAnimationOptions { - open?: any; - close?: any; - easing?: string; - speed?: number; + open?: any; + close?: any; + easing?: string; + speed?: number; } interface NotyCallbackOptions { - onShow?: Function; - afterShow?: Function; - onClose?: Function; - afterClose?: Function; + onShow?: Function; + afterShow?: Function; + onClose?: Function; + afterClose?: Function; + onCloseClick?: Function; } interface NotyStatic { - (notyOptions: NotyOptions); - defaults: NotyOptions; + (notyOptions: NotyOptions); + defaults: NotyOptions; - get(id: any); - close(id: any); - clearQueue(); - closeAll(); - setText(id: any, text: string); - setType(id: any, type: string); + get(id: any); + close(id: any); + clearQueue(); + closeAll(); + setText(id: any, text: string); + setType(id: any, type: string); } interface Noty { @@ -72,7 +81,7 @@ interface Noty { } interface JQueryStatic { - noty: NotyStatic; + noty: NotyStatic; } interface JQuery { From d93b846ef26cf417d8760bc62b33ec42ba948401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Helfensd=C3=B6rfer?= Date: Mon, 30 Jan 2017 19:49:19 +0100 Subject: [PATCH 2/2] Update index.d.ts --- jquery.noty/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery.noty/index.d.ts b/jquery.noty/index.d.ts index c85db008fa..f4bfe4bcb9 100644 --- a/jquery.noty/index.d.ts +++ b/jquery.noty/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for jQuery.noty v2.0 +// Type definitions for jQuery.noty v2.4 // Project: http://needim.github.io/noty/ -// Definitions by: Aaron King +// Definitions by: Aaron King , Tim Helfensdörfer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Project by: Nedim Carter @@ -26,8 +26,8 @@ interface NotyOptions { progressBar?: boolean; animation?: NotyAnimationOptions; - /** ['click', 'button', 'hover', 'backdrop'] // backdrop click will close all notifications */ - closeWith?: any[]; + /** backdrop click will close all notifications */ + closeWith?: ('click' | 'button' | 'hover' | 'backdrop')[]; /** if true adds an overlay */ modal?: boolean;