Adding jQuery.Timer Definitions (Post-Fork Resync)

This is to add the jQuery.Timer definitions and tests, as well as the
tscparams that seem to be required (hopefully DefinitelyTyped Travis CI
builds will work this time). Modified alert() to be console.log()
instead. Readme updated as well (ignore line #1).
This commit is contained in:
Josh Strobl
2013-10-20 01:02:13 -07:00
parent 1c65567822
commit 2bfb70a40f
5 changed files with 66 additions and 1 deletions
+31
View File
@@ -0,0 +1,31 @@
// Type definitions for jQueryTimer 1.0
// Project: https://github.com/jchavannes/jquery-timer
// Definitions by: Joshua Strobl <https://github.com/JoshStrobl/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface JQueryTimer {
// #region Constructors
(action?: Function, time?: Number, autostart?: Boolean): Object;
set(any): Object;
// #endregion
// #region Actions
once(time: Number): Object;
play(reset?: Boolean): Object;
pause(): Object;
stop(): Object;
toggle(reset?: Boolean): Object;
// #endregion
// #region Properties
isActive: Boolean;
remaining: Number;
// #endregion
}
interface JQuery {
timer: JQueryTimer;
}