From 95f34f41c240da5249066417489618489306bedc Mon Sep 17 00:00:00 2001 From: Gregor Woiwode Date: Mon, 7 Sep 2015 11:09:12 +0200 Subject: [PATCH 1/2] Adds typings for simplebar.js --- simplebar/simplebar-tests.ts | 10 ++++++++++ simplebar/simplebar.d.ts | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100755 simplebar/simplebar-tests.ts create mode 100755 simplebar/simplebar.d.ts diff --git a/simplebar/simplebar-tests.ts b/simplebar/simplebar-tests.ts new file mode 100755 index 0000000000..a64aa0fc89 --- /dev/null +++ b/simplebar/simplebar-tests.ts @@ -0,0 +1,10 @@ +/// +/// + +// Type definitions for simplebar.js 1.1.7 +// Project: https://github.com/Grsmto/simplebar +// Definitions by: Gregor Woiwode +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +var simplebar = $.fn.simplebar.noConflict(); +$.fn.simplebar = simplebar; diff --git a/simplebar/simplebar.d.ts b/simplebar/simplebar.d.ts new file mode 100755 index 0000000000..63173f4322 --- /dev/null +++ b/simplebar/simplebar.d.ts @@ -0,0 +1,37 @@ +// Type definitions for simplebar.js 1.1.7 +// Project: https://github.com/Grsmto/simplebar +// Definitions by: Gregor Woiwode +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface SimplebarOpions { + autoHide?: boolean; + wrapContent?: boolean +} + +interface JQuery { + /** + * Enables simplebar on calling element. + */ + simplebar: { + /** + * Define if scrollbar should be faded out automatically + * + * @param indicator if scrollbar should be faded out automatically. + */ + (options?: SimplebarOpions): JQuery; + }; +} + +interface JQueryStatic { + /** + * Enables simplebar on calling element. + */ + simplebar: { + /** + * Define if scrollbar should be faded out automatically + * + * @param indicator if scrollbar should be faded out automatically. + */ + (options?: SimplebarOpions): JQuery; + }; +} From a665c455aac227479ee3732726c41ec589bc5e44 Mon Sep 17 00:00:00 2001 From: Gregor Woiwode Date: Mon, 7 Sep 2015 11:17:37 +0200 Subject: [PATCH 2/2] Removes comments from test file --- simplebar/simplebar-tests.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/simplebar/simplebar-tests.ts b/simplebar/simplebar-tests.ts index a64aa0fc89..abf906a089 100755 --- a/simplebar/simplebar-tests.ts +++ b/simplebar/simplebar-tests.ts @@ -1,10 +1,5 @@ /// /// -// Type definitions for simplebar.js 1.1.7 -// Project: https://github.com/Grsmto/simplebar -// Definitions by: Gregor Woiwode -// Definitions: https://github.com/borisyankov/DefinitelyTyped - var simplebar = $.fn.simplebar.noConflict(); $.fn.simplebar = simplebar;