Fix selectize.js API typings

- Make event handler types less restrictive
This commit is contained in:
Adi Dahiya
2014-12-05 17:32:35 -05:00
parent f87a626478
commit 4a836cb285
2 changed files with 15 additions and 9 deletions
+12 -1
View File
@@ -1,7 +1,18 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="selectize.d.ts" />
// All code examples taken from https://github.com/brianreavis/selectize.js/blob/master/examples
var $input = $(".test-input").selectize();
var testApi = $input[0].selectize;
function changeListener(selection: string) {
console.log(selection);
}
testApi.on("change", changeListener);
testApi.off("change", changeListener);
testApi.off("change");
// All code examples below taken from https://github.com/brianreavis/selectize.js/blob/master/examples
// API example
// --------------------------------------------------------------------------------------------------------------------