diff --git a/icheck/icheck-tests.ts b/icheck/icheck-tests.ts new file mode 100644 index 000000000..7998d8ed6 --- /dev/null +++ b/icheck/icheck-tests.ts @@ -0,0 +1,34 @@ +/// +/// + +$('input').iCheck({ + labelHover: false, + cursor: true +}); + +// customize all inputs (will search for checkboxes and radio buttons) +$('input').iCheck(); + +// handle inputs only inside $('.block') +$('.block input').iCheck(); + +// handle only checkboxes inside $('.test') +$('.test input').iCheck({ + handle: 'checkbox' +}); + +// handle .vote class elements (will search inside the element, if it's not an input) +$('.vote').iCheck(); + +// you can also change options after inputs are customized +$('input.some').iCheck({ + // different options +}); + +$('input').on('ifChecked', function (event) { + alert(event.type + ' callback'); +}); + +$('input').iCheck('check', function () { + alert('Well done, Sir'); +}); \ No newline at end of file diff --git a/icheck/icheck.d.ts b/icheck/icheck.d.ts index 2abdd10ad..e8e2b3126 100644 --- a/icheck/icheck.d.ts +++ b/icheck/icheck.d.ts @@ -3,7 +3,7 @@ // Definitions by: Dániel Tar https://github.com/qcz // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare interface ICheckOptions { +interface ICheckOptions { /** * 'checkbox' or 'radio' to style only checkboxes or radio buttons, both by default */ @@ -106,7 +106,7 @@ declare interface ICheckOptions { insert?: string; } -declare interface JQuery { +interface JQuery { iCheck(options?: ICheckOptions): JQuery; - iCheck(command: string): void; + iCheck(command: string, callback?: () => void): void; } \ No newline at end of file diff --git a/noVNC/noVNC.d.ts b/noVNC/noVNC.d.ts index ff6f690ec..6352aed3d 100644 --- a/noVNC/noVNC.d.ts +++ b/noVNC/noVNC.d.ts @@ -87,7 +87,7 @@ interface NvRFBDefaults { onFBResize?: (rfb: RFB, width: number, height: number) => void; } -class RFB { +declare class RFB { constructor(defaults); set_local_cursor(cursor): void; get_display(): Display; diff --git a/node_zeromq/zmq-tests.ts b/node_zeromq/zmq-tests.ts index 26ffd2a20..a71bbaa10 100644 --- a/node_zeromq/zmq-tests.ts +++ b/node_zeromq/zmq-tests.ts @@ -1,7 +1,6 @@ /// -import zeromq = module('zmq'); -var zmq: zeromq; +import zmq = module('zmq'); function test1() { var sock = zmq.socket('push'); diff --git a/node_zeromq/zmq.d.ts b/node_zeromq/zmq.d.ts index 4297eded6..8e9224d91 100644 --- a/node_zeromq/zmq.d.ts +++ b/node_zeromq/zmq.d.ts @@ -3,7 +3,7 @@ // Definitions by: Dave McKeown // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare interface EventEmitter {}; +interface EventEmitter {} declare module 'zmq' { diff --git a/unity-webapi/unity-webapi.d.ts b/unity-webapi/unity-webapi.d.ts index 419504971..451ddab6b 100644 --- a/unity-webapi/unity-webapi.d.ts +++ b/unity-webapi/unity-webapi.d.ts @@ -9,7 +9,7 @@ declare class UnitySettings { public onInit:Function; } -enum UnityPlaybackState { +declare enum UnityPlaybackState { Playing, Paused }