From c86178045e0b87d8c2cfd3c35e760eb406d88cd1 Mon Sep 17 00:00:00 2001 From: gentoo90 Date: Sun, 4 Feb 2018 12:27:29 +0200 Subject: [PATCH] jquery.colorpicker: make disable field in options optional --- types/jquery.colorpicker/index.d.ts | 2 +- types/jquery.colorpicker/jquery.colorpicker-tests.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/jquery.colorpicker/index.d.ts b/types/jquery.colorpicker/index.d.ts index 05ee2cf5d2..1ece8a3c66 100644 --- a/types/jquery.colorpicker/index.d.ts +++ b/types/jquery.colorpicker/index.d.ts @@ -31,7 +31,7 @@ interface JQueryColorpickerOptions { closeOnOutside?: boolean; color?: string; colorFormat?: string; - disabled: boolean; + disabled?: boolean; draggable?: boolean; duration?: string; format?: string; diff --git a/types/jquery.colorpicker/jquery.colorpicker-tests.ts b/types/jquery.colorpicker/jquery.colorpicker-tests.ts index 4d2adfb69b..7d6e5c7ce3 100644 --- a/types/jquery.colorpicker/jquery.colorpicker-tests.ts +++ b/types/jquery.colorpicker/jquery.colorpicker-tests.ts @@ -70,6 +70,9 @@ colorpicker.colorpicker("destroy"); colorpicker.colorpicker("setColor", "#deadbeef"); colorpicker.colorpicker("option", "disabled", true); +// check if all options are optional +let defaultColorpicker = $("").colorpicker({}); + // example plugins provided $.colorpicker.parts["memory"] = function (inst) {