From c5bcfd3d0832909ff89f69e2c4f6669d0513cf87 Mon Sep 17 00:00:00 2001 From: Moes Date: Wed, 11 May 2016 14:01:51 +1000 Subject: [PATCH] Update jquery.pnotify.d.ts Add type --- jquery.pnotify/jquery.pnotify.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jquery.pnotify/jquery.pnotify.d.ts b/jquery.pnotify/jquery.pnotify.d.ts index cdccb6fbd5..3fd1d30d99 100644 --- a/jquery.pnotify/jquery.pnotify.d.ts +++ b/jquery.pnotify/jquery.pnotify.d.ts @@ -4,6 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +type NoticeTypeOptions = "notice" | "info" | "success" | "error"; +type StylingOptions = "brighttheme" | "jqueryui" | "bootstrap2" | "bootstrap3" | "fontawesome"; +type StateOptions = "initializing" | "opening" | "open" | "closing" | "closed"; interface PNotifyStack { dir1?: string; @@ -131,7 +134,7 @@ interface PNotifyOptions { /** * What styling classes to use. (Can be either "brighttheme", "jqueryui", "bootstrap2", "bootstrap3", or "fontawesome".) */ - styling?: "brighttheme" | "jqueryui" | "bootstrap2" | "bootstrap3" | "fontawesome"; + styling?: StylingOptions; /** * Additional classes to be added to the notice. (For custom styling.) */ @@ -176,7 +179,7 @@ interface PNotifyOptions { /** * Type of the notice. "notice", "info", "success", or "error". */ - type?: "notice" | "info" | "success" | "error"; + type?: NoticeTypeOptions; /** * Set icon to true to use the default icon for the selected style/type, false for no icon, or a string for your own icon class. */ @@ -257,8 +260,7 @@ interface PNotify { /** * The state can be "initializing", "opening", "open", "closing", and "closed" */ - - state: "initializing" | "opening" | "open" | "closing" | "closed"; + state?: StateOptions; /** * This function is for updating the notice.