Update reference paths

This commit is contained in:
Boris Yankov 2013-01-17 20:03:30 +02:00
parent a427049e18
commit 209d95071a
90 changed files with 928 additions and 925 deletions

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular-1.0.d.ts" />
/// <reference path="angular.d.ts" />
///////////////////////////////////////////////////////////////////////////////
// ngCookies module (angular-cookies.js)

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular-1.0.d.ts" />
/// <reference path="angular.d.ts" />
///////////////////////////////////////////////////////////////////////////////
// ngMock module (angular-mocks.js)

View File

@ -3,7 +3,7 @@
// Definitions by: Diego Vilar <http://github.com/diegovilar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular-1.0.d.ts" />
/// <reference path="angular.d.ts" />
///////////////////////////////////////////////////////////////////////////////

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular-1.0.d.ts" />
/// <reference path="angular.d.ts" />
///////////////////////////////////////////////////////////////////////////////
// ngSanitize module (angular-sanitize.js)

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
declare var angular: ng.IAngularStatic;

View File

@ -1,4 +1,4 @@
/// <reference path="async-0.1.d.ts" />
/// <reference path="async.d.ts" />
var fs, path;

View File

@ -1,4 +1,4 @@
/// <reference path="backbone-0.9.d.ts" />
/// <reference path="backbone.d.ts" />
declare var _, $;

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
declare module Backbone {

View File

@ -1,4 +1,4 @@
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="bootstrap.datepicker.d.ts"/>
function tests_simple() {

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface DatepickerOptions {
format?: string;

View File

@ -1,5 +1,5 @@
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="bootstrap-2.1.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="bootstrap.d.ts" />
$('body').off('.data-api');
$('body').off('.alert.data-api');

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface ModalOptions {
backdrop?: bool;

2
breeze/breeze.d.ts vendored
View File

@ -3,7 +3,7 @@
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// Updated Jan 14 2011 - Jay Traband ( www.ideablade.com).
// Updated Jan 14 2011 - Jay Traband (www.ideablade.com)
declare module BreezeCore {

View File

@ -1,4 +1,4 @@
/// <reference path="chosen-0.9.d.ts" />
/// <reference path="chosen.jquery.d.ts" />
$(".chzn-select").chosen({ no_results_text: "No results matched" });
$("#form_field").chosen().change();

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface ChosenOptions {
allow_single_deselect?: bool;

View File

@ -1,4 +1,4 @@
/// <reference path="codemirror-3.0.d.ts" />
/// <reference path="codemirror.d.ts" />
var myCodeMirror = CodeMirror(document.body);

View File

@ -1,4 +1,4 @@
/// <reference path="easeljs-0.5.d.ts" />
/// <reference path="easeljs.d.ts" />
function test_simple() {
var canvas = document.getElementById('canvas');

View File

@ -11,7 +11,7 @@
*/
/// <reference path="../tweenjs/tweenjs-0.3.d.ts" />
/// <reference path="../tweenjs/tweenjs.d.ts" />
// rename the native MouseEvent, to avoid conflit with createjs's MouseEvent
interface NativeMouseEvent extends MouseEvent {

View File

@ -1,5 +1,5 @@
/// <reference path="ember-1.0.d.ts" />
/// <reference path="handlebars-1.0.d.ts" />
/// <reference path="ember.d.ts" />
/// <reference path="../handlebars/handlebars.d.ts" />
var App;

View File

@ -1,4 +1,4 @@
/// <reference path="express-3.0.d.ts" />
/// <reference path="express.d.ts" />
declare var _, $;

View File

@ -19,7 +19,7 @@ connect.session({})
*/
///<reference path='../node/node-0.8.d.ts' />
///<reference path='../node/node.d.ts' />
// do not reference this. use module('express') instead
declare module _express {

View File

@ -1,5 +1,5 @@
/// <reference path="jquery-1.8.d.ts" />
/// <reference path="fancybox-2.1.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="fancybox.d.ts" />
$('.fancybox').fancybox();
$('.fancybox').fancybox({

View File

@ -4,6 +4,8 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface FancyboxOptions {
padding?: any; // number or []
margin?: any; // number or []
@ -87,7 +89,7 @@ interface FancyboxMethods {
showLoading();
hideLoading();
(options?: FancyboxOptions): void;
(options: FancyboxOptions): void;
(selector: string, options?: FancyboxOptions): void;
(selector: JQuery, options?: FancyboxOptions): void;
(group?: any[], options?: FancyboxOptions): void;

430
flot/jquery.flot.d.ts vendored
View File

@ -1,215 +1,215 @@
/// <reference path="jquery.d.ts" />
module jquery.flot {
interface plotOptions {
colors?: any[];
series?: seriesOptions;
legend?: legendOptions;
xaxis?: axisOptions;
yaxis?: axisOptions;
xaxes?: axisOptions[];
yaxes?: axisOptions[];
grid?: gridOptions;
interfaction?: interaction;
hooks?: hooks;
}
interface hooks {
processOptions: { (plot: plot, options: plotOptions): void; } [];
processRawData: { (plot: plot, series: dataSeries, data: any[], datapoints: datapoints): void; }[];
processDatapoints: { (plot: plot, series: dataSeries, datapoints: datapoints): void; }[];
processOffset: { (plot: plot, offset: canvasPoint): void; }[];
drawBackground: { (plot: plot, context: CanvasRenderingContext2D): void; }[];
drawSeries: { (plot: plot, context: CanvasRenderingContext2D, series: dataSeries): void; }[];
draw: { (plot: plot, context: CanvasRenderingContext2D): void; }[];
bindEvents: { (plot: plot, eventHolder: JQuery): void; }[];
drawOverlay: { (plot: plot, context: CanvasRenderingContext2D): void; }[];
shutdown: { (plot: plot, eventHolder: JQuery): void; }[];
}
interface interaction {
redrawOverlayInterval?: number;
}
interface gridOptions {
show?: bool;
aboveData?: bool;
color?: any; // color
backgroundColor?: any; //color/gradient or null
margin?: any; // number or margin object
labelMargin?: number;
axisMargin?: number;
markings?: any; //array of markings or (fn: axes -> array of markings)
borderWidth: number;
borderColor?: any; // color or null
minBorderMargin?: number; // or null
clickable?: bool;
hoverable?: bool;
autoHighlight?: bool;
mouseActiveRadius?: number;
tickColor?: any;
markingsColor?: any;
markingsLineWidth?: number;
}
interface legendOptions {
show?: bool;
labelFormatter?: (label: string, series: any) => string; // null or (fn: string, series object -> string)
labelBoxBorderColor?: any; //color
noColumns?: number;
position?: string; //"ne" or "nw" or "se" or "sw"
margin?: any; //number of pixels or [x margin, y margin]
backgroundColor?: any; //null or color
backgroundOpacity?: number; // between 0 and 1
container?: JQuery; // null or jQuery object/DOM element/jQuery expression
sorted?: any; //null/false, true, "ascending", "descending" or a comparator
}
interface seriesOptions {
color?: number;
label?: string;
lines?: linesOptions;
bars?: barsOptions;
points?: pointsOptions;
xaxis?: number;
yaxis?: number;
clickable?: bool;
hoverable?: bool;
shadowSize?: number;
highlightColor?: any;
}
interface dataSeries extends seriesOptions {
data: any[];
}
interface axisOptions {
show?: bool; // null or true/false
position?: string; // "bottom" or "top" or "left" or "right"
color?: any; // null or color spec
tickColor?: any; // null or color spec
font?: any; // null or font spec object
min?: number;
max?: number;
autoscaleMargin?: number;
transform?: (v: number) => number; // null or fn: number -> number
inverseTransform?: (v: number) => number; // null or fn: number -> number
ticks?: any; // null or number or ticks array or (fn: axis -> ticks array)
tickSize?: any; // number or array
minTickSize?: any; // number or array
tickFormatter?: (t: number) => string; // (fn: number, object -> string) or string
tickDecimals?: number;
labelWidth?: number;
labelHeight?: number;
reserveSpace?: bool;
tickLength?: number;
alignTicksWithAxis?: number;
}
interface seriesTypeBase {
show?: bool;
lineWidth?: number;
fill?: any; //boolean or number
fillColor?: any; //null or color/gradient
}
interface linesOptions extends seriesTypeBase {
steps?: bool;
}
interface barsOptions extends seriesTypeBase {
barWidth?: number;
align?: string;
horizontal?: bool;
}
interface pointsOptions extends seriesTypeBase {
radius?: number;
symbol?: any;
}
interface gradient {
colors: any[];
}
interface item {
datapoint: number[]; // the point, e.g. [0, 2]
dataIndex: number; // the index of the point in the data array
series: dataSeries; //the series object
seriesIndex: number; //the index of the series
pageX: number;
pageY: number; //the global screen coordinates of the point
}
interface datapoints {
points: number[];
pointsize: number;
format: datapointFormat[];
}
interface datapointFormat {
x?: bool;
y?: bool;
number: bool;
required: bool;
defaultValue?: number;
}
interface point {
x: number;
y: number;
}
interface canvasPoint {
top: number;
left: number;
bottom?: number;
right?: number;
}
interface axes {
xaxis: axis;
yaxis: axis;
x2axis?: axis;
y2axis?: axis;
}
interface axis extends axisOptions {
p2c(point):canvasPoint;
c2p(canvasPoint):point;
}
interface plot {
highlight(series: dataSeries, datapoint: item);
unhightlight();
unhighlight(series: dataSeries, datapoint: item);
setData(data: any);
setupGrid();
draw();
triggerRedrawOverlay();
width();
height();
offset();
pointOffset(point: point);
resize();
shutdown();
getData(): dataSeries[];
getAxes(): axes;
getPlaceholder(): JQuery;
getCanvas(): HTMLCanvasElement;
getPlotOffset(): canvasPoint;
getOptions(): plotOptions;
}
}
interface JQueryStatic {
plot(placeholder: JQuery, data: jquery.flot.dataSeries[], options?: jquery.flot.plotOptions): jquery.flot.plot;
plot(placeholder: JQuery, data: any[], options?: jquery.flot.plotOptions): jquery.flot.plot;
}
/// <reference path="../jquery/jquery.d.ts" />
module jquery.flot {
interface plotOptions {
colors?: any[];
series?: seriesOptions;
legend?: legendOptions;
xaxis?: axisOptions;
yaxis?: axisOptions;
xaxes?: axisOptions[];
yaxes?: axisOptions[];
grid?: gridOptions;
interfaction?: interaction;
hooks?: hooks;
}
interface hooks {
processOptions: { (plot: plot, options: plotOptions): void; } [];
processRawData: { (plot: plot, series: dataSeries, data: any[], datapoints: datapoints): void; }[];
processDatapoints: { (plot: plot, series: dataSeries, datapoints: datapoints): void; }[];
processOffset: { (plot: plot, offset: canvasPoint): void; }[];
drawBackground: { (plot: plot, context: CanvasRenderingContext2D): void; }[];
drawSeries: { (plot: plot, context: CanvasRenderingContext2D, series: dataSeries): void; }[];
draw: { (plot: plot, context: CanvasRenderingContext2D): void; }[];
bindEvents: { (plot: plot, eventHolder: JQuery): void; }[];
drawOverlay: { (plot: plot, context: CanvasRenderingContext2D): void; }[];
shutdown: { (plot: plot, eventHolder: JQuery): void; }[];
}
interface interaction {
redrawOverlayInterval?: number;
}
interface gridOptions {
show?: bool;
aboveData?: bool;
color?: any; // color
backgroundColor?: any; //color/gradient or null
margin?: any; // number or margin object
labelMargin?: number;
axisMargin?: number;
markings?: any; //array of markings or (fn: axes -> array of markings)
borderWidth: number;
borderColor?: any; // color or null
minBorderMargin?: number; // or null
clickable?: bool;
hoverable?: bool;
autoHighlight?: bool;
mouseActiveRadius?: number;
tickColor?: any;
markingsColor?: any;
markingsLineWidth?: number;
}
interface legendOptions {
show?: bool;
labelFormatter?: (label: string, series: any) => string; // null or (fn: string, series object -> string)
labelBoxBorderColor?: any; //color
noColumns?: number;
position?: string; //"ne" or "nw" or "se" or "sw"
margin?: any; //number of pixels or [x margin, y margin]
backgroundColor?: any; //null or color
backgroundOpacity?: number; // between 0 and 1
container?: JQuery; // null or jQuery object/DOM element/jQuery expression
sorted?: any; //null/false, true, "ascending", "descending" or a comparator
}
interface seriesOptions {
color?: number;
label?: string;
lines?: linesOptions;
bars?: barsOptions;
points?: pointsOptions;
xaxis?: number;
yaxis?: number;
clickable?: bool;
hoverable?: bool;
shadowSize?: number;
highlightColor?: any;
}
interface dataSeries extends seriesOptions {
data: any[];
}
interface axisOptions {
show?: bool; // null or true/false
position?: string; // "bottom" or "top" or "left" or "right"
color?: any; // null or color spec
tickColor?: any; // null or color spec
font?: any; // null or font spec object
min?: number;
max?: number;
autoscaleMargin?: number;
transform?: (v: number) => number; // null or fn: number -> number
inverseTransform?: (v: number) => number; // null or fn: number -> number
ticks?: any; // null or number or ticks array or (fn: axis -> ticks array)
tickSize?: any; // number or array
minTickSize?: any; // number or array
tickFormatter?: (t: number) => string; // (fn: number, object -> string) or string
tickDecimals?: number;
labelWidth?: number;
labelHeight?: number;
reserveSpace?: bool;
tickLength?: number;
alignTicksWithAxis?: number;
}
interface seriesTypeBase {
show?: bool;
lineWidth?: number;
fill?: any; //boolean or number
fillColor?: any; //null or color/gradient
}
interface linesOptions extends seriesTypeBase {
steps?: bool;
}
interface barsOptions extends seriesTypeBase {
barWidth?: number;
align?: string;
horizontal?: bool;
}
interface pointsOptions extends seriesTypeBase {
radius?: number;
symbol?: any;
}
interface gradient {
colors: any[];
}
interface item {
datapoint: number[]; // the point, e.g. [0, 2]
dataIndex: number; // the index of the point in the data array
series: dataSeries; //the series object
seriesIndex: number; //the index of the series
pageX: number;
pageY: number; //the global screen coordinates of the point
}
interface datapoints {
points: number[];
pointsize: number;
format: datapointFormat[];
}
interface datapointFormat {
x?: bool;
y?: bool;
number: bool;
required: bool;
defaultValue?: number;
}
interface point {
x: number;
y: number;
}
interface canvasPoint {
top: number;
left: number;
bottom?: number;
right?: number;
}
interface axes {
xaxis: axis;
yaxis: axis;
x2axis?: axis;
y2axis?: axis;
}
interface axis extends axisOptions {
p2c(point):canvasPoint;
c2p(canvasPoint):point;
}
interface plot {
highlight(series: dataSeries, datapoint: item);
unhightlight();
unhighlight(series: dataSeries, datapoint: item);
setData(data: any);
setupGrid();
draw();
triggerRedrawOverlay();
width();
height();
offset();
pointOffset(point: point);
resize();
shutdown();
getData(): dataSeries[];
getAxes(): axes;
getPlaceholder(): JQuery;
getCanvas(): HTMLCanvasElement;
getPlotOffset(): canvasPoint;
getOptions(): plotOptions;
}
}
interface JQueryStatic {
plot(placeholder: JQuery, data: jquery.flot.dataSeries[], options?: jquery.flot.plotOptions): jquery.flot.plot;
plot(placeholder: JQuery, data: any[], options?: jquery.flot.plotOptions): jquery.flot.plot;
}

View File

@ -1,5 +1,5 @@
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="foundation-3.2.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="foundation.d.ts" />
function test_orbit() {
$("#featured").orbit();

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface OrbitOptions {
animation?: string;

View File

@ -1,5 +1,5 @@
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="hammerjs-0.6.d.ts" />
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="hammerjs.d.ts" />
var hammer = new Hammer(document.getElementById("container"));
hammer.ondragstart = function (ev) { };

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface HammerOptions {
prevent_default?: bool;

View File

@ -1,4 +1,4 @@
/// <reference path="handlebars-1.0.d.ts" />
/// <reference path="handlebars.d.ts" />
var context = {
author: { firstName: "Alan", lastName: "Johnson" },

View File

@ -1,100 +1,99 @@
/// <reference path="highcharts-2.3.d.ts" />
var animate: HighchartsBoolOrAnimation;
animate = true;
animate = { duration: 200, easing: "linear" };
var gradient: HighchartsColorOrGradient;
gradient = {
linearGradient: { x0: 0, y0: 0, x1: 500, y1: 500 },
stops: [
[0, 'rgb(255, 255, 255)'],
[1, 'rgb(200, 200, 255)']
]
}
var color = "#fcfcff";
var backgound: HighchartsColorOrGradient;
backgound = gradient;
backgound = color;
var chart1 = new Highcharts.Chart({
chart: {
renderTo: "container"
},
xAxis: [{
}],
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
var chart2 = new Highcharts.Chart({
chart: {
renderTo: 'container',
width: 400,
height: 400,
spacingRight: 20
},
xAxis: [{
type: 'logarithmic',
min: 1,
max: 1000,
endOnTick: true,
tickInterval: 1,
minorTickInterval: 0.1,
gridLineWidth: 1
}],
yAxis: [{
type: 'logarithmic',
min: 1,
max: 1000,
tickInterval: 1,
minorTickInterval: 0.1,
title: {
text: null
}
}],
legend: {
enabled: false
},
series: [{
data: [
[550, 870], [738, 362], [719, 711], [547, 665], [595, 197], [332, 144],
[581, 555], [196, 862], [6, 837], [400, 924], [888, 148], [785, 730],
[374, 358], [440, 69], [704, 318], [646, 506], [238, 662], [233, 56],
[622, 572], [563, 903], [744, 672], [904, 646], [390, 325], [536, 491],
[676, 186], [467, 145], [790, 114], [437, 793], [853, 243], [947, 196],
[395, 728], [527, 148], [516, 675], [632, 562], [52, 552], [605, 580],
[790, 865], [156, 87], [584, 290], [339, 921], [383, 633], [106, 373],
[762, 863], [424, 149], [608, 959], [574, 711], [468, 664], [268, 77],
[894, 850], [171, 102], [203, 565], [592, 549], [86, 486], [526, 244],
[323, 575], [488, 842], [401, 618], [148, 43], [828, 314], [554, 711],
[685, 868], [387, 435], [469, 828], [623, 506], [436, 184], [450, 156],
[805, 517], [465, 997], [728, 802], [231, 438], [935, 438], [519, 856],
[378, 579], [73, 765], [223, 219], [359, 317], [686, 742], [17, 790],
[20, 35], [410, 644], [984, 325], [503, 882], [900, 187], [578, 968],
[27, 718], [355, 704], [395, 332], [641, 548], [964, 374], [215, 472],
[323, 66], [882, 542], [671, 327], [650, 193], [828, 632], [760, 929],
[607, 335], [928, 826], [462, 598], [631, 411]
],
type: 'scatter'
}]
});
chart1.exportChart(null, {
chart: {
backgroundColor: '#FFFFFF'
}
});
var div: HTMLDivElement;
var r = new Highcharts.Renderer(div, 20, 30);
var box = r.text("Hello", 10, 10).getBBox();
/// <reference path="highcharts.d.ts" />
var animate: HighchartsBoolOrAnimation;
animate = true;
animate = { duration: 200, easing: "linear" };
var gradient: HighchartsColorOrGradient;
gradient = {
linearGradient: { x0: 0, y0: 0, x1: 500, y1: 500 },
stops: [
[0, 'rgb(255, 255, 255)'],
[1, 'rgb(200, 200, 255)']
]
}
var color = "#fcfcff";
var backgound: HighchartsColorOrGradient;
backgound = gradient;
backgound = color;
var chart1 = new Highcharts.Chart({
chart: {
renderTo: "container"
},
xAxis: [{
}],
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
var chart2 = new Highcharts.Chart({
chart: {
renderTo: 'container',
width: 400,
height: 400,
spacingRight: 20
},
xAxis: [{
type: 'logarithmic',
min: 1,
max: 1000,
endOnTick: true,
tickInterval: 1,
minorTickInterval: 0.1,
gridLineWidth: 1
}],
yAxis: [{
type: 'logarithmic',
min: 1,
max: 1000,
tickInterval: 1,
minorTickInterval: 0.1,
title: {
text: null
}
}],
legend: {
enabled: false
},
series: [{
data: [
[550, 870], [738, 362], [719, 711], [547, 665], [595, 197], [332, 144],
[581, 555], [196, 862], [6, 837], [400, 924], [888, 148], [785, 730],
[374, 358], [440, 69], [704, 318], [646, 506], [238, 662], [233, 56],
[622, 572], [563, 903], [744, 672], [904, 646], [390, 325], [536, 491],
[676, 186], [467, 145], [790, 114], [437, 793], [853, 243], [947, 196],
[395, 728], [527, 148], [516, 675], [632, 562], [52, 552], [605, 580],
[790, 865], [156, 87], [584, 290], [339, 921], [383, 633], [106, 373],
[762, 863], [424, 149], [608, 959], [574, 711], [468, 664], [268, 77],
[894, 850], [171, 102], [203, 565], [592, 549], [86, 486], [526, 244],
[323, 575], [488, 842], [401, 618], [148, 43], [828, 314], [554, 711],
[685, 868], [387, 435], [469, 828], [623, 506], [436, 184], [450, 156],
[805, 517], [465, 997], [728, 802], [231, 438], [935, 438], [519, 856],
[378, 579], [73, 765], [223, 219], [359, 317], [686, 742], [17, 790],
[20, 35], [410, 644], [984, 325], [503, 882], [900, 187], [578, 968],
[27, 718], [355, 704], [395, 332], [641, 548], [964, 374], [215, 472],
[323, 66], [882, 542], [671, 327], [650, 193], [828, 632], [760, 929],
[607, 335], [928, 826], [462, 598], [631, 411]
],
type: 'scatter'
}]
});
chart1.exportChart(null, {
chart: {
backgroundColor: '#FFFFFF'
}
});
var div: HTMLDivElement;
var r = new Highcharts.Renderer(div, 20, 30);
var box = r.text("Hello", 10, 10).getBBox();

View File

@ -1,4 +1,4 @@
/// <reference path="history-1.7.d.ts" />
/// <reference path="history.d.ts" />
if (!History.enabled) {
return false;

View File

@ -22,4 +22,4 @@ interface History {
go(X);
log(...messages: any[]);
debug(...messages: any[]);
}
}

View File

@ -1,4 +1,4 @@
/// <reference path="humane-3.0.d.ts" />
/// <reference path="humane.d.ts" />
humane.log("Welcome Back");
humane.log(["List","of","Items"]);

View File

@ -1,4 +1,4 @@
/// <reference path="lib/jquery.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
// Type definitions for i18next (v1.5.10 incl. jQuery)
// Project: http://i18next.com

View File

@ -1,6 +1,6 @@
/// <reference path="../lib/sinon.d.ts" />
/// <reference path="../lib/mocha.d.ts" />
/// <reference path="../lib/jquery.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../i18next.d.ts" />
// declarations for expect.js

View File

@ -1,4 +1,4 @@
/// <reference path="impress-0.5.d.ts" />
/// <reference path="impress.d.ts" />
impress().init();

View File

@ -1,4 +1,4 @@
/// <reference path="iscroll-4.2.d.ts" />
/// <reference path="iscroll.d.ts" />
var myScroll1 = new iScroll('wrapper');
var myScroll2 = new iScroll('wrapper', { hScrollbar: false, vScrollbar: false });

View File

@ -1,4 +1,4 @@
/// <reference path="jasmine-1.2.d.ts" />
/// <reference path="jasmine.d.ts" />
describe("A suite", () => {
it("contains spec with an expectation", () => {

View File

@ -1,37 +1,37 @@
///<reference path="../jquery/jquery-1.9.d.ts" />
///<reference path="jquery.cookie.d.ts" />
class TestObject {
text: string;
value: number;
constructor (text: string, value: number) {
this.text = text;
this.value = value;
}
}
class CookieOptions implements JQueryCookieOptions {
expires: number;
path: string;
domain: string;
secure: bool;
}
$.cookie("the_cookie", "the_value");
console.log($.cookie("the_cookie"));
var testObject = new TestObject("Hello World", 5);
var cookieOptions = new CookieOptions();
cookieOptions.path = "/";
cookieOptions.domain = "jquery.com";
$.cookie.json = true;
$.cookie("test", testObject, cookieOptions);
var result = <TestObject>$.cookie("test");
console.log(result.text);
///<reference path="../jquery/jquery.d.ts" />
///<reference path="jquery.cookie.d.ts" />
class TestObject {
text: string;
value: number;
constructor (text: string, value: number) {
this.text = text;
this.value = value;
}
}
class CookieOptions implements JQueryCookieOptions {
expires: number;
path: string;
domain: string;
secure: bool;
}
$.cookie("the_cookie", "the_value");
console.log($.cookie("the_cookie"));
var testObject = new TestObject("Hello World", 5);
var cookieOptions = new CookieOptions();
cookieOptions.path = "/";
cookieOptions.domain = "jquery.com";
$.cookie.json = true;
$.cookie("test", testObject, cookieOptions);
var result = <TestObject>$.cookie("test");
console.log(result.text);

View File

@ -1,32 +1,32 @@
// Type definitions for jQuery Cookie Plugin 1.3
// Project: https://github.com/carhartl/jquery-cookie
// Definitions by: Roy Goode <https://github.com/RoyGoode/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery-1.9.d.ts" />
interface JQueryCookieOptions {
expires?: any;
path?: string;
domain?: string;
secure?: bool;
}
interface JQueryCookieStatic {
raw?: bool;
json?: bool;
(name: string): any;
(name: string, value: string): void;
(name: string, value: string, options: JQueryCookieOptions): void;
(name: string, value: any): void;
(name: string, value: any, options: JQueryCookieOptions): void;
}
interface JQueryStatic {
cookie?: JQueryCookieStatic;
removeCookie(name: string): bool;
removeCookie(name: string, options: JQueryCookieOptions): bool;
// Type definitions for jQuery Cookie Plugin 1.3
// Project: https://github.com/carhartl/jquery-cookie
// Definitions by: Roy Goode <https://github.com/RoyGoode/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
interface JQueryCookieOptions {
expires?: any;
path?: string;
domain?: string;
secure?: bool;
}
interface JQueryCookieStatic {
raw?: bool;
json?: bool;
(name: string): any;
(name: string, value: string): void;
(name: string, value: string, options: JQueryCookieOptions): void;
(name: string, value: any): void;
(name: string, value: any, options: JQueryCookieOptions): void;
}
interface JQueryStatic {
cookie?: JQueryCookieStatic;
removeCookie(name: string): bool;
removeCookie(name: string, options: JQueryCookieOptions): bool;
}

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface JQuery {
dynatree(options?: DynatreeOptions): DynaTree;

View File

@ -1,50 +1,50 @@
/// <reference path='../jquery/jquery-1.9.d.ts'/>
/// <reference path='jquery.jnotify-1.0.d.ts'/>
$(document).ready(function () {
$('#StatusBar').jnotifyInizialize({
oneAtTime: true
});
$('#Notification')
.jnotifyInizialize({
oneAtTime: false,
appendType: 'append'
})
.css({
'position': 'absolute',
'marginTop': '20px',
'right': '20px',
'width': '250px',
'z-index': '9999'
});
$('#addStatusBarMessage').click(function () {
$('#StatusBar').jnotifyAddMessage({
text: 'This is a non permanent message.',
permanent: false,
showIcon: false
});
});
$('#addStatusBarError').click(function () {
$('#StatusBar').jnotifyAddMessage({
text: 'This is a permanent error.',
permanent: true,
type: 'error'
});
});
$('#addNotificationMessage').click(function () {
$('#Notification').jnotifyAddMessage({
text: 'This is a non permanent message.',
permanent: false
});
});
$('#addNotificationError').click(function () {
$('#Notification').jnotifyAddMessage({
text: 'This is a permanent error.',
permanent: true,
type: 'error'
});
});
/// <reference path='../jquery/jquery.d.ts'/>
/// <reference path='jquery.jnotify.d.ts'/>
$(document).ready(function () {
$('#StatusBar').jnotifyInizialize({
oneAtTime: true
});
$('#Notification')
.jnotifyInizialize({
oneAtTime: false,
appendType: 'append'
})
.css({
'position': 'absolute',
'marginTop': '20px',
'right': '20px',
'width': '250px',
'z-index': '9999'
});
$('#addStatusBarMessage').click(function () {
$('#StatusBar').jnotifyAddMessage({
text: 'This is a non permanent message.',
permanent: false,
showIcon: false
});
});
$('#addStatusBarError').click(function () {
$('#StatusBar').jnotifyAddMessage({
text: 'This is a permanent error.',
permanent: true,
type: 'error'
});
});
$('#addNotificationMessage').click(function () {
$('#Notification').jnotifyAddMessage({
text: 'This is a non permanent message.',
permanent: false
});
});
$('#addNotificationError').click(function () {
$('#Notification').jnotifyAddMessage({
text: 'This is a permanent error.',
permanent: true,
type: 'error'
});
});
});

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../jquery/jquery-1.9.d.ts'/>
/// <reference path='../jquery/jquery.d.ts'/>
interface JNotifyInitOptions {
oneAtTime?: bool;

View File

@ -1,45 +1,45 @@
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="jquery.timepicker-0.3.d.ts"/>
var beforeShowCallback, onSelectCallback, onCloseCallback, onHourShow, onMinuteShow;
$('#timepicker').timepicker({
timeSeparator: ':',
showLeadingZero: true,
showMinutesLeadingZero: true,
showPeriod: false,
showPeriodLabels: true,
periodSeparator: ' ',
altField: '#alternate_input',
defaultTime: '12:34',
showOn: 'focus',
button: null,
hourText: 'Hour',
minuteText: 'Minute',
amPmText: ['AM', 'PM'],
myPosition: 'left top',
atPosition: 'left bottom',
beforeShow: beforeShowCallback,
onSelect: onSelectCallback,
onClose: onCloseCallback,
onHourShow: onHourShow,
onMinuteShow: onMinuteShow,
hours: {
starts: 0,
ends: 23
},
minutes: {
starts: 0,
ends: 55,
interval: 5
},
rows: 4,
showHours: true,
showMinutes: true,
showCloseButton: false,
closeButtonText: 'Done',
showNowButton: false,
nowButtonText: 'Now',
showDeselectButton: false,
deselectButtonText: 'Deselect'
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="jquery.timepicker.d.ts"/>
var beforeShowCallback, onSelectCallback, onCloseCallback, onHourShow, onMinuteShow;
$('#timepicker').timepicker({
timeSeparator: ':',
showLeadingZero: true,
showMinutesLeadingZero: true,
showPeriod: false,
showPeriodLabels: true,
periodSeparator: ' ',
altField: '#alternate_input',
defaultTime: '12:34',
showOn: 'focus',
button: null,
hourText: 'Hour',
minuteText: 'Minute',
amPmText: ['AM', 'PM'],
myPosition: 'left top',
atPosition: 'left bottom',
beforeShow: beforeShowCallback,
onSelect: onSelectCallback,
onClose: onCloseCallback,
onHourShow: onHourShow,
onMinuteShow: onMinuteShow,
hours: {
starts: 0,
ends: 23
},
minutes: {
starts: 0,
ends: 55,
interval: 5
},
rows: 4,
showHours: true,
showMinutes: true,
showCloseButton: false,
closeButtonText: 'Done',
showNowButton: false,
nowButtonText: 'Now',
showDeselectButton: false,
deselectButtonText: 'Deselect'
});

View File

@ -3,8 +3,8 @@
// Definitions by: https://github.com/anwarjaved
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jqueryui/jqueryui-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="../jqueryui/jqueryui.d.ts"/>
interface TimePickerHour {
starts?: number; // first displayed hour

View File

@ -1,93 +1,93 @@
///<reference path="../jquery/jquery-1.9.d.ts" />
///<reference path="jquery.transit.d.ts" />
class TransitOptions implements JQueryTransitOptions {
opacity: number;
duration: number;
delay: number;
easing: string;
complete: () => void;
scale: any;
}
$(document).ready(function () {
test_opacity();
test_scale();
test_duration();
// Wait for all tests to complete and report results
setTimeout(Assert.Results, 2000);
});
class Assert {
static totalTests: number = 0;
static passedTests: number = 0;
static Results() {
console.log('Tests succeeded - ' + passedTests + '/' + totalTests + '; Tests failed - ' + (totalTests - passedTests) + '/' + totalTests);
}
static AssertionFailed(actual: any, expected: any, test: string) {
console.log((test || '') + ' assertion failed -- expected ' + expected.toString() + '; actual ' + actual.toString());
}
static Equal(actual: any, expected: any, test?: string) {
totalTests++;
if (actual === expected) {
passedTests++;
return;
}
AssertionFailed(actual, expected, test);
}
static NotEqual(actual: any, expected: any, test?: string) {
totalTests++;
if (actual !== expected) {
passedTests++;
return;
}
AssertionFailed(actual, expected, test);
}
}
function test_signatures() {
var TestObject = $('<div>');
var options = new TransitOptions();
options.opacity = 50;
options.duration = 250;
TestObject.css("scale", 2);
TestObject.transition(options);
TestObject.transition(options, 500);
TestObject.transition(options, 'in');
TestObject.transition(options, function () { var test: bool = true; });
TestObject.transition(options, 500, 'out');
TestObject.transition(options, 500, 'in-out', function () { var test: bool = true; });
}
function test_opacity() {
var TestObject = $('<div>');
TestObject.css('opacity', 25);
Assert.Equal(TestObject.attr('style'), 'opacity: 25;', 'Opacity pre-transition test');
TestObject.transition({ opacity: 75, duration: 1, complete: function () { Assert.Equal(TestObject.attr('style'), 'opacity: 75;', 'Opacity transition test'); } });
}
function test_scale() {
var TestObject = $('<div>');
TestObject.css('scale', 0.5);
Assert.Equal(TestObject.attr('style'), 'transform: scale(0.5, 0.5);', 'Scale pre-transition test');
TestObject.transition({ scale: 2, duration: 1, complete: function () { Assert.Equal(TestObject.attr('style'), 'transform: scale(2, 2);', 'Scale transition test'); } });
TestObject.css('scale', [0.5, 1.0]);
Assert.Equal(TestObject.attr('style'), 'transform: scale(0.5, 1);', 'Scale pre-transition test');
TestObject.transition({ scale: [2, 3], duration: 1, complete: function () { Assert.Equal(TestObject.attr('style'), 'transform: scale(2, 3);', 'Scale transition test'); } });
}
function test_duration() {
var TestObject = $('<div>');
TestObject.css('opacity', 25);
Assert.Equal(TestObject.attr('style'), 'opacity: 25;', 'Duration pre-transition test');
TestObject.transition({ opacity: 75, duration: 1000, complete: function () { Assert.Equal(TestObject.attr('style'), 'opacity: 75;', 'Duration post-transition test'); } });
// Test the transitions state partway through and assert that we're not to our final state yet.
setTimeout(function () { Assert.NotEqual(TestObject.attr('style'), 'opacity: 75;', 'Duration intra-transition test'); }, 300);
}
///<reference path="../jquery/jquery.d.ts" />
///<reference path="jquery.transit.d.ts" />
class TransitOptions implements JQueryTransitOptions {
opacity: number;
duration: number;
delay: number;
easing: string;
complete: () => void;
scale: any;
}
$(document).ready(function () {
test_opacity();
test_scale();
test_duration();
// Wait for all tests to complete and report results
setTimeout(Assert.Results, 2000);
});
class Assert {
static totalTests: number = 0;
static passedTests: number = 0;
static Results() {
console.log('Tests succeeded - ' + passedTests + '/' + totalTests + '; Tests failed - ' + (totalTests - passedTests) + '/' + totalTests);
}
static AssertionFailed(actual: any, expected: any, test: string) {
console.log((test || '') + ' assertion failed -- expected ' + expected.toString() + '; actual ' + actual.toString());
}
static Equal(actual: any, expected: any, test?: string) {
totalTests++;
if (actual === expected) {
passedTests++;
return;
}
AssertionFailed(actual, expected, test);
}
static NotEqual(actual: any, expected: any, test?: string) {
totalTests++;
if (actual !== expected) {
passedTests++;
return;
}
AssertionFailed(actual, expected, test);
}
}
function test_signatures() {
var TestObject = $('<div>');
var options = new TransitOptions();
options.opacity = 50;
options.duration = 250;
TestObject.css("scale", 2);
TestObject.transition(options);
TestObject.transition(options, 500);
TestObject.transition(options, 'in');
TestObject.transition(options, function () { var test: bool = true; });
TestObject.transition(options, 500, 'out');
TestObject.transition(options, 500, 'in-out', function () { var test: bool = true; });
}
function test_opacity() {
var TestObject = $('<div>');
TestObject.css('opacity', 25);
Assert.Equal(TestObject.attr('style'), 'opacity: 25;', 'Opacity pre-transition test');
TestObject.transition({ opacity: 75, duration: 1, complete: function () { Assert.Equal(TestObject.attr('style'), 'opacity: 75;', 'Opacity transition test'); } });
}
function test_scale() {
var TestObject = $('<div>');
TestObject.css('scale', 0.5);
Assert.Equal(TestObject.attr('style'), 'transform: scale(0.5, 0.5);', 'Scale pre-transition test');
TestObject.transition({ scale: 2, duration: 1, complete: function () { Assert.Equal(TestObject.attr('style'), 'transform: scale(2, 2);', 'Scale transition test'); } });
TestObject.css('scale', [0.5, 1.0]);
Assert.Equal(TestObject.attr('style'), 'transform: scale(0.5, 1);', 'Scale pre-transition test');
TestObject.transition({ scale: [2, 3], duration: 1, complete: function () { Assert.Equal(TestObject.attr('style'), 'transform: scale(2, 3);', 'Scale transition test'); } });
}
function test_duration() {
var TestObject = $('<div>');
TestObject.css('opacity', 25);
Assert.Equal(TestObject.attr('style'), 'opacity: 25;', 'Duration pre-transition test');
TestObject.transition({ opacity: 75, duration: 1000, complete: function () { Assert.Equal(TestObject.attr('style'), 'opacity: 75;', 'Duration post-transition test'); } });
// Test the transitions state partway through and assert that we're not to our final state yet.
setTimeout(function () { Assert.NotEqual(TestObject.attr('style'), 'opacity: 75;', 'Duration intra-transition test'); }, 300);
}

View File

@ -1,6 +1,6 @@
// Type definitions for jQuery.transit.js
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
// Transit //////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/// <reference path="jquery-1.8.d.ts"/>
/// <reference path="jquery.validation-1.10.d.ts" />
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="jquery.validation.d.ts" />
function test_validate() {
$("#commentForm").validate();

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface ValidationOptions {
debug?: bool;

View File

@ -1,28 +1,28 @@
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="jquery.watermark-3.1.d.ts"/>
$('#inputId').watermark('Required information');
$('#inputId').watermark('Required information', { className: 'myClassName' });
$('#inputId').watermark('Search', { useNative: false });
$.watermark.options.className = 'myClass';
$.watermark.options.useNative = false;
var myFunction;
$.watermark.options.useNative = myFunction;
$.watermark.options.hideBeforeUnload = false;
$.watermark.options = {
className: 'myClass',
useNative: false,
hideBeforeUnload: false
};
$.watermark.options.hideBeforeUnload = true;
$.watermark.show('input.optional');
$.watermark.hide('#myInput');
$.watermark.showAll();
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="jquery.watermark.d.ts"/>
$('#inputId').watermark('Required information');
$('#inputId').watermark('Required information', { className: 'myClassName' });
$('#inputId').watermark('Search', { useNative: false });
$.watermark.options.className = 'myClass';
$.watermark.options.useNative = false;
var myFunction;
$.watermark.options.useNative = myFunction;
$.watermark.options.hideBeforeUnload = false;
$.watermark.options = {
className: 'myClass',
useNative: false,
hideBeforeUnload: false
};
$.watermark.options.hideBeforeUnload = true;
$.watermark.show('input.optional');
$.watermark.hide('#myInput');
$.watermark.showAll();
$.watermark.hideAll();

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface WatermarkOptions {
className?: string; // Default class name for all watermarks

View File

@ -1,4 +1,4 @@
/// <reference path="jquery-1.9.d.ts" />
/// <reference path="jquery.d.ts" />
function test_add() {
$("p").add("div").addClass("widget");

View File

@ -1,5 +1,5 @@
/// <reference path="jquery-1.8.d.ts" />
/// <reference path="jquerymobile-1.2.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="jquerymobile.d.ts" />
function test_api() {
$.mobile.changePage("about/us.html", { transition: "slideup" });

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface JQueryMobileEvent { (event: Event, ui): void; }

View File

@ -1,5 +1,5 @@
/// <reference path="jquery-1.8.d.ts" />
/// <reference path="jqueryui-1.9.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="jqueryui.d.ts" />
function test_draggable() {

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
// Accordion //////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/// <reference path="../backbone/backbone-0.9.d.ts" />
/// <reference path="../knockout/knockout-2.2.d.ts" />
/// <reference path="../backbone/backbone.d.ts" />
/// <reference path="../knockout/knockout.d.ts" />
declare module Knockback {
export interface EventWatcherOptions {

View File

@ -1,30 +1,30 @@
/// <reference path="knockout-2.2.d.ts" />
// build: ko.editables 0.9
// http://romanych.github.com/ko.editables/
// bestowed by ko.editable(target)
interface KnockoutEditable {
addEditable(target: any): any;
beginEdit(): void;
commit(): void;
rollback(): void;
hasChanges(): bool;
}
interface KnockoutEditableStatic {
(viewModel: any, autoInit?: bool): void;
beginEdit(scope: string): void;
commit(scope: string): void;
rollback(scope: string): void;
hasChanges(scope: string): bool;
// INTERNAL
//getHasChangesFlag(scope: string): any;
//enable(object: any, scope: string); void;
}
// extend ko global
interface KnockoutStatic {
editable: KnockoutEditableStatic;
/// <reference path="../knockout/knockout.d.ts" />
// build: ko.editables 0.9
// http://romanych.github.com/ko.editables/
// bestowed by ko.editable(target)
interface KnockoutEditable {
addEditable(target: any): any;
beginEdit(): void;
commit(): void;
rollback(): void;
hasChanges(): bool;
}
interface KnockoutEditableStatic {
(viewModel: any, autoInit?: bool): void;
beginEdit(scope: string): void;
commit(scope: string): void;
rollback(scope: string): void;
hasChanges(scope: string): bool;
// INTERNAL
//getHasChangesFlag(scope: string): any;
//enable(object: any, scope: string); void;
}
// extend ko global
interface KnockoutStatic {
editable: KnockoutEditableStatic;
}

View File

@ -3,7 +3,7 @@
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout-2.2.d.ts" />
/// <reference path="../knockout/knockout.d.ts" />
interface KnockoutMappingCreateOptions {
data: any;

View File

@ -1,4 +1,4 @@
/// <reference path="knockout-2.2.d.ts" />
/// <reference path="../knockouot/knockout.d.ts" />
interface KnockoutValidationGroupingOptions {
deep?: bool;

View File

@ -1,19 +1,19 @@
/// <reference path="knockout-2.2.d.ts" />
// build: knockout.viewmodel 1.1.3
// http://coderenaissance.github.com/knockout.viewmodel/
interface KnockoutViewModelStatic {
toModel(viewmodel: any): any;
fromModel(model: any, options?: any): any;
updateFromModel(viewmodel: any, model: any);
// INTERNAL flag: enable logging of conversions
// logs will be written to console
logging: bool;
}
// Extend ko global
interface KnockoutStatic {
viewmodel: KnockoutViewModelStatic;
/// <reference path="../knockout/knockout.d.ts" />
// build: knockout.viewmodel 1.1.3
// http://coderenaissance.github.com/knockout.viewmodel/
interface KnockoutViewModelStatic {
toModel(viewmodel: any): any;
fromModel(model: any, options?: any): any;
updateFromModel(viewmodel: any, model: any);
// INTERNAL flag: enable logging of conversions
// logs will be written to console
logging: bool;
}
// Extend ko global
interface KnockoutStatic {
viewmodel: KnockoutViewModelStatic;
}

View File

@ -1,5 +1,5 @@
/// <reference path="knockout-2.2.d.ts" />
/// <reference path="../knockout.mapping/knockout.mapping-2.0.d.ts" />
/// <reference path="knockout.d.ts" />
/// <reference path="../knockout.mapping/knockout.mapping.d.ts" />
declare var $;

View File

@ -1,6 +1,6 @@
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../knockout/knockout-2.2.d.ts" />
/// <reference path="kolite-1.1.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../knockout/knockout.d.ts" />
/// <reference path="kolite.d.ts" />
function test_asyncCommand() {
var saveCmd = ko.asyncCommand({

4
kolite/kolite.d.ts vendored
View File

@ -4,8 +4,8 @@
// Definitions https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../knockout/knockout-2.2.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../knockout/knockout.d.ts" />
// Activity /////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/// <reference path='../jasmine/jasmine-1.2.d.ts'/>
/// <reference path='linq-2.2.d.ts'/>
/// <reference path='../jasmine/jasmine.d.ts'/>
/// <reference path='linq.d.ts'/>
// <reference path="c:/linq.js" /> tests were run from VisualStudio + Resharper7
describe("Linq.js tests", function () {

View File

@ -1,4 +1,4 @@
/// <reference path="modernizr-2.6.d.ts" />
/// <reference path="modernizr.d.ts" />
declare var $: any;

View File

@ -1,4 +1,4 @@
/// <reference path="moment-1.7.d.ts" />
/// <reference path="moment.d.ts" />
moment().add('hours', 1).fromNow();

View File

@ -1,4 +1,4 @@
/// <reference path="msnodesql-0.2.d.ts" />
/// <reference path="msnodesql.d.ts" />
import sql = module('msnodesql');

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path='../node/node-0.8.d.ts' />
///<reference path='../node/node.d.ts' />
declare module "msnodesql" {
export function open(connectionString: string, callback: Function): Connection;

View File

@ -1,4 +1,4 @@
/// <reference path="mustache-0.7.d.ts" />
/// <reference path="mustache.d.ts" />
var view = { title: "Joe", calc: function () { return 2 + 4; } };
var output = Mustache.render("{{title}} spends {{calc}}", view);

View File

@ -1,4 +1,4 @@
/// <reference path="node_redis-0.8.d.ts" />
/// <reference path="node_redis.d.ts" />
import redis = module('redis');

View File

@ -1,4 +1,4 @@
/// <reference path="phonegap-2.2.d.ts" />
/// <reference path="phonegap.d.ts" />
function test_accelerometer() {
var watchID = null;

View File

@ -1,4 +1,4 @@
/// <reference path="platform-1.0.d.ts" />
/// <reference path="platform.d.ts" />
declare interface ITestContainer {
[name: string]: PlatformStatic;

View File

@ -1,142 +1,142 @@
/// <reference path="pouch-0.1.d.ts" />
declare var $: any;
function alert(thing: any) {
$('body').append('<div>' + thing + '</div>');
}
var pouch: Pouch;
function pouchTests() {
Pouch('idb://testdb', function (err: PouchError, res: Pouch) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
pouch = res;
alert("database opened");
runTests();
}
});
}
var tests = [
setupTests,
testId,
testAllDocs,
testGet,
testUpdate,
testDelete,
deleteDb
];
var testIndex;
var revs: any = {};
function runTests() {
testIndex = 0;
tests[testIndex++]();
}
// each test function except the last one needs to call nextTest when it is finished doing its thing.
function nextTest() {
alert("starting test " + testIndex);
tests[testIndex++]();
}
function setupTests() {
alert('setupTests');
pouch.bulkDocs({
docs: [{ _id: '1', name: 'record 1' },
{ _id: '2', name: 'record 2' },
{ _id: '3', name: 'record 3' }
]
}, function (err: PouchError, res: PouchUpdateResponse[]) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
for (var i = 0; i < res.length; i++) {
if (res[i].ok) {
revs[res[i].id] = res[i].rev;
}
}
alert("test records loaded");
}
nextTest();
});
}
function testId() {
alert('testId');
var id = pouch.id();
alert('Database Id = ' + id);
nextTest();
}
function testGet() {
alert('testGet');
pouch.get('1', function (err: PouchError, res: PouchGetResponse) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert('Retrieved record with id=1, name=[' + res['name'] + ']');
}
nextTest();
});
}
function testAllDocs() {
alert('testAllDocs');
pouch.allDocs(function (err: PouchError, res: PouchAllDocsResponse) {
alert('allDocs resulted in ' + res.total_rows + ' results');
for (var i = 0; i < res.total_rows; i++) {
alert('Retrieved record with id=' + res.rows[i].id + ', rev=[' + res.rows[i].value.rev + ']');
}
nextTest();
});
}
function testUpdate() {
alert('testUpdate');
pouch.put({ _id: '2', _rev: revs['2'], name: 'record 2 updated' }, function (err: PouchError, res: PouchUpdateResponse) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert('record updated id=' + res.id + ', rev=[' + res.rev + ']');
}
testAllDocs(); // spit out the db contents and then go on
});
}
function testDelete() {
alert('testDelete');
pouch.remove({ _id: '3', _rev: revs['3'] }, function (err: PouchError, res: PouchUpdateResponse) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert('record deleted id=' + res.id + ', rev=[' + res.rev + ']');
}
testAllDocs(); // spit out the db contents and then go on
});
}
function deleteDb() {
alert('deleteDb');
if (pouch) {
pouch = null;
Pouch.destroy('idb://testdb', function (err: PouchError) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert("database destroyed");
}
});
}
}
/// <reference path="pouch.d.ts" />
declare var $: any;
function alert(thing: any) {
$('body').append('<div>' + thing + '</div>');
}
var pouch: Pouch;
function pouchTests() {
Pouch('idb://testdb', function (err: PouchError, res: Pouch) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
pouch = res;
alert("database opened");
runTests();
}
});
}
var tests = [
setupTests,
testId,
testAllDocs,
testGet,
testUpdate,
testDelete,
deleteDb
];
var testIndex;
var revs: any = {};
function runTests() {
testIndex = 0;
tests[testIndex++]();
}
// each test function except the last one needs to call nextTest when it is finished doing its thing.
function nextTest() {
alert("starting test " + testIndex);
tests[testIndex++]();
}
function setupTests() {
alert('setupTests');
pouch.bulkDocs({
docs: [{ _id: '1', name: 'record 1' },
{ _id: '2', name: 'record 2' },
{ _id: '3', name: 'record 3' }
]
}, function (err: PouchError, res: PouchUpdateResponse[]) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
for (var i = 0; i < res.length; i++) {
if (res[i].ok) {
revs[res[i].id] = res[i].rev;
}
}
alert("test records loaded");
}
nextTest();
});
}
function testId() {
alert('testId');
var id = pouch.id();
alert('Database Id = ' + id);
nextTest();
}
function testGet() {
alert('testGet');
pouch.get('1', function (err: PouchError, res: PouchGetResponse) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert('Retrieved record with id=1, name=[' + res['name'] + ']');
}
nextTest();
});
}
function testAllDocs() {
alert('testAllDocs');
pouch.allDocs(function (err: PouchError, res: PouchAllDocsResponse) {
alert('allDocs resulted in ' + res.total_rows + ' results');
for (var i = 0; i < res.total_rows; i++) {
alert('Retrieved record with id=' + res.rows[i].id + ', rev=[' + res.rows[i].value.rev + ']');
}
nextTest();
});
}
function testUpdate() {
alert('testUpdate');
pouch.put({ _id: '2', _rev: revs['2'], name: 'record 2 updated' }, function (err: PouchError, res: PouchUpdateResponse) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert('record updated id=' + res.id + ', rev=[' + res.rev + ']');
}
testAllDocs(); // spit out the db contents and then go on
});
}
function testDelete() {
alert('testDelete');
pouch.remove({ _id: '3', _rev: revs['3'] }, function (err: PouchError, res: PouchUpdateResponse) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert('record deleted id=' + res.id + ', rev=[' + res.rev + ']');
}
testAllDocs(); // spit out the db contents and then go on
});
}
function deleteDb() {
alert('deleteDb');
if (pouch) {
pouch = null;
Pouch.destroy('idb://testdb', function (err: PouchError) {
if (err) {
alert('Error ' + err.status + ' occurred ' + err.error + ' - ' + err.reason);
}
else {
alert("database destroyed");
}
});
}
}

View File

@ -1,4 +1,4 @@
/// <reference path="qunit-1.10.d.ts" />
/// <reference path="qunit.d.ts" />
QUnit.test("deepEqual test", function () {
var obj = { foo: "bar" };

View File

@ -1,4 +1,4 @@
/// <reference path="raphael-2.1.d.ts" />
/// <reference path="raphael.d.ts" />
var paper = Raphael(10, 50, 320, 200);
var circle = paper.circle(50, 40, 10);

View File

@ -1,4 +1,4 @@
/// <reference path="require-2.1.d.ts" />
/// <reference path="require.d.ts" />
// this test does not actually reference amd module 'main.ts', create one yourself.

View File

@ -1,4 +1,4 @@
/// <reference path="sammyjs-0.7.d.ts" />
/// <reference path="sammyjs.d.ts" />
function test_general() {
var app = Sammy('#main', function () {

View File

@ -1,5 +1,5 @@
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="select2-3.2.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="select2.d.ts" />
$("#e9").select2();
$("#e2").select2({

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
interface Select2QueryOptions {
term?: string;

View File

@ -1,4 +1,4 @@
/// <reference path="signalr-1.0.d.ts" />
/// <reference path="signalr.d.ts" />
function test_client() {
var connection = $.connection('/echo');

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.9.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
interface HubMethod {
(callback: (data: string) => void );

View File

@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path='../node/node-0.8.d.ts' />
///<reference path='../node/node.d.ts' />
declare module "socket.io" {
import http = module('http');

View File

@ -1,4 +1,4 @@
/// <reference path="spin-1.2.d.ts" />
/// <reference path="spin.d.ts" />
var spinner = new Spinner().spin();
target.appendChild(spinner.el);

View File

@ -1,4 +1,4 @@
/// <reference path="state-machine-2.2.d.ts" />
/// <reference path="state-machine.d.ts" />
var fsm = StateMachine.create({
initial: 'green',

View File

@ -1,4 +1,4 @@
/// <reference path="swipeview-1.0.d.ts" />
/// <reference path="swipeview.d.ts" />
function demo1() {
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

View File

@ -1,4 +1,4 @@
/// <reference path="toastr-1.2.d.ts" />
/// <reference path="toastr.d.ts" />
function test_basic() {
var t = [];

94
toastr/toastr.d.ts vendored
View File

@ -1,47 +1,49 @@
/// <reference path="jquery.d.ts" />
// Type definitions for Toastr 1.0
// Project: https://github.com/CodeSeven/toastr
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface ToastrOptions {
tapToDismiss?: bool;
toastClass?: string;
containerId?: string;
debug?: bool;
fadeIn?: number;
fadeOut?: number;
extendedTimeOut?: number;
iconClasses?: {
error: string;
info: string;
success: string;
warning: string;
};
iconClass?: string;
positionClass?: string;
timeOut?: number;
titleClass?: string;
messageClass?: string;
onclick?: () => void;
}
interface ToastrDisplayMethod {
(message: string): JQuery;
(message: string, title: string): JQuery;
(message: string, title: string, overrides: ToastrOptions): JQuery;
}
interface Toastr {
clear(): void;
clear(toast: JQuery): void;
error: ToastrDisplayMethod;
info: ToastrDisplayMethod;
options: ToastrOptions;
success: ToastrDisplayMethod;
warning: ToastrDisplayMethod;
version: string;
}
// Type definitions for Toastr 1.0
// Project: https://github.com/CodeSeven/toastr
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface ToastrOptions {
tapToDismiss?: bool;
toastClass?: string;
containerId?: string;
debug?: bool;
fadeIn?: number;
fadeOut?: number;
extendedTimeOut?: number;
iconClasses?: {
error: string;
info: string;
success: string;
warning: string;
};
iconClass?: string;
positionClass?: string;
timeOut?: number;
titleClass?: string;
messageClass?: string;
onclick?: () => void;
}
interface ToastrDisplayMethod {
(message: string): JQuery;
(message: string, title: string): JQuery;
(message: string, title: string, overrides: ToastrOptions): JQuery;
}
interface Toastr {
clear(): void;
clear(toast: JQuery): void;
error: ToastrDisplayMethod;
info: ToastrDisplayMethod;
options: ToastrOptions;
success: ToastrDisplayMethod;
warning: ToastrDisplayMethod;
version: string;
}
declare var toastr: Toastr;

View File

@ -1,4 +1,4 @@
/// <reference path="underscore-1.4.d.ts" />
/// <reference path="underscore.d.ts" />
declare var $;

View File

@ -1,4 +1,4 @@
/// <reference path="unity-webapi-1.0.d.ts" />
/// <reference path="unity-webapi.d.ts" />
var Unity = external.getUnityObject(1.0);
var settings = new UnitySettings();