Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jonathan Pirnay
2014-06-19 12:03:54 +02:00
193 changed files with 4547 additions and 1095 deletions

View File

@@ -83,10 +83,12 @@ All definitions files include a header with the author and editors, so at some p
* [Firefox](https://developer.mozilla.org/en-US/docs/Web/API) (by [vvakame](https://github.com/vvakame))
* [FlexSlider](http://www.woothemes.com/flexslider/) (by [Diullei Gomes](https://github.com/Diullei))
* [Flight by Twitter](http://flightjs.github.com/flight/) (by [Jonathan Hedrén](https://github.com/jonathanhedren))
* [flipsnap.js](http://pxgrid.github.io/js-flipsnap/) (by [kubosho_](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki))
* [Foundation](http://foundation.zurb.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [FPSMeter](http://darsa.in/fpsmeter/) (by [Aaron Lampros](https://github.com/alampros))
* [fs-extra](https://github.com/jprichardson/node-fs-extra) (by [midknight41](https://github.com/midknight41))
* [FullCalendar](http://arshaw.com/fullcalendar/) (by [Neil Stalker](https://github.com/nestalk))
* [Fuse.js](https://github.com/krisk/Fuse) (by [Greg Smith](https://github.com/smrq))
* [Gamepad](http://www.w3.org/TR/gamepad/) (by [Kon](http://phyzkit.net/))
* [GeoJSON](http://geojson.org/) (by [Jake Bruun](https://github.com/cobster))
* [Giraffe](https://github.com/barc/backbone.giraffe) (by [Matt McCray](https://github.com/darthapo))
@@ -155,9 +157,11 @@ All definitions files include a header with the author and editors, so at some p
* [jQuery.joyride](http://zurb.com/playground/jquery-joyride-feature-tour-plugin) (by [Vincent Bortone](https://github.com/vbortone))
* [jQuery.jSignature](https://github.com/willowsystems/jSignature) (by [Patrick Magee](https://github.com/pjmagee))
* [jQuery.noty](http://needim.github.io/noty/) (by [Aaron King](https://github.com/kingdango/))
* [jQuery.pickadate](https://github.com/amsul/pickadate.js) (by [Theodore Brown](https://github.com/theodorejb))
* [jQuery.payment](http://needim.github.io/noty/) (by [Eric J. Smith](https://github.com/ejsmith/))
* [jQuery.pickadate](https://github.com/amsul/pickadate.js) (by [Theodore Brown](https://github.com/theodorejb))
* [jQuery.pjax](https://github.com/defunkt/jquery-pjax) (by [Junle Li](https://github.com/lijunle))
* [jQuery.pnotify](http://sciactive.github.io/pnotify/) (by [David Sichau](https://github.com/DavidSichau/))
* [jQuery.postMessage](http://benalman.com/projects/jquery-postmessage-plugin/) (by [Junle Li](https://github.com/lijunle))
* [jQuery.scrollTo](https://github.com/flesler/jquery.scrollTo) (by [Neil Stalker](https://github.com/nestalk/))
* [jQuery.simplePagination](https://github.com/flaviusmatis/simplePagination.js) (by [Natan Vivo](https://github.com/nvivo/))
* [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) (by [Blake Niemyjski](https://github.com/niemyjski))
@@ -210,6 +214,7 @@ All definitions files include a header with the author and editors, so at some p
* [Logg](https://github.com/dpup/node-logg) (by [Bret Little](https://github.com/blittle))
* [Long.js](https://github.com/dcodeIO/Long.js) (by [Toshihide Hara](https://github.com/kerug))
* [lz-string](https://github.com/pieroxy/lz-string) (by [Roman Nikitin](https://github.com/M0ns1gn0r))
* [Mapbox](https://github.com/mapbox/mapbox.js/) (by [Maxime Fabre](https://github.com/anahkiasen))
* [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr))
* [MathJax](https://github.com/mathjax/MathJax) (by [Roland Zwaga](https://github.com/rolandzwaga))
* [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) (by [Sarah Williams](https://github.com/flurg))
@@ -218,6 +223,7 @@ All definitions files include a header with the author and editors, so at some p
* [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) (by [John Vilk](https://github.com/jvilk))
* [Minimatch](https://github.com/isaacs/minimatch) (by [vvakame](https://github.com/vvakame))
* [minimist](https://github.com/substack/minimist) (by [Bart van der Schoor](https://github.com/Bartvds))
* [Mixpanel](https://github.com/mixpanel/mixpanel-js) (by [Knut Eirik Leira Hjelle](https://github.com/hjellek))
* [mixto](https://github.com/atom/mixto) (by [vvakame](https://github.com/vvakame))
* [Modernizr](http://modernizr.com/) (by [Boris Yankov](https://github.com/borisyankov) and [Theodore Brown](https://github.com/theodorejb/))
* [Moment.js](https://github.com/timrwood/moment) (by [Michael Lakerveld](https://github.com/Lakerfield))
@@ -300,6 +306,7 @@ All definitions files include a header with the author and editors, so at some p
* [Teechart](http://www.steema.com) (by [Steema](http://www.steema.com))
* [text-buffer](https://github.com/atom/text-buffer) (by [vvakame](https://github.com/vvakame))
* [three.js](http://mrdoob.github.com/three.js/) (by [Kon](http://phyzkit.net/))
* [TimelineJS](https://github.com/NUKnightLab/TimelineJS) (by [Roland Zwaga](https://github.com/rolandzwaga))
* [Toastr](https://github.com/CodeSeven/toastr) (by [Boris Yankov](https://github.com/borisyankov))
* [trunk8](https://github.com/rviscomi/trunk8) (by [Blake Niemyjski](https://github.com/niemyjski))
* [TweenJS](http://www.createjs.com/#!/TweenJS) (by [Pedro Ferreira](https://bitbucket.org/drk4))
@@ -316,6 +323,7 @@ All definitions files include a header with the author and editors, so at some p
* [urlrouter](https://github.com/fengmk2/urlrouter) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
* [UUID.js](https://github.com/LiosK/UUID.js) (by [Jason Jarrett](https://github.com/staxmanade))
* [Valerie](https://github.com/davewatts/valerie) (by [Howard Richards](https://github.com/conficient))
* [Velocity](http://velocityjs.org/) (by [Greg Smith](https://github.com/smrq))
* [Viewporter](https://github.com/zynga/viewporter) (by [Boris Yankov](https://github.com/borisyankov))
* [Vimeo](http://developer.vimeo.com/player/js-api) (by [Daz Wilkin](https://github.com/DazWilkin/))
* [vinyl](https://github.com/wearefractal/vinyl) (by [vvakame](https://github.com/vvakame/))
@@ -326,6 +334,7 @@ All definitions files include a header with the author and editors, so at some p
* [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) (from TypeScript samples)
* [ws](http://einaros.github.io/ws/) (by [Paul Loyd](https://github.com/loyd))
* [x2js](https://code.google.com/p/x2js/) (by [Hiroki Horiuchi](https://github.com/horiuchi/))
* [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) (by [Michel Salib](https://github.com/michelsalib))
* [XRegExp](http://xregexp.com/) (by [Bart van der Schoor](https://github.com/Bartvds))
* [YouTube](https://developers.google.com/youtube/) (by [Daz Wilkin](https://github.com/DazWilkin/))
* [YouTube Analytics API](https://developers.google.com/youtube/analytics/) (by [Frank M](https://github.com/sgtfrankieboy))

4
Finch/Finch.d.ts vendored
View File

@@ -1,6 +1,6 @@
// Type definitions for Finch 0.5.13
// Project: https://github.com/stoodder/finchjs
// Definitions by: https://github.com/DavidSichau
// Project: https://github.com/stoodder/finchjs
// Definitions by: David Sichau <https://github.com/DavidSichau>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -176,8 +176,7 @@ amplify.request("twitter-mentions", { user: "amplifyjs" });
//Example:
amplify.request.decoders.appEnvelope =
function (data, status, xhr, success, error) {
var appEnvelopeDecoder: amplifyDecoder = function (data, status, xhr, success, error) {
if (data.status === "success") {
success(data.data);
} else if (data.status === "fail" || data.status === "error") {
@@ -187,6 +186,17 @@ function (data, status, xhr, success, error) {
}
};
//a new decoder can be added to the amplifyDecoders interface
interface amplifyDecoders {
appEnvelope: amplifyDecoder;
}
amplify.request.decoders.appEnvelope = appEnvelopeDecoder;
//but you can also just add it via an index
amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder;
amplify.request.define("decoderExample", "ajax", {
url: "/myAjaxUrl",
type: "POST",

View File

@@ -3,11 +3,33 @@
// Definitions by: Jonas Eriksson <https://github.com/joeriks/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface amplifyRequestSettings {
resourceId: string;
data?: any;
success?: Function;
error?: Function;
success?: (...args: any[]) => void;
error?: (...args: any[]) => void;
}
interface amplifyDecoder {
(
data?: any,
status?: string,
xhr?: JQueryXHR,
success?: (...args: any[]) => void,
error?: (...args: any[]) => void
): void
}
interface amplifyDecoders {
[decoderName: string]: amplifyDecoder;
jsSend: amplifyDecoder;
}
interface amplifyAjaxSettings extends JQueryAjaxSettings {
cache?: any;
decoder?: any /* string or amplifyDecoder */;
}
interface amplifyRequest {
@@ -39,7 +61,7 @@ interface amplifyRequest {
* cache: See the cache section for more details.
* decoder: See the decoder section for more details.
*/
define(resourceId: string, requestType: string, settings?: any): void;
define(resourceId: string, requestType: string, settings?: amplifyAjaxSettings): void;
/***
* Define a custom request.
@@ -50,9 +72,9 @@ interface amplifyRequest {
* success: Callback to invoke on success.
* error: Callback to invoke on error.
*/
define(resourceId: string, resource: Function): void;
decoders: any;
define(resourceId: string, resource: (settings: amplifyRequestSettings) => void): void;
decoders: amplifyDecoders;
cache: any;
}

View File

@@ -1,6 +1,6 @@
// Type definitions for Angular Translate (pascalprecht.translate module)
// Project: https://github.com/PascalPrecht/angular-translate
// Definitions by: Michel Salib <michelsalib@hotmail.com>
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />

View File

@@ -78,12 +78,13 @@ interface IUrlLocatorTestService {
// Service for determining who the currently logged on user is.
class UrlLocatorTestService implements IUrlLocatorTestService {
static $inject = ["$http", "$rootScope", "$urlRouter"];
static $inject = ["$http", "$rootScope", "$urlRouter", "$state"];
constructor(
private $http: ng.IHttpService,
private $rootScope: ng.IRootScopeService,
private $urlRouter: ng.ui.IUrlRouterService
private $urlRouter: ng.ui.IUrlRouterService,
private $state: ng.ui.IStateService
) {
$rootScope.$on("$locationChangeSuccess", (event: ng.IAngularEvent) => this.onLocationChangeSuccess(event));
}
@@ -107,6 +108,23 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
});
}
}
private stateServiceTest() {
this.$state.go("myState");
this.$state.transitionTo("myState");
if (this.$state.includes("myState") === true) {
//
}
if (this.$state.is("myState") === true) {
//
}
if (this.$state.href("myState") === "/myState") {
//
}
this.$state.get("myState");
this.$state.get();
this.$state.reload();
}
}
myApp.service("urlLocatorTest", UrlLocatorTestService);
@@ -124,4 +142,3 @@ module UiViewScrollProviderTests {
$uiViewScrollProvider.useAnchorScroll();
}]);
}

View File

@@ -1,6 +1,6 @@
// Type definitions for Angular JS 1.1.5+ (ui.router module)
// Project: https://github.com/angular-ui/ui-router
// Definitions by: Michel Salib <michelsalib@hotmail.com>
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
@@ -86,6 +86,7 @@ declare module ng.ui {
get(): IState[];
current: IState;
params: IStateParamsService;
reload(): void;
}
interface IStateParamsService {

View File

@@ -1,6 +1,6 @@
// Type definitions for Angular JS 1.2+ (ngAnimate module)
// Project: http://angularjs.org
// Definitions by: Michel Salib <michelsalib@hotmail.com>
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular.d.ts" />

View File

@@ -1,4 +1,4 @@
/// Type definitions for Angular JS 1.2 (ngCookies module)
// Type definitions for Angular JS 1.2 (ngCookies module)
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,6 +1,6 @@
// Type definitions for Angular JS 1.2 (ngResource module)
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Michael Jess <http://github.com/miffels> (minor enhancements)
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Michael Jess <http://github.com/miffels>
// Definitions: https://github.com/daptiv/DefinitelyTyped
/// <reference path="angular.d.ts" />

View File

@@ -1,6 +1,6 @@
// Type definitions for Angular JS 1.2 (ngRoute module)
// Project: http://angularjs.org
// Definitions by: Jonathan Park
// Definitions by: Jonathan Park <https://github.com/park9140>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular.d.ts" />
@@ -15,7 +15,9 @@ declare module ng.route {
// RouteParamsService
// see http://docs.angularjs.org/api/ngRoute.$routeParams
///////////////////////////////////////////////////////////////////////////
interface IRouteParamsService {}
interface IRouteParamsService {
[key: string]: any;
}
///////////////////////////////////////////////////////////////////////////
// RouteService

View File

@@ -1,6 +1,6 @@
// Type definitions for Angular Scenario Testing
// Project: http://angularjs.org
// Definitions by: RomanoLindano
// Definitions by: RomanoLindano <https://github.com/RomanoLindano>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />

View File

@@ -203,6 +203,7 @@ declare module ng {
$error: any;
$addControl(control: ng.INgModelController): void;
$removeControl(control: ng.INgModelController): void;
$setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
$setDirty(): void;
$setPristine(): void;
}
@@ -302,13 +303,17 @@ declare module ng {
// WindowService
// see http://docs.angularjs.org/api/ng.$window
///////////////////////////////////////////////////////////////////////////
interface IWindowService extends Window {}
interface IWindowService extends Window {
[key: string]: any;
}
///////////////////////////////////////////////////////////////////////////
// BrowserService
// TODO undocumented, so we need to get it from the source code
///////////////////////////////////////////////////////////////////////////
interface IBrowserService {}
interface IBrowserService {
[key: string]: any;
}
///////////////////////////////////////////////////////////////////////////
// TimeoutService

View File

@@ -1,4 +1,9 @@
// Type definitions for ansicolors
// Project: https://github.com/thlorenz/ansicolors
// Definitions by: rogierschouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "ansicolors" {
var colors: {[index: string]: (s: string) => string;};
export = colors;
export = colors;
}

View File

@@ -1,6 +1,6 @@
// Type definitions for asciify 1.3.5
// Project: https://www.npmjs.org/package/asciify
// Definitions by: Alan Norbauer http://alan.norbauer.com
// Definitions by: Alan Norbauer <http://alan.norbauer.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
@@ -26,4 +26,4 @@ declare module "asciify" {
}
export = asciify
}
}

View File

@@ -156,6 +156,22 @@ q.push([{ name: 'baz' }, { name: 'bay' }, { name: 'bax' }], function (err) {
console.log('finished processing bar');
});
// tests for strongly typed tasks
var q2 = async.queue(function (task: string, callback) {
console.log('Task: ' + task);
callback();
}, 1);
q2.push('task1');
q2.push('task2', function (error, results: string[]) {
console.log('Finished tasks: ' + results.join(', '));
});
q2.push(['task3', 'task4', 'task5'], function (error, results: string[]) {
console.log('Finished tasks: ' + results.join(', '));
});
var filename = '';
async.auto({
get_data: function (callback) { },

1
async/async.d.ts vendored
View File

@@ -16,6 +16,7 @@ interface AsyncQueue<T> {
length(): number;
concurrency: number;
push(task: T, callback?: AsyncMultipleResultsCallback<T>): void;
push(task: T[], callback?: AsyncMultipleResultsCallback<T>): void;
saturated: AsyncMultipleResultsCallback<T>;
empty: AsyncMultipleResultsCallback<T>;
drain: AsyncMultipleResultsCallback<T>;

View File

@@ -1 +0,0 @@
""

View File

@@ -1 +0,0 @@
""

View File

@@ -1,5 +1,5 @@
// Type definitions for Auth0Widget.js
// Project: Auth0.com
// Project: http://auth0.com
// Definitions by: Robert McLaws <https://github.com/advancedrei>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -45,4 +45,4 @@ declare var Auth0Widget: Auth0WidgetStatic;
declare module "Auth0Widget" {
export = Auth0Widget
}
}

4
auth0/auth0.d.ts vendored
View File

@@ -1,5 +1,5 @@
// Type definitions for Auth0.js
// Project: Auth0.com
// Project: http://auth0.com
// Definitions by: Robert McLaws <https://github.com/advancedrei>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -130,4 +130,4 @@ declare var Auth0: Auth0Static;
declare module "Auth0" {
export = Auth0
}
}

View File

@@ -1,10 +1,8 @@
// Type definitions for Backbone 1.0.0
// Project: http://backbonejs.org/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions by: Natan Vivo <https://github.com/nvivo/>
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Natan Vivo <https://github.com/nvivo/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../underscore/underscore.d.ts" />

View File

@@ -0,0 +1,31 @@
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="bootstrap.v3.datetimepicker.d.ts" />
function test_cases() {
$('#datetimepicker').datetimepicker();
$('#datetimepicker').datetimepicker({
pickDate: false
});
$('#datetimepicker').datetimepicker({
pickTime: false
});
$('#datetimepicker').datetimepicker({
minDate: '2012-12-31'
});
$('#datetimepicker').data("DateTimePicker").setMaxDate('2012-12-31');
var startDate = new Date(2012, 1, 20);
var endDate = new Date(2012, 1, 25);
$('#datetimepicker2')
.datetimepicker()
.on("dp.change", function (ev) {
if (ev.date.valueOf() > endDate.valueOf()) {
$('#alert').show().find('strong').text('The start date must be before the end date.');
} else {
$('#alert').hide();
startDate = ev.date;
$('#date-start-display').text($('#date-start').data('date'));
}
});
}

View File

@@ -0,0 +1,100 @@
// Type definitions for Bootstrap datetimepicker v3
// Project: http://eonasdan.github.io/bootstrap-datetimepicker
// Definitions by: Jesica N. Fera <https://github.com/bayitajesi>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/**
* bootstrap-datetimepicker.js 3.0.0 Copyright (c) 2014 Jonathan Peterson
* Available via the MIT license.
* see: http://eonasdan.github.io/bootstrap-datetimepicker or https://github.com/Eonasdan/bootstrap-datetimepicker for details.
*/
/// <reference path="../jquery/jquery.d.ts"/>
declare module BootstrapV3DatetimePicker {
interface DatetimepickerChangeEventObject extends JQueryEventObject {
date: any;
oldDate: any;
}
interface DatetimepickerEventObject extends JQueryEventObject {
date: any;
}
interface DatetimepickerIcons {
time?: string;
date?: string;
up?: string;
down?: string;
}
interface DatetimepickerOptions {
pickDate?: boolean;
pickTime?: boolean;
useMinutes?: boolean;
useSeconds?: boolean;
useCurrent?: boolean;
minuteStepping?: number;
minDate?: any;
maxDate?: any;
showToday?: boolean;
collapse?: boolean;
language?: string;
defaultDate?: string;
disabledDates?: Array<any>;
enabledDates?: Array<any>;
icons?: DatetimepickerIcons;
useStrict?: boolean;
direction?: string;
sideBySide?: boolean;
daysOfWeekDisabled?: Array<any>;
}
interface Datetimepicker {
setDate(date: any): void;
setMinDate(date: any): void;
setMaxDate(date: any): void;
show(): void;
disable(): void;
enable(): void;
getDate(): void;
}
}
interface JQuery {
datetimepicker(): JQuery;
datetimepicker(options: BootstrapV3DatetimePicker.DatetimepickerOptions): JQuery;
off(events: "dp.change", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery;
off(events: "dp.change", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery;
on(events: "dp.change", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery;
on(events: "dp.change", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery;
on(events: 'dp.change', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery;
off(events: "dp.show", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
off(events: "dp.show", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: "dp.show", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: "dp.show", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: 'dp.show', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
off(events: "dp.hide", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
off(events: "dp.hide", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: "dp.hide", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: "dp.hide", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: 'dp.hide', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
off(events: "dp.error", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
off(events: "dp.error", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: "dp.error", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: "dp.error", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
on(events: 'dp.error', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery;
data(key: 'DateTimePicker'): BootstrapV3DatetimePicker.Datetimepicker;
}

View File

@@ -1,7 +1,7 @@
// Type definitions for chai-datetime
// Project: https://github.com/gaslight/chai-datetime.git
// Definitions by: Cliff Burger <https://github.com/cliffburger/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../chai/chai.d.ts" />

View File

@@ -1,7 +1,7 @@
// Type definitions for chai-jquery 1.1.1
// Project: https://github.com/chaijs/chai-jquery
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../chai/chai.d.ts" />

View File

@@ -1 +0,0 @@
""

3
chai/chai.d.ts vendored
View File

@@ -1,8 +1,7 @@
// Type definitions for chai 1.7.2
// Project: http://chaijs.com/
// Definitions by: Jed Hunsaker <https://github.com/jedhunsaker/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module chai {

View File

@@ -1,4 +1,4 @@
// Type definitions for Chrome packaged application development.
// Type definitions for Chrome packaged application development
// Project: http://developer.chrome.com/apps/
// Definitions by: Adam Lay <https://github.com/AdamLay>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -92,4 +92,4 @@ declare module chrome.app.window {
var onMaximized: WindowEvent;
var onMinimized: WindowEvent;
var onRestored: WindowEvent;
}
}

66
chrome/chrome.d.ts vendored
View File

@@ -1,6 +1,6 @@
// Type definitions for Chrome extension development.
// Type definitions for Chrome extension development
// Project: http://developer.chrome.com/extensions/
// Definitions by: Matthew Kimber <https://github.com/matthewkimber> and otiai10 <https://github.com/otiai10>
// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
////////////////////
@@ -1232,6 +1232,68 @@ declare module chrome.management {
var onEnabled: ManagementEnabledEvent;
}
////////////////////
// Notifications
// https://developer.chrome.com/extensions/notifications
////////////////////
declare module chrome.notifications {
interface ButtonOptions {
title: string;
iconUrl?: string;
}
interface ItemOptions {
title: string;
message: string;
}
interface NotificationOptions {
type?: string;
iconUrl?: string;
title?: string;
message?: string;
contextMessage?: string;
priority?: number;
eventTime?: number;
buttons?: Array<ButtonOptions>;
items?: Array<ItemOptions>;
progress?: number;
isClickable?: boolean;
}
interface OnClosed {
addListener(callback: (notificationId: string, byUser: boolean) => void): void;
}
interface OnClicked {
addListener(callback: (notificationId: string) => void): void;
}
interface OnButtonClicked {
addListener(callback: (notificationId: string, buttonIndex: number) => void): void;
}
interface OnPermissionLevelChanged {
addListener(callback: (level: string) => void): void;
}
interface OnShowSettings {
addListener(callback: Function): void;
}
export var onClosed: OnClosed;
export var onClicked: OnClicked;
export var onButtonClicked: OnButtonClicked;
export var onPermissionLevelChanged: OnPermissionLevelChanged;
export var onShowSettings: OnShowSettings;
export function create(notificationId: string, options: NotificationOptions, callback: (notificationId: string) => void): void;
export function update(notificationId: string, options: NotificationOptions, callback: (wasUpdated: boolean) => void): void;
export function clear(notificationId: string, callback: (wasCleared: boolean) => void): void;
export function getAll(callback: (notifications: any) => void): void;
export function getPermissionLevel(callback: (level: string) => void): void;
}
////////////////////
// Omnibox
////////////////////

View File

@@ -1,6 +1,6 @@
// Type definitions for Apache Cordova.
// Type definitions for Apache Cordova
// Project: http://cordova.apache.org
// Definitions by: Microsoft Open Technologies, Inc. <http://msopentech.com>
// Definitions by: Microsoft Open Technologies Inc. <http://msopentech.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
//
// Copyright (c) Microsoft Open Technologies, Inc.
@@ -57,4 +57,4 @@ interface UrlUtil {
}
/** Apache Cordova instance */
declare var cordova: Cordova;
declare var cordova: Cordova;

View File

@@ -1,5 +1,5 @@
// Type definitions for EaselJS 0.7.1, TweenJS 0.5.1, SoundJS 0.5.2, PreloadJS 0.4.1
// Project: http://www.createjs.com/#!/EaselJS
// Type definitions for CreateJS
// Project: http://www.createjs.com/
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>, Chris Smith <https://github.com/evilangelist>, Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,5 +1,5 @@
// Type definitions for EaselJS 0.7.1, TweenJS 0.5.1, SoundJS 0.5.2, PreloadJS 0.4.1
// Project: http://www.createjs.com/#!/EaselJS
// Type definitions for CreateJS
// Project: http://www.createjs.com/
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>, Chris Smith <https://github.com/evilangelist>, Satoru Kimura <https://github.com/gyohk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,7 +1,7 @@
// Type definitions for Crossroads.js
// Project: http://millermedeiros.github.io/crossroads.js/
// Definitions by: Diullei Gomes <https://github.com/diullei>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../js-signals/js-signals.d.ts" />

4
d3/d3.d.ts vendored
View File

@@ -751,8 +751,8 @@ declare module D3 {
empty: () => boolean;
data: {
(values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => string): UpdateSelection;
(values: any[], key?: (data: any, index?: number) => string): UpdateSelection;
(values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => any): UpdateSelection;
(values: any[], key?: (data: any, index?: number) => any): UpdateSelection;
(): any[];
};

View File

@@ -0,0 +1,10 @@
/// <reference path="date.format.d.ts" />
// test dateFormat
var now : string = dateFormat();
var nowFullDate : string = dateFormat( dateFormat.masks.fullDate );
// test format() (on the prototype of Date)
var then : Date = new Date( 2014, 1, 1 );
var thenDefaultFormat : string = then.format();
var thenCustomFormat : string = then.format('yyyy/m/d HH:MM');

244
date.format.js/date.format.d.ts vendored Normal file
View File

@@ -0,0 +1,244 @@
// Type definitions for Date Format 1.2.3
// Project: http://blog.stevenlevithan.com/archives/date-time-format
// Definitions by: Rob Stutton <https://github.com/balrob>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/*****************************************************************************
Portions Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/** Enables basic storage and retrieval of dates and times. */
interface Date {
/** Returns a string representation of a date. The format of the string depends on the locale. */
toString(): string;
/** Returns a date as a string value. */
toDateString(): string;
/** Returns a time as a string value. */
toTimeString(): string;
/** Returns a value as a string value appropriate to the host environment's current locale. */
toLocaleString(): string;
/** Returns a date as a string value appropriate to the host environment's current locale. */
toLocaleDateString(): string;
/** Returns a time as a string value appropriate to the host environment's current locale. */
toLocaleTimeString(): string;
/** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
valueOf(): number;
/** Gets the time value in milliseconds. */
getTime(): number;
/** Gets the year, using local time. */
getFullYear(): number;
/** Gets the year using Universal Coordinated Time (UTC). */
getUTCFullYear(): number;
/** Gets the month, using local time. */
getMonth(): number;
/** Gets the month of a Date object using Universal Coordinated Time (UTC). */
getUTCMonth(): number;
/** Gets the day-of-the-month, using local time. */
getDate(): number;
/** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
getUTCDate(): number;
/** Gets the day of the week, using local time. */
getDay(): number;
/** Gets the day of the week using Universal Coordinated Time (UTC). */
getUTCDay(): number;
/** Gets the hours in a date, using local time. */
getHours(): number;
/** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
getUTCHours(): number;
/** Gets the minutes of a Date object, using local time. */
getMinutes(): number;
/** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
getUTCMinutes(): number;
/** Gets the seconds of a Date object, using local time. */
getSeconds(): number;
/** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
getUTCSeconds(): number;
/** Gets the milliseconds of a Date, using local time. */
getMilliseconds(): number;
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
getUTCMilliseconds(): number;
/** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
getTimezoneOffset(): number;
/**
* Sets the date and time value in the Date object.
* @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
*/
setTime(time: number): void;
/**
* Sets the milliseconds value in the Date object using local time.
* @param ms A numeric value equal to the millisecond value.
*/
setMilliseconds(ms: number): void;
/**
* Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
* @param ms A numeric value equal to the millisecond value.
*/
setUTCMilliseconds(ms: number): void;
/**
* Sets the seconds value in the Date object using local time.
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setSeconds(sec: number, ms?: number): void;
/**
* Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setUTCSeconds(sec: number, ms?: number): void;
/**
* Sets the minutes value in the Date object using local time.
* @param min A numeric value equal to the minutes value.
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setMinutes(min: number, sec?: number, ms?: number): void;
/**
* Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
* @param min A numeric value equal to the minutes value.
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setUTCMinutes(min: number, sec?: number, ms?: number): void;
/**
* Sets the hour value in the Date object using local time.
* @param hours A numeric value equal to the hours value.
* @param min A numeric value equal to the minutes value.
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setHours(hours: number, min?: number, sec?: number, ms?: number): void;
/**
* Sets the hours value in the Date object using Universal Coordinated Time (UTC).
* @param hours A numeric value equal to the hours value.
* @param min A numeric value equal to the minutes value.
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): void;
/**
* Sets the numeric day-of-the-month value of the Date object using local time.
* @param date A numeric value equal to the day of the month.
*/
setDate(date: number): void;
/**
* Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
* @param date A numeric value equal to the day of the month.
*/
setUTCDate(date: number): void;
/**
* Sets the month value in the Date object using local time.
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
* @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
*/
setMonth(month: number, date?: number): void;
/**
* Sets the month value in the Date object using Universal Coordinated Time (UTC).
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
* @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
*/
setUTCMonth(month: number, date?: number): void;
/**
* Sets the year of the Date object using local time.
* @param year A numeric value for the year.
* @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
* @param date A numeric value equal for the day of the month.
*/
setFullYear(year: number, month?: number, date?: number): void;
/**
* Sets the year value in the Date object using Universal Coordinated Time (UTC).
* @param year A numeric value equal to the year.
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
* @param date A numeric value equal to the day of the month.
*/
setUTCFullYear(year: number, month?: number, date?: number): void;
/** Returns a date converted to a string using Universal Coordinated Time (UTC). */
toUTCString(): string;
/** Returns a date as a string value in ISO format. */
toISOString(): string;
/** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
toJSON(key?: any): string;
/**
* This is a convenience addition to the Date prototype
* Returns a formatted version of the date.
* The mask defaults to dateFormat.masks.default.
* @param {string=} mask
* @param {boolean=} utc
*/
format(mask?: string, utc?: boolean) : string;
}
declare var Date: {
new (): Date;
new (value: number): Date;
new (value: string): Date;
new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
(): string;
prototype: Date;
/**
* Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
* @param s A date string
*/
parse(s: string): number;
/**
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
* @param month The month as an number between 0 and 11 (January to December).
* @param date The date as an number between 1 and 31.
* @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
* @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
* @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
* @param ms An number from 0 to 999 that specifies the milliseconds.
*/
UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
now(): number;
};
// Some common format strings
interface DateFormatMasks {
"default": string;
shortDate: string;
mediumDate: string;
longDate: string;
fullDate: string;
shortTime: string;
mediumTime: string;
longTime: string;
isoDate: string;
isoTime: string;
isoDateTime: string;
isoUtcDateTime: string;
}
// Internationalization strings
interface DateFormatI18n {
dayNames: string[];
monthNames: string[];
}
/**
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
* The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default.
* @param {Date=} date
* @param {string=} mask
* @param {boolean=} utc
*/
declare var dateFormat: {
(date?: any, mask?: string, utc?: boolean ): string;
masks : DateFormatMasks;
i18n : DateFormatI18n;
};

5
dcjs/dc.d.ts vendored
View File

@@ -1,7 +1,8 @@
// Type definitions for DCJS
// Project: https://github.com/dc-js
// Definitions by: hans windhoff
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files
///<reference path="../d3/d3.d.ts" />
@@ -195,4 +196,4 @@ export interface ILegendwidget {
export function rowChart(cssSel: string): IRowchart;
}
}

View File

@@ -1,6 +1,6 @@
// Type definitions for domready
// Project: https://github.com/ded/domready
// Definitions by: Christian Holm Nielsen
// Definitions by: Christian Holm Nielsen <https://github.com/dotnetnerd>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare function domready(callback: () => any) : void;

View File

@@ -1,7 +1,7 @@
// Type definitions for expect.js 0.2.0
// Project: https://github.com/LearnBoost/expect.js
// Definitions by: Teppei Sato <https://github.com/teppeis>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare function expect(target?: any): Expect.Root;
@@ -17,7 +17,7 @@ declare module Expect {
*
* @param fn callback to match error string against
*/
throwError(fn?: (exception: any) => void): void;
throwError(fn?: (exception: any) => void): void;
/**
* Assert that the function throws.

View File

@@ -1,7 +1,7 @@
// Type definitions for expectations.js 0.2.5
// Project: https://github.com/spmason/expectations
// Definitions by: vvakame <https://github.com/vvakame>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var expect:Expectations.IExpectations;
@@ -57,4 +57,4 @@ declare module Expectations {
fail(why?:string, what?:any):any;
}
}
}

View File

@@ -1,7 +1,7 @@
// Type definitions for express-validator
// Project: https://github.com/ctavan/express-validator
// Definitions by: Nathan Ridley <https://github.com/axefrog/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module ExpressValidator {
export interface ValidationError {

View File

@@ -1,7 +1,7 @@
// Type definitions for Express 3.1
// Project: http://expressjs.com
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/* =================== USAGE ===================

View File

@@ -1,7 +1,7 @@
// Type definitions for FabricJS
// Project: http://fabricjs.com/
// Definitions by: Oliver Klemencic <https://github.com/oklemencic/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module fabric {

View File

@@ -1,4 +1,4 @@
// Type Definitions for File System API
// Type definitions for File System API
// Project: http://www.w3.org/TR/file-system-api/
// Definitions by: Kon <http://phyzkit.net/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type Definitions for File API: Writer
// Type definitions for File API: Writer
// Project: http://www.w3.org/TR/file-writer-api/
// Definitions by: Kon <http://phyzkit.net/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -0,0 +1,13 @@
/**
* Created by kubosho_ on 6/16/2014.
*/
///<reference path='flipsnap.d.ts'/>
Flipsnap('', {
maxPoint: 3,
distance: 230,
transitionDuration: 500,
disableTouch: true,
disable3d: false
});

93
flipsnap/flipsnap.d.ts vendored Normal file
View File

@@ -0,0 +1,93 @@
// Type definitions for flipsnap.js
// Project: http://pxgrid.github.io/js-flipsnap/
// Definitions by: kubosho_ <https://github.com/kubosho>, gsino <https://github.com/gsino>, Mayuki Sawatari <https://github.com/mayuki>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface IFlipsnap {
/**
* Return true or false. true is returned when there is previous element.
*/
hasPrev(): boolean;
/**
* Return true or false. true is returned when there is next element.
*/
hasNext(): boolean;
/**
* Move to previous item.
*/
toPrev(transitionDuration?: number): void;
/**
* Move to next item.
*/
toNext(transitionDuration?: number): void;
/**
* Move to item of number.
*/
moveToPoint(point: number, transitionDuration?: number): void;
/**
* Recalculate values
*/
refresh(): void;
element: HTMLElement;
}
interface FlipsnapStatic {
/**
* @param element The element
*/
(element: HTMLElement, opts?: FlipsnapOptions): IFlipsnap;
/**
* @param selector The parameter must be CSS Selector. When set string, to get first element of result. Not all element.
*/
(selector: string, opts?: FlipsnapOptions): IFlipsnap;
}
interface FlipsnapOptions {
/**
* Stop point count. default is auto calculate from element item count.
*/
maxPoint?: number;
/**
* Move distance. default is auto calculate from element width and maxPont.
*/
distance?: number;
/**
* Transition duration (millisecond). default is 350.
*/
transitionDuration?: number;
/**
* When set true, touch event is disabled. Only handling button or etc interface. default is false.
*/
disableTouch?: boolean;
/**
* When support 3D transform browser and this option set true, it is not used 3D transform and use 2D transform. You should set true, when it is a device which has a bug in 3D transform(old Android or BlackBerry etc). default is false.
*/
disable3d?: boolean;
}
interface HTMLElement {
addEventListener(type: "fstouchstart", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "fstouchmove", listener: (ev: FlipsnapTouchMoveEvent) => any, useCapture?: boolean): void;
addEventListener(type: "fstouchend", listener: (ev: FlipsnapTouchEndEvent) => any, useCapture?: boolean): void;
}
interface FlipsnapTouchMoveEvent extends Event {
delta: number;
direction: number;
}
interface FlipsnapTouchEndEvent extends Event {
moved: boolean;
cancelled: boolean;
newPoint: number;
originalPoint: number;
}
declare var Flipsnap: FlipsnapStatic;

View File

@@ -1,6 +1,6 @@
// Type definitions for ftdomdelegate
// Project: https://github.com/ftlabs/ftdomdelegate
// Definitions by: Christian Holm Nielsen
// Definitions by: Christian Holm Nielsen <https://github.com/dotnetnerd>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare class Delegate
@@ -19,4 +19,4 @@ declare class Delegate
root(element? : Element) : void;
destroy() : void;
}
}

73
fuse/fuse-tests.ts Normal file
View File

@@ -0,0 +1,73 @@
/// <reference path="fuse.d.ts" />
function test_fuse_find_identifiers() {
var books = [{
id: 1,
title: 'The Great Gatsby',
author: 'F. Scott Fitzgerald'
}, {
id: 2,
title: 'The DaVinci Code',
author: 'Dan Brown'
}, {
id: 3,
title: 'Angels & Demons',
author: 'Dan Brown'
}];
var options = {
keys: ['author', 'title'], // keys to search in
id: 'id' // return a list of identifiers only
};
var f = new Fuse(books, options);
var result = f.search('brwn'); // Fuzzy-search for pattern 'brwn'
}
function test_fuse_find_records() {
var books = [{
id: 1,
title: 'The Great Gatsby',
author: 'F. Scott Fitzgerald'
}, {
id: 2,
title: 'The DaVinci Code',
author: 'Dan Brown'
}, {
id: 3,
title: 'Angels & Demons',
author: 'Dan Brown'
}];
var options = {
keys: ['author', 'title']
};
var f = new Fuse(books, options);
var result = f.search('brwn');
}
function test_fuse_flat_array() {
var books = ["Old Man's War", "The Lock Artist", "HTML5", "Right Ho Jeeves", "The Code of the Wooster", "Thank You Jeeves", "The DaVinci Code", "Angels & Demons", "The Silmarillion", "Syrup", "The Lost Symbol", "The Book of Lies", "Lamb", "Fool", "Incompetence", "Fat", "Colony", "Backwards, Red Dwarf", "The Grand Design", "The Book of Samson", "The Preservationist", "Fallen", "Monster 1959"];
var f = new Fuse(books);
var result = f.search('Falen');
}
function test_fuse_deep_key_search() {
var books = [{
id: 1,
title: 'The Great Gatsby',
author: {
firstName: 'F. Scott',
lastName: 'Fitzgerald'
}
}, {
title: 'The DaVinci Code',
author: {
firstName: 'Dan',
lastName: 'Brown'
}
}];
var options = {
keys: ['author.firstName']
}
var f = new Fuse(books, options);
var result = f.search('brwn');
}

28
fuse/fuse.d.ts vendored Normal file
View File

@@ -0,0 +1,28 @@
// Type definitions for Fuse.js 1.1.5
// Project: https://github.com/krisk/Fuse
// Definitions by: Greg Smith <https://github.com/smrq/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare class Fuse {
constructor(list: any[], options?: fuse.IFuseOptions);
search(pattern: string): any[];
}
declare module fuse {
interface IFuseOptions extends ISearchOptions {
caseSensitive?: boolean;
includeScore?: boolean;
shouldSort?: boolean;
searchFn?: any;
sortFn?: (a: {score: number}, b: {score: number}) => number;
getFn?: (obj: any, path: string) => any;
keys?: string[];
}
interface ISearchOptions {
location?: number;
distance?: number;
threshold?: number;
maxPatternLength?: number;
}
}

View File

@@ -1,6 +1,6 @@
// Type definitions for glDatePicker 2.0
// Project: http://glad.github.com/glDatePicker/
// Definitions by: Dániel Tar https://github.com/qcz
// Definitions by: Dániel Tar <https://github.com/qcz>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
@@ -66,4 +66,4 @@ interface GlDatePicker {
interface JQuery {
glDatePicker(ret: boolean): GlDatePicker;
glDatePicker(options?: GlDatePickerOptions): JQuery;
}
}

View File

@@ -159,40 +159,19 @@ declare module google {
enableRegionInteractivity?: boolean;
height?: number;
keepAspectRatio?: boolean;
legend?: GeoChartLegend;
legend?: ChartLegend;
region?: string;
magnifyingGlass?: GeoChartMagnifyingGlass;
markerOpacity?: number;
resolution?: string;
sizeAxis?: GeoChartAxis;
tooltip?: GeoChartTooltip;
sizeAxis?: ChartSizeAxis;
tooltip?: ChartTooltip;
width?: number;
}
export interface GeoChartAxis {
maxSize?: number;
maxValue?: number;
minSize?: number;
minValue?: number;
}
export interface GeoChartTextStyle {
color?: string;
fontName?: string;
fontSize?: number;
bold?: boolean;
italic?: boolean;
}
export interface GeoChartLegend {
numberFormat?: string;
textStyle?: GeoChartTextStyle;
}
export interface GeoChartMagnifyingGlass {
enable?: boolean;
zoomFactor?: number;
}
export interface GeoChartTooltip {
textStyle?: GeoChartTextStyle;
trigger?: string;
}
export interface GeoChartRegionClickEvent {
region: string;
}
@@ -276,6 +255,7 @@ declare module google {
maxLines?: number;
position?: string;
textStyle?: ChartTextStyle;
numberFormat?: string;
}
// https://google-developers.appspot.com/chart/interactive/docs/animation
@@ -766,10 +746,10 @@ declare module google {
}
export interface ChartSizeAxis {
maxSize: number;
maxValue: number;
minSize: number;
minValue: number;
maxSize?: number;
maxValue?: number;
minSize?: number;
minValue?: number;
}
//#endregion
@@ -864,7 +844,7 @@ declare module google {
// https://google-developers.appspot.com/chart/interactive/docs/gallery/timeline#Configuration_Options
export interface TimelineOptions {
avoidOverlappingGridLines?: boolean;
backgroundColor?: string;
backgroundColor?: any;
colors?: string[];
enableInteractivity?: boolean;
forceIFrame?: boolean;

View File

@@ -1,10 +1,10 @@
/// <reference path="../googlemaps/google.maps.d.ts" />
// Type definitions for CSS3 InfoBubble with tabs for Google Maps API V3
// Project: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src/
// Definitions by: Johan Nilsson https://github.com/Dashue
// Definitions by: Johan Nilsson <https://github.com/Dashue>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../googlemaps/google.maps.d.ts" />
/**
* @name CSS3 InfoBubble with tabs for Google Maps API V3
* @version 0.8
@@ -105,4 +105,4 @@ declare module google.maps.infobubble {
*/
shadowStyle?: number;
}
}
}

View File

@@ -1,6 +1,7 @@
// Type definitions for Hammer.js 1.0.10
// Type definitions for Hammer.js 1.1.3
// Project: http://eightmedia.github.com/hammer.js/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Drew Noakes <https://drewnoakes.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -31,8 +32,6 @@ interface HammerStatic {
plugins: any;
gestures: any;
READY: boolean;
}
declare class HammerInstance {
@@ -42,40 +41,51 @@ declare class HammerInstance {
off(gesture: string, handler: (event: HammerEvent) => void): HammerInstance;
enable(toggle: boolean): HammerInstance;
// You shouldn't use this, this is an internally method use by the gestures. Only use it when you know what you're doing! You can read the sourcecode about how to use this.
// You shouldn't normally use this internal method. Only use it when you know what you're doing! You can read the sourcecode for information about how to use this.
trigger(gesture: string, eventData: HammerGestureEventData): HammerInstance;
}
// Gesture Options : https://github.com/EightMedia/hammer.js/wiki/Getting-Started#gesture-options
interface HammerOptions {
behavior?: {
contentZooming?: string;
tapHighlightColor?: string;
touchAction?: string;
touchCallout?: string;
userDrag?: string;
userSelect?: string;
};
doubleTapDistance?: number;
doubleTapInterval?: number;
drag?: boolean;
drag_block_horizontal?: boolean;
drag_block_vertical?: boolean;
drag_lock_to_axis?: boolean;
drag_max_touches?: number;
drag_min_distance?: number;
dragBlockHorizontal?: boolean;
dragBlockVertical?: boolean;
dragDistanceCorrection?: boolean;
dragLockMinDistance?: number;
dragLockToAxis?: boolean;
dragMaxTouches?: number;
dragMinDistance?: number;
gesture?: boolean;
hold?: boolean;
hold_threshold?: number;
hold_timeout?: number;
prevent_default?: boolean;
prevent_mouseevents?: boolean;
holdThreshold?: number;
holdTimeout?: number;
preventDefault?: boolean;
preventMouse?: boolean;
release?: boolean;
show_touches?: boolean;
stop_browser_behavior?: any;
showTouches?: boolean;
swipe?: boolean;
swipe_max_touches?: number;
swipe_velocity?: number;
swipeMaxTouches?: number;
swipeMinTouches?: number;
swipeVelocityX?: number;
swipeVelocityY?: number;
tap?: boolean;
tap_always?: boolean;
tap_max_distance?: number;
tap_max_touchtime?: number;
doubletap_distance?: number;
doubletap_interval?: number;
tapAlways?: boolean;
tapMaxDistance?: number;
tapMaxTime?: number;
touch?: boolean;
transform?: boolean;
transform_always_block?: boolean;
transform_min_rotation?: number;
transform_min_scale?: number;
transformMinRotation?: number;
transformMinScale?: number;
}
interface HammerGestureEventData {
@@ -106,6 +116,8 @@ interface HammerGestureEventData {
}
interface HammerPoint {
clientX: number;
clientY: number;
pageX: number;
pageY: number;
}

View File

@@ -1,7 +1,8 @@
// Type definitions for highlight.js
// Project: https://github.com/isagalaev/highlight.js
// Definitions by: Niklas Mollenhauer <https://github.com/nikeee/>
// Definitions by: Niklas Mollenhauer <https://github.com/nikeee/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "highlight.js"
{
module hljs

2
humane/humane.d.ts vendored
View File

@@ -1,7 +1,7 @@
// Type definitions for Humane 3.0
// Project: http://wavded.github.com/humane-js/
// Definitions by: jmvrbanac <https://github.com/jmvrbanac>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface HumaneOptions {

View File

@@ -1,6 +1,6 @@
// Type definitions for i18next (v1.5.10 incl. jQuery)
// Type definitions for i18next v1.5.10
// Project: http://i18next.com
// Definitions by: Maarten Docter <https://github.com/mdocter> - Blog: http://www.maartendocter.nl
// Definitions by: Maarten Docter <https://github.com/mdocter>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// Sources: https://github.com/jamuhl/i18next/

View File

@@ -1,6 +1,6 @@
// Type definitions for iScroll Lite 4.1
// Project: http://cubiq.org/iscroll-4
// Definitions by: Boris Yankov <https://github.com/borisyankov/> and Christiaan Rakowski <https://github.com/csrakowski/>
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christiaan Rakowski <https://github.com/csrakowski/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,6 +1,6 @@
// Type definitions for iScroll 4.2
// Project: http://cubiq.org/iscroll-4
// Definitions by: Boris Yankov <https://github.com/borisyankov/> and Christiaan Rakowski <https://github.com/csrakowski/>
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christiaan Rakowski <https://github.com/csrakowski/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

14
ix.js/l2o.d.ts vendored
View File

@@ -54,8 +54,10 @@ declare module Ix {
some(predicate?: EnumerablePredicate<T>, thisArg?: any): boolean; // alias
average(selector?: EnumerableFunc<T, number>): number;
max(selector?: EnumerableFunc<T, number>): number;
min(selector?: EnumerableFunc<T, number>): number;
max(): T;
max<TResult>(selector: EnumerableFunc<T, TResult>): TResult;
min(): T;
min<TResult>(selector: EnumerableFunc<T, TResult>): TResult;
sum(selector?: EnumerableFunc<T, number>): number;
concat<T>(...sources: Enumerable<T>[]): Enumerable<T>;
@@ -91,16 +93,16 @@ declare module Ix {
comparer?: EqualityComparer<TKey, TKey>): Enumerable<TResult>;
groupBy<TKey, TElement>(
keySelector: (item: T) => TKey,
elementSelector: (item: T) => TElement): Grouping<TKey, TElement>;
elementSelector: (item: T) => TElement): Enumerable<Grouping<TKey, TElement>>;
groupBy<TKey>(
keySelector: (item: T) => TKey): Grouping<TKey, T>;
keySelector: (item: T) => TKey): Enumerable<Grouping<TKey, T>>;
// if need to set comparer without resultSelector
groupBy<TKey, TElement>(
keySelector: (item: T) => TKey,
elementSelector: (item: T) => TElement,
_: boolean,
comparer: EqualityComparer<TKey, TKey>): Grouping<TKey, TElement>;
comparer: EqualityComparer<TKey, TKey>): Enumerable<Grouping<TKey, TElement>>;
// if need to set resultSelector without elementSelector
groupBy<TKey, TResult>(
keySelector: (item: T) => TKey,
@@ -112,7 +114,7 @@ declare module Ix {
keySelector: (item: T) => TKey,
_: boolean,
__: boolean,
comparer: EqualityComparer<TKey, TKey>): Grouping<TKey, T>;
comparer: EqualityComparer<TKey, TKey>): Enumerable<Grouping<TKey, T>>;
groupJoin<TInner, TOuterKey, TInnerKey, TResult>(
inner: Enumerable<TInner>,

View File

@@ -1,7 +1,7 @@
// Type definitions for Jasmine-fixture 1.0.7
// Project: https://github.com/searls/jasmine-fixture
// Definitions by: Craig Brett <https://github.com/craigbrett17/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/** Affixes the given jquery selectors into the body and will be removed after each spec
* @param {string} selector The JQuery selector to be added to the dom
@@ -13,4 +13,4 @@ interface JQuery {
* @param {string} selector The JQuery selector to be added to the dom
*/
affix(selector: string): JQuery;
}
}

View File

@@ -1,7 +1,7 @@
// Type definitions for Jasmine-JQuery 1.5.8
// Project: https://github.com/velesin/jasmine-jquery
// Definitions by: Gregor Stamac <https://github.com/gstamac/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jasmine/jasmine.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>

View File

@@ -1,7 +1,7 @@
// Type definitions for Jasmine 2.0
// Project: http://pivotal.github.com/jasmine/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Theodore Brown <https://github.com/theodorejb>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare function describe(description: string, specDefinitions: () => void): void;

View File

@@ -1,7 +1,7 @@
// Type definitions for Jasmine 1.3
// Project: http://pivotal.github.com/jasmine/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare function describe(description: string, specDefinitions: () => void): void;

View File

@@ -29,27 +29,6 @@ var funcArr: Function[] = [];
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var validOpts: Joi.ValidationOptions = null;
validOpts = {abortEarly: bool};
validOpts = {convert: bool};
validOpts = {allowUnknown: bool};
validOpts = {skipFunctions: bool};
validOpts = {stripUnknown: bool};
validOpts = {language: bool};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var renOpts: Joi.RenameOptions = null;
renOpts = {alias: bool};
renOpts = {multiple: bool};
renOpts = {override: bool};
var validErr: Joi.ValidationError = null;
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var schema: Joi.Schema = null;
var anySchema: Joi.AnySchema<Joi.Schema> = null;
@@ -61,9 +40,66 @@ var binSchema: Joi.BinarySchema = null;
var dateSchema: Joi.DateSchema = null;
var funcSchema: Joi.FunctionSchema = null;
var objSchema: Joi.ObjectSchema = null;
var altSchema: Joi.AlternativesSchema = null;
var schemaArr: Joi.Schema[] = [];
var ref: Joi.Reference = null;
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var validOpts: Joi.ValidationOptions = null;
validOpts = {abortEarly: bool};
validOpts = {convert: bool};
validOpts = {allowUnknown: bool};
validOpts = {skipFunctions: bool};
validOpts = {stripUnknown: bool};
validOpts = {language: bool};
validOpts = {context: obj};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var renOpts: Joi.RenameOptions = null;
renOpts = {alias: bool};
renOpts = {multiple: bool};
renOpts = {override: bool};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var whenOpts: Joi.WhenOptions = null;
whenOpts = {is: schema};
whenOpts = {is: schema, then: schema};
whenOpts = {is: schema, otherwise: schema};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var refOpts: Joi.ReferenceOptions = null;
refOpts = {alias: bool};
refOpts = {multiple: bool};
refOpts = {override: bool};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
var validErr: Joi.ValidationError = null;
var validErrItem: Joi.ValidationErrorItem;
validErrItem= {
message: str,
type: str,
path: str
};
validErrItem = {
message: str,
type: str,
path: str,
options: validOpts
};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
schema = anySchema;
@@ -76,6 +112,8 @@ schema = dateSchema;
schema = funcSchema;
schema = objSchema;
schema = ref;
anySchema = anySchema;
anySchema = numSchema;
anySchema = strSchema;
@@ -99,18 +137,22 @@ schemaMap = {
anySchema = Joi.any();
anySchema.validate(x, (err: Joi.ValidationError, value: any) => {
});
module common {
anySchema = anySchema.allow(x);
anySchema = anySchema.allow(x, x);
anySchema = anySchema.allow([x, x, x]);
anySchema = anySchema.valid(x);
anySchema = anySchema.valid(x, x);
anySchema = anySchema.valid([x, x, x]);
anySchema = anySchema.invalid(x);
anySchema = anySchema.invalid(x, x);
anySchema = anySchema.invalid([x, x, x]);
anySchema = anySchema.default(x);
anySchema = anySchema.required();
anySchema = anySchema.optional();
anySchema = anySchema.forbidden();
anySchema = anySchema.description(str);
anySchema = anySchema.notes(str);
@@ -118,8 +160,16 @@ module common {
anySchema = anySchema.tags(str);
anySchema = anySchema.tags(strArr);
anySchema = anySchema.meta(obj);
anySchema = anySchema.example(obj);
anySchema = anySchema.unit(str);
anySchema = anySchema.options(validOpts);
anySchema = anySchema.strict();
anySchema = anySchema.concat(x);
altSchema = anySchema.when(str, whenOpts);
altSchema = anySchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -140,14 +190,23 @@ arrSchema = arrSchema.excludes([numSchema, strSchema]);
// - - - - - - - -
module common {
arrSchema = arrSchema.allow(anyArr);
arrSchema = arrSchema.valid(anyArr);
arrSchema = arrSchema.invalid(anyArr);
arrSchema = arrSchema.default(anyArr);
module common_copy_paste {
// use search & replace from any
anySchema = anySchema.allow(x);
anySchema = anySchema.allow(x, x);
anySchema = anySchema.allow([x, x, x]);
anySchema = anySchema.valid(x);
anySchema = anySchema.valid(x, x);
anySchema = anySchema.valid([x, x, x]);
anySchema = anySchema.invalid(x);
anySchema = anySchema.invalid(x, x);
anySchema = anySchema.invalid([x, x, x]);
anySchema = anySchema.default(x);
arrSchema = arrSchema.required();
arrSchema = arrSchema.optional();
arrSchema = arrSchema.forbidden();
arrSchema = arrSchema.description(str);
arrSchema = arrSchema.notes(str);
@@ -155,8 +214,16 @@ module common {
arrSchema = arrSchema.tags(str);
arrSchema = arrSchema.tags(strArr);
arrSchema = arrSchema.meta(obj);
arrSchema = arrSchema.example(obj);
arrSchema = arrSchema.unit(str);
arrSchema = arrSchema.options(validOpts);
arrSchema = arrSchema.strict();
arrSchema = arrSchema.concat(x);
altSchema = arrSchema.when(str, whenOpts);
altSchema = arrSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -164,14 +231,22 @@ module common {
boolSchema = Joi.bool();
boolSchema = Joi.boolean();
module common {
boolSchema = boolSchema.allow(bool);
boolSchema = boolSchema.valid(bool);
boolSchema = boolSchema.invalid(bool);
boolSchema = boolSchema.default(bool);
module common_copy_paste {
boolSchema = boolSchema.allow(x);
boolSchema = boolSchema.allow(x, x);
boolSchema = boolSchema.allow([x, x, x]);
boolSchema = boolSchema.valid(x);
boolSchema = boolSchema.valid(x, x);
boolSchema = boolSchema.valid([x, x, x]);
boolSchema = boolSchema.invalid(x);
boolSchema = boolSchema.invalid(x, x);
boolSchema = boolSchema.invalid([x, x, x]);
boolSchema = boolSchema.default(x);
boolSchema = boolSchema.required();
boolSchema = boolSchema.optional();
boolSchema = boolSchema.forbidden();
boolSchema = boolSchema.description(str);
boolSchema = boolSchema.notes(str);
@@ -179,8 +254,16 @@ module common {
boolSchema = boolSchema.tags(str);
boolSchema = boolSchema.tags(strArr);
boolSchema = boolSchema.meta(obj);
boolSchema = boolSchema.example(obj);
boolSchema = boolSchema.unit(str);
boolSchema = boolSchema.options(validOpts);
boolSchema = boolSchema.strict();
boolSchema = boolSchema.concat(x);
altSchema = boolSchema.when(str, whenOpts);
altSchema = boolSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -192,13 +275,21 @@ binSchema = binSchema.max(num);
binSchema = binSchema.length(num);
module common {
binSchema = binSchema.allow(bin);
binSchema = binSchema.valid(bin);
binSchema = binSchema.invalid(bin);
binSchema = binSchema.default(bin);
binSchema = binSchema.allow(x);
binSchema = binSchema.allow(x, x);
binSchema = binSchema.allow([x, x, x]);
binSchema = binSchema.valid(x);
binSchema = binSchema.valid(x, x);
binSchema = binSchema.valid([x, x, x]);
binSchema = binSchema.invalid(x);
binSchema = binSchema.invalid(x, x);
binSchema = binSchema.invalid([x, x, x]);
binSchema = binSchema.default(x);
binSchema = binSchema.required();
binSchema = binSchema.optional();
binSchema = binSchema.forbidden();
binSchema = binSchema.description(str);
binSchema = binSchema.notes(str);
@@ -206,8 +297,16 @@ module common {
binSchema = binSchema.tags(str);
binSchema = binSchema.tags(strArr);
binSchema = binSchema.meta(obj);
binSchema = binSchema.example(obj);
binSchema = binSchema.unit(str);
binSchema = binSchema.options(validOpts);
binSchema = binSchema.strict();
binSchema = binSchema.concat(x);
altSchema = binSchema.when(str, whenOpts);
altSchema = binSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -224,23 +323,21 @@ dateSchema = dateSchema.min(num);
dateSchema = dateSchema.max(num);
module common {
dateSchema = dateSchema.allow(date);
dateSchema = dateSchema.valid(date);
dateSchema = dateSchema.invalid(date);
dateSchema = dateSchema.default(date);
dateSchema = dateSchema.allow(num);
dateSchema = dateSchema.valid(num);
dateSchema = dateSchema.invalid(num);
dateSchema = dateSchema.default(num);
dateSchema = dateSchema.allow(str);
dateSchema = dateSchema.valid(str);
dateSchema = dateSchema.invalid(str);
dateSchema = dateSchema.default(str);
dateSchema = dateSchema.allow(x);
dateSchema = dateSchema.allow(x, x);
dateSchema = dateSchema.allow([x, x, x]);
dateSchema = dateSchema.valid(x);
dateSchema = dateSchema.valid(x, x);
dateSchema = dateSchema.valid([x, x, x]);
dateSchema = dateSchema.invalid(x);
dateSchema = dateSchema.invalid(x, x);
dateSchema = dateSchema.invalid([x, x, x]);
dateSchema = dateSchema.default(x);
dateSchema = dateSchema.required();
dateSchema = dateSchema.optional();
dateSchema = dateSchema.forbidden();
dateSchema = dateSchema.description(str);
dateSchema = dateSchema.notes(str);
@@ -248,8 +345,16 @@ module common {
dateSchema = dateSchema.tags(str);
dateSchema = dateSchema.tags(strArr);
dateSchema = dateSchema.meta(obj);
dateSchema = dateSchema.example(obj);
dateSchema = dateSchema.unit(str);
dateSchema = dateSchema.options(validOpts);
dateSchema = dateSchema.strict();
dateSchema = dateSchema.concat(x);
altSchema = dateSchema.when(str, whenOpts);
altSchema = dateSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -265,13 +370,21 @@ numSchema = numSchema.max(num);
numSchema = numSchema.integer();
module common {
numSchema = numSchema.allow(num);
numSchema = numSchema.valid(num);
numSchema = numSchema.invalid(num);
numSchema = numSchema.default(num);
numSchema = numSchema.allow(x);
numSchema = numSchema.allow(x, x);
numSchema = numSchema.allow([x, x, x]);
numSchema = numSchema.valid(x);
numSchema = numSchema.valid(x, x);
numSchema = numSchema.valid([x, x, x]);
numSchema = numSchema.invalid(x);
numSchema = numSchema.invalid(x, x);
numSchema = numSchema.invalid([x, x, x]);
numSchema = numSchema.default(x);
numSchema = numSchema.required();
numSchema = numSchema.optional();
numSchema = numSchema.forbidden();
numSchema = numSchema.description(str);
numSchema = numSchema.notes(str);
@@ -279,8 +392,16 @@ module common {
numSchema = numSchema.tags(str);
numSchema = numSchema.tags(strArr);
numSchema = numSchema.meta(obj);
numSchema = numSchema.example(obj);
numSchema = numSchema.unit(str);
numSchema = numSchema.options(validOpts);
numSchema = numSchema.strict();
numSchema = numSchema.concat(x);
altSchema = numSchema.when(str, whenOpts);
altSchema = numSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -295,29 +416,48 @@ objSchema = objSchema.min(num);
objSchema = objSchema.max(num);
objSchema = objSchema.length(num);
objSchema = objSchema.pattern(exp, schema);
objSchema = objSchema.and(str, str, str);
objSchema = objSchema.and(strArr);
objSchema = objSchema.or(str, str, str);
objSchema = objSchema.or(strArr);
objSchema = objSchema.xor(str, str, str);
objSchema = objSchema.xor(strArr);
objSchema = objSchema.with(str, str);
objSchema = objSchema.with(str, strArr);
objSchema = objSchema.without(str, str);
objSchema = objSchema.without(str, strArr);
objSchema = objSchema.xor(str, str, str);
objSchema = objSchema.xor(strArr);
objSchema = objSchema.or(str, str, str);
objSchema = objSchema.or(strArr);
objSchema = objSchema.rename(str, str);
objSchema = objSchema.rename(str, str, renOpts);
objSchema = objSchema.assert(str, schema, str);
objSchema = objSchema.assert(ref, schema, str);
objSchema = objSchema.unknown();
objSchema = objSchema.unknown(bool);
module common {
objSchema = objSchema.allow(obj);
objSchema = objSchema.valid(obj);
objSchema = objSchema.invalid(obj);
objSchema = objSchema.default(obj);
objSchema = objSchema.allow(x);
objSchema = objSchema.allow(x, x);
objSchema = objSchema.allow([x, x, x]);
objSchema = objSchema.valid(x);
objSchema = objSchema.valid(x, x);
objSchema = objSchema.valid([x, x, x]);
objSchema = objSchema.invalid(x);
objSchema = objSchema.invalid(x, x);
objSchema = objSchema.invalid([x, x, x]);
objSchema = objSchema.default(x);
objSchema = objSchema.required();
objSchema = objSchema.optional();
objSchema = objSchema.forbidden();
objSchema = objSchema.description(str);
objSchema = objSchema.notes(str);
@@ -325,8 +465,16 @@ module common {
objSchema = objSchema.tags(str);
objSchema = objSchema.tags(strArr);
objSchema = objSchema.meta(obj);
objSchema = objSchema.example(obj);
objSchema = objSchema.unit(str);
objSchema = objSchema.options(validOpts);
objSchema = objSchema.strict();
objSchema = objSchema.concat(x);
altSchema = objSchema.when(str, whenOpts);
altSchema = objSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -343,35 +491,43 @@ strSchema = strSchema.token();
strSchema = strSchema.email();
strSchema = strSchema.guid();
strSchema = strSchema.isoDate();
strSchema = strSchema.lowercase();
strSchema = strSchema.uppercase();
strSchema = strSchema.trim();
module common {
strSchema = strSchema.allow(x);
strSchema = strSchema.allow(x, x);
strSchema = strSchema.allow(anyArr);
strSchema = strSchema.allow([x, x, x]);
strSchema = strSchema.valid(x);
strSchema = strSchema.valid(x, x);
strSchema = strSchema.valid(anyArr);
strSchema = strSchema.valid([x, x, x]);
strSchema = strSchema.invalid(x);
strSchema = strSchema.invalid(x, x);
strSchema = strSchema.invalid(anyArr);
strSchema = strSchema.invalid([x, x, x]);
strSchema = strSchema.default(x);
strSchema = strSchema.required();
strSchema = strSchema.optional();
strSchema = strSchema.forbidden();
strSchema = strSchema.description(str);
strSchema = strSchema.notes(str);
strSchema = strSchema.notes(strArr);
strSchema = strSchema.tags(str);
strSchema = strSchema.tags(strArr);
strSchema = strSchema.meta(obj);
strSchema = strSchema.example(obj);
strSchema = strSchema.unit(str);
strSchema = strSchema.options(validOpts);
strSchema = strSchema.strict();
strSchema = strSchema.default(x);
strSchema = strSchema.concat(x);
altSchema = strSchema.when(str, whenOpts);
altSchema = strSchema.when(ref, whenOpts);
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -390,6 +546,13 @@ Joi.validate(value, schema, validOpts, (err, value) => {
str = err.details[0].message;
str = err.details[0].type;
});
Joi.validate(value, schema, (err, value) => {
x = value;
str = err.message;
str = err.details[0].path;
str = err.details[0].message;
str = err.details[0].type;
});
// variant
Joi.validate(num, schema, validOpts, (err, value) => {
num = value;
@@ -401,3 +564,8 @@ Joi.validate(value, {});
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
schema = Joi.compile(obj);
Joi.assert(obj, schema);
ref = Joi.ref(str, refOpts);
ref = Joi.ref(str);

140
joi/joi.d.ts vendored
View File

@@ -1,8 +1,10 @@
// Type definitions for joi v4.0.0
// Type definitions for joi v4.6.0
// Project: https://github.com/spumko/joi
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// TODO express type of Schema in a type-parameter (.default, .valid, .example etc)
declare module 'joi' {
export interface ValidationOptions {
@@ -18,6 +20,8 @@ declare module 'joi' {
stripUnknown?: boolean;
// overrides individual error messages. Defaults to no override ({}).
language?: Object
// provides an external data set to be used in references
context?: Object;
}
export interface RenameOptions {
@@ -29,6 +33,20 @@ declare module 'joi' {
override?: boolean;
}
export interface WhenOptions {
// the required condition joi type.
is: Schema;
// the alternative schema type if the condition is true. Required if otherwise is missing.
then?: Schema;
// the alternative schema type if the condition is false. Required if then is missing
otherwise?: Schema;
}
export interface ReferenceOptions {
separator?: string;
contextPrefix?: string;
}
export interface ValidationError {
message: string;
details: ValidationErrorItem[];
@@ -48,12 +66,14 @@ declare module 'joi' {
}
export interface Schema extends AnySchema<Schema> {
}
export interface Reference extends Schema {
}
export interface AnySchema<T extends AnySchema<Schema>> {
validate<U>(value: U, options?: ValidationOptions, callback?: (err: ValidationError, value: U) => void): void;
/**
* Whitelists a value
*/
@@ -82,6 +102,11 @@ declare module 'joi' {
*/
optional(): T;
/**
* Marks a key as forbidden which will not allow any value except undefined. Used to explicitly forbid keys.
*/
forbidden(): T;
/**
* Annotates the key
*/
@@ -100,7 +125,22 @@ declare module 'joi' {
tags(notes: string[]): T;
/**
* Overrides the global validate() options for the current key and any sub-key
* Attaches metadata to the key.
*/
meta(meta: Object): T;
/**
* Annotates the key with an example value, must be valid.
*/
example(value: any): T;
/**
* Annotates the key with an unit name.
*/
unit(name: string): T;
/**
* Overrides the global validate() options for the current key and any sub-key.
*/
options(options: ValidationOptions): T;
@@ -110,9 +150,20 @@ declare module 'joi' {
strict(): T;
/**
* Sets a default value if the original value is undefined
* Sets a default value if the original value is undefined.
*/
default(value: any): T;
/**
* Returns a new type that is the result of adding the rules of one type to another.
*/
concat(schema: T): T;
/**
* Converts the type into an alternatives type where the conditions are merged into the type definition where:
*/
when(ref: string, options: WhenOptions): AlternativesSchema;
when(ref: Reference, options: WhenOptions): AlternativesSchema;
}
export interface BooleanSchema extends AnySchema<BooleanSchema> {
@@ -187,6 +238,20 @@ declare module 'joi' {
*/
isoDate(): StringSchema;
/**
* Requires the string value to be all lowercase. If the validation convert option is on (enabled by default), the string will be forced to lowercase.
*/
lowercase(): StringSchema;
/**
* Requires the string value to be all uppercase. If the validation convert option is on (enabled by default), the string will be forced to uppercase.
*/
uppercase(): StringSchema;
/**
* Requires the string value to contain no whitespace before or after. If the validation convert option is on (enabled by default), the string will be trimmed.
*/
trim(): StringSchema;
}
export interface ArraySchema extends AnySchema<ArraySchema> {
@@ -240,6 +305,29 @@ declare module 'joi' {
*/
length(limit: number): ObjectSchema;
/**
* Specify validation rules for unknown keys matching a pattern.
*/
pattern(regex: RegExp, schema: Schema): ObjectSchema;
/**
* Defines an all-or-nothing relationship between keys where if one of the peers is present, all of them are required as well.
*/
and(peer1: string, peer2: string, ...peers: string[]): ObjectSchema;
and(peers: string[]): ObjectSchema;
/**
* Defines a relationship between keys where one of the peers is required (and more than one is allowed).
*/
or(peer1: string, peer2: string, ...peers: string[]): ObjectSchema;
or(peers: string[]): ObjectSchema;
/**
* Defines an exclusive relationship between a set of keys. one of them is required but not at the same time where:
*/
xor(peer1: string, peer2: string, ...peers: string[]): ObjectSchema;
xor(peers: string[]): ObjectSchema;
/**
* Requires the presence of other keys whenever the specified key is present.
*/
@@ -252,22 +340,21 @@ declare module 'joi' {
without(key: string, peers: string): ObjectSchema;
without(key: string, peers: string[]): ObjectSchema;
/**
* Defines an exclusive relationship between a set of keys. one of them is required but not at the same time where:
*/
xor(peer1: string, peer2: string, ...peers: string[]): ObjectSchema;
xor(peers: string[]): ObjectSchema;
/**
* Defines a relationship between keys where one of the peers is required (and more than one is allowed).
*/
or(peer1: string, peer2: string, ...peers: string[]): ObjectSchema;
or(peers: string[]): ObjectSchema;
/**
* Renames a key to another name (deletes the renamed key).
*/
rename(from: string, to: string, options?: RenameOptions): ObjectSchema;
/**
* Verifies an assertion where.
*/
assert(ref: string, schema: Schema, message: string): ObjectSchema;
assert(ref: Reference, schema: Schema, message: string): ObjectSchema;
/**
* Overrides the handling of unknown keys for the scope of the current object only (does not apply to children).
*/
unknown(allow?:boolean): ObjectSchema;
}
export interface BinarySchema extends AnySchema<BinarySchema> {
@@ -308,6 +395,12 @@ declare module 'joi' {
}
export interface AlternativesSchema extends AnySchema<FunctionSchema> {
try(schemas: Schema[]): AlternativesSchema;
when(ref: string, options: WhenOptions): AlternativesSchema;
when(ref: Reference, options: WhenOptions): AlternativesSchema;
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
/**
@@ -368,10 +461,21 @@ declare module 'joi' {
*/
export function validate<T>(value: T, schema: Schema, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): void;
export function validate<T>(value: T, schema: Object, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): void;
export function validate<T>(value: T, schema: Schema, callback: (err: ValidationError, value: T) => void): void;
export function validate<T>(value: T, schema: Object, callback: (err: ValidationError, value: T) => void): void;
/**
* Converts literal schema definition to joi schema object (or returns the same back if already a joi schema object).
*/
export function compile(schema: Object): Schema;
/**
* Validates a value against a schema and throws if validation fails.
*/
export function assert(value: any, schema: Schema): void;
/**
* Generates a reference to the value of the named key.
*/
export function ref(key:string, options?: ReferenceOptions): Reference;
}

View File

@@ -1,6 +1,6 @@
// Type definitions for jQRangeSlider 4.2.8
// Project: http://ghusse.github.com/jQRangeSlider
// Definitions by: Dániel Tar https://github.com/qcz
// Definitions by: Dániel Tar <https://github.com/qcz>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>

View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery.Address 1.5
// Project: https://github.com/asual/jquery-address
// Definitions by: Martin Duparc <@martinduparc>
// Definitions by: Martin Duparc <https://github.com/martinduparc>
// Definitions: https://github.com/borisyankov/DefinitelyTyped/
/// <reference path="../jquery/jquery.d.ts" />

View File

@@ -1,4 +1,4 @@
// Type definitions for jquery.clientSideLogging.
// Type definitions for jquery.clientSideLogging
// Project: https://github.com/remybach/jQuery.clientSideLogging
// Definitions by: Diullei Gomes <https://github.com/diullei>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery.Colorbox 1.4.15
// Project: http://www.jacklmoore.com/colorbox/
// Definitions by: Gidon Junge <@gjunge>
// Definitions by: Gidon Junge <https://github.com/gjunge>
// Definitions: https://github.com/borisyankov/DefinitelyTyped/
/// <reference path="../jquery/jquery.d.ts" />

View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery.cycle.js 2.9999.81 (15-JAN-2013)
// Type definitions for jQuery.cycle.js
// Project: http://jquery.malsup.com/cycle/
// Definitions by: Fran<EFBFBD>ois Guillot <http://fguillot.developpez.com/>
// Definitions by: François Guillot <http://fguillot.developpez.com/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -90,4 +90,4 @@ interface Cycle {
interface JQuery {
cycle: Cycle;
}
}

View File

@@ -1,5 +1,6 @@
// Type definitions for jQuery Cycle2 version 2.1.2 (build 20140216)
// Project: http://jquery.malsup.com/cycle2/ (also https://github.com/malsup/cycle2)
// Project: http://jquery.malsup.com/cycle2/
// https://github.com/malsup/cycle2
// Definitions by: Donny Nadolny <https://github.com/dnadolny/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -140,4 +141,4 @@ declare module JQueryCycle2 {
interface Transition {
before(opts: Options, curr: Element, next: Element, fwd: boolean): void;
}
}
}

View File

@@ -1,22 +1,23 @@
// Type definitions for jquery.dynatree 1.2
// Type definitions for jquery.dynatree 1.2.5
// Project: http://code.google.com/p/dynatree/
// Definitions by: https://github.com/fdecampredon
// Definitions by: François de Campredon <https://github.com/fdecampredon>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="../jqueryui/jqueryui.d.ts"/>
declare module JQueryUI {
interface UI {
dynatree: DynatreeNamespace
}
}
interface JQuery {
dynatree(options?: DynatreeOptions): DynaTree;
dynatree(option?: string, ...rest: any[]): any;
}
interface JQueryStatic {
ui: {
dynatree: DynatreeNamespace;
};
}
interface DynaTree {
activateKey(key: string): DynaTreeNode;
count(): number;
@@ -39,7 +40,7 @@ interface DynaTree {
renderInvisibleNodes(): void;
selectKey(key: string, flag: string): DynaTreeNode;
serializeArray(stopOnParents: boolean): any[];
toDict(): any;
toDict(includeRoot?: boolean): any;
visit(fn: (node: DynaTreeNode) =>boolean, includeRoot: boolean): void;
}
@@ -77,6 +78,7 @@ interface DynaTreeNode {
makeVisible(): boolean;
move(targetNode: DynaTreeNode, mode: string): boolean;
reload(force: boolean): void;
reloadChildren(callback?: (node: DynaTreeNode, isOk: boolean) => any): void;
remove(): void;
removeChildren(): void;
render(useEffects: boolean, includeInvisible: boolean): void;
@@ -177,7 +179,7 @@ interface DynaTreeDataModel {
interface DynaTreeDNDOptions {
autoExpandMS?: number; // Expand nodes after n milliseconds of hovering.
preventVoidMoves?: boolean; // Prevent dropping nodes 'before self', etc.
revert: boolean; // true: slide helper back to source if drop is rejected
// Make tree nodes draggable:
onDragStart?: (sourceNode: any) =>void; // Callback(sourceNode), return true, to enable dnd

View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery-menu-aim
// Project: https://github.com/kamens/jQuery-menu-aim
// Definitions by: Robert Fonseca-Ensor
// Definitions by: Robert Fonseca-Ensor <http://www.robfe.com/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />

View File

@@ -0,0 +1,60 @@
/// <reference path="jquery.pjax.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
function test_fn_pjax() {
$(document).pjax("a");
$(document).pjax("a", "#pjax-container");
$(document).pjax("a", { push: true });
$(document).pjax("a", "#pjax-container", { push: true });
}
function test_pjax() {
$.pjax();
$.pjax({
url: "hello.html",
container: "#main"
});
}
function test_click() {
var event = $.Event("click");
$.pjax.click(event, "#pjax-container");
$.pjax.click(event, { container: "#pjax-container" });
$.pjax.click(event, "#pjax-container", { push: true });
}
function test_submit() {
var event = $.Event("submit");
$.pjax.submit(event, "#pjax-container");
$.pjax.submit(event, { container: "#pjax-container" });
$.pjax.submit(event, "#pjax-container", { push: true });
}
function test_enable() {
$.pjax.enable();
}
function test_disable() {
$.pjax.disable();
}
function test_reload() {
$.pjax.reload();
}
function test_defauluts() {
$.pjax.defaults = {
timeout: 650,
push: true,
replace: false,
type: 'GET',
dataType: 'html',
scrollTo: 0,
maxCacheLength: 20,
version: $.noop
};
}
function test_support() {
console.log($.support.pjax);
}

142
jquery.pjax/jquery.pjax.d.ts vendored Normal file
View File

@@ -0,0 +1,142 @@
// Type definitions for jquery-pjax
// Project: https://github.com/defunkt/jquery-pjax
// Definitions by: Junle Li <https://github.com/lijunle>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface PjaxSettings extends JQueryAjaxSettings {
/**
* A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody).
* If it is not defined, the `data-pjax` attribute of the link will be treated as container.
* If such an attribute is not defined too, the context will be treated as container.
*/
container?: string;
/**
* Whether to pushState the URL. Defaults to true.
*/
push?: boolean;
/**
* Whether to replaceState the URL. Defaults to false.
*/
replace?: boolean;
}
interface JQuery {
/**
* Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container.
* Tries to make sure the back button and ctrl+click work the way you'd expect.
* If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container.
* If such an attribute is not defined too, the context runs with this statement will be treated as container.
* @param delegationSelector The selector to limit which links PJAX should listen on.
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody).
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
* @return Returns the jQuery object
*/
pjax(delegationSelector: string, options?: PjaxSettings): JQuery;
/**
* Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container.
* Tries to make sure the back button and ctrl+click work the way you'd expect.
* If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container.
* If such an attribute is not defined too, the context runs with this statement will be treated as container.
* @param delegationSelector The selector to limit which links PJAX should listen on.
* @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(containerSelector).html(xhr.responseBody).
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. The `containerSelector` parameter has priority.
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
* @return Returns the jQuery object
*/
pjax(delegationSelector: string, containerSelector?: string, options?: PjaxSettings): JQuery;
}
interface JQueryStatic {
pjax: PjaxStatic;
}
interface PjaxStatic {
/**
* PJAX default settings.
*/
defaults: PjaxSettings;
/**
* Loads a URL with ajax, puts the response body inside a container, then pushState()'s the loaded URL.
* Works just like $.ajax in that it accepts a jQuery ajax settings object (with keys like url, type, data, etc).
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody).
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
*/
(options?: PjaxSettings): JQueryXHR;
/**
* PJAX on click handler.
* @param event A jQuery click event.
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody).
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
*/
click(event: JQueryEventObject, options?: PjaxSettings): void;
/**
* PJAX on click handler.
* @param event A jQuery click event.
* @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(containerSelector).html(xhr.responseBody).
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. The `containerSelector` parameter has priority.
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
*/
click(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void;
/**
* PJAX on form submit handler
* @param event A jQuery click event.
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody).
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
*/
submit(event: JQueryEventObject, options?: PjaxSettings): void;
/**
* PJAX on form submit handler
* @param event A jQuery click event.
* @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(containerSelector).html(xhr.responseBody).
* @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options:
* - container: a jQuery selector indicates where to stick the response body. The `containerSelector` parameter has priority.
* - push: a boolean indicates whether to pushState the URL. Default is true.
* - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false.
*/
submit(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void;
/**
* Install pjax functions on $.pjax to enable pushState behavior. Does nothing if already enabled.
*/
enable(): void;
/**
* Disable pushState behavior.
* This is the case when a browser doesn't support pushState. It is sometimes useful to disable pushState for debugging on a modern browser.
*/
disable(): void;
/**
* Reload current page with pjax.
*/
reload(): JQueryXHR;
}
interface JQuerySupport {
/**
* A boolean value indicates if pjax is supported by the browser.
*/
pjax: boolean;
}

View File

@@ -1,6 +1,6 @@
// Type definitions for jquery.pnotify 1.3.1
// Project: https://github.com/sciactive/pnotify
// Definitions by: https://github.com/DavidSichau
// Project: https://github.com/sciactive/pnotify
// Definitions by: David Sichau <https://github.com/DavidSichau>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery Tags Manager
// Project: http://welldonethings.com/tags/manager
// Definitions by: https://github.com/vbortone
// Definitions by: Vincent Bortone <https://github.com/vbortone>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>

View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery UI Timepicker 0.3
// Project: http://fgelinas.com/code/timepicker/
// Definitions by: https://github.com/anwarjaved
// Definitions by: Anwar Javed <https://github.com/anwarjaved>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>

View File

@@ -1,7 +1,6 @@
// Type definitions for jQuery UI DateTimePicker 0.3 Addon
//
// Type definitions for jQuery UI DateTimePicker 0.3
// Project: http://trentrichardson.com/examples/timepicker/
// Definitions by: https://github.com/dougajmcdonald
// Definitions by: dougajmcdonald <https://github.com/dougajmcdonald>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>

View File

@@ -1,6 +1,6 @@
// Type definitions for jquery.validation 1.11.1
// Project: http://jqueryvalidation.org/
// Definitions by: https://github.com/fdecampredon , https://github.com/johnnyreilly
// Definitions by: François de Campredon <https://github.com/fdecampredon>, Johj Reilly <https://github.com/johnnyreilly>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,6 +1,6 @@
// Type definitions for Watermark plugin for jQuery 3.1
// Project: http://jquery-watermark.googlecode.com
// Definitions by: https://github.com/anwarjaved
// Definitions by: Anwar Javed <https://github.com/anwarjaved>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -27,4 +27,4 @@ interface JQuery {
interface JQueryStatic {
watermark: Watermark;
}
}

View File

@@ -6,7 +6,7 @@ function test_add() {
$('li').add('p').css('background-color', 'red');
$('li').add(document.getElementsByTagName('p')[0])
.css('background-color', 'red');
.css('background-coailor', 'red');
$('li').add('<p id="new">new paragraph</p>')
.css('background-color', 'red');
$("div").css("border", "2px solid red")
@@ -86,6 +86,9 @@ function test_ajax() {
success: function (data) {
$('.result').html(data);
alert('Load was performed.');
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Load failed. responseJSON=' + jqXHR.responseJSON);
}
});
var _super = jQuery.ajaxSettings.xhr;

8
jquery/jquery.d.ts vendored
View File

@@ -1,6 +1,6 @@
// Type definitions for jQuery 1.10.x / 2.0.x
// Project: http://jquery.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, James Harrison Fisher <https://github.com/jameshfisher>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly/>
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton <https://github.com/Steve-Fenton>, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen <https://github.com/jasons-novaleaf>, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, James Harrison Fisher <https://github.com/jameshfisher>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/* *****************************************************************************
@@ -80,7 +80,7 @@ interface JQueryAjaxSettings {
/**
* A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
*/
error? (jqXHR: JQueryXHR, textStatus: string, errorThrow: string): any;
error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
/**
* Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
*/
@@ -168,6 +168,10 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
*/
overrideMimeType(mimeType: string): any;
abort(statusText?: string): void;
/**
* Property containing the parsed response if the response Content-Type is json
*/
responseJSON?: any;
}
/**

View File

@@ -1,7 +1,7 @@
// Type definitions for js-fixtures 1.2.0
// Project: https://github.com/badunk/js-fixtures
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Fixtures {
path: string;
@@ -18,4 +18,4 @@ interface Fixtures {
cleanUp(): void;
}
declare var fixtures: Fixtures;
declare var fixtures: Fixtures;

View File

@@ -1,7 +1,7 @@
// Type definitions for JS-Signals
// Project: http://millermedeiros.github.io/js-signals/
// Definitions by: Diullei Gomes <https://github.com/diullei>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface SignalBinding {
active: boolean;

2
js-url/js-url.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Type definitions for url() v1.8.6
// Type definitions for url v1.8.6
// Project: https://github.com/websanova/js-url
// Definitions by: MIZUNE Pine <https://github.com/pine613>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for jsPlumb 1.3.16 jQuery adapter.
// Type definitions for jsPlumb 1.3.16 jQuery adapter
// Project: http://jsplumb.org
// Definitions by: Steve Shearn <https://github.com/shearnie/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -19,26 +19,26 @@ interface jsPlumbInstance {
addEndpoint(ep: string): any;
removeClass(el: any, clazz: string): void;
hasClass(el: any, clazz: string): void;
draggable(el: string, options?: DragOptions): jsPlumbInstance;
draggable(ids: string[], options?: DragOptions): jsPlumbInstance;
draggable(el: string, options?: DragOptions): jsPlumbInstance;
draggable(ids: string[], options?: DragOptions): jsPlumbInstance;
connect(connection: ConnectParams, referenceParams?: ConnectParams): Connection;
makeSource(el: string, options: SourceOptions): void;
makeTarget(el: string, options: TargetOptions): void;
repaintEverything(): void;
detachEveryConnection(): void;
detachAllConnections(el: string): void;
removeAllEndpoints(el: string, recurse?: boolean): jsPlumbInstance;
removeAllEndpoints(el: Element, recurse?: boolean): jsPlumbInstance;
removeAllEndpoints(el: string, recurse?: boolean): jsPlumbInstance;
removeAllEndpoints(el: Element, recurse?: boolean): jsPlumbInstance;
select(params: SelectParams): Connections;
getConnections(options?: any, flat?: any): any[];
deleteEndpoint(uuid: string, doNotRepaintAfterwards?: boolean): jsPlumbInstance;
deleteEndpoint(endpoint: Endpoint, doNotRepaintAfterwards?: boolean): jsPlumbInstance;
repaint(el: string): jsPlumbInstance;
repaint(el: Element): jsPlumbInstance;
SVG: string;
CANVAS: string;
VML: string;
deleteEndpoint(uuid: string, doNotRepaintAfterwards?: boolean): jsPlumbInstance;
deleteEndpoint(endpoint: Endpoint, doNotRepaintAfterwards?: boolean): jsPlumbInstance;
repaint(el: string): jsPlumbInstance;
repaint(el: Element): jsPlumbInstance;
SVG: string;
CANVAS: string;
VML: string;
}
interface Defaults {
@@ -48,8 +48,8 @@ interface Defaults {
ConnectionsDetachable?: boolean;
ReattachConnections?: boolean;
ConnectionOverlays?: any[][];
Container?: any; // string(selector or id) or element
DragOptions?: DragOptions;
Container?: any; // string(selector or id) or element
DragOptions?: DragOptions;
}
interface PaintStyle {
@@ -76,8 +76,8 @@ interface Connections {
}
interface ConnectParams {
source?: any; // string, element or endpoint
target?: any; // string, element or endpoint
source?: any; // string, element or endpoint
target?: any; // string, element or endpoint
detachable?: boolean;
deleteEndpointsOnDetach?: boolean;
endPoint?: string;
@@ -118,11 +118,11 @@ interface SelectParams {
target: string;
}
interface Connection {
setDetachable(detachable: boolean): void;
setParameter<T>(name: string, value: T): void;
endpoints: Endpoint[];
}
interface Endpoint {
}
interface Connection {
setDetachable(detachable: boolean): void;
setParameter<T>(name: string, value: T): void;
endpoints: Endpoint[];
}
interface Endpoint {
}

View File

@@ -1,6 +1,6 @@
// Type definitions for JsRender
// Project: http://www.jsviews.com/#jsrender
// Definitions by: https://github.com/zakki
// Definitions by: Kensuke Matsuzaki <https://github.com/zakki>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>

View File

@@ -1,6 +1,6 @@
// Type definitions for karma-jasmine plugin
// Project: https://github.com/karma-runner/karma-jasmine
// Definitions by: Michel Salib <michelsalib@hotmail.com>
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jasmine/jasmine.d.ts" />

View File

@@ -1,7 +1,7 @@
// Type definitions for KineticJS
// Project: http://kineticjs.com/
// Definitions by: Basarat Ali Syed <http://www.github.com/basarat>, Ralph de Ruijter <http://www.superdopey.nl/techblog/>
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Kinetic {
@@ -544,4 +544,4 @@ declare module Kinetic {
width: number;
height: number;
}
}
}

View File

@@ -1,5 +1,5 @@
// Type definitions for knockout-editables 0.9
// Project:http://romanych.github.com/ko.editables/
// Project: http://romanych.github.com/ko.editables/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

View File

@@ -1,7 +1,7 @@
// Type definitions for Knockout.Mapper
// Project: https://github.com/LucasLorentz/knockout.mapper
// Definitions by: Brandon Meyer <https://github.com/BMeyerKC>
// Definitions https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts" />
@@ -12,4 +12,4 @@ interface KnockoutMapper {
interface KnockoutStatic {
mapper: KnockoutMapper;
}
}

View File

@@ -1,7 +1,7 @@
// Type definitions for Knockout.Mapping 2.0
// Project: https://github.com/SteveSanderson/knockout.mapping
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts" />

4
kolite/kolite.d.ts vendored
View File

@@ -1,7 +1,7 @@
// Type definitions for KoLite 1.1
// Project: https://github.com/CodeSeven/kolite
// Definitions by: Boris Yankov <https://github.com/borisyankov>
// Definitions https://github.com/borisyankov/DefinitelyTyped
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
@@ -78,4 +78,4 @@ interface KnockoutUtils {
interface KnockoutBindingHandlers {
command: KnockoutBindingHandler;
}
}

84
leaflet/leaflet.d.ts vendored
View File

@@ -474,7 +474,7 @@ declare module L {
* positions.
* Default value: 'topright'.
*/
position: string;
position?: string;
}
}
@@ -773,20 +773,20 @@ declare module L {
/**
* Create a layer group, optionally given an initial set of layers.
*/
function featureGroup(layers?: ILayer[]): FeatureGroup;
function featureGroup<T extends ILayer>(layers?: T[]): FeatureGroup<T>;
export class FeatureGroup extends LayerGroup implements ILayer, IEventPowered<FeatureGroup> {
export class FeatureGroup<T extends ILayer> extends LayerGroup<T> implements ILayer, IEventPowered<FeatureGroup<T>> {
/**
* Create a layer group, optionally given an initial set of layers.
*/
constructor(layers?: ILayer[]);
constructor(layers?: T[]);
/**
* Binds a popup with a particular HTML content to a click on any layer from the
* group that has a bindPopup method.
*/
bindPopup(htmlContent: string, options?: PopupOptions): FeatureGroup;
bindPopup(htmlContent: string, options?: PopupOptions): FeatureGroup<T>;
/**
* Returns the LatLngBounds of the Feature Group (created from bounds and coordinates
@@ -797,17 +797,17 @@ declare module L {
/**
* Sets the given path options to each layer of the group that has a setStyle method.
*/
setStyle(style: PathOptions): FeatureGroup;
setStyle(style: PathOptions): FeatureGroup<T>;
/**
* Brings the layer group to the top of all other layers.
*/
bringToFront(): FeatureGroup;
bringToFront(): FeatureGroup<T>;
/**
* Brings the layer group to the bottom of all other layers.
*/
bringToBack(): FeatureGroup;
bringToBack(): FeatureGroup<T>;
////////////
////////////
@@ -826,20 +826,20 @@ declare module L {
////////////////
////////////////
addEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup;
addOneTimeEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup;
removeEventListener(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup;
addEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup<T>;
addOneTimeEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup<T>;
removeEventListener(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup<T>;
hasEventListeners(type: string): boolean;
fireEvent(type: string, data?: any): FeatureGroup;
on(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup;
once(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup;
off(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup;
fire(type: string, data?: any): FeatureGroup;
addEventListener(eventMap: any, context?: any): FeatureGroup;
removeEventListener(eventMap?: any, context?: any): FeatureGroup;
clearAllEventListeners(): FeatureGroup;
on(eventMap: any, context?: any): FeatureGroup;
off(eventMap?: any, context?: any): FeatureGroup;
fireEvent(type: string, data?: any): FeatureGroup<T>;
on(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup<T>;
once(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup<T>;
off(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup<T>;
fire(type: string, data?: any): FeatureGroup<T>;
addEventListener(eventMap: any, context?: any): FeatureGroup<T>;
removeEventListener(eventMap?: any, context?: any): FeatureGroup<T>;
clearAllEventListeners(): FeatureGroup<T>;
on(eventMap: any, context?: any): FeatureGroup<T>;
off(eventMap?: any, context?: any): FeatureGroup<T>;
}
}
@@ -882,7 +882,7 @@ declare module L {
*/
function geoJson(geojson?: any, options?: GeoJSONOptions): GeoJSON;
export class GeoJSON extends FeatureGroup {
export class GeoJSON extends FeatureGroup<ILayer> {
/**
* Creates a GeoJSON layer. Optionally accepts an object in GeoJSON format
@@ -1539,60 +1539,60 @@ declare module L {
/**
* Create a layer group, optionally given an initial set of layers.
*/
function layerGroup(layers?: ILayer[]): LayerGroup;
function layerGroup<T extends ILayer>(layers?: T[]): LayerGroup<T>;
export class LayerGroup extends Class implements ILayer {
export class LayerGroup<T extends ILayer> extends Class implements ILayer {
/**
* Create a layer group, optionally given an initial set of layers.
*/
constructor(layers?: ILayer[]);
constructor(layers?: T[]);
/**
* Adds the group of layers to the map.
*/
addTo(map: Map): LayerGroup;
addTo(map: Map): LayerGroup<T>;
/**
* Adds a given layer to the group.
*/
addLayer(layer: ILayer): LayerGroup;
addLayer(layer: T): LayerGroup<T>;
/**
* Removes a given layer from the group.
*/
removeLayer(layer: ILayer): LayerGroup;
removeLayer(layer: T): LayerGroup<T>;
/**
* Removes a given layer of the given id from the group.
*/
removeLayer(id: string): LayerGroup;
removeLayer(id: string): LayerGroup<T>;
/**
* Returns true if the given layer is currently added to the group.
*/
hasLayer(layer: ILayer): boolean;
hasLayer(layer: T): boolean;
/**
* Returns the layer with the given id.
*/
getLayer(id: string): ILayer;
getLayer(id: string): T;
/**
* Returns an array of all the layers added to the group.
*/
getLayers(): ILayer[];
getLayers(): T[];
/**
* Removes all the layers from the group.
*/
clearLayers(): LayerGroup;
clearLayers(): LayerGroup<T>;
/**
* Iterates over the layers of the group, optionally specifying context of
* the iterator function.
*/
eachLayer(fn: (layer: ILayer) => void, context?: any): LayerGroup;
eachLayer(fn: (layer: T) => void, context?: any): LayerGroup<T>;
/**
* Returns a GeoJSON representation of the layer group (GeoJSON FeatureCollection).
@@ -2794,7 +2794,7 @@ declare module L {
*/
function multiPolygon(latlngs: LatLng[][], options?: PolylineOptions): MultiPolygon;
export class MultiPolygon extends FeatureGroup {
export class MultiPolygon extends FeatureGroup<Polygon> {
/**
* Instantiates a multi-polyline object given an array of latlngs arrays (one
@@ -2829,7 +2829,7 @@ declare module L {
*/
function multiPolyline(latlngs: LatLng[][], options?: PolylineOptions): MultiPolyline;
export class MultiPolyline extends FeatureGroup {
export class MultiPolyline extends FeatureGroup<Polyline> {
/**
* Instantiates a multi-polyline object given an array of arrays of geographical
@@ -3655,27 +3655,27 @@ declare module L {
}
}
export interface TileLayerFactory {
export interface TileLayerFactory {
/**
* Instantiates a tile layer object given a URL template and optionally an options
* object.
*/
(urlTemplate: string, options?: TileLayerOptions): TileLayer;
(urlTemplate: string, options?: TileLayerOptions): TileLayer;
/**
* Instantiates a WMS tile layer object given a base URL of the WMS service and
* a WMS parameters/options object.
*/
wms(baseUrl: string, options: WMSOptions): L.TileLayer.WMS;
wms(baseUrl: string, options: WMSOptions): L.TileLayer.WMS;
/**
* Instantiates a Canvas tile layer object given an options object (optionally).
*/
canvas(options?: TileLayerOptions): L.TileLayer.Canvas;
canvas(options?: TileLayerOptions): L.TileLayer.Canvas;
}
export var tileLayer: TileLayerFactory;
export var tileLayer: TileLayerFactory;
}
declare module L {

View File

@@ -1,6 +1,6 @@
// Type definitions for linq.js, ver 3.0.3-Beta4
// Type definitions for linq.js v3.0.3-Beta4
// Project: http://linqjs.codeplex.com/
// Definitions by: neuecc (http://www.codeplex.com/site/users/view/neuecc)
// Definitions by: neuecc <http://www.codeplex.com/site/users/view/neuecc>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module linqjs {

2
linq/linq.d.ts vendored
View File

@@ -1,6 +1,6 @@
// Type definitions for linq.js 2.2
// Project: http://linqjs.codeplex.com/
// Definitions by: Marcin Najder
// Definitions by: Marcin Najder <https://github.com/marcinnajder>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// todo: jQuery plugin, RxJS Binding

View File

@@ -1,6 +1,6 @@
// Type definitions for linq.jquery (from linq.js)
// Project: http://linqjs.codeplex.com/
// Definitions by: neuecc (http://www.codeplex.com/site/users/view/neuecc)
// Definitions by: neuecc <http://www.codeplex.com/site/users/view/neuecc>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>

Some files were not shown because too many files have changed in this diff Show More