From 4afabfed53fa2e8f8966a74163ad981747e8a6cc Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 24 Jul 2017 15:46:38 -0400 Subject: [PATCH] providing type definitions for jquery-editable-select (#18356) * providing type definitions for jquery-editable-select * fixing linting errors for jquery-editable-select * re-enabling disabled linting rule ban-types for jquery-editable-select --- types/jquery-editable-select/index.d.ts | 71 +++++++++++++++++++ .../jquery-editable-select-tests.ts | 15 ++++ types/jquery-editable-select/tsconfig.json | 23 ++++++ types/jquery-editable-select/tslint.json | 5 ++ 4 files changed, 114 insertions(+) create mode 100644 types/jquery-editable-select/index.d.ts create mode 100644 types/jquery-editable-select/jquery-editable-select-tests.ts create mode 100644 types/jquery-editable-select/tsconfig.json create mode 100644 types/jquery-editable-select/tslint.json diff --git a/types/jquery-editable-select/index.d.ts b/types/jquery-editable-select/index.d.ts new file mode 100644 index 0000000000..43ae7065ae --- /dev/null +++ b/types/jquery-editable-select/index.d.ts @@ -0,0 +1,71 @@ +// Type definitions for jquery-editable-select 2.2 +// Project: https://github.com/indrimuska/jquery-editable-select +// Definitions by: Vincent Biret +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace JQueryEditableSelect { + interface EditableSelectOptions { + /** + * Filter (or not) items in list while typing. + */ + filter?: boolean; + /** + * Easing used for showing and hiding the dropdown list. + */ + effects?: 'default' | 'slide' | 'fade'; + /** + * Duration of the easings (in milliseconds). + */ + duration?: number | 'fast' | 'slow'; + /** + * Where to append the dropdown list in the DOM. + */ + appendTo?: string | JQuery; + /** + * How dropdown list is triggered. + */ + trigger?: 'focus'| 'manual'; + } +} + +interface JQuery { + /** + * Transforms the