Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Vincent Bortone
2013-01-17 11:01:27 -05:00
90 changed files with 66 additions and 116 deletions
+19 -4
View File
@@ -1,12 +1,27 @@
DefinitelyTyped
===============
TypeScript type definitions repository for popular JavaScript libraries.
The repository for *high quality* TypeScript type definitions.
The project aims to provide *high quality* definitions for the most popular libraries out there.
Use a definition file like this:
Complete
--------
```
/// <reference path="jquery.d.ts" />
```
Contributor Guidelines
----------------------
Definition files should be called 'library.d.ts'.
In case there are multiple versions supported, the latest one will be without a version number in the file name.
Older versions will be in the form of 'library-1.0.d.ts'.
Test files called 'library-tests.ts'.
They are not runnable, in the TDD way.
They contain code that should compile with no errors, usually taken from the documentation.samples of the library.
It is very desirable each new contribution to contain tests too.
List of Libraries
-----------------
* [AngularJS](http://angularjs.org) (by [Diego Vilar](https://github.com/diegovilar)) ([wiki](https://github.com/borisyankov/DefinitelyTyped/wiki/AngularJS-Definitions-Usage-Notes))
* [async](https://github.com/caolan/async) (by [Boris Yankov](https://github.com/borisyankov))
* [Backbone.js](http://backbonejs.org/) (by [Boris Yankov](https://github.com/borisyankov))
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
declare var angular: ng.IAngularStatic;
View File
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
declare module Backbone {
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="bootstrap.datepicker.d.ts"/>
function tests_simple() {
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface DatepickerOptions {
format?: string;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="bootstrap-2.1.d.ts" />
$('body').off('.data-api');
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface ModalOptions {
backdrop?: bool;
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface ChosenOptions {
allow_single_deselect?: bool;
View File
View File
View File
View File
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="foundation-3.2.d.ts" />
function test_orbit() {
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface OrbitOptions {
animation?: string;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="hammerjs-0.6.d.ts" />
var hammer = new Hammer(document.getElementById("container"));
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface HammerOptions {
prevent_default?: bool;
View File
View File
View File
View File
View File
+1 -1
View File
@@ -1,4 +1,4 @@
///<reference path="../jquery/jquery-1.8.d.ts" />
///<reference path="../jquery/jquery-1.9.d.ts" />
///<reference path="jquery.cookie.d.ts" />
class TestObject {
+1 -1
View File
@@ -3,7 +3,7 @@
// Definitions by: Roy Goode <https://github.com/RoyGoode/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery-1.8.d.ts" />
///<reference path="../jquery/jquery-1.9.d.ts" />
interface JQueryCookieOptions {
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface JQuery {
dynatree(options?: DynatreeOptions): DynaTree;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path='../jquery/jquery-1.8.d.ts'/>
/// <reference path='../jquery/jquery-1.9.d.ts'/>
/// <reference path='jquery.jnotify-1.0.d.ts'/>
$(document).ready(function () {
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../jquery/jquery-1.8.d.ts'/>
/// <reference path='../jquery/jquery-1.9.d.ts'/>
interface JNotifyInitOptions {
oneAtTime?: bool;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="jquery.timepicker-0.3.d.ts"/>
var beforeShowCallback, onSelectCallback, onCloseCallback, onHourShow, onMinuteShow;
@@ -3,7 +3,7 @@
// Definitions by: https://github.com/anwarjaved
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jqueryui/jqueryui-1.9.d.ts"/>
interface TimePickerHour {
+1 -1
View File
@@ -1,4 +1,4 @@
///<reference path="../jquery/jquery-1.8.d.ts" />
///<reference path="../jquery/jquery-1.9.d.ts" />
///<reference path="jquery.transit.d.ts" />
@@ -1,6 +1,6 @@
// Type definitions for jQuery.transit.js
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
// Transit //////////////////////////////////////////////////
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface ValidationOptions {
debug?: bool;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="jquery.watermark-3.1.d.ts"/>
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface WatermarkOptions {
className?: string; // Default class name for all watermarks
+6 -66
View File
@@ -1,4 +1,4 @@
/// <reference path="jquery-1.8.d.ts" />
/// <reference path="jquery-1.9.d.ts" />
function test_add() {
$("p").add("div").addClass("widget");
@@ -292,13 +292,6 @@ function test_allSelector() {
$("body").prepend("<h3>" + elementCount2 + " elements found</h3>");
}
function test_andSelf() {
$('li.third-item').nextAll().andSelf()
.css('background-color', 'red');
$("div").find("p").andSelf().addClass("border");
$("div").find("p").addClass("background");
}
function test_animate() {
$('#clickme').click(function () {
$('#book').animate({
@@ -570,32 +563,6 @@ function test_blur() {
$("p").blur();
}
function test_browser() {
jQuery.each(jQuery.browser, function (i, val) {
$("<div>" + i + " : <span>" + val + "</span>").appendTo(document.body);
});
$.browser.msie;
if ($.browser.webkit) {
alert("this is webkit!");
}
var ua = $.browser;
if (ua.mozilla && ua.version.slice(0, 3) == "1.9") {
alert("Do stuff for firefox 3");
}
if ($.browser.msie) {
$("#div ul li").css("display", "inline");
} else {
$("#div ul li").css("display", "inline-table");
}
$("p").html("The version number of the rendering engine your browser uses is: <span>" + $.browser.version + "</span>");
if ($.browser.msie) {
alert($.browser.version);
}
if ($.browser.msie) {
parseInt($.browser.version, 10);
}
}
interface JQueryStatic { Topic; }
function test_callbacks() {
function fn1(value) {
@@ -829,9 +796,9 @@ function test_css() {
height: function (index, value) {
return parseFloat(value) * 1.2;
}
});
});
var dims = $("#box").css([ "width", "height", "backgroundColor" ]);
}
function test_cssHooks() {
@@ -1068,27 +1035,6 @@ function test_detach() {
});
}
/* Not existing, but not recommended either
function test_die() {
function aClick() {
$("div").show().fadeOut("slow");
}
$("#bind").click(function () {
$("#theone").live("click", aClick)
.text("Can Click!");
});
$("#unbind").click(function () {
$("#theone").die("click", aClick)
.text("Does nothing...");
});
$("p").die();
$("p").die("click");
var foo = function () { };
$("p").live("click", foo);
$("p").die("click", foo);
}
*/
function test_each() {
$.each([52, 97], function (index, value) {
alert(index + ': ' + value);
@@ -1420,6 +1366,10 @@ function test_find() {
.css({ "font-style": "italic", "font-weight": "bolder" });
}
function test_finish() {
$(".box").finish();
}
function test_first() {
$('li').first().css('background-color', 'red');
}
@@ -2011,16 +1961,6 @@ function test_length() {
}).trigger('click');
}
/* deprecated
function test_live() {
$(selector).live(events, data, handler);
$(document).delegate(selector, events, data, handler);
$(document).on(events, selector, data, handler);
$("a.offsite").live("click", function () { alert("Goodbye!"); });
$(document).delegate("a.offsite", "click", function () { alert("Goodbye!"); });
$(document).on("click", "a.offsite", function () { alert("Goodbye!"); });
} */
function test_load() {
$('#result').load('ajax/test.html');
$('#result').load('ajax/test.html', function () {
+10 -15
View File
@@ -13,7 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
// Typing for the jQuery library, version 1.7.x
// Typing for the jQuery library, version 1.9.x
/*
Interface for the AJAX setting that will configure the AJAX request
@@ -133,14 +133,6 @@ interface JQueryEventObject extends Event {
/*
Collection of properties of the current browser
*/
interface JQueryBrowserInfo {
safari:bool;
opera:bool;
msie:bool;
mozilla:bool;
webkit:bool;
version:string;
}
interface JQuerySupport {
ajax?: bool;
@@ -247,7 +239,8 @@ interface JQueryStatic {
/******
EVENTS
*******/
proxy(context: any, name: any, ...args: any[]): any;
proxy(fn : (...args: any[]) => any, context: any, ...args: any[]): any;
proxy(context: any, name: string, ...args: any[]): any;
Deferred(): JQueryDeferred;
Event(name:string, eventProperties?:any): JQueryEventObject;
@@ -266,7 +259,6 @@ interface JQueryStatic {
/**********
PROPERTIES
***********/
browser: JQueryBrowserInfo;
support: JQuerySupport;
/*********
@@ -378,8 +370,11 @@ interface JQuery {
/***
CSS
****/
css(propertyName: string, value?: any): any;
css(propertyName: any, value?: any): any;
css(propertyName: string): any;
css(propertyNames: string[]): any;
css(properties: any): any;
css(propertyName: string, value: any): any;
css(propertyName: any, value: any): any;
height(): number;
height(value: number): JQuery;
@@ -448,6 +443,8 @@ interface JQuery {
fadeToggle(duration?: any, callback?: any): JQuery;
fadeToggle(duration?: any, easing?: string, callback?: any): JQuery;
finish(): JQuery;
hide(duration?: any, callback?: any): JQuery;
hide(duration?: any, easing?: string, callback?: any): JQuery;
@@ -677,8 +674,6 @@ interface JQuery {
add(html: string): JQuery;
add(obj: JQuery): JQuery;
andSelf(): JQuery;
children(selector?: any): JQuery;
closest(selector: string): JQuery;
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface JQueryMobileEvent { (event: Event, ui): void; }
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
// Accordion //////////////////////////////////////////////////
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../knockout/knockout-2.2.d.ts" />
/// <reference path="kolite-1.1.d.ts" />
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../knockout/knockout-2.2.d.ts" />
View File
View File
View File
View File
View File
View File
View File
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
module Sammy {
export function (): Sammy.Application;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="select2-3.2.d.ts" />
$("#e9").select2();
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
/// <reference path="../jquery/jquery-1.9.d.ts"/>
interface Select2QueryOptions {
term?: string;
+1 -1
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="../jquery/jquery-1.9.d.ts" />
interface HubMethod {
(callback: (data: string) => void );
View File
View File
View File
View File
View File
View File
View File