mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge branch 'master' of https://github.com/borisyankov/DefinitelyTyped
This commit is contained in:
@@ -567,7 +567,7 @@ var DefinitelyTyped;
|
||||
this.path = path;
|
||||
this.files = [];
|
||||
this.typings = [];
|
||||
this.files = IO.dir(path, pattern, { recursive: true });
|
||||
this.files = IO.dir(path, pattern, { recursive: true }).sort();
|
||||
}
|
||||
FileHandler.prototype.allTS = function () {
|
||||
return this.files;
|
||||
@@ -716,7 +716,7 @@ var DefinitelyTyped;
|
||||
};
|
||||
|
||||
Print.prototype.printSyntaxErrorCount = function (current, total) {
|
||||
this.out(' \33[36m\33[1mSyntaxe error :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n');
|
||||
this.out(' \33[36m\33[1mSyntax error :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n');
|
||||
};
|
||||
|
||||
Print.prototype.printTestErrorCount = function (current, total) {
|
||||
|
||||
@@ -55,7 +55,7 @@ module DefinitelyTyped {
|
||||
public typings: Typing[] = [];
|
||||
|
||||
constructor(public path: string, pattern: any) {
|
||||
this.files = IO.dir(path, pattern, { recursive: true });
|
||||
this.files = IO.dir(path, pattern, { recursive: true }).sort();
|
||||
}
|
||||
|
||||
public allTS(): string[] {
|
||||
@@ -209,7 +209,7 @@ module DefinitelyTyped {
|
||||
}
|
||||
|
||||
public printSyntaxErrorCount(current: number, total: number) {
|
||||
this.out(' \33[36m\33[1mSyntaxe error :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n');
|
||||
this.out(' \33[36m\33[1mSyntax error :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n');
|
||||
}
|
||||
|
||||
public printTestErrorCount(current: number, total: number) {
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngCookies module (angular-cookies.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng.cookies {
|
||||
declare module ng.cookies {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CookieService
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngSanitize module (angular-sanitize.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng.sanitize {
|
||||
declare module ng.sanitize {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// SanitizeService
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/// <reference path="backbone.d.ts" />
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
declare var _, $;
|
||||
|
||||
function test_events() {
|
||||
|
||||
var object = new Backbone.Events();
|
||||
|
||||
Vendored
+58
-29
@@ -66,18 +66,12 @@ declare module Backbone {
|
||||
reset?: boolean;
|
||||
}
|
||||
|
||||
interface on { (eventName: string, callback: (...args: any[]) => void, context?: any): any; }
|
||||
interface off { (eventName?: string, callback?: (...args: any[]) => void, context?: any): any; }
|
||||
interface trigger { (eventName: string, ...args: any[]): any; }
|
||||
interface bind { (eventName: string, callback: (...args: any[]) => void, context?: any): any; }
|
||||
interface unbind { (eventName?: string, callback?: (...args: any[]) => void, context?: any): any; }
|
||||
|
||||
class Events {
|
||||
on(eventName: string, callback: (...args:any[]) => void, context?: any): any;
|
||||
off(eventName?: string, callback?: (...args:any[]) => void, context?: any): any;
|
||||
on(eventName: string, callback: (...args: any[]) => void , context?: any): any;
|
||||
off(eventName?: string, callback?: (...args: any[]) => void , context?: any): any;
|
||||
trigger(eventName: string, ...args: any[]): any;
|
||||
bind(eventName: string, callback: (...args:any[]) => void, context?: any): any;
|
||||
unbind(eventName?: string, callback?: (...args:any[]) => void, context?: any): any;
|
||||
bind(eventName: string, callback: (...args: any[]) => void , context?: any): any;
|
||||
unbind(eventName?: string, callback?: (...args: any[]) => void , context?: any): any;
|
||||
|
||||
once(events: string, callback: (...args: any[]) => void , context?: any): any;
|
||||
listenTo(object: any, events: string, callback: (...args: any[]) => void ): any;
|
||||
@@ -92,7 +86,6 @@ declare module Backbone {
|
||||
sync(...arg: any[]): JQueryXHR;
|
||||
}
|
||||
|
||||
|
||||
class Model extends ModelBase {
|
||||
|
||||
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality
|
||||
@@ -103,9 +96,9 @@ declare module Backbone {
|
||||
id: any;
|
||||
idAttribute: string;
|
||||
validationError: any;
|
||||
urlRoot(): string;
|
||||
urlRoot: any;
|
||||
|
||||
constructor (attributes?: any, options?: any);
|
||||
constructor(attributes?: any, options?: any);
|
||||
initialize(attributes?: any);
|
||||
|
||||
fetch(options?: ModelFetchOptions): JQueryXHR;
|
||||
@@ -130,6 +123,19 @@ declare module Backbone {
|
||||
save(attributes?: any, options?: ModelSaveOptions);
|
||||
unset(attribute: string, options?: Silenceable);
|
||||
validate(attributes: any, options?: any): any;
|
||||
|
||||
_validate(attrs: any, options: any): boolean;
|
||||
|
||||
// mixins from underscore
|
||||
|
||||
keys(): string[];
|
||||
values(): any[];
|
||||
pairs(): any[];
|
||||
invert(): any;
|
||||
pick(keys: string[]): any;
|
||||
pick(...keys: string[]): any;
|
||||
omit(keys: string[]): any;
|
||||
omit(...keys: string[]): any;
|
||||
}
|
||||
|
||||
class Collection extends ModelBase {
|
||||
@@ -141,7 +147,7 @@ declare module Backbone {
|
||||
collection: Model;
|
||||
length: number;
|
||||
|
||||
constructor (models?: any, options?: any);
|
||||
constructor(models?: any, options?: any);
|
||||
|
||||
fetch(options?: CollectionFetchOptions): JQueryXHR;
|
||||
|
||||
@@ -165,6 +171,12 @@ declare module Backbone {
|
||||
unshift(model: Model, options?: AddOptions);
|
||||
where(properies: any): Model[];
|
||||
|
||||
_prepareModel(attrs?: any, options?: any): any;
|
||||
_removeReference(model: Model): void;
|
||||
_onModelEvent(event: string, model: Model, collection: Collection, options: any): void;
|
||||
|
||||
// mixins from underscore
|
||||
|
||||
all(iterator: (element: Model, index: number) => boolean, context?: any): boolean;
|
||||
any(iterator: (element: Model, index: number) => boolean, context?: any): boolean;
|
||||
collect(iterator: (element: Model, index: number, context?: any) => any[], context?: any): any[];
|
||||
@@ -177,7 +189,7 @@ declare module Backbone {
|
||||
difference(...model: Model[]): Model[];
|
||||
drop(): Model;
|
||||
drop(n: number): Model[];
|
||||
each(iterator: (element: Model, index: number, list?: any) => void, context?: any);
|
||||
each(iterator: (element: Model, index: number, list?: any) => void , context?: any);
|
||||
every(iterator: (element: Model, index: number) => boolean, context?: any): boolean;
|
||||
filter(iterator: (element: Model, index: number) => boolean, context?: any): Model[];
|
||||
find(iterator: (element: Model, index: number) => boolean, context?: any): Model;
|
||||
@@ -185,7 +197,7 @@ declare module Backbone {
|
||||
first(n: number): Model[];
|
||||
flatten(shallow?: boolean): Model[];
|
||||
foldl(iterator: (memo: any, element: Model, index: number) => any, initialMemo: any, context?: any): any;
|
||||
forEach(iterator: (element: Model, index: number, list?: any) => void, context?: any);
|
||||
forEach(iterator: (element: Model, index: number, list?: any) => void , context?: any);
|
||||
include(value: any): boolean;
|
||||
indexOf(element: Model, isSorted?: boolean): number;
|
||||
initial(): Model;
|
||||
@@ -230,21 +242,36 @@ declare module Backbone {
|
||||
|
||||
routes: any;
|
||||
|
||||
constructor (options?: RouterOptions);
|
||||
initialize (options?: RouterOptions);
|
||||
route(route: string, name: string, callback?: (...parameter: any[]) => void);
|
||||
constructor(options?: RouterOptions);
|
||||
initialize(options?: RouterOptions);
|
||||
route(route: string, name: string, callback?: (...parameter: any[]) => void );
|
||||
navigate(fragment: string, options?: NavigateOptions);
|
||||
navigate(fragment: string, trigger?: boolean);
|
||||
|
||||
_bindRoutes(): void;
|
||||
_routeToRegExp(route: string): RegExp;
|
||||
_extractParameters(route: RegExp, fragment: string): string[];
|
||||
}
|
||||
|
||||
var history: History;
|
||||
class History {
|
||||
|
||||
class History extends Events {
|
||||
|
||||
handlers: any[];
|
||||
interval: number;
|
||||
|
||||
start(options?: HistoryOptions);
|
||||
navigate(fragment: string, options: any);
|
||||
pushSate();
|
||||
getFragment(fragment?: string, forcePushState?: boolean): string;
|
||||
|
||||
getHash(window?: Window): string;
|
||||
getFragment(fragment?: string, forcePushState?: boolean): string;
|
||||
stop(): void;
|
||||
route(route: string, callback: (...args: any[]) => void );
|
||||
checkUrl(e?: any): void;
|
||||
loadUrl(fragmentOverride: string): boolean;
|
||||
navigate(fragment: string, options?: any);
|
||||
started: boolean;
|
||||
|
||||
_updateHash(location: Location, fragment: string, replace: bool);
|
||||
}
|
||||
|
||||
interface ViewOptions {
|
||||
@@ -261,15 +288,15 @@ declare module Backbone {
|
||||
|
||||
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality
|
||||
|
||||
constructor (options?: ViewOptions);
|
||||
constructor(options?: ViewOptions);
|
||||
|
||||
$(selector: string): JQuery;
|
||||
model: Model;
|
||||
collection: Collection;
|
||||
template: (data?: any) => string;
|
||||
make(tagName: string, attrs?, opts?): View;
|
||||
setElement(element: HTMLElement, delegate?: boolean);
|
||||
id: string;
|
||||
cid: string;
|
||||
className: string;
|
||||
tagName: string;
|
||||
events: any;
|
||||
@@ -282,23 +309,25 @@ declare module Backbone {
|
||||
render(): View;
|
||||
remove(): View;
|
||||
make(tagName, attributes?, content?);
|
||||
//delegateEvents: any;
|
||||
delegateEvents(events?: any): any;
|
||||
undelegateEvents();
|
||||
|
||||
_ensureElement(): void;
|
||||
}
|
||||
|
||||
// SYNC
|
||||
function sync(method, model, options?: JQueryAjaxSettings);
|
||||
var emulateHTTP: boolean;
|
||||
var emulateJSONBackbone: boolean;
|
||||
var emulateHTTP: boolean;
|
||||
var emulateJSONBackbone: boolean;
|
||||
|
||||
// Utility
|
||||
|
||||
// 0.9 cannot return modules anymore, and "typeof <Module>" is not compiling for some reason
|
||||
// returning "any" until this is fixed
|
||||
|
||||
|
||||
//function noConflict(): typeof Backbone;
|
||||
function noConflict(): any;
|
||||
|
||||
function setDomLibrary(jQueryNew);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@
|
||||
* Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
|
||||
*/
|
||||
|
||||
module BgiFrame {
|
||||
declare module BgiFrame {
|
||||
interface ISettings {
|
||||
top: string;
|
||||
left: string;
|
||||
|
||||
Vendored
+77
-77
@@ -30,7 +30,7 @@ import b2Contacts = Box2D.Dynamics.Contacts;
|
||||
import b2Controllers = Box2D.Dynamics.Controllers;
|
||||
import b2Joints = Box2D.Dynamics.Joints;
|
||||
|
||||
module Box2D.Common {
|
||||
declare module Box2D.Common {
|
||||
|
||||
/**
|
||||
* Color for debug drawing. Each value has the range [0, 1].
|
||||
@@ -76,7 +76,7 @@ module Box2D.Common {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common {
|
||||
declare module Box2D.Common {
|
||||
|
||||
/**
|
||||
* Controls Box2D global settings.
|
||||
@@ -228,7 +228,7 @@ module Box2D.Common {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* A 2-by-2 matrix. Stored in column-major order.
|
||||
@@ -341,7 +341,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* A 3-by3 matrix. Stored in column-major order.
|
||||
@@ -428,7 +428,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* Math utility functions.
|
||||
@@ -693,7 +693,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may no coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position.
|
||||
@@ -756,7 +756,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* A transform contains translation and rotation. It is used to represent the position and orientation of rigid frames.
|
||||
@@ -806,7 +806,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* A 2D column vector.
|
||||
@@ -957,7 +957,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Common.Math {
|
||||
declare module Box2D.Common.Math {
|
||||
|
||||
/**
|
||||
* A 2D column vector with 3 elements.
|
||||
@@ -1043,7 +1043,7 @@ module Box2D.Common.Math {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Axis aligned bounding box.
|
||||
@@ -1117,7 +1117,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* We use contact ids to facilitate warm starting.
|
||||
@@ -1153,7 +1153,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* This structure is used to report contact points.
|
||||
@@ -1207,7 +1207,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Input for b2Distance. You have to option to use the shape radii in the computation. Even
|
||||
@@ -1241,7 +1241,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Output calculation for b2Distance.
|
||||
@@ -1270,7 +1270,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* A distance proxy is used by the GJK algorithm. It encapsulates any shape.
|
||||
@@ -1327,7 +1327,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and ray casts. Leafs are proxies with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor so that the proxy AABB is bigger than the client object. This allows the client object to move by small amounts without triggering a tree update. Nodes are pooled.
|
||||
@@ -1402,7 +1402,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* The broad-phase is used for computing pairs and performing volume queries and ray casts. This broad-phase does not persist pairs. Instead, this reports potentially new pairs. It is up to the client to consume the new pairs and to track subsequent overlap.
|
||||
@@ -1483,7 +1483,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Empty declaration, used in many callbacks within b2DynamicTree.
|
||||
@@ -1494,7 +1494,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* A manifold for two touching convex shapes. Box2D supports multiple types of contact: - clip point versus plane with radius - point versus point with radius (circles) The local point usage depends on the manifold type: -e_circles: the local center of circleA -e_faceA: the center of faceA -e_faceB: the center of faceB Similarly the local normal usage: -e_circles: not used -e_faceA: the normal on polygonA -e_faceB: the normal on polygonB We store contacts in this way so that position correction can account for movement, which is critical for continuous physics. All contact scenarios must be expressed in one of these types. This structure is stored across time steps, so we keep it small.
|
||||
@@ -1565,7 +1565,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* A manifold point is a contact point belonging to a contact manifold. It holds details related to the geometry and dynamics of the contact points. The local point usage depends on the manifold type: -e_circles: the local center of circleB -e_faceA: the local center of cirlceB or the clip point of polygonB -e_faceB: the clip point of polygonA This structure is stored across time steps, so we keep it small. Note: the impulses are used for internal caching and may not provide reliable contact forces, especially for high speed collisions.
|
||||
@@ -1610,7 +1610,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* An oriented bounding box.
|
||||
@@ -1634,7 +1634,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Ray cast input data.
|
||||
@@ -1666,7 +1666,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Results of a ray cast.
|
||||
@@ -1685,7 +1685,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* A line in space between two given vertices.
|
||||
@@ -1735,7 +1735,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Used to warm start b2Distance. Set count to zero on first call.
|
||||
@@ -1764,7 +1764,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Inpute parameters for b2TimeOfImpact
|
||||
@@ -1798,7 +1798,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* This is used to compute the current state of a contact manifold.
|
||||
@@ -1837,7 +1837,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* We use contact ids to facilitate warm starting.
|
||||
@@ -1866,7 +1866,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision {
|
||||
declare module Box2D.Collision {
|
||||
|
||||
/**
|
||||
* Interface for objects tracking overlap of many AABBs.
|
||||
@@ -1940,7 +1940,7 @@ module Box2D.Collision {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision.Shapes {
|
||||
declare module Box2D.Collision.Shapes {
|
||||
|
||||
/**
|
||||
* A circle shape.
|
||||
@@ -2038,7 +2038,7 @@ module Box2D.Collision.Shapes {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision.Shapes {
|
||||
declare module Box2D.Collision.Shapes {
|
||||
|
||||
/**
|
||||
* This structure is used to build edge shapes.
|
||||
@@ -2067,7 +2067,7 @@ module Box2D.Collision.Shapes {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision.Shapes {
|
||||
declare module Box2D.Collision.Shapes {
|
||||
|
||||
/**
|
||||
* An edge shape.
|
||||
@@ -2223,7 +2223,7 @@ module Box2D.Collision.Shapes {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision.Shapes {
|
||||
declare module Box2D.Collision.Shapes {
|
||||
|
||||
/**
|
||||
* This holds the mass data computed for a shape.
|
||||
@@ -2247,7 +2247,7 @@ module Box2D.Collision.Shapes {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision.Shapes {
|
||||
declare module Box2D.Collision.Shapes {
|
||||
|
||||
/**
|
||||
* Convex polygon. The vertices must be in CCW order for a right-handed coordinate system with the z-axis coming out of the screen.
|
||||
@@ -2429,7 +2429,7 @@ module Box2D.Collision.Shapes {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Collision.Shapes {
|
||||
declare module Box2D.Collision.Shapes {
|
||||
|
||||
/**
|
||||
* A shape is used for collision detection. Shapes are created in b2Body. You can use shape for collision detection before they are attached to the world.
|
||||
@@ -2543,7 +2543,7 @@ module Box2D.Collision.Shapes {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* A rigid body.
|
||||
@@ -2927,7 +2927,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* A body definition holds all the data needed to construct a rigid body. You can safely re-use body definitions.
|
||||
@@ -3009,7 +3009,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* Implement this class to provide collision filtering. In other words, you can implement this class if you want finer control over contact creation.
|
||||
@@ -3037,7 +3037,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* Contact impulses for reporting. Impulses are used instead of forces because sub-step forces may approach infinity for rigid body collisions. These match up one-to-one with the contact points in b2Manifold.
|
||||
@@ -3056,7 +3056,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* Implement this class to get contact information. You can use these results for things like sounds and game logic. You can also get contact results by traversing the contact lists after the time step. However, you might miss some contacts because continuous physics leads to sub-stepping. Additionally you may receive multiple callbacks for the same contact in a single time step. You should strive to make your callbacks efficient because there may be many callbacks per time step.
|
||||
@@ -3092,7 +3092,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* Implement and register this class with a b2World to provide debug drawing of physics entities in your game.
|
||||
@@ -3285,7 +3285,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* Joints and shapes are destroyed when their associated body is destroyed. Implement this listener so that you may nullify references to these joints and shapes.
|
||||
@@ -3306,7 +3306,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* This holds contact filtering data.
|
||||
@@ -3336,7 +3336,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* A fixture is used to attach a shape to a body for collision detection. A fixture inherits its transform from its parent. Fixtures hold additional non-geometric data such as friction, collision filters, etc. Fixtures are created via b2Body::CreateFixture.
|
||||
@@ -3470,7 +3470,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* A fixture definition is used to create a fixture. This class defines an abstract fixture definition. You can reuse fixture definitions safely.
|
||||
@@ -3519,7 +3519,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics {
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
/**
|
||||
* The world class manages all physics entities, dynamic simulation, and asynchronous queries.
|
||||
@@ -3787,7 +3787,7 @@ module Box2D.Dynamics {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Contacts {
|
||||
declare module Box2D.Dynamics.Contacts {
|
||||
|
||||
/**
|
||||
* The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.
|
||||
@@ -3873,7 +3873,7 @@ module Box2D.Dynamics.Contacts {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Contacts {
|
||||
declare module Box2D.Dynamics.Contacts {
|
||||
|
||||
/**
|
||||
* A contact edge is used to connect bodies and contacts together in a contact graph where each body is a node and each contact is an edge. A contact edge belongs to a doubly linked list maintained in each attached body. Each contact has two contact nodes, one for each attached body.
|
||||
@@ -3902,7 +3902,7 @@ module Box2D.Dynamics.Contacts {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Contacts {
|
||||
declare module Box2D.Dynamics.Contacts {
|
||||
|
||||
/**
|
||||
* This structure is used to report contact point results.
|
||||
@@ -3946,7 +3946,7 @@ module Box2D.Dynamics.Contacts {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Base class for controllers. Controllers are a convience for encapsulating common per-step functionality.
|
||||
@@ -4012,7 +4012,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Controller Edge.
|
||||
@@ -4051,7 +4051,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Calculates buoyancy forces for fluids in the form of a half plane.
|
||||
@@ -4112,7 +4112,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Applies an acceleration every frame, like gravity
|
||||
@@ -4131,7 +4131,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Applies an acceleration every frame, like gravity.
|
||||
@@ -4150,7 +4150,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Applies simplified gravity between every pair of bodies.
|
||||
@@ -4175,7 +4175,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Controllers {
|
||||
declare module Box2D.Dynamics.Controllers {
|
||||
|
||||
/**
|
||||
* Applies top down linear damping to the controlled bodies The damping is calculated by multiplying velocity by a matrix in local co-ordinates.
|
||||
@@ -4207,7 +4207,7 @@ module Box2D.Dynamics.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.
|
||||
@@ -4284,7 +4284,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Joint definitions are used to construct joints.
|
||||
@@ -4323,7 +4323,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A joint edge is used to connect bodies and joints together in a joint graph where each body is a node and each joint is an edge. A joint edge belongs to a doubly linked list maintained in each attached body. Each joint has two joint nodes, one for each attached body.
|
||||
@@ -4352,7 +4352,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
|
||||
@@ -4423,7 +4423,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game.
|
||||
@@ -4472,7 +4472,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
|
||||
@@ -4540,7 +4540,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Friction joint defintion.
|
||||
@@ -4582,7 +4582,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 + ratio coordinate2 = constant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length.
|
||||
@@ -4630,7 +4630,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work). The provided joints must attach a dynamic body to a static body.
|
||||
@@ -4659,7 +4659,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A line joint. This joint provides one degree of freedom: translation along an axis fixed in body1. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
|
||||
@@ -4779,7 +4779,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Line joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
|
||||
@@ -4847,7 +4847,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. Note: this joint is not fully documented as it is intended primarily for the testbed. See that for more instructions.
|
||||
@@ -4930,7 +4930,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
|
||||
@@ -4959,7 +4959,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
|
||||
@@ -5073,7 +5073,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
|
||||
@@ -5146,7 +5146,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.
|
||||
@@ -5206,7 +5206,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.
|
||||
@@ -5276,7 +5276,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
|
||||
@@ -5390,7 +5390,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because: 1. you might not know where the center of mass will be. 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken.
|
||||
@@ -5457,7 +5457,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.
|
||||
@@ -5492,7 +5492,7 @@ module Box2D.Dynamics.Joints {
|
||||
}
|
||||
}
|
||||
|
||||
module Box2D.Dynamics.Joints {
|
||||
declare module Box2D.Dynamics.Joints {
|
||||
|
||||
/**
|
||||
* Weld joint definition. You need to specify local anchor points where they are attached and the relative body angle. The position of the anchor points is important for computing the reaction torque.
|
||||
|
||||
Vendored
+82
-81
@@ -14,7 +14,7 @@ declare module breezeCore {
|
||||
}
|
||||
|
||||
interface IEnum {
|
||||
contains(object: any): bool;
|
||||
contains(object: any): boolean;
|
||||
fromName(name: string): EnumSymbol;
|
||||
getNames(): string[];
|
||||
getSymbols(): EnumSymbol[];
|
||||
@@ -24,11 +24,11 @@ declare module breezeCore {
|
||||
constructor (name: string, methodObj?: any);
|
||||
|
||||
addSymbol(propertiesObj?: any): EnumSymbol;
|
||||
contains(object: any): bool;
|
||||
contains(object: any): boolean;
|
||||
fromName(name: string): EnumSymbol;
|
||||
getNames(): string[];
|
||||
getSymbols(): EnumSymbol[];
|
||||
static isSymbol(object: any): bool;
|
||||
static isSymbol(object: any): boolean;
|
||||
seal(): void;
|
||||
}
|
||||
|
||||
@@ -43,14 +43,14 @@ declare module breezeCore {
|
||||
constructor (name: string, publisher: any, defaultErrorCallback?: ErrorCallback);
|
||||
|
||||
static enable(eventName: string, target: any): void;
|
||||
static enable(eventName: string, target: any, isEnabled: bool): void;
|
||||
static enable(eventName: string, target: any, isEnabled: boolean): void;
|
||||
static enable(eventName: string, target: any, isEnabled: Function): void;
|
||||
|
||||
static isEnabled(eventName: string, target: any): bool;
|
||||
publish(data: any, publishAsync?: bool, errorCallback?: ErrorCallback): void;
|
||||
static isEnabled(eventName: string, target: any): boolean;
|
||||
publish(data: any, publishAsync?: boolean, errorCallback?: ErrorCallback): void;
|
||||
publishAsync(data: any, errorCallback?: ErrorCallback): void;
|
||||
subscribe(callback?: (data: any) => void ): number;
|
||||
unsubscribe(unsubKey: number): bool;
|
||||
unsubscribe(unsubKey: number): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ declare module breeze {
|
||||
name: string;
|
||||
parentEntityType: EntityType;
|
||||
validators: Validator[];
|
||||
isDataProperty: bool;
|
||||
isNavigationProperty: bool;
|
||||
isDataProperty: boolean;
|
||||
isNavigationProperty: boolean;
|
||||
}
|
||||
|
||||
interface IStructuralType {
|
||||
@@ -116,13 +116,13 @@ declare module breeze {
|
||||
concurrencyMode: string;
|
||||
dataType: DataTypeSymbol;
|
||||
defaultValue: any;
|
||||
fixedLength: bool;
|
||||
isComplexProperty: bool;
|
||||
isDataProperty: bool;
|
||||
isNavigationProperty: bool;
|
||||
isNullable: bool;
|
||||
isPartOfKey: bool;
|
||||
isUnmapped: bool;
|
||||
fixedLength: boolean;
|
||||
isComplexProperty: boolean;
|
||||
isDataProperty: boolean;
|
||||
isNavigationProperty: boolean;
|
||||
isNullable: boolean;
|
||||
isPartOfKey: boolean;
|
||||
isUnmapped: boolean;
|
||||
|
||||
maxLength: number;
|
||||
name: string;
|
||||
@@ -138,10 +138,10 @@ declare module breeze {
|
||||
concurrencyMode?: string;
|
||||
dataType?: DataTypeSymbol;
|
||||
defaultValue?: any;
|
||||
fixedLength?: bool;
|
||||
isNullable?: bool;
|
||||
isPartOfKey?: bool;
|
||||
isUnmapped?: bool;
|
||||
fixedLength?: boolean;
|
||||
isNullable?: boolean;
|
||||
isPartOfKey?: boolean;
|
||||
isUnmapped?: boolean;
|
||||
maxLength?: number;
|
||||
name?: string;
|
||||
nameOnServer?: string;
|
||||
@@ -150,7 +150,7 @@ declare module breeze {
|
||||
|
||||
class DataService {
|
||||
adapterName: string;
|
||||
hasServerMetadata: bool;
|
||||
hasServerMetadata: boolean;
|
||||
serviceName: string;
|
||||
jsonResultsAdapter: JsonResultsAdapter;
|
||||
constructor(config: DataServiceOptions);
|
||||
@@ -158,7 +158,7 @@ declare module breeze {
|
||||
|
||||
interface DataServiceOptions {
|
||||
adapterName?: string;
|
||||
hasServerMetadata?: bool;
|
||||
hasServerMetadata?: boolean;
|
||||
serviceName?: string;
|
||||
jsonResultsAdapter?: JsonResultsAdapter;
|
||||
}
|
||||
@@ -166,11 +166,11 @@ declare module breeze {
|
||||
class JsonResultsAdapter {
|
||||
name: string;
|
||||
extractResults: (data: {}) => {};
|
||||
visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: bool; };
|
||||
visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; };
|
||||
constructor(config: {
|
||||
name: string;
|
||||
extractResults?: (data: {}) => {};
|
||||
visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: bool; };
|
||||
visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; };
|
||||
});
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ declare module breeze {
|
||||
|
||||
class DataTypeSymbol extends breezeCore.EnumSymbol {
|
||||
defaultValue: any;
|
||||
isNumeric: bool;
|
||||
isNumeric: boolean;
|
||||
}
|
||||
interface DataType extends breezeCore.IEnum {
|
||||
Binary: DataTypeSymbol;
|
||||
@@ -210,7 +210,7 @@ declare module breeze {
|
||||
parseDateFromServer(date: any): Date;
|
||||
|
||||
}
|
||||
declare var DataType: DataType;
|
||||
var DataType: DataType;
|
||||
|
||||
class EntityActionSymbol extends breezeCore.EnumSymbol {
|
||||
}
|
||||
@@ -234,7 +234,7 @@ declare module breeze {
|
||||
entity: Entity;
|
||||
entityManager: EntityManager;
|
||||
entityState: EntityStateSymbol;
|
||||
isBeingSaved: bool;
|
||||
isBeingSaved: boolean;
|
||||
originalValues: any;
|
||||
|
||||
propertyChanged: PropertyChangedEvent;
|
||||
@@ -243,7 +243,7 @@ declare module breeze {
|
||||
acceptChanges(): void;
|
||||
addValidationError(validationError: ValidationError): void;
|
||||
clearValidationErrors(): void;
|
||||
getKey(forceRefresh?: bool): EntityKey;
|
||||
getKey(forceRefresh?: boolean): EntityKey;
|
||||
|
||||
getValidationErrors(): ValidationError[];
|
||||
getValidationErrors(property: string): ValidationError[];
|
||||
@@ -261,11 +261,12 @@ declare module breeze {
|
||||
setDeleted(): void;
|
||||
setModified(): void;
|
||||
setUnchanged(): void;
|
||||
validateEntity(): bool;
|
||||
setDetached(): boolean;
|
||||
validateEntity(): boolean;
|
||||
|
||||
validateProperty(property: string, context?: any): bool;
|
||||
validateProperty(property: DataProperty, context?: any): bool;
|
||||
validateProperty(property: NavigationProperty, context?: any): bool;
|
||||
validateProperty(property: string, context?: any): boolean;
|
||||
validateProperty(property: DataProperty, context?: any): boolean;
|
||||
validateProperty(property: NavigationProperty, context?: any): boolean;
|
||||
}
|
||||
|
||||
class PropertyChangedEventArgs {
|
||||
@@ -293,8 +294,8 @@ declare module breeze {
|
||||
constructor (entityType: EntityType, keyValue: any);
|
||||
constructor (entityType: EntityType, keyValues: any[]);
|
||||
|
||||
equals(entityKey: EntityKey): bool;
|
||||
static equals(k1: EntityKey, k2: EntityKey): bool;
|
||||
equals(entityKey: EntityKey): boolean;
|
||||
static equals(k1: EntityKey, k2: EntityKey): boolean;
|
||||
}
|
||||
|
||||
class EntityManager {
|
||||
@@ -317,14 +318,14 @@ declare module breeze {
|
||||
clear(): void;
|
||||
createEmptyCopy(): EntityManager;
|
||||
createEntity(typeName: string, config?: {}, entityState?: EntityStateSymbol) : Entity;
|
||||
detachEntity(entity: Entity): bool;
|
||||
detachEntity(entity: Entity): boolean;
|
||||
executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise;
|
||||
executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise;
|
||||
|
||||
executeQueryLocally(query: EntityQuery): Entity[];
|
||||
exportEntities(entities?: Entity[]): string;
|
||||
fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: bool): Promise;
|
||||
fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: bool): Promise;
|
||||
fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): Promise;
|
||||
fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): Promise;
|
||||
fetchEntityByKey(entityKey: EntityKey): Promise;
|
||||
fetchMetadata(callback?: (schema: any) => void , errorCallback?: breezeCore.ErrorCallback): Promise;
|
||||
generateTempKeyValue(entity: Entity): any;
|
||||
@@ -348,24 +349,24 @@ declare module breeze {
|
||||
getEntityByKey(typeName: string, keyValues: any[]): Entity;
|
||||
getEntityByKey(entityKey: EntityKey): Entity;
|
||||
|
||||
hasChanges(): bool;
|
||||
hasChanges(entityTypeName: string): bool;
|
||||
hasChanges(entityTypeNames: string[]): bool;
|
||||
hasChanges(entityType: EntityType): bool;
|
||||
hasChanges(entityTypes: EntityType[]): bool;
|
||||
hasChanges(): boolean;
|
||||
hasChanges(entityTypeName: string): boolean;
|
||||
hasChanges(entityTypeNames: string[]): boolean;
|
||||
hasChanges(entityType: EntityType): boolean;
|
||||
hasChanges(entityTypes: EntityType[]): boolean;
|
||||
|
||||
static importEntities(exportedString: string, config?: { mergeStrategy?: MergeStrategySymbol; }): EntityManager;
|
||||
importEntities(exportedString: string, config?: { mergeStrategy?: MergeStrategySymbol; }): EntityManager;
|
||||
importEntities(exportedString: any, config?: { mergeStrategy?: MergeStrategySymbol; }): EntityManager;
|
||||
|
||||
rejectChanges(): Entity[];
|
||||
saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): Promise;
|
||||
setProperties(config: EntityManagerProperties): void;
|
||||
|
||||
helper: {
|
||||
unwrapInstance(structObj: Entity, isOData: bool): any;
|
||||
unwrapOriginalValues(target: Entity, metadataStore: MetadataStore, isOData: bool): any;
|
||||
unwrapChangedValues(target: Entity, metadataStore: MetadataStore, isOData: bool): any;
|
||||
getEntityKeyFromRawEntity(rawEntity: any, entityType: EntityType, isClient: bool): EntityKey;
|
||||
unwrapInstance(structObj: Entity, isOData: boolean): any;
|
||||
unwrapOriginalValues(target: Entity, metadataStore: MetadataStore, isOData: boolean): any;
|
||||
unwrapChangedValues(target: Entity, metadataStore: MetadataStore, isOData: boolean): any;
|
||||
getEntityKeyFromRawEntity(rawEntity: any, entityType: EntityType, isClient: boolean): EntityKey;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -416,7 +417,7 @@ declare module breeze {
|
||||
|
||||
class HasChangesChangedEventArgs {
|
||||
entityManager: EntityManager;
|
||||
hasChanges: bool;
|
||||
hasChanges: boolean;
|
||||
}
|
||||
|
||||
class HasChangesChangedEvent extends breezeCore.Event {
|
||||
@@ -445,7 +446,7 @@ declare module breeze {
|
||||
static fromEntities(entities: Entity[]): EntityQuery;
|
||||
static fromEntityKey(entityKey: EntityKey): EntityQuery;
|
||||
static fromEntityNavigation(entity: Entity, navigationProperty: NavigationProperty): EntityQuery;
|
||||
inlineCount(enabled?: bool): EntityQuery;
|
||||
inlineCount(enabled?: boolean): EntityQuery;
|
||||
orderBy(propertyPaths: string): EntityQuery;
|
||||
orderBy(propertyPaths: string[]): EntityQuery;
|
||||
orderByDesc(propertyPaths: string): EntityQuery;
|
||||
@@ -474,13 +475,13 @@ declare module breeze {
|
||||
}
|
||||
|
||||
class EntityStateSymbol extends breezeCore.EnumSymbol {
|
||||
isAdded(): bool;
|
||||
isAddedModifiedOrDeleted(): bool;
|
||||
isDeleted(): bool;
|
||||
isDetached(): bool;
|
||||
isModified(): bool;
|
||||
isUnchanged(): bool;
|
||||
isUnchangedOrModified(): bool;
|
||||
isAdded(): boolean;
|
||||
isAddedModifiedOrDeleted(): boolean;
|
||||
isDeleted(): boolean;
|
||||
isDetached(): boolean;
|
||||
isModified(): boolean;
|
||||
isUnchanged(): boolean;
|
||||
isUnchangedOrModified(): boolean;
|
||||
}
|
||||
interface EntityState extends breezeCore.IEnum {
|
||||
Added: EntityStateSymbol;
|
||||
@@ -517,7 +518,7 @@ declare module breeze {
|
||||
getEntityCtor(): Function;
|
||||
getNavigationProperty(propertyName: string): NavigationProperty;
|
||||
getProperties(): IProperty[];
|
||||
getProperty(propertyPath: string, throwIfNotFound?: bool): IProperty;
|
||||
getProperty(propertyPath: string, throwIfNotFound?: boolean): IProperty;
|
||||
getPropertyNames(): string[];
|
||||
setProperties(config: EntityTypeProperties): void;
|
||||
toString(): string;
|
||||
@@ -562,7 +563,7 @@ declare module breeze {
|
||||
static caseInsensitiveSQL: LocalQueryComparisonOptions;
|
||||
static defaultInstance: LocalQueryComparisonOptions;
|
||||
|
||||
constructor (config: { name?: string; isCaseSensitive?: bool; usesSql92CompliantStringComparison?: bool; });
|
||||
constructor (config: { name?: string; isCaseSensitive?: boolean; usesSql92CompliantStringComparison?: boolean; });
|
||||
|
||||
setAsDefault(): void;
|
||||
}
|
||||
@@ -585,12 +586,12 @@ declare module breeze {
|
||||
fetchMetadata(dataService: string, callback?: (data) => void , errorCallback?: breezeCore.ErrorCallback): Promise;
|
||||
fetchMetadata(dataService: DataService, callback?: (data) => void , errorCallback?: breezeCore.ErrorCallback): Promise;
|
||||
getDataService(serviceName: string): DataService;
|
||||
getEntityType(entityTypeName: string, okIfNotFound?: bool): IStructuralType;
|
||||
getEntityType(entityTypeName: string, okIfNotFound?: boolean): IStructuralType;
|
||||
getEntityTypes(): IStructuralType[];
|
||||
hasMetadataFor(serviceName: string): bool;
|
||||
hasMetadataFor(serviceName: string): boolean;
|
||||
static importMetadata(exportedString: string): MetadataStore;
|
||||
importMetadata(exportedString: string): MetadataStore;
|
||||
isEmpty(): bool;
|
||||
isEmpty(): boolean;
|
||||
registerEntityTypeCtor(entityTypeName: string, entityCtor: Function, initializationFn?: (entity: Entity) =>void ): void;
|
||||
trackUnmappedType(entityCtor: Function, interceptor?: Function);
|
||||
setEntityTypeForResourceName(resourceName: string, entityTypeOrName: string): void;
|
||||
@@ -628,9 +629,9 @@ declare module breeze {
|
||||
entityType: EntityType;
|
||||
foreignKeyNames: string[];
|
||||
inverse: NavigationProperty;
|
||||
isDataProperty: bool;
|
||||
isNavigationProperty: bool;
|
||||
isScalar: bool;
|
||||
isDataProperty: boolean;
|
||||
isNavigationProperty: boolean;
|
||||
isScalar: boolean;
|
||||
name: string;
|
||||
parentEntityType: EntityType;
|
||||
relatedDataProperties: DataProperty[];
|
||||
@@ -643,7 +644,7 @@ declare module breeze {
|
||||
name?: string;
|
||||
nameOnServer?: string;
|
||||
entityTypeName: string;
|
||||
isScalar?: bool;
|
||||
isScalar?: boolean;
|
||||
associationName?: string;
|
||||
foreignKeyNames?: string[];
|
||||
foreignKeyNamesOnServer?: string[];
|
||||
@@ -651,15 +652,15 @@ declare module breeze {
|
||||
}
|
||||
|
||||
class Predicate {
|
||||
constructor (property: string, operator: string, value: any, valueIsLiteral?: bool);
|
||||
constructor (property: string, operator: FilterQueryOpSymbol, value: any, valueIsLiteral?: bool);
|
||||
constructor (property: string, operator: string, value: any, valueIsLiteral?: boolean);
|
||||
constructor (property: string, operator: FilterQueryOpSymbol, value: any, valueIsLiteral?: boolean);
|
||||
|
||||
and: PredicateMethod;
|
||||
static and: PredicateMethod;
|
||||
|
||||
static create: PredicateMethod;
|
||||
|
||||
static isPredicate(o: any): bool;
|
||||
static isPredicate(o: any): boolean;
|
||||
|
||||
static not(predicate: Predicate): Predicate;
|
||||
not(): Predicate;
|
||||
@@ -675,8 +676,8 @@ declare module breeze {
|
||||
interface PredicateMethod {
|
||||
(predicates: Predicate[]): Predicate;
|
||||
(...predicates: Predicate[]): Predicate;
|
||||
(property: string, operator: string, value: any, valueIsLiteral?: bool): Predicate;
|
||||
(property: string, operator: FilterQueryOpSymbol, value: any, valueIsLiteral?: bool): Predicate;
|
||||
(property: string, operator: string, value: any, valueIsLiteral?: boolean): Predicate;
|
||||
(property: string, operator: FilterQueryOpSymbol, value: any, valueIsLiteral?: boolean): Predicate;
|
||||
}
|
||||
|
||||
class Promise {
|
||||
@@ -704,10 +705,10 @@ declare module breeze {
|
||||
}
|
||||
|
||||
class SaveOptions {
|
||||
allowConcurrentSaves: bool;
|
||||
allowConcurrentSaves: boolean;
|
||||
static defaultInstance: SaveOptions;
|
||||
|
||||
constructor (config?: { allowConcurrentSaves?: bool; });
|
||||
constructor (config?: { allowConcurrentSaves?: boolean; });
|
||||
|
||||
setAsDefault(): SaveOptions;
|
||||
}
|
||||
@@ -724,10 +725,10 @@ declare module breeze {
|
||||
|
||||
class ValidationOptions {
|
||||
static defaultInstance: ValidationOptions;
|
||||
validateOnAttach: bool;
|
||||
validateOnPropertyChange: bool;
|
||||
validateOnQuery: bool;
|
||||
validateOnSave: bool;
|
||||
validateOnAttach: boolean;
|
||||
validateOnPropertyChange: boolean;
|
||||
validateOnQuery: boolean;
|
||||
validateOnSave: boolean;
|
||||
|
||||
constructor (config?: ValidationOptionsConfiguration);
|
||||
|
||||
@@ -736,10 +737,10 @@ declare module breeze {
|
||||
}
|
||||
|
||||
interface ValidationOptionsConfiguration {
|
||||
validateOnAttach?: bool;
|
||||
validateOnSave?: bool;
|
||||
validateOnQuery?: bool;
|
||||
validateOnPropertyChange?: bool;
|
||||
validateOnAttach?: boolean;
|
||||
validateOnSave?: boolean;
|
||||
validateOnQuery?: boolean;
|
||||
validateOnPropertyChange?: boolean;
|
||||
}
|
||||
|
||||
class Validator {
|
||||
@@ -747,7 +748,7 @@ declare module breeze {
|
||||
|
||||
constructor (name: string, validatorFn: ValidatorFunction, context?: any);
|
||||
|
||||
static bool(): Validator;
|
||||
static boolean(): Validator;
|
||||
static byte(): Validator;
|
||||
static date(): Validator;
|
||||
static duration(): Validator;
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for chai-fuzzy 1.3.0 assert style
|
||||
// Project: http://chaijs.com/plugins/chai-fuzzy
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../chai/chai-assert.d.ts" />
|
||||
|
||||
declare module chai {
|
||||
interface Assert {
|
||||
like(act:any, exp:any, msg?:string);
|
||||
notLike(act:any, exp:any, msg?:string);
|
||||
containOneLike(act:any, exp:any, msg?:string);
|
||||
notContainOneLike(act:any, exp:any, msg?:string);
|
||||
jsonOf(act:any, exp:any, msg?:string);
|
||||
notJsonOf(act:any, exp:any, msg?:string);
|
||||
}
|
||||
}
|
||||
Vendored
+3
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for chai v1.6.0 assert style
|
||||
// Type definitions for chai v1.7.0 assert style
|
||||
// Project: http://chaijs.com/
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -10,7 +10,9 @@ declare module chai
|
||||
(express:any, msg?:string);
|
||||
|
||||
fail(actual?:any, expected?:any, msg?:string, operator?:string);
|
||||
|
||||
ok(val:any, msg?:string);
|
||||
notOk(val:any, msg?:string);
|
||||
|
||||
equal(act:any, exp:any, msg?:string);
|
||||
notEqual(act:any, exp:any, msg?:string);
|
||||
@@ -71,7 +73,6 @@ declare module chai
|
||||
propertyVal(obj:Object, prop:string, val:any, msg?:string);
|
||||
propertyNotVal(obj:Object, prop:string, val:any, msg?:string);
|
||||
|
||||
|
||||
deepPropertyVal(obj:Object, prop:string, val:any, msg?:string);
|
||||
deepPropertyNotVal(obj:Object, prop:string, val:any, msg?:string);
|
||||
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
/// <reference path="chrome.d.ts" />
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="../jqueryui/jqueryui.d.ts" />
|
||||
|
||||
// https://developer.chrome.com/extensions/examples/api/bookmarks/basic/popup.js
|
||||
function bookmarksExample() {
|
||||
$(function () {
|
||||
$('#search').change(function () {
|
||||
$('#bookmarks').empty();
|
||||
dumpBookmarks($('#search').val());
|
||||
});
|
||||
});
|
||||
// Traverse the bookmark tree, and print the folder and nodes.
|
||||
function dumpBookmarks(query?) {
|
||||
var bookmarkTreeNodes = chrome.bookmarks.getTree(
|
||||
function (bookmarkTreeNodes) {
|
||||
$('#bookmarks').append(dumpTreeNodes(bookmarkTreeNodes, query));
|
||||
});
|
||||
}
|
||||
function dumpTreeNodes(bookmarkNodes, query) {
|
||||
var list = $('<ul>');
|
||||
var i;
|
||||
for (i = 0; i < bookmarkNodes.length; i++) {
|
||||
list.append(dumpNode(bookmarkNodes[i], query));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
function dumpNode(bookmarkNode, query) {
|
||||
if (bookmarkNode.title) {
|
||||
if (query && !bookmarkNode.children) {
|
||||
if (String(bookmarkNode.title).indexOf(query) == -1) {
|
||||
return $('<span></span>');
|
||||
}
|
||||
}
|
||||
var anchor = $('<a>');
|
||||
anchor.attr('href', bookmarkNode.url);
|
||||
anchor.text(bookmarkNode.title);
|
||||
/*
|
||||
* When clicking on a bookmark in the extension, a new tab is fired with
|
||||
* the bookmark url.
|
||||
*/
|
||||
anchor.click(function () {
|
||||
chrome.tabs.create({ url: bookmarkNode.url });
|
||||
});
|
||||
var span = $('<span>');
|
||||
var options = bookmarkNode.children ?
|
||||
$('<span>[<a href="#" id="addlink">Add</a>]</span>') :
|
||||
$('<span>[<a id="editlink" href="#">Edit</a> <a id="deletelink" ' +
|
||||
'href="#">Delete</a>]</span>');
|
||||
var edit = bookmarkNode.children ? $('<table><tr><td>Name</td><td>' +
|
||||
'<input id="title"></td></tr><tr><td>URL</td><td><input id="url">' +
|
||||
'</td></tr></table>') : $('<input>');
|
||||
// Show add and edit links when hover over.
|
||||
span.hover(function () {
|
||||
span.append(options);
|
||||
$('#deletelink').click(function () {
|
||||
$('#deletedialog').empty().dialog({
|
||||
autoOpen: false,
|
||||
title: 'Confirm Deletion',
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
overlay: {
|
||||
backgroundColor: '#000',
|
||||
opacity: 0.5
|
||||
},
|
||||
buttons: {
|
||||
'Yes, Delete It!': function () {
|
||||
chrome.bookmarks.remove(String(bookmarkNode.id));
|
||||
span.parent().remove();
|
||||
$(this).dialog('destroy');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog('destroy');
|
||||
}
|
||||
}
|
||||
}).dialog('open');
|
||||
});
|
||||
$('#addlink').click(function () {
|
||||
$('#adddialog').empty().append(edit).dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: true, title: 'Add New Bookmark', modal: true,
|
||||
buttons: {
|
||||
'Add': function () {
|
||||
chrome.bookmarks.create({
|
||||
parentId: bookmarkNode.id,
|
||||
title: $('#title').val(), url: $('#url').val()
|
||||
});
|
||||
$('#bookmarks').empty();
|
||||
$(this).dialog('destroy');
|
||||
dumpBookmarks();
|
||||
},
|
||||
'Cancel': function () {
|
||||
$(this).dialog('destroy');
|
||||
}
|
||||
}
|
||||
}).dialog('open');
|
||||
});
|
||||
$('#editlink').click(function () {
|
||||
edit.val(anchor.text());
|
||||
$('#editdialog').empty().append(edit).dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: true, title: 'Edit Title', modal: true,
|
||||
show: 'slide', buttons: {
|
||||
'Save': function () {
|
||||
chrome.bookmarks.update(String(bookmarkNode.id), {
|
||||
title: edit.val()
|
||||
});
|
||||
anchor.text(edit.val());
|
||||
options.show();
|
||||
$(this).dialog('destroy');
|
||||
},
|
||||
'Cancel': function () {
|
||||
$(this).dialog('destroy');
|
||||
}
|
||||
}
|
||||
}).dialog('open');
|
||||
});
|
||||
options.fadeIn();
|
||||
},
|
||||
// unhover
|
||||
function () {
|
||||
options.remove();
|
||||
}).append(anchor);
|
||||
}
|
||||
var li = $(bookmarkNode.title ? '<li>' : '<div>').append(span);
|
||||
if (bookmarkNode.children && bookmarkNode.children.length > 0) {
|
||||
li.append(dumpTreeNodes(bookmarkNode.children, query));
|
||||
}
|
||||
return li;
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
dumpBookmarks();
|
||||
});
|
||||
}
|
||||
|
||||
// https://developer.chrome.com/extensions/examples/api/browserAction/make_page_red/background.js
|
||||
function pageRedder() {
|
||||
chrome.browserAction.onClicked.addListener(function (tab) {
|
||||
// No tabs or host permissions needed!
|
||||
console.log('Turning ' + tab.url + ' red!');
|
||||
chrome.tabs.executeScript({
|
||||
code: 'document.body.style.backgroundColor="red"'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// https://developer.chrome.com/extensions/examples/api/browserAction/print/background.js
|
||||
function printPage() {
|
||||
chrome.browserAction.onClicked.addListener(function (tab) {
|
||||
var action_url = "javascript:window.print();";
|
||||
chrome.tabs.update(tab.id, { url: action_url });
|
||||
});
|
||||
}
|
||||
Vendored
+113
-113
@@ -31,7 +31,7 @@ declare module chrome.alarms {
|
||||
export function get(callback: (alarm: Alarm) => void): void;
|
||||
export function get(name: string, callback: (alarm: Alarm) => void): void;
|
||||
|
||||
declare var onAlarm: AlarmEvent;
|
||||
var onAlarm: AlarmEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -98,8 +98,8 @@ declare module chrome.bookmarks {
|
||||
addListener(callback: (id: string, reorderInfo: BookmarkReorderInfo) => void);
|
||||
}
|
||||
|
||||
declare var MAX_WRITE_OPERATIONS_PER_HOUR: number;
|
||||
declare var MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: number;
|
||||
var MAX_WRITE_OPERATIONS_PER_HOUR: number;
|
||||
var MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: number;
|
||||
|
||||
export function search(query: string, callback: (results: BookmarkTreeNode[]) => void): void;
|
||||
export function getTree(callback: (results: BookmarkTreeNode[]) => void): void;
|
||||
@@ -114,12 +114,12 @@ declare module chrome.bookmarks {
|
||||
export function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
|
||||
export function removeTree(id: string, callback?: Function): void;
|
||||
|
||||
declare var onRemoved: chrome.alarms.AlarmEvent;
|
||||
declare var onImportEnded: BookmarkImportEndedEvent;
|
||||
declare var onImportBegan: BookmarkImportBeganEvent;
|
||||
declare var onChanged: BookmarkChangedEvent;
|
||||
declare var onCreated: BookmarkCreatedEvent;
|
||||
declare var onChildrenReordered: BookmarkChildrenReordered;
|
||||
var onRemoved: chrome.alarms.AlarmEvent;
|
||||
var onImportEnded: BookmarkImportEndedEvent;
|
||||
var onImportBegan: BookmarkImportBeganEvent;
|
||||
var onChanged: BookmarkChangedEvent;
|
||||
var onCreated: BookmarkCreatedEvent;
|
||||
var onChildrenReordered: BookmarkChildrenReordered;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -172,7 +172,7 @@ declare module chrome.browserAction {
|
||||
export function getPopup(details: TabDetails, callback: (result: string) => void): void;
|
||||
export function setIcon(details: TabIconDetails, callback?: Function): void;
|
||||
|
||||
declare var onClicked: BrowserClickedEvent;
|
||||
var onClicked: BrowserClickedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -229,7 +229,7 @@ declare module chrome.commands {
|
||||
addListener(callback: (command: string) => void);
|
||||
}
|
||||
|
||||
declare var onCommand: CommandEvent;
|
||||
var onCommand: CommandEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -271,12 +271,12 @@ declare module chrome.contentSettings {
|
||||
description?: string;
|
||||
}
|
||||
|
||||
declare var cookies: ContentSetting;
|
||||
declare var popups: ContentSetting;
|
||||
declare var javascript: ContentSetting;
|
||||
declare var notifications: ContentSetting;
|
||||
declare var plugins: ContentSetting;
|
||||
declare var images: ContentSetting;
|
||||
var cookies: ContentSetting;
|
||||
var popups: ContentSetting;
|
||||
var javascript: ContentSetting;
|
||||
var notifications: ContentSetting;
|
||||
var plugins: ContentSetting;
|
||||
var images: ContentSetting;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -330,7 +330,7 @@ declare module chrome.contextMenus {
|
||||
export function update(id: any, updateProperties: UpdateProperties, callback?: Function): void;
|
||||
export function remove(menuItemId: any, callback?: Function): void;
|
||||
|
||||
declare var onClicked: MenuClickedEvent;
|
||||
var onClicked: MenuClickedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -399,7 +399,7 @@ declare module chrome.cookies {
|
||||
export function remove(details: Details, callback?: (details: Details) => void): void;
|
||||
export function get(details: Details, callback: (cookie?: Cookie) => void): void;
|
||||
|
||||
declare var onChanged: CookieChangedEvent;
|
||||
var onChanged: CookieChangedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -422,8 +422,8 @@ declare module "chrome.debugger" {
|
||||
export function detach(target: Debuggee, callback?: Function): void;
|
||||
export function sendCommand(target: Debuggee, method: string, commandParams?: Object, callback?: (result: Object) => void): void;
|
||||
|
||||
declare var onDetach: DebuggerDetachedEvent;
|
||||
declare var onEvent: DebuggerEventEvent;
|
||||
var onDetach: DebuggerDetachedEvent;
|
||||
var onEvent: DebuggerEventEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -534,7 +534,7 @@ declare module chrome.declarativeWebRequest {
|
||||
addListener(callback: Function): void;
|
||||
}
|
||||
|
||||
declare var onRequest: RequestedEvent;
|
||||
var onRequest: RequestedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -561,14 +561,14 @@ declare module chrome.devtools.inspectedWindow {
|
||||
addListener(callback: (resource: Resource, content: string) => void): void;
|
||||
}
|
||||
|
||||
declare var tabId: number;
|
||||
var tabId: number;
|
||||
|
||||
export function reload(reloadOptions: ReloadOptions): void;
|
||||
export function eval(expression: string, callback?: (result: Object, isException: boolean) => void): void;
|
||||
export function getResources(callback: (resources: Resource[]) => void): void;
|
||||
|
||||
declare var onResourceAdded: ResourceAddedEvent;
|
||||
declare var onResourceContentCommitted: ResourceContentCommittedEvent;
|
||||
var onResourceAdded: ResourceAddedEvent;
|
||||
var onResourceContentCommitted: ResourceContentCommittedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -589,8 +589,8 @@ declare module chrome.devtools.network {
|
||||
|
||||
export function getHAR(callback: (harLog: Object) => void): void;
|
||||
|
||||
declare var onRequestFinished: RequestFinishedEvent;
|
||||
declare var onNavigated: NavigatedEvent;
|
||||
var onRequestFinished: RequestFinishedEvent;
|
||||
var onNavigated: NavigatedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -651,7 +651,7 @@ declare module chrome.devtools.panels {
|
||||
onHidden: ExtensionSidebarPaneHiddenEvent;
|
||||
}
|
||||
|
||||
declare var elements: ElementsPanel;
|
||||
var elements: ElementsPanel;
|
||||
|
||||
export function create(title: string, iconPath: string, pagePath: string, callback?: (panel: ExtensionPanel) => void): void;
|
||||
export function setOpenResourceHandler(callback: (resource: chrome.devtools.inspectedWindow.Resource) => void): void;
|
||||
@@ -776,9 +776,9 @@ declare module chrome.downloads {
|
||||
export function cancel(downloadId: number, callback?: Function): void;
|
||||
export function download(options: DownloadOptions, callback?: (downloadId: number) => void): void;
|
||||
|
||||
declare var onChanged: DownloadChangedEvent;
|
||||
declare var onCreated: DownloadCreatedEvent;
|
||||
declare var onErased: DownloadErasedEvent;
|
||||
var onChanged: DownloadChangedEvent;
|
||||
var onCreated: DownloadCreatedEvent;
|
||||
var onErased: DownloadErasedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -868,8 +868,8 @@ declare module chrome.extension {
|
||||
addListener(callback: (port: Port) => void): void;
|
||||
}
|
||||
|
||||
declare var inIncognitoContext: boolean;
|
||||
declare var lastError: Object;
|
||||
var inIncognitoContext: boolean;
|
||||
var lastError: Object;
|
||||
|
||||
export function getBackgroundPage(): Window;
|
||||
export function getURL(path: string): string;
|
||||
@@ -881,10 +881,10 @@ declare module chrome.extension {
|
||||
export function connect(extensionId?: string, connectInfo?: ConnectInfo): Port;
|
||||
export function isAllowedIncognitoAccess(callback: (isAllowedAccess) => void): void;
|
||||
|
||||
declare var onMessage: ExtensionMessageEvent;
|
||||
declare var onMessageExternal: ExtensionMessageExternalEvent;
|
||||
declare var onConnect: ExtensionConnectEvent;
|
||||
declare var onConnectExternal: ExtensionConnectExternalEvent;
|
||||
var onMessage: ExtensionMessageEvent;
|
||||
var onMessageExternal: ExtensionMessageExternalEvent;
|
||||
var onConnect: ExtensionConnectEvent;
|
||||
var onConnectExternal: ExtensionConnectExternalEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -911,7 +911,7 @@ declare module chrome.fileBrowserHandler {
|
||||
addListener(callback: (id: string, details: FileHandlerExecuteEventDetails) => void): void;
|
||||
}
|
||||
|
||||
declare var onExecute: FileBrowserHandlerExecuteEvent;
|
||||
var onExecute: FileBrowserHandlerExecuteEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -989,10 +989,10 @@ declare module chrome.fontSettings {
|
||||
export function getFontList(callback: (results: FontName[]) => void): void;
|
||||
export function clearDefaultFixedFontSize(details: Object, callback?: Function): void;
|
||||
|
||||
declare var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
|
||||
declare var onDefaultFontSizeChanged: DefaultFontSizeChangedEvent;
|
||||
declare var onMinimumFontSizeChanged: MinimumFontSizeChangedEvent;
|
||||
declare var onFontChanged: FontChangedEvent;
|
||||
var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
|
||||
var onDefaultFontSizeChanged: DefaultFontSizeChangedEvent;
|
||||
var onMinimumFontSizeChanged: MinimumFontSizeChangedEvent;
|
||||
var onFontChanged: FontChangedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1052,8 +1052,8 @@ declare module chrome.history {
|
||||
export function getVisits(details: Url, callback: (results: VisitItem[]) => void): void;
|
||||
export function deleteUrl(details: Url, callback?: Function): void;
|
||||
|
||||
declare var onVisited: HistoryVisitedEvent;
|
||||
declare var onVisitRemoved: HistoryVisitRemovedEvent;
|
||||
var onVisited: HistoryVisitedEvent;
|
||||
var onVisitRemoved: HistoryVisitRemovedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1074,7 +1074,7 @@ declare module chrome.idle {
|
||||
|
||||
export function queryState(thresholdSeconds: number, callback: (newState: string) => void): void;
|
||||
|
||||
declare var onStateChanged: IdleStateChangedEvent;
|
||||
var onStateChanged: IdleStateChangedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1183,14 +1183,14 @@ declare module chrome.input.ime {
|
||||
export function clearComposition(parameters: ClearCompositionParameters, callback?: (success: boolean) => void): void;
|
||||
export function setCursorPosition(parameters: CursorPositionParameters, callback?: (success: boolean) => void): void;
|
||||
|
||||
declare var onBlur: BlurEvent;
|
||||
declare var onCandidateClicked: CandidateClickedEvent;
|
||||
declare var onKeyEvent: KeyEventEvent;
|
||||
declare var onDeactivated: DeactivatedEvent;
|
||||
declare var onInputContextUpdate: InputContextUpdateEvent;
|
||||
declare var onActivate: ActivateEvent;
|
||||
declare var onFocus: FocusEvent;
|
||||
declare var onMenuItemActivated: MenuItemActivatedEvent;
|
||||
var onBlur: BlurEvent;
|
||||
var onCandidateClicked: CandidateClickedEvent;
|
||||
var onKeyEvent: KeyEventEvent;
|
||||
var onDeactivated: DeactivatedEvent;
|
||||
var onInputContextUpdate: InputContextUpdateEvent;
|
||||
var onActivate: ActivateEvent;
|
||||
var onFocus: FocusEvent;
|
||||
var onMenuItemActivated: MenuItemActivatedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1250,10 +1250,10 @@ declare module chrome.management {
|
||||
export function launchApp(id: string, callback?: Function): void;
|
||||
export function uninstall(id: string, options: UninstallOptions, callback?: Function): void;
|
||||
|
||||
declare var onDisabled: ManagementDisabledEvent;
|
||||
declare var onUninstalled: ManagementUninstalledEvent;
|
||||
declare var onInstalled: ManagementInstalledEvent;
|
||||
declare var onEnabled: ManagementEnabledEvent;
|
||||
var onDisabled: ManagementDisabledEvent;
|
||||
var onUninstalled: ManagementUninstalledEvent;
|
||||
var onInstalled: ManagementInstalledEvent;
|
||||
var onEnabled: ManagementEnabledEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1287,10 +1287,10 @@ declare module chrome.omnibox {
|
||||
|
||||
export function setDefaultSuggestion(suggestion: Suggestion): void;
|
||||
|
||||
declare var onInputEntered: OmniboxInputEnteredEvent;
|
||||
declare var onInputChanged: OmniboxInputChangedEvent;
|
||||
declare var onInputStarted: OmniboxInputStartedEvent;
|
||||
declare var onInputCancelled: OmniboxInputCancelledEvent;
|
||||
var onInputEntered: OmniboxInputEnteredEvent;
|
||||
var onInputChanged: OmniboxInputChangedEvent;
|
||||
var onInputStarted: OmniboxInputStartedEvent;
|
||||
var onInputCancelled: OmniboxInputCancelledEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1330,7 +1330,7 @@ declare module chrome.pageAction {
|
||||
export function getPopup(details: GetDetails, callback: (result: string) => void): void;
|
||||
export function setIcon(details: IconDetails, callback?: Function): void;
|
||||
|
||||
declare var onClicked: PageActionClickedEvent;
|
||||
var onClicked: PageActionClickedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1366,8 +1366,8 @@ declare module chrome.permissions {
|
||||
export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
|
||||
export function remove(permissions: Permissions, callback?: (removed: boolean) => void): void;
|
||||
|
||||
declare var onRemoved: PermissionsRemovedEvent;
|
||||
declare var onAdded: PermissionsAddedEvent;
|
||||
var onRemoved: PermissionsRemovedEvent;
|
||||
var onAdded: PermissionsAddedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1395,9 +1395,9 @@ declare module chrome.privacy {
|
||||
protectedContentEnabled: chrome.types.ChromeSetting;
|
||||
}
|
||||
|
||||
declare var services: Services;
|
||||
declare var network: Network;
|
||||
declare var websites: Websites;
|
||||
var services: Services;
|
||||
var network: Network;
|
||||
var websites: Websites;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1441,16 +1441,16 @@ declare module chrome.proxy {
|
||||
addListener(callback: (details: ErrorDetails) => void): void;
|
||||
}
|
||||
|
||||
declare var settings: chrome.types.ChromeSetting;
|
||||
declare var onProxyError: ProxyErrorEvent;
|
||||
var settings: chrome.types.ChromeSetting;
|
||||
var onProxyError: ProxyErrorEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Runtime
|
||||
////////////////////
|
||||
declare module chrome.runtime {
|
||||
declare var lastError: Object;
|
||||
declare var id: string;
|
||||
var lastError: Object;
|
||||
var id: string;
|
||||
|
||||
interface InstalledDetails {
|
||||
reason: string;
|
||||
@@ -1477,10 +1477,10 @@ declare module chrome.runtime {
|
||||
export function getManifest(): Object;
|
||||
export function getURL(path: string): string;
|
||||
|
||||
declare var onSuspend: RuntimeSuspendEvent;
|
||||
declare var onStartup: RuntimeStartupEvent;
|
||||
declare var onInstalled: RuntimeInstalledEvent;
|
||||
declare var onSuspendCanceled: RuntimeSuspendCanceledEvent;
|
||||
var onSuspend: RuntimeSuspendEvent;
|
||||
var onStartup: RuntimeStartupEvent;
|
||||
var onInstalled: RuntimeInstalledEvent;
|
||||
var onSuspendCanceled: RuntimeSuspendCanceledEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1508,7 +1508,7 @@ declare module chrome.scriptBadge {
|
||||
export function getAttention(details: AttentionDetails): void;
|
||||
export function setPopup(details: SetPopupDetails): void;
|
||||
|
||||
declare var onClicked: ScriptBadgeClickedEvent;
|
||||
var onClicked: ScriptBadgeClickedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1550,10 +1550,10 @@ declare module chrome.storage {
|
||||
addListener(callback: (changes: Object, areaName: string) => void): void;
|
||||
}
|
||||
|
||||
declare var local: Local;
|
||||
declare var sync: Sync;
|
||||
var local: Local;
|
||||
var sync: Sync;
|
||||
|
||||
declare var onChanged: StorageChangedEvent;
|
||||
var onChanged: StorageChangedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1788,14 +1788,14 @@ declare module chrome.tabs {
|
||||
export function detectLanguage(callback: (language: string) => void): void;
|
||||
export function detectLanguage(tabId: number, callback: (language: string) => void): void;
|
||||
|
||||
declare var onHighlighted: TabHighlightedEvent;
|
||||
declare var onRemoved: TabRemovedEvent;
|
||||
declare var onUpdated: TabUpdatedEvent;
|
||||
declare var onAttached: TabAttachedEvent;
|
||||
declare var onMoved: TabMovedEvent;
|
||||
declare var onDetached: TabDetachedEvent;
|
||||
declare var onCreated: TabCreatedEvent;
|
||||
declare var onActivated: TabActivatedEvent;
|
||||
var onHighlighted: TabHighlightedEvent;
|
||||
var onRemoved: TabRemovedEvent;
|
||||
var onUpdated: TabUpdatedEvent;
|
||||
var onAttached: TabAttachedEvent;
|
||||
var onMoved: TabMovedEvent;
|
||||
var onDetached: TabDetachedEvent;
|
||||
var onCreated: TabCreatedEvent;
|
||||
var onActivated: TabActivatedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -1869,8 +1869,8 @@ declare module chrome.ttsEngine {
|
||||
addListener(callback: Function): void;
|
||||
}
|
||||
|
||||
declare var onSpeak: TtsEngineSpeakEvent;
|
||||
declare var onStop: TtsEngineStopEvent;
|
||||
var onSpeak: TtsEngineSpeakEvent;
|
||||
var onStop: TtsEngineStopEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -2043,15 +2043,15 @@ declare module chrome.webNavigation {
|
||||
export function getFrame(details: GetFrameDetails, callback: (details?: GetFrameResultDetails) => void): void;
|
||||
export function getAllFrames(details: GetAllFrameDetails, callback: (details?: Object[]) => void): void;
|
||||
|
||||
declare var onReferenceFragmentUpdated: WebNavigationReferenceFragmentUpdatedEvent;
|
||||
declare var onCompleted: WebNavigationCompletedEvent;
|
||||
declare var onHistoryStateUpdated: WebNavigationHistoryStateUpdatedEvent;
|
||||
declare var onCreatedNavigationTarget: WebNavigationCreatedNavigationTargetEvent;
|
||||
declare var onTabReplaced: WebNavigationTabReplacedEvent;
|
||||
declare var onBeforeNavigate: WebNavigationBeforeNavigateEvent;
|
||||
declare var onCommitted: WebNavigationCommittedEvent;
|
||||
declare var onDOMContentLoaded: WebNavigationDomContentLoadedEvent;
|
||||
declare var onErrorOccurred: WebNavigationErrorOccurredEvent;
|
||||
var onReferenceFragmentUpdated: WebNavigationReferenceFragmentUpdatedEvent;
|
||||
var onCompleted: WebNavigationCompletedEvent;
|
||||
var onHistoryStateUpdated: WebNavigationHistoryStateUpdatedEvent;
|
||||
var onCreatedNavigationTarget: WebNavigationCreatedNavigationTargetEvent;
|
||||
var onTabReplaced: WebNavigationTabReplacedEvent;
|
||||
var onBeforeNavigate: WebNavigationBeforeNavigateEvent;
|
||||
var onCommitted: WebNavigationCommittedEvent;
|
||||
var onDOMContentLoaded: WebNavigationDomContentLoadedEvent;
|
||||
var onErrorOccurred: WebNavigationErrorOccurredEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -2256,19 +2256,19 @@ declare module chrome.webRequest {
|
||||
addListener(callback: (details: OnBeforeRequestDetails) => void): void;
|
||||
}
|
||||
|
||||
declare var MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES: number;
|
||||
var MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES: number;
|
||||
|
||||
export function handlerBehaviorChanged(callback?: Function): void;
|
||||
|
||||
declare var onCompleted: WebRequestCompletedEvent;
|
||||
declare var onHeadersReceived: WebRequestHeadersReceivedEvent;
|
||||
declare var onBeforeRedirect: WebRequestBeforeRedirectEvent;
|
||||
declare var onAuthRequired: WebRequestAuthRequiredEvent;
|
||||
declare var onBeforeSendHeaders: WebRequestBeforeSendHeadersEvent;
|
||||
declare var onErrorOccurred: WebRequestErrorOccurredEvent;
|
||||
declare var onResponseStarted: WebRequestResponseStartedEvent;
|
||||
declare var onSendHeaders: WebRequestSendHeadersEvent;
|
||||
declare var onBeforeRequest: WebRequestBeforeRequestEvent;
|
||||
var onCompleted: WebRequestCompletedEvent;
|
||||
var onHeadersReceived: WebRequestHeadersReceivedEvent;
|
||||
var onBeforeRedirect: WebRequestBeforeRedirectEvent;
|
||||
var onAuthRequired: WebRequestAuthRequiredEvent;
|
||||
var onBeforeSendHeaders: WebRequestBeforeSendHeadersEvent;
|
||||
var onErrorOccurred: WebRequestErrorOccurredEvent;
|
||||
var onResponseStarted: WebRequestResponseStartedEvent;
|
||||
var onSendHeaders: WebRequestSendHeadersEvent;
|
||||
var onBeforeRequest: WebRequestBeforeRequestEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
@@ -2334,8 +2334,8 @@ declare module chrome.windows {
|
||||
addListener(callback: (windowId: number) => void): void;
|
||||
}
|
||||
|
||||
declare var WINDOW_ID_CURRENT: number;
|
||||
declare var WINDOW_ID_NONE: number;
|
||||
var WINDOW_ID_CURRENT: number;
|
||||
var WINDOW_ID_NONE: number;
|
||||
|
||||
export function get(windowId: number, callback: (window: chrome.windows.Window) => void): void;
|
||||
export function get(windowId: number, getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
|
||||
@@ -2349,7 +2349,7 @@ declare module chrome.windows {
|
||||
export function getLastFocused(callback: (window: chrome.windows.Window) => void): void;
|
||||
export function getLastFocused(getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
|
||||
|
||||
declare var onRemoved: WindowRemovedEvent;
|
||||
declare var onCreated: WindowCreatedEvent;
|
||||
declare var onFocusChanged: WindowFocusChangedEvent;
|
||||
var onRemoved: WindowRemovedEvent;
|
||||
var onCreated: WindowCreatedEvent;
|
||||
var onFocusChanged: WindowFocusChangedEvent;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
/// <reference path="codemirror.d.ts" />
|
||||
|
||||
var myCodeMirror = CodeMirror(document.body);
|
||||
var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body);
|
||||
|
||||
var myCodeMirror2 = CodeMirror(document.body, {
|
||||
var myCodeMirror2: CodeMirror.Editor = CodeMirror(document.body, {
|
||||
value: "function myScript(){return 100;}\n",
|
||||
mode: "javascript"
|
||||
});
|
||||
|
||||
var myTextArea;
|
||||
var myCodeMirror3 = CodeMirror(function (elt) {
|
||||
var myTextArea: HTMLTextAreaElement;
|
||||
var myCodeMirror3: CodeMirror.Editor = CodeMirror(function (elt) {
|
||||
myTextArea.parentNode.replaceChild(elt, myTextArea);
|
||||
}, { value: myTextArea.value });
|
||||
|
||||
var myCodeMirror4 = CodeMirror.fromTextArea(myTextArea);
|
||||
var myCodeMirror4: CodeMirror.Editor = CodeMirror.fromTextArea(myTextArea);
|
||||
|
||||
var doc: CodeMirror.Doc = new CodeMirror.Doc('text');
|
||||
var doc2: CodeMirror.Doc = CodeMirror(document.body).getDoc();
|
||||
|
||||
Vendored
+366
-368
File diff suppressed because it is too large
Load Diff
Vendored
+5
-1
@@ -475,11 +475,15 @@ declare module "durandal/plugins/router" {
|
||||
export var map: {
|
||||
(routeOrRouteArray: IRouteInfoParameters): IRouteInfo;
|
||||
(routeOrRouteArray: IRouteInfoParameters[]): IRouteInfo[];
|
||||
};
|
||||
}
|
||||
/**
|
||||
* After you've configured the router, you need to activate it. This is usually done in your shell. The activate function of the router returns a promise that resolves when the router is ready to start. To use the router, you should add an activate function to your shell and return the result from that. The application startup infrastructure of Durandal will detect your shell's activate function and call it at the appropriate time, waiting for it's promise to resolve. This allows Durandal to properly orchestrate the timing of composition and databinding along with animations and splash screen display.
|
||||
*/
|
||||
export var activate: (defaultRoute: string) => JQueryPromise;
|
||||
/**
|
||||
* Before any route is activated, the guardRoute funtion is called. You can plug into this function to add custom logic to allow, deny or redirect based on the requested route. To allow, return true. To deny, return false. To redirect, return a string with the hash or url. You may also return a promise for any of these values.
|
||||
*/
|
||||
export var guardRoute: (routeInfo: IRouteInfo, params: any, instance: any) => any
|
||||
}
|
||||
|
||||
declare module "durandal/widget" {
|
||||
|
||||
Vendored
+2
-2
@@ -158,11 +158,11 @@ declare module "dustjs-linkedin" {
|
||||
export function escapeHtml(html: string): string;
|
||||
export function escapeJs(js: string): string;
|
||||
|
||||
declare var helpers: {
|
||||
var helpers: {
|
||||
[key: string]: (chk: Chunk, ctx: Context, bodies?: any, params?: any) => any;
|
||||
};
|
||||
|
||||
declare var filters: {
|
||||
var filters: {
|
||||
[key: string]: (value: string) => string;
|
||||
};
|
||||
}
|
||||
Vendored
+1
-1
@@ -35,7 +35,7 @@ interface EpicEditorOptions {
|
||||
};
|
||||
}
|
||||
|
||||
class EpicEditor {
|
||||
declare class EpicEditor {
|
||||
constructor();
|
||||
constructor(options: EpicEditorOptions);
|
||||
|
||||
|
||||
Vendored
+31
-22
@@ -149,6 +149,7 @@ declare module fabric {
|
||||
ry: number;
|
||||
|
||||
complexity(): number;
|
||||
initialize(options: any);
|
||||
initialize(points: number[], options: any): IRect;
|
||||
toObject(propertiesToInclude: any[]): any;
|
||||
toSVG(): string;
|
||||
@@ -172,6 +173,7 @@ declare module fabric {
|
||||
type: string;
|
||||
useNative: Boolean;
|
||||
|
||||
initialize(options: any);
|
||||
initialize(text: string, options: any): IText;
|
||||
toString(): string;
|
||||
render(ctx: CanvasRenderingContext2D, noTransform: bool);
|
||||
@@ -387,15 +389,16 @@ declare module fabric {
|
||||
destroy(): IGroup;
|
||||
getObjects(): IObject[];
|
||||
hasMoved(): bool;
|
||||
initialize(options: any);
|
||||
initialize(objects, options): any;
|
||||
item(index): IObject;
|
||||
remove(object): IGroup;
|
||||
remove(object?): IGroup;
|
||||
removeWithUpdate(object): IGroup;
|
||||
render(ctx, noTransform): void;
|
||||
saveCoords(): IGroup;
|
||||
setObjectsCoords(): IGroup;
|
||||
size(): number;
|
||||
toGrayscale(): void;
|
||||
toGrayscale(): IGroup;
|
||||
toObject(propertiesToInclude: any[]): any;
|
||||
tostring(): string;
|
||||
toSVG(): string;
|
||||
@@ -409,6 +412,7 @@ declare module fabric {
|
||||
y2: number;
|
||||
|
||||
complexity(): number;
|
||||
initialize(options: any);
|
||||
initialize(points: number[], options: any): ILine;
|
||||
toObject(propertiesToInclude: any[]): any;
|
||||
toSVG(): string;
|
||||
@@ -424,11 +428,13 @@ declare module fabric {
|
||||
filters: any;
|
||||
|
||||
applyFilters(callback);
|
||||
clone(callback?, propertiesToInclude?): IObject;
|
||||
clone(propertiesToInclude, callback);
|
||||
complexity(): number;
|
||||
getElement(): HTMLImageElement;
|
||||
getOriginalSize(): { width: number; height: number; };
|
||||
getSrc(): string;
|
||||
initialize(options: any);
|
||||
initialize(element: string, options: any);
|
||||
initialize(element: HTMLImageElement, options: any);
|
||||
render(ctx: CanvasRenderingContext2D, noTransform: bool);
|
||||
@@ -453,6 +459,7 @@ declare module fabric {
|
||||
|
||||
export interface IPath extends IObject {
|
||||
complexity(): number;
|
||||
initialize(options: any);
|
||||
initialize(path, options);
|
||||
render(ctx: CanvasRenderingContext2D, noTransform: bool);
|
||||
toDatalessObject(propertiesToInclude): any;
|
||||
@@ -463,6 +470,7 @@ declare module fabric {
|
||||
|
||||
export interface IPolygon extends IObject {
|
||||
complexity(): number;
|
||||
initialize(options: any);
|
||||
initialize(points, options);
|
||||
toObject(propertiesToInclude): any;
|
||||
toSVG(): string;
|
||||
@@ -470,6 +478,7 @@ declare module fabric {
|
||||
|
||||
export interface IPolyline extends IObject {
|
||||
complexity(): number;
|
||||
initialize(options: any);
|
||||
initialize(points, options);
|
||||
toObject(propertiesToInclude): any;
|
||||
toSVG(): string;
|
||||
@@ -477,11 +486,12 @@ declare module fabric {
|
||||
|
||||
export interface IPathGroup extends IObject {
|
||||
complexity(): number;
|
||||
initialize(options: any);
|
||||
initialize(paths, options);
|
||||
isSameColor(): bool;
|
||||
render(ctx: CanvasRenderingContext2D);
|
||||
toDatalessObject(propertiesToInclude): any;
|
||||
toGrayscale();
|
||||
toGrayscale(): IPathGroup;
|
||||
toObject(propertiesToInclude): any;
|
||||
tostring(): string;
|
||||
toSVG(): string;
|
||||
@@ -660,18 +670,18 @@ declare module fabric {
|
||||
export interface ITriangleOptions extends IObjectOptions {
|
||||
}
|
||||
|
||||
declare var Rect: {
|
||||
var Rect: {
|
||||
fromElement(element: SVGElement, options: IRectOptions): IRect;
|
||||
fromObject(object): IRect;
|
||||
new (options?: IRectOptions): IRect;
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Triangle: {
|
||||
var Triangle: {
|
||||
new (options?: ITriangleOptions): ITriangle;
|
||||
}
|
||||
|
||||
declare var Canvas: {
|
||||
var Canvas: {
|
||||
new (element: HTMLCanvasElement, options?: ICanvasOptions): ICanvas;
|
||||
new (element: string, options?: ICanvasOptions): ICanvas;
|
||||
|
||||
@@ -680,7 +690,7 @@ declare module fabric {
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var StaticCanvas: {
|
||||
var StaticCanvas: {
|
||||
new (element: HTMLCanvasElement, options?: ICanvasOptions): ICanvas;
|
||||
new (element: string, options?: ICanvasOptions): ICanvas;
|
||||
|
||||
@@ -689,7 +699,7 @@ declare module fabric {
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Circle: {
|
||||
var Circle: {
|
||||
ATTRIBUTE_NAMES: string[];
|
||||
fromElement(element: SVGElement, options: ICircleOptions): ICircle;
|
||||
fromObject(object): ICircle;
|
||||
@@ -697,11 +707,11 @@ declare module fabric {
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Group: {
|
||||
var Group: {
|
||||
new (items?: any[], options?: IObjectOptions): IGroup;
|
||||
}
|
||||
|
||||
declare var Line: {
|
||||
var Line: {
|
||||
ATTRIBUTE_NAMES: string[];
|
||||
fromElement(element: SVGElement, options): ILine;
|
||||
fromObject(object): ILine;
|
||||
@@ -709,53 +719,53 @@ declare module fabric {
|
||||
new (points: number[], objObjects?: IObjectOptions): ILine;
|
||||
}
|
||||
|
||||
declare var Intersection: {
|
||||
var Intersection: {
|
||||
intersectLineLine(a1, a2, b1, b2);
|
||||
intersectLinePolygon(a1, a2, points);
|
||||
intersectPolygonPolygon(points1, points2);
|
||||
intersectPolygonRectangle(points, r1, r2);
|
||||
}
|
||||
|
||||
declare var Path: {
|
||||
var Path: {
|
||||
fromElement(element: SVGElement, options): IPath;
|
||||
fromObject(object): IPath;
|
||||
new (): IPath;
|
||||
}
|
||||
|
||||
declare var PathGroup: {
|
||||
var PathGroup: {
|
||||
fromObject(object): IPathGroup;
|
||||
new (): IPathGroup;
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Point: {
|
||||
var Point: {
|
||||
new (x, y): IPoint;
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Object: {
|
||||
var Object: {
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Polygon: {
|
||||
var Polygon: {
|
||||
fromObject(object): IPolygon;
|
||||
fromElement(element: SVGElement, options): IPolygon;
|
||||
new (): IPolygon;
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Polyline: {
|
||||
var Polyline: {
|
||||
fromObject(object): IPolyline;
|
||||
fromElement(element: SVGElement, options): IPolyline;
|
||||
new (): IPolyline;
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
declare var Text: {
|
||||
var Text: {
|
||||
new (text: string, options?: ITextOptions): IText;
|
||||
}
|
||||
|
||||
declare var Image: {
|
||||
var Image: {
|
||||
fromURL(url: string): IImage;
|
||||
fromURL(url: string, callback: (image: IImage) => any): IImage;
|
||||
fromURL(url: string, callback: (image: IImage) => any, objObjects: IObjectOptions): IImage;
|
||||
@@ -809,7 +819,7 @@ declare module fabric {
|
||||
|
||||
}
|
||||
|
||||
declare var util: {
|
||||
var util: {
|
||||
addClass(element: HTMLElement, className: string);
|
||||
addListener(element, eventName: string, handler);
|
||||
animate(options: {
|
||||
@@ -846,5 +856,4 @@ declare module fabric {
|
||||
toFixed(number, fractionDigits);
|
||||
wrapElement(element: HTMLElement, wrapper, attributes);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
var canvas = new fabric.Canvas('c', {
|
||||
hoverCursor: 'pointer',
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
var dot, i,
|
||||
t1, t2,
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
var $ = function(id){return document.getElementById(id)};
|
||||
|
||||
@@ -28,7 +28,7 @@ canvas.on({
|
||||
|
||||
for (var i = 0; i < filters.length; i++) {
|
||||
var checkBox = <HTMLInputElement>$(filters[i]);
|
||||
var image = <fabric.Image>canvas.getActiveObject();
|
||||
var image = <fabric.IImage>canvas.getActiveObject();
|
||||
checkBox.checked = !!image.filters[i];
|
||||
}
|
||||
},
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
var canvas = new fabric.Canvas('c');
|
||||
var $ = function (id) { return document.getElementById(id); };
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
module fabric {
|
||||
export interface CircleWithLineInfos extends ICircle {
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
var canvas = new fabric.Canvas('c');
|
||||
fabric.loadSVGFromURL('../assets/135.svg', function (objects) {
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
module fabric {
|
||||
export interface ImageWithInfo extends IImage {
|
||||
@@ -1,4 +1,4 @@
|
||||
///<reference path="..\fabricjs.d.ts" />
|
||||
///<reference path="fabricjs.d.ts" />
|
||||
|
||||
module fabric {
|
||||
export interface ImageWithInfo extends IImage {
|
||||
@@ -41,7 +41,7 @@ function updateComplexity() {
|
||||
}, 100);
|
||||
}
|
||||
|
||||
document.getElementById('commands').onclick = function (ev) {
|
||||
document.getElementById('commands').onclick = function (ev: any) {
|
||||
var ev: any = ev || window.event;
|
||||
|
||||
if (ev.preventDefault) {
|
||||
@@ -450,8 +450,8 @@ if (supportsColorpicker()) {
|
||||
}, 100);
|
||||
|
||||
if (document.location.search.indexOf('guidelines') > -1) {
|
||||
initCenteringGuidelines(canvas);
|
||||
initAligningGuidelines(canvas);
|
||||
//initCenteringGuidelines(canvas);
|
||||
//initAligningGuidelines(canvas);
|
||||
}
|
||||
|
||||
gradientifyBtn.onclick = function() {
|
||||
@@ -475,7 +475,7 @@ if (supportsColorpicker()) {
|
||||
var activeObject = canvas.getActiveObject();
|
||||
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
this.value = (<fabric.Text>activeObject).text;
|
||||
this.value = (<fabric.IText>activeObject).text;
|
||||
}
|
||||
};
|
||||
textEl.onkeyup = function(e) {
|
||||
@@ -485,7 +485,7 @@ if (supportsColorpicker()) {
|
||||
canvas.discardActiveObject();
|
||||
}
|
||||
else {
|
||||
(<fabric.Text>activeObject).text = this.value;
|
||||
(<fabric.IText>activeObject).text = this.value;
|
||||
}
|
||||
canvas.renderAll();
|
||||
}
|
||||
@@ -497,7 +497,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(cmdUnderlineBtn);
|
||||
cmdUnderlineBtn.disabled = true;
|
||||
cmdUnderlineBtn.onclick = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textDecoration = (activeObject.textDecoration == 'underline' ? '' : 'underline');
|
||||
this.className = activeObject.textDecoration ? 'selected' : '';
|
||||
@@ -511,7 +511,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(cmdLinethroughBtn);
|
||||
cmdLinethroughBtn.disabled = true;
|
||||
cmdLinethroughBtn.onclick = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textDecoration = (activeObject.textDecoration == 'line-through' ? '' : 'line-through');
|
||||
this.className = activeObject.textDecoration ? 'selected' : '';
|
||||
@@ -525,7 +525,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(cmdOverlineBtn);
|
||||
cmdOverlineBtn.disabled = true;
|
||||
cmdOverlineBtn.onclick = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textDecoration = (activeObject.textDecoration == 'overline' ? '' : 'overline');
|
||||
this.className = activeObject.textDecoration ? 'selected' : '';
|
||||
@@ -539,7 +539,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(cmdBoldBtn);
|
||||
cmdBoldBtn.disabled = true;
|
||||
cmdBoldBtn.onclick = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.fontWeight = (activeObject.fontWeight == 'bold' ? '' : 'bold');
|
||||
this.className = activeObject.fontWeight ? 'selected' : '';
|
||||
@@ -553,7 +553,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(cmdItalicBtn);
|
||||
cmdItalicBtn.disabled = true;
|
||||
cmdItalicBtn.onclick = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.fontStyle = (activeObject.fontStyle == 'italic' ? '' : 'italic');
|
||||
this.className = activeObject.fontStyle ? 'selected' : '';
|
||||
@@ -567,7 +567,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(cmdShadowBtn);
|
||||
cmdShadowBtn.disabled = true;
|
||||
cmdShadowBtn.onclick = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textShadow = !activeObject.textShadow ? 'rgba(0,0,0,0.2) 2px 2px 10px' : '';
|
||||
this.className = activeObject.textShadow ? 'selected' : '';
|
||||
@@ -581,7 +581,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(textAlignSwitch);
|
||||
textAlignSwitch.disabled = true;
|
||||
textAlignSwitch.onchange = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.textAlign = this.value.toLowerCase();
|
||||
canvas.renderAll();
|
||||
@@ -594,7 +594,7 @@ if (supportsColorpicker()) {
|
||||
activeObjectButtons.push(fontFamilySwitch);
|
||||
fontFamilySwitch.disabled = true;
|
||||
fontFamilySwitch.onchange = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.fontFamily = this.value;
|
||||
canvas.renderAll();
|
||||
@@ -605,7 +605,7 @@ if (supportsColorpicker()) {
|
||||
var bgColorField = document.getElementById('text-bg-color');
|
||||
if (bgColorField) {
|
||||
bgColorField.onchange = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.backgroundColor = this.value;
|
||||
canvas.renderAll();
|
||||
@@ -616,7 +616,7 @@ if (supportsColorpicker()) {
|
||||
var strokeColorField = document.getElementById('text-stroke-color');
|
||||
if (strokeColorField) {
|
||||
strokeColorField.onchange = function() {
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.strokeStyle = this.value;
|
||||
canvas.renderAll();
|
||||
@@ -639,7 +639,7 @@ if (supportsColorpicker()) {
|
||||
label.appendChild(slider);
|
||||
slider.title = "Line height";
|
||||
slider.onchange = function(){
|
||||
var activeObject = <fabric.Text>canvas.getActiveObject();
|
||||
var activeObject = <fabric.IText>canvas.getActiveObject();
|
||||
if (activeObject && activeObject.type === 'text') {
|
||||
activeObject.lineHeight = this.value;
|
||||
canvas.renderAll();
|
||||
@@ -661,7 +661,7 @@ if (supportsColorpicker()) {
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof Cufon !== 'undefined') {
|
||||
Cufon.fonts.delicious.offsetLeft = 75;
|
||||
Cufon.fonts.delicious.offsetTop = 25;
|
||||
}
|
||||
//if (typeof Cufon !== 'undefined') {
|
||||
// Cufon.fonts.delicious.offsetLeft = 75;
|
||||
// Cufon.fonts.delicious.offsetTop = 25;
|
||||
//}
|
||||
Vendored
+1
-1
@@ -89,7 +89,7 @@ interface FileSaver extends EventTarget {
|
||||
onwriteend:Function;
|
||||
}
|
||||
|
||||
var FileSaver: {
|
||||
declare var FileSaver: {
|
||||
/**
|
||||
* When the FileSaver constructor is called, the user agent must return a new FileSaver object with readyState set to INIT.
|
||||
* This constructor must be visible when the script's global object is either a Window object or an object implementing the WorkerUtils interface.
|
||||
|
||||
Vendored
+1
-1
@@ -43,7 +43,7 @@ interface IFirebaseQuery {
|
||||
ref(): Firebase;
|
||||
}
|
||||
|
||||
class Firebase implements IFirebaseQuery {
|
||||
declare class Firebase implements IFirebaseQuery {
|
||||
constructor(firebaseURL: string);
|
||||
auth(authToken: string, onComplete?: (error: string, result: IFirebaseAuthResult) => void, onCancel?:(error: string) => void): void;
|
||||
unauth(): void;
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Ronnie Haakon Hegelund <http://ronniehegelund.blogspot.dk>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
class Tracker {
|
||||
declare class Tracker {
|
||||
_trackPageview(): void;
|
||||
_getName(): string;
|
||||
_getAccount(): string;
|
||||
|
||||
Vendored
+1
-1
@@ -52,7 +52,7 @@ interface HammerDirectionEvent extends HammerEvent {
|
||||
distanceY: number;
|
||||
}
|
||||
|
||||
class Hammer {
|
||||
declare class Hammer {
|
||||
constructor (element: any, options?: HammerOptions);
|
||||
|
||||
ondragstart: (event: HammerDirectionEvent) => void;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
///<reference path="icheck.d.ts" />
|
||||
///<reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
$('input').iCheck({
|
||||
labelHover: false,
|
||||
cursor: true
|
||||
});
|
||||
|
||||
// customize all inputs (will search for checkboxes and radio buttons)
|
||||
$('input').iCheck();
|
||||
|
||||
// handle inputs only inside $('.block')
|
||||
$('.block input').iCheck();
|
||||
|
||||
// handle only checkboxes inside $('.test')
|
||||
$('.test input').iCheck({
|
||||
handle: 'checkbox'
|
||||
});
|
||||
|
||||
// handle .vote class elements (will search inside the element, if it's not an input)
|
||||
$('.vote').iCheck();
|
||||
|
||||
// you can also change options after inputs are customized
|
||||
$('input.some').iCheck({
|
||||
// different options
|
||||
});
|
||||
|
||||
$('input').on('ifChecked', function (event) {
|
||||
alert(event.type + ' callback');
|
||||
});
|
||||
|
||||
$('input').iCheck('check', function () {
|
||||
alert('Well done, Sir');
|
||||
});
|
||||
Vendored
+3
-3
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Dániel Tar https://github.com/qcz
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare interface ICheckOptions {
|
||||
interface ICheckOptions {
|
||||
/**
|
||||
* 'checkbox' or 'radio' to style only checkboxes or radio buttons, both by default
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ declare interface ICheckOptions {
|
||||
insert?: string;
|
||||
}
|
||||
|
||||
declare interface JQuery {
|
||||
interface JQuery {
|
||||
iCheck(options?: ICheckOptions): JQuery;
|
||||
iCheck(command: string): void;
|
||||
iCheck(command: string, callback?: () => void): void;
|
||||
}
|
||||
Vendored
+1
-1
@@ -32,7 +32,7 @@ interface iScrollOptions {
|
||||
onDestroy?: iScrollEvent;
|
||||
}
|
||||
|
||||
class iScroll {
|
||||
declare class iScroll {
|
||||
|
||||
constructor (element: string);
|
||||
constructor (element: string, options: iScrollOptions);
|
||||
|
||||
Vendored
+1
-1
@@ -57,7 +57,7 @@ interface iScrollOptions {
|
||||
onZoomEnd?: iScrollEvent;
|
||||
}
|
||||
|
||||
class iScroll {
|
||||
declare class iScroll {
|
||||
|
||||
constructor (element: string);
|
||||
constructor (element: string, options: iScrollOptions);
|
||||
|
||||
Vendored
+12
-12
@@ -8,28 +8,28 @@
|
||||
/**
|
||||
* Complets an asynchronous task, allowing Jake's execution to proceed to the next task
|
||||
*/
|
||||
function complete(): void;
|
||||
declare function complete(): void;
|
||||
|
||||
/**
|
||||
* Creates a description for a Jake Task (or FileTask, DirectoryTask). When invoked, the description that iscreated will be associated with whatever Task is created next.
|
||||
* @param description The description for the Task
|
||||
*/
|
||||
function desc(description:string): void;
|
||||
declare function desc(description:string): void;
|
||||
|
||||
/**
|
||||
* Creates a Jake DirectoryTask. Can be used as a prerequisite for FileTasks, or for simply ensuring a directory exists for use with a Task's action.
|
||||
* @param name The name of the DiretoryTask
|
||||
*/
|
||||
function directory(name:string): jake.DirectoryTask;
|
||||
declare function directory(name:string): jake.DirectoryTask;
|
||||
|
||||
|
||||
/**
|
||||
* Causes Jake execution to abort with an error. Allows passing an optional error code, which will be used to set the exit-code of exiting process.
|
||||
* @param err The error to thow when aborting execution. If this argument is an Error object, it will simply be thrown. If a String, it will be used as the error-message. (If it is a multi-line String, the first line will be used as the Error message, and the remaining lines will be used as the error-stack.)
|
||||
*/
|
||||
function fail(...err:string[]): void;
|
||||
function fail(...err:Error[]): void;
|
||||
function fail(...err:any[]): void;
|
||||
declare function fail(...err:string[]): void;
|
||||
declare function fail(...err:Error[]): void;
|
||||
declare function fail(...err:any[]): void;
|
||||
|
||||
/**
|
||||
* Creates a Jake FileTask.
|
||||
@@ -38,14 +38,14 @@ function fail(...err:any[]): void;
|
||||
* @param action The action to perform for this task
|
||||
* @param opts Perform this task asynchronously. If you flag a task with this option, you must call the global `complete` method inside the task's action, for execution to proceed to the next task.
|
||||
*/
|
||||
function file(name:string, prereqs?:string[], action?:()=>void, opts?:jake.FileTaskOptions): jake.FileTask;
|
||||
declare function file(name:string, prereqs?:string[], action?:()=>void, opts?:jake.FileTaskOptions): jake.FileTask;
|
||||
|
||||
/**
|
||||
* Creates a namespace which allows logical grouping of tasks, and prevents name-collisions with task-names. Namespaces can be nested inside of other namespaces.
|
||||
* @param name The name of the namespace
|
||||
* @param scope The enclosing scope for the namespaced tasks
|
||||
*/
|
||||
function namespace(name:string, scope:()=>void): void;
|
||||
declare function namespace(name:string, scope:()=>void): void;
|
||||
|
||||
/**
|
||||
* @param name The name of the Task
|
||||
@@ -53,11 +53,11 @@ function namespace(name:string, scope:()=>void): void;
|
||||
* @param action The action to perform for this task
|
||||
* @param opts
|
||||
*/
|
||||
function task(name:string, prereqs?:string[], action?:(...params:any[])=>any, opts?:jake.TaskOptions): jake.Task;
|
||||
function task(name:string, action?:(...params:any[])=>any, opts?:jake.TaskOptions): jake.Task;
|
||||
function task(name:string, opts?:jake.TaskOptions, action?:(...params:any[])=>any): jake.Task;
|
||||
declare function task(name:string, prereqs?:string[], action?:(...params:any[])=>any, opts?:jake.TaskOptions): jake.Task;
|
||||
declare function task(name:string, action?:(...params:any[])=>any, opts?:jake.TaskOptions): jake.Task;
|
||||
declare function task(name:string, opts?:jake.TaskOptions, action?:(...params:any[])=>any): jake.Task;
|
||||
|
||||
module jake{
|
||||
declare module jake{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// File-utils //////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,6 @@ interface ClientSideLoggingObject {
|
||||
|
||||
interface JQueryStatic {
|
||||
info: (what?: any) => any;
|
||||
error: (what?: any) => any;
|
||||
log: (what?: any) => any;
|
||||
clientSideLogging: (options: ClientSideLoggingObject) => any;
|
||||
}
|
||||
|
||||
@@ -1086,6 +1086,11 @@ $(document).ready( function() {
|
||||
} );
|
||||
} );
|
||||
|
||||
/*
|
||||
|
||||
This test does not compile, because - for some hard to find reason - the compiler is missing the aTargets
|
||||
property of the second element.
|
||||
|
||||
// Using aoColumnDefs
|
||||
$(document).ready( function() {
|
||||
$('#example').dataTable( {
|
||||
@@ -1098,6 +1103,8 @@ $(document).ready( function() {
|
||||
} );
|
||||
} );
|
||||
|
||||
*/
|
||||
|
||||
// Using aoColumns
|
||||
$(document).ready( function() {
|
||||
$('#example').dataTable( {
|
||||
|
||||
+68
-68
@@ -27,30 +27,30 @@ declare module DataTables
|
||||
_(selector:JQuery, opts?:RowParams): any[];
|
||||
|
||||
/// Add a single new row or multiple rows of data to the table.
|
||||
fnAddData(data:any, redraw?:bool) : number[];
|
||||
fnAddData(data:any, redraw?:boolean) : number[];
|
||||
|
||||
/// This function will make DataTables recalculate the column sizes.
|
||||
fnAdjustColumnSizing(redraw? : bool) : void;
|
||||
fnAdjustColumnSizing(redraw? : boolean) : void;
|
||||
|
||||
/// Quickly and simply clear a table
|
||||
fnClearTable(redraw? : bool) : void;
|
||||
fnClearTable(redraw? : boolean) : void;
|
||||
|
||||
/// The exact opposite of 'opening' a row, this function will close any rows which are currently 'open'.
|
||||
fnClose(node: Node) : number;
|
||||
|
||||
/// Remove a row for the table
|
||||
fnDeleteRow(index: number, callback?: () => void, redraw?: bool) : any[];
|
||||
fnDeleteRow(tr: Node, callback?: () => void, redraw?: bool) : any[];
|
||||
fnDeleteRow(index: number, callback?: () => void, redraw?: boolean) : any[];
|
||||
fnDeleteRow(tr: Node, callback?: () => void, redraw?: boolean) : any[];
|
||||
|
||||
/// Restore the table to it's original state in the DOM by removing all of DataTables enhancements,
|
||||
/// alterations to the DOM structure of the table and event listeners.
|
||||
fnDestroy(remove?: bool) : void;
|
||||
fnDestroy(remove?: boolean) : void;
|
||||
|
||||
/// Redraw the table
|
||||
fnDraw(complete? : bool) : void;
|
||||
fnDraw(complete? : boolean) : void;
|
||||
|
||||
/// Filter the input based on data
|
||||
fnFilter(input: string, column? : number, regex?: bool, smart? : bool, showGlobal?: bool, caseInsensitive? : bool) : void;
|
||||
fnFilter(input: string, column? : number, regex?: boolean, smart? : boolean, showGlobal?: boolean, caseInsensitive? : boolean) : void;
|
||||
|
||||
/// Get the data for the whole table, an individual row or an individual cell based on the provided parameters.
|
||||
fnGetData(row?: Node, col? : number) : any;
|
||||
@@ -63,7 +63,7 @@ declare module DataTables
|
||||
fnGetPosition(node: Node) : any; // number | number[]
|
||||
|
||||
/// Check to see if a row is 'open' or not.
|
||||
fnIsOpen(tr: Node) : bool;
|
||||
fnIsOpen(tr: Node) : boolean;
|
||||
|
||||
/// This function will place a new row directly after a row which is currently on display on the page,
|
||||
/// with the HTML contents that is passed into the function.
|
||||
@@ -72,11 +72,11 @@ declare module DataTables
|
||||
fnOpen(node: Node, html: JQuery, clazz: string) : Node;
|
||||
|
||||
/// Change the pagination - provides the internal logic for pagination in a simple API function.
|
||||
fnPageChange(action: string, redraw?: bool) : void;
|
||||
fnPageChange(page: number, redraw?: bool) : void;
|
||||
fnPageChange(action: string, redraw?: boolean) : void;
|
||||
fnPageChange(page: number, redraw?: boolean) : void;
|
||||
|
||||
/// Show a particular column
|
||||
fnSetColumnVis(column: number, show: bool, redraw?: bool) : void;
|
||||
fnSetColumnVis(column: number, show: boolean, redraw?: boolean) : void;
|
||||
|
||||
/// Get the settings for a particular table for external manipulation
|
||||
fnSettings() : Settings;
|
||||
@@ -90,25 +90,25 @@ declare module DataTables
|
||||
|
||||
/// Update a table cell or row - this method will accept either a single value to update the cell with,
|
||||
/// an array of values with one element for each column or an object in the same format as the original data source.
|
||||
fnUpdate(data: any, row: Node, column?:number, redraw?: bool, action? : bool) : number;
|
||||
fnUpdate(data: any, dataIndex: number, column?:number, redraw?: bool, action? : bool) : number;
|
||||
fnUpdate(data: any, row: Node, column?:number, redraw?: boolean, action? : boolean) : number;
|
||||
fnUpdate(data: any, dataIndex: number, column?:number, redraw?: boolean, action? : boolean) : number;
|
||||
|
||||
/// Provide a common method for plug-ins to check the version of DataTables being used,
|
||||
/// in order to ensure compatibility.
|
||||
fnVersionCheck(version: string) : bool;
|
||||
fnVersionCheck(version: string) : boolean;
|
||||
}
|
||||
|
||||
export interface Static
|
||||
{
|
||||
/// Provide a common method for plug-ins to check the version of DataTables being used,
|
||||
/// in order to ensure compatibility.
|
||||
fnVersionCheck(version: string) : bool;
|
||||
fnVersionCheck(version: string) : boolean;
|
||||
|
||||
/// Check if a TABLE node is a DataTable table already or not.
|
||||
fnIsDataTable(table: Node) : bool;
|
||||
fnIsDataTable(table: Node) : boolean;
|
||||
|
||||
/// Get all DataTable tables that have been initialised.
|
||||
fnTables(visible? : bool) : Node[];
|
||||
fnTables(visible? : boolean) : Node[];
|
||||
}
|
||||
|
||||
export interface RowParams
|
||||
@@ -138,24 +138,24 @@ declare module DataTables
|
||||
aoColumnDefs?: ColumnDef[];
|
||||
aoSearchCols?: any[];
|
||||
asStripClasses?: string[];
|
||||
bAutoWidth?: bool;
|
||||
bDeferRender?: bool;
|
||||
bDestroy?: bool;
|
||||
bFilter?: bool;
|
||||
bInfo?: bool;
|
||||
bJQueryUI?: bool;
|
||||
bLengthChange?: bool;
|
||||
bPaginate?: bool;
|
||||
bProcessing?: bool;
|
||||
bRetrieve?: bool;
|
||||
bScrollAutoCss?: bool;
|
||||
bScrollCollapse?: bool;
|
||||
bScrollInfinite?: bool;
|
||||
bServerSide?: bool;
|
||||
bSort?: bool;
|
||||
bSortCellsTop?: bool;
|
||||
bSortClasses?: bool;
|
||||
bStateSave?: bool;
|
||||
bAutoWidth?: boolean;
|
||||
bDeferRender?: boolean;
|
||||
bDestroy?: boolean;
|
||||
bFilter?: boolean;
|
||||
bInfo?: boolean;
|
||||
bJQueryUI?: boolean;
|
||||
bLengthChange?: boolean;
|
||||
bPaginate?: boolean;
|
||||
bProcessing?: boolean;
|
||||
bRetrieve?: boolean;
|
||||
bScrollAutoCss?: boolean;
|
||||
bScrollCollapse?: boolean;
|
||||
bScrollInfinite?: boolean;
|
||||
bServerSide?: boolean;
|
||||
bSort?: boolean;
|
||||
bSortCellsTop?: boolean;
|
||||
bSortClasses?: boolean;
|
||||
bStateSave?: boolean;
|
||||
fnCookieCallback?: CookieCallback;
|
||||
fnCreatedRow?: RowCreatedCallback;
|
||||
fnDrawCallback?: DrawCallback;
|
||||
@@ -227,10 +227,10 @@ declare module DataTables
|
||||
{
|
||||
aDataSort?: number[];
|
||||
asSorting?: string[];
|
||||
bSearchable? : bool;
|
||||
bSortable? : bool;
|
||||
bVisible? : bool;
|
||||
_bAutoType? : bool;
|
||||
bSearchable? : boolean;
|
||||
bSortable? : boolean;
|
||||
bVisible? : boolean;
|
||||
_bAutoType? : boolean;
|
||||
fnCreatedCell?: CreatedCell;
|
||||
iDataSort?: number;
|
||||
mData?: any;
|
||||
@@ -257,7 +257,7 @@ declare module DataTables
|
||||
oFeatures : Features;
|
||||
oScroll: ScrollingSettings;
|
||||
oLanguage : { fnInfoCallback : InfoCallback; };
|
||||
oBrowser : { bScrollOversize : bool; };
|
||||
oBrowser : { bScrollOversize : boolean; };
|
||||
aanFeatures: Node[][];
|
||||
aoData: Row[];
|
||||
aiDisplay: number[];
|
||||
@@ -289,8 +289,8 @@ declare module DataTables
|
||||
nTFoot: Node;
|
||||
nTBody: Node;
|
||||
nTableWrapper: Node;
|
||||
bDeferLoading: bool;
|
||||
bInitialized: bool;
|
||||
bDeferLoading: boolean;
|
||||
bInitialized: boolean;
|
||||
aoOpenRows: any[];
|
||||
sDom: string;
|
||||
sPaginationType: string;
|
||||
@@ -302,7 +302,7 @@ declare module DataTables
|
||||
oLoadedState: any;
|
||||
sAjaxSource: string;
|
||||
sAjaxDataProp: string;
|
||||
bAjaxDataGet: bool;
|
||||
bAjaxDataGet: boolean;
|
||||
jqXHR: any;
|
||||
fnServerData: any;
|
||||
aoServerParams: any[];
|
||||
@@ -310,18 +310,18 @@ declare module DataTables
|
||||
fnFormatNumber: FormatNumber;
|
||||
aLengthMenu: any[];
|
||||
iDraw: number;
|
||||
bDrawing: bool;
|
||||
bDrawing: boolean;
|
||||
iDrawError: number;
|
||||
_iDisplayLength: number;
|
||||
_iDisplayStart: number;
|
||||
_iDisplayEnd: number;
|
||||
_iRecordsTotal: number;
|
||||
_iRecordsDisplay: number;
|
||||
bJUI: bool;
|
||||
bJUI: boolean;
|
||||
oClasses: any;
|
||||
bFiltered: bool;
|
||||
bSorted: bool;
|
||||
bSortCellsTop: bool;
|
||||
bFiltered: boolean;
|
||||
bSorted: boolean;
|
||||
bSortCellsTop: boolean;
|
||||
oInit: any;
|
||||
aoDestroyCallback: any[];
|
||||
fnRecordsTotal: () => number;
|
||||
@@ -336,24 +336,24 @@ declare module DataTables
|
||||
|
||||
export interface Features
|
||||
{
|
||||
bAutoWidth: bool;
|
||||
bDeferRender: bool;
|
||||
bFilter: bool;
|
||||
bInfo: bool;
|
||||
bLengthChange: bool;
|
||||
bPaginate: bool;
|
||||
bProcessing: bool;
|
||||
bServerSize: bool;
|
||||
bSort: bool;
|
||||
bSortClasses: bool;
|
||||
bStateSave: bool;
|
||||
bAutoWidth: boolean;
|
||||
bDeferRender: boolean;
|
||||
bFilter: boolean;
|
||||
bInfo: boolean;
|
||||
bLengthChange: boolean;
|
||||
bPaginate: boolean;
|
||||
bProcessing: boolean;
|
||||
bServerSize: boolean;
|
||||
bSort: boolean;
|
||||
bSortClasses: boolean;
|
||||
bStateSave: boolean;
|
||||
}
|
||||
|
||||
export interface ScrollingSettings
|
||||
{
|
||||
bAutoCss : bool;
|
||||
bCollapse: bool;
|
||||
bInfinite: bool;
|
||||
bAutoCss : boolean;
|
||||
bCollapse: boolean;
|
||||
bInfinite: boolean;
|
||||
iBarWidth: number;
|
||||
iLoadGap: number;
|
||||
sX: string;
|
||||
@@ -373,10 +373,10 @@ declare module DataTables
|
||||
{
|
||||
aDataSort: any;
|
||||
asSorting: string[];
|
||||
bSearchable : bool;
|
||||
bSortable : bool;
|
||||
bVisible : bool;
|
||||
_bAutoType : bool;
|
||||
bSearchable : boolean;
|
||||
bSortable : boolean;
|
||||
bVisible : boolean;
|
||||
_bAutoType : boolean;
|
||||
fnCreatedCell: CreatedCell;
|
||||
fnGetData: (data: any, specific: string) => any;
|
||||
fnSetData: (data: any, value: any) => void;
|
||||
@@ -439,7 +439,7 @@ declare module DataTables
|
||||
|
||||
export interface PreDrawCallback
|
||||
{
|
||||
(settings: Settings) : bool;
|
||||
(settings: Settings) : boolean;
|
||||
}
|
||||
|
||||
export interface RowCallback
|
||||
|
||||
Vendored
+4
-4
@@ -3,9 +3,9 @@
|
||||
// Definitions by: Dániel Tar <https://github.com/qcz/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="jquery.d.ts"/>
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
declare interface JScrollPaneSettings {
|
||||
interface JScrollPaneSettings {
|
||||
/**
|
||||
* Whether arrows should be shown on the generated scroll pane. When set to false only the scrollbar
|
||||
* track and drag will be shown, if set to true then arrows buttons will also be shown.
|
||||
@@ -141,7 +141,7 @@ declare interface JScrollPaneSettings {
|
||||
trackClickRepeatFreq?: number;
|
||||
}
|
||||
|
||||
declare interface JScrollPaneApi {
|
||||
interface JScrollPaneApi {
|
||||
/**
|
||||
* Reinitialises the scroll pane (if it's internal dimensions have changed since the last time it was initialised).
|
||||
* The settings object which is passed in will override any settings from the previous time it was initialised -
|
||||
@@ -308,7 +308,7 @@ declare interface JScrollPaneApi {
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
declare interface JQuery {
|
||||
interface JQuery {
|
||||
/**
|
||||
* Initialises the jScrollPane on the JQuery object.
|
||||
*/
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: mzeiher <https://github.com/mzeiher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
module jszip {
|
||||
declare module jszip {
|
||||
export interface JSZip {
|
||||
/**
|
||||
* Get a file from the archive
|
||||
|
||||
+2
-2
@@ -21,14 +21,14 @@ interface KnockoutMappingOptions {
|
||||
include?: string[];
|
||||
copy?: string[];
|
||||
mappedProperties?: string[];
|
||||
deferEvaluation?: bool;
|
||||
deferEvaluation?: boolean;
|
||||
create?: (options: KnockoutMappingCreateOptions) => void;
|
||||
update?: (options: KnockoutMappingUpdateOptions) => void;
|
||||
key?: (data: any) => any;
|
||||
}
|
||||
|
||||
interface KnockoutMapping {
|
||||
isMapped(viewModel: any): bool;
|
||||
isMapped(viewModel: any): boolean;
|
||||
fromJS(jsObject: any): any;
|
||||
fromJS(jsObject: any, targetOrOptions: any): any;
|
||||
fromJS(jsObject: any, inputOptions: any, target: any): any;
|
||||
|
||||
Vendored
+3
-3
@@ -79,8 +79,7 @@ interface KnockoutObservableArrayStatic {
|
||||
|
||||
fn: KnockoutObservableArrayFunctions<any>;
|
||||
|
||||
<T>(): KnockoutObservableArray<T>;
|
||||
<T>(value: T[]): KnockoutObservableArray<T>;
|
||||
<T>(value?: T[]): KnockoutObservableArray<T>;
|
||||
}
|
||||
|
||||
interface KnockoutObservableArray<T> extends KnockoutObservableArrayFunctions<T> {
|
||||
@@ -95,7 +94,6 @@ interface KnockoutObservableStatic {
|
||||
fn: KnockoutObservableFunctions;
|
||||
|
||||
<T>(value?: T): KnockoutObservable<T>;
|
||||
<T>(): KnockoutObservable<T>;
|
||||
}
|
||||
|
||||
/** use as method to get/set the value */
|
||||
@@ -135,6 +133,8 @@ interface KnockoutBindingHandler {
|
||||
}
|
||||
|
||||
interface KnockoutBindingHandlers {
|
||||
[bindingHandler: string]: KnockoutBindingHandler;
|
||||
|
||||
// Controlling text and appearance
|
||||
visible: KnockoutBindingHandler;
|
||||
text: KnockoutBindingHandler;
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
// todo: jQuery plugin, RxJS Binding
|
||||
|
||||
module linq {
|
||||
declare module linq {
|
||||
|
||||
interface EnumerableStatic {
|
||||
Choice(...contents: any[]): Enumerable;
|
||||
|
||||
Vendored
+66
@@ -115,6 +115,39 @@ interface Moment {
|
||||
daysInMonth(): number;
|
||||
isDST(): bool;
|
||||
|
||||
isBefore(b: Moment): bool;
|
||||
isBefore(b: string): bool;
|
||||
isBefore(b: Number): bool;
|
||||
isBefore(b: Date): bool;
|
||||
isBefore(b: Array): bool;
|
||||
isBefore(b: Moment, granularity: string): bool;
|
||||
isBefore(b: String, granularity: string): bool;
|
||||
isBefore(b: Number, granularity: string): bool;
|
||||
isBefore(b: Date, granularity: string): bool;
|
||||
isBefore(b: Array, granularity: string): bool;
|
||||
|
||||
isAfter(b: Moment): bool;
|
||||
isAfter(b: string): bool;
|
||||
isAfter(b: Number): bool;
|
||||
isAfter(b: Date): bool;
|
||||
isAfter(b: Array): bool;
|
||||
isAfter(b: Moment, granularity: string): bool;
|
||||
isAfter(b: String, granularity: string): bool;
|
||||
isAfter(b: Number, granularity: string): bool;
|
||||
isAfter(b: Date, granularity: string): bool;
|
||||
isAfter(b: Array, granularity: string): bool;
|
||||
|
||||
isSame(b: Moment): bool;
|
||||
isSame(b: string): bool;
|
||||
isSame(b: Number): bool;
|
||||
isSame(b: Date): bool;
|
||||
isSame(b: Array): bool;
|
||||
isSame(b: Moment, granularity: string): bool;
|
||||
isSame(b: String, granularity: string): bool;
|
||||
isSame(b: Number, granularity: string): bool;
|
||||
isSame(b: Date, granularity: string): bool;
|
||||
isSame(b: Array, granularity: string): bool;
|
||||
|
||||
lang(language: string);
|
||||
lang(reset: bool);
|
||||
lang(): string;
|
||||
@@ -220,6 +253,39 @@ interface MomentStatic {
|
||||
duration(input: MomentInput): Duration;
|
||||
duration(object: any): Duration;
|
||||
duration(): Duration;
|
||||
|
||||
isBefore(b: Moment): bool;
|
||||
isBefore(b: string): bool;
|
||||
isBefore(b: Number): bool;
|
||||
isBefore(b: Date): bool;
|
||||
isBefore(b: Array): bool;
|
||||
isBefore(b: Moment, granularity: string): bool;
|
||||
isBefore(b: String, granularity: string): bool;
|
||||
isBefore(b: Number, granularity: string): bool;
|
||||
isBefore(b: Date, granularity: string): bool;
|
||||
isBefore(b: Array, granularity: string): bool;
|
||||
|
||||
isAfter(b: Moment): bool;
|
||||
isAfter(b: string): bool;
|
||||
isAfter(b: Number): bool;
|
||||
isAfter(b: Date): bool;
|
||||
isAfter(b: Array): bool;
|
||||
isAfter(b: Moment, granularity: string): bool;
|
||||
isAfter(b: String, granularity: string): bool;
|
||||
isAfter(b: Number, granularity: string): bool;
|
||||
isAfter(b: Date, granularity: string): bool;
|
||||
isAfter(b: Array, granularity: string): bool;
|
||||
|
||||
isSame(b: Moment): bool;
|
||||
isSame(b: string): bool;
|
||||
isSame(b: Number): bool;
|
||||
isSame(b: Date): bool;
|
||||
isSame(b: Array): bool;
|
||||
isSame(b: Moment, granularity: string): bool;
|
||||
isSame(b: String, granularity: string): bool;
|
||||
isSame(b: Number, granularity: string): bool;
|
||||
isSame(b: Date, granularity: string): bool;
|
||||
isSame(b: Array, granularity: string): bool;
|
||||
}
|
||||
|
||||
declare var moment: MomentStatic;
|
||||
|
||||
Vendored
+1
-1
@@ -18,4 +18,4 @@ interface MousetrapStatic {
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
var Mousetrap: MousetrapStatic;
|
||||
declare var Mousetrap: MousetrapStatic;
|
||||
|
||||
Vendored
+1
-1
@@ -87,7 +87,7 @@ interface NvRFBDefaults {
|
||||
onFBResize?: (rfb: RFB, width: number, height: number) => void;
|
||||
}
|
||||
|
||||
class RFB {
|
||||
declare class RFB {
|
||||
constructor(defaults);
|
||||
set_local_cursor(cursor): void;
|
||||
get_display(): Display;
|
||||
|
||||
Vendored
+1
-1
@@ -929,7 +929,7 @@ declare module "crypto" {
|
||||
export function createHash(algorithm: string): Hash;
|
||||
export function createHmac(algorithm: string, key: string): Hmac;
|
||||
interface Hash {
|
||||
update(data: any, input_encoding?: string): void;
|
||||
update(data: any, input_encoding?: string): Hash;
|
||||
digest(encoding?: string): string;
|
||||
}
|
||||
interface Hmac {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/// <reference path='zmq.d.ts' />
|
||||
|
||||
import zeromq = module('zmq');
|
||||
var zmq: zeromq;
|
||||
import zmq = module('zmq');
|
||||
|
||||
function test1() {
|
||||
var sock = zmq.socket('push');
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Dave McKeown <http://github.com/davemckeown>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare interface EventEmitter {};
|
||||
interface EventEmitter {}
|
||||
|
||||
declare module 'zmq' {
|
||||
|
||||
|
||||
Vendored
+17
-17
@@ -122,23 +122,23 @@ declare module "restify" {
|
||||
export function createStringClient(options?: ClientOptions): Client;
|
||||
export function createClient(options?: ClientOptions): HttpClient;
|
||||
|
||||
export class ConflictError { constructor(message?: any); };
|
||||
export class InvalidArguementError { constructor(message?: any); };
|
||||
export class RestError { constructor(message?: any); };
|
||||
export class BadDigestError { constructor(message: any); };
|
||||
export class BadMethodError { constructor(message: any); };
|
||||
export class BadRequestError { constructor(message: any); };
|
||||
export class InternalError { constructor(message: any); };
|
||||
export class InvalidContentError { constructor(message: any); };
|
||||
export class InvalidCredentialsError { constructor(message: any); };
|
||||
export class InvalidHeaderError { constructor(message: any); };
|
||||
export class InvalidVersionError { constructor(message: any); };
|
||||
export class MissingParameterError { constructor(message: any); };
|
||||
export class NotAuthorizedError { constructor(message: any); };
|
||||
export class RequestExpiredError { constructor(message: any); };
|
||||
export class RequestThrottledError { constructor(message: any); };
|
||||
export class ResourceNotFoundError { constructor(message: any); };
|
||||
export class WrongAcceptError { constructor(message: any); };
|
||||
export class ConflictError { constructor(message?: any); }
|
||||
export class InvalidArguementError { constructor(message?: any); }
|
||||
export class RestError { constructor(message?: any); }
|
||||
export class BadDigestError { constructor(message: any); }
|
||||
export class BadMethodError { constructor(message: any); }
|
||||
export class BadRequestError { constructor(message: any); }
|
||||
export class InternalError { constructor(message: any); }
|
||||
export class InvalidContentError { constructor(message: any); }
|
||||
export class InvalidCredentialsError { constructor(message: any); }
|
||||
export class InvalidHeaderError { constructor(message: any); }
|
||||
export class InvalidVersionError { constructor(message: any); }
|
||||
export class MissingParameterError { constructor(message: any); }
|
||||
export class NotAuthorizedError { constructor(message: any); }
|
||||
export class RequestExpiredError { constructor(message: any); }
|
||||
export class RequestThrottledError { constructor(message: any); }
|
||||
export class ResourceNotFoundError { constructor(message: any); }
|
||||
export class WrongAcceptError { constructor(message: any); }
|
||||
|
||||
export function acceptParser(parser: any);
|
||||
export function authorizationParser();
|
||||
|
||||
Vendored
+71
-71
@@ -50,8 +50,8 @@ declare module Rx {
|
||||
contains(item: _IDisposable): bool;
|
||||
toArray(): _IDisposable[];
|
||||
}
|
||||
export module CompositeDisposable {
|
||||
function new (...disposables: _IDisposable[]): ICompositeDisposable;
|
||||
export interface CompositeDisposable {
|
||||
(...disposables: _IDisposable[]): ICompositeDisposable;
|
||||
}
|
||||
|
||||
// Main disposable class
|
||||
@@ -61,11 +61,11 @@ declare module Rx {
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
export module Disposable {
|
||||
function new (action: () =>void ): IDisposable;
|
||||
export interface Disposable {
|
||||
(action: () =>void ): IDisposable;
|
||||
|
||||
function create(action: () =>void ): _IDisposable;
|
||||
var empty: _IDisposable;
|
||||
create(action: () =>void ): _IDisposable;
|
||||
empty: _IDisposable;
|
||||
}
|
||||
|
||||
// Single assignment
|
||||
@@ -78,8 +78,8 @@ declare module Rx {
|
||||
getDisposable(): _IDisposable;
|
||||
setDisposable(value: _IDisposable): void;
|
||||
}
|
||||
export module SingleAssignmentDisposable {
|
||||
function new (): ISingleAssignmentDisposable;
|
||||
export interface SingleAssignmentDisposable {
|
||||
(): ISingleAssignmentDisposable;
|
||||
}
|
||||
|
||||
// Multiple assignment disposable
|
||||
@@ -92,8 +92,8 @@ declare module Rx {
|
||||
setDisposable(value: _IDisposable): void;
|
||||
disposable(value?: _IDisposable): _IDisposable;
|
||||
}
|
||||
export module SerialDisposable {
|
||||
function new (): ISerialDisposable;
|
||||
export interface SerialDisposable {
|
||||
(): ISerialDisposable;
|
||||
}
|
||||
|
||||
interface IRefCountDisposable {
|
||||
@@ -105,8 +105,8 @@ declare module Rx {
|
||||
dispose(): void;
|
||||
getDisposable(): _IDisposable;
|
||||
}
|
||||
export module RefCountDisposable {
|
||||
function new (disposable: _IDisposable): IRefCountDisposable;
|
||||
export interface RefCountDisposable {
|
||||
(disposable: _IDisposable): IRefCountDisposable;
|
||||
}
|
||||
|
||||
interface IScheduledItem {
|
||||
@@ -146,19 +146,19 @@ declare module Rx {
|
||||
scheduleRecursiveWithAbsolute(dueTime: number, action: (action: (dueTime: number) =>void ) =>void ): _IDisposable;
|
||||
scheduleRecursiveWithAbsoluteAndState(state: any, dueTime: number, action: (state: any, action: (state: any, dueTime: number) =>void ) =>void ): _IDisposable;
|
||||
}
|
||||
export module Scheduler {
|
||||
function new (now: () =>number,
|
||||
export interface Scheduler {
|
||||
(now: () =>number,
|
||||
schedule: (state: any, action: (scheduler: IScheduler, state: any) =>_IDisposable) => _IDisposable,
|
||||
scheduleRelative: (state: any, dueTime: number, action: (scheduler: IScheduler, state: any) =>_IDisposable) =>_IDisposable,
|
||||
scheduleAbsolute: (state: any, dueTime: number, action: (scheduler: IScheduler, state: any) =>_IDisposable) =>_IDisposable
|
||||
): IScheduler;
|
||||
|
||||
function now(): number;
|
||||
function normalize(timeSpan: number): number;
|
||||
now(): number;
|
||||
normalize(timeSpan: number): number;
|
||||
|
||||
var immediate: IScheduler;
|
||||
var currentThread: ICurrentScheduler;//IScheduler;
|
||||
var timeout: IScheduler;
|
||||
immediate: IScheduler;
|
||||
currentThread: ICurrentScheduler;//IScheduler;
|
||||
timeout: IScheduler;
|
||||
}
|
||||
|
||||
// Current Thread IScheduler
|
||||
@@ -207,13 +207,13 @@ declare module Rx {
|
||||
value?: any;
|
||||
exception?: any;
|
||||
}
|
||||
export module Notification {
|
||||
export interface Notification {
|
||||
//abstract
|
||||
//function new (): INotification;
|
||||
|
||||
function createOnNext(value: any): INotification;//ON
|
||||
function createOnError(exception): INotification;//OE
|
||||
function createOnCompleted(): INotification;//OC
|
||||
createOnNext(value: any): INotification;//ON
|
||||
createOnError(exception): INotification;//OE
|
||||
createOnCompleted(): INotification;//OC
|
||||
}
|
||||
|
||||
export module Internals {
|
||||
@@ -223,10 +223,10 @@ declare module Rx {
|
||||
getCurrent(): any;
|
||||
dispose(): void;
|
||||
}
|
||||
export module Enumerator {
|
||||
function new (moveNext: () =>bool, getCurrent: () => any, dispose: () =>void ): IEnumerator;
|
||||
export interface Enumerator {
|
||||
(moveNext: () =>bool, getCurrent: () => any, dispose: () =>void ): IEnumerator;
|
||||
|
||||
function create(moveNext: () =>bool, getCurrent: () =>any, dispose?: () =>void ): IEnumerator;
|
||||
create(moveNext: () =>bool, getCurrent: () =>any, dispose?: () =>void ): IEnumerator;
|
||||
}
|
||||
|
||||
// Enumerable
|
||||
@@ -236,12 +236,12 @@ declare module Rx {
|
||||
concat(): IObservable;
|
||||
catchException(): IObservable;
|
||||
}
|
||||
export module Enumerable {
|
||||
function new (getEnumerator: () =>IEnumerator): IEnumerable;
|
||||
export interface Enumerable {
|
||||
(getEnumerator: () =>IEnumerator): IEnumerable;
|
||||
|
||||
function repeat(value: any, repeatCount?: number): IEnumerable;
|
||||
function forEach(source: any[], selector?: (element: any, index: number) =>any): IEnumerable;
|
||||
function forEach(source: { length: number;[index: number]: any; }, selector?: (element: any, index: number) =>any): IEnumerable;
|
||||
repeat(value: any, repeatCount?: number): IEnumerable;
|
||||
forEach(source: any[], selector?: (element: any, index: number) =>any): IEnumerable;
|
||||
forEach(source: { length: number;[index: number]: any; }, selector?: (element: any, index: number) =>any): IEnumerable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,8 +285,8 @@ declare module Rx {
|
||||
_onError: (exception: any) =>void;
|
||||
_onCompleted: () =>void;
|
||||
}
|
||||
export module AnonymousObserver {
|
||||
function new (onNext: (value: any) =>void , onError: (exception: any) =>void , onCompleted: () =>void ): IAnonymousObserver;
|
||||
export interface AnonymousObserver {
|
||||
(onNext: (value: any) =>void , onError: (exception: any) =>void , onCompleted: () =>void ): IAnonymousObserver;
|
||||
}
|
||||
|
||||
interface ICheckedObserver extends IObserver {
|
||||
@@ -306,8 +306,8 @@ declare module Rx {
|
||||
|
||||
ensureActive(): void;
|
||||
}
|
||||
export module ScheduledObserver {
|
||||
function new (scheduler: IScheduler, observer: IObserver): IScheduledObserver;
|
||||
export interface ScheduledObserver {
|
||||
(scheduler: IScheduler, observer: IObserver): IScheduledObserver;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ declare module Rx {
|
||||
takeWhile(predicate: (value: any, index?: number) =>bool): IObservable;
|
||||
where(predicate: (value: any, index?: number) => bool): IObservable;
|
||||
|
||||
// time
|
||||
// time
|
||||
delay(dueTime: number, scheduler?: IScheduler): IObservable;
|
||||
throttle(dueTime: number, scheduler?: IScheduler): IObservable;
|
||||
windowWithTime(dueTime: number, timeShiftOrScheduler?: any, scheduler?: IScheduler): IObservable;
|
||||
@@ -389,41 +389,41 @@ declare module Rx {
|
||||
timeout(dueTime: number, other?: IObservable, scheduler?: IScheduler): IObservable;
|
||||
delaySubscription(dueTime: number, scheduler?: IScheduler): IObservable;
|
||||
}
|
||||
export module Observable {
|
||||
function new (subscribe: (observer: IObserver) =>_IDisposable): IObservable;
|
||||
export interface Observable {
|
||||
(subscribe: (observer: IObserver) =>_IDisposable): IObservable;
|
||||
|
||||
function start(func: () =>any, scheduler?: IScheduler, context?: any): IObservable;
|
||||
function toAsync(func: Function, scheduler?: IScheduler, context?: any): (...arguments: any[]) => IObservable;
|
||||
function create(subscribe: (Observer) =>() =>void ): IObservable;
|
||||
function createWithDisposable(subscribe: (Observer) =>_IDisposable): IObservable;
|
||||
function defer(observableFactory: () =>IObservable): IObservable;
|
||||
function empty(scheduler?: IScheduler): IObservable;
|
||||
function fromArray(array: any[], scheduler?: IScheduler): IObservable;
|
||||
function fromArray(array: { length: number;[index: number]: any; }, scheduler?: IScheduler): IObservable;
|
||||
function generate(initialState: any, condition: (state: any) =>bool, iterate: (state: any) =>any, resultSelector: (state: any) =>any, scheduler?: IScheduler): IObservable;
|
||||
function never(): IObservable;
|
||||
function range(start: number, count: number, scheduler?: IScheduler): IObservable;
|
||||
function repeat(value: any, repeatCount?: number, scheduler?: IScheduler): IObservable;
|
||||
function returnValue(value: any, scheduler?: IScheduler): IObservable;
|
||||
function throwException(exception: any, scheduler?: IScheduler): IObservable;
|
||||
function using(resourceFactory: () =>any, observableFactory: (resource: any) =>IObservable): IObservable;
|
||||
function amb(...sources: IObservable[]): IObservable;
|
||||
function catchException(sources: IObservable[]): IObservable;
|
||||
function catchException(...sources: IObservable[]): IObservable;
|
||||
function concat(...sources: IObservable[]): IObservable;
|
||||
function concat(sources: IObservable[]): IObservable;
|
||||
function merge(...sources: IObservable[]): IObservable;
|
||||
function merge(sources: IObservable[]): IObservable;
|
||||
function merge(scheduler: IScheduler, ...sources: IObservable[]): IObservable;
|
||||
function merge(scheduler: IScheduler, sources: IObservable[]): IObservable;
|
||||
function onErrorResumeNext(...sources: IObservable[]): IObservable;
|
||||
function onErrorResumeNext(sources: IObservable[]): IObservable;
|
||||
start(func: () =>any, scheduler?: IScheduler, context?: any): IObservable;
|
||||
toAsync(func: Function, scheduler?: IScheduler, context?: any): (...arguments: any[]) => IObservable;
|
||||
create(subscribe: (Observer) =>() =>void ): IObservable;
|
||||
createWithDisposable(subscribe: (Observer) =>_IDisposable): IObservable;
|
||||
defer(observableFactory: () =>IObservable): IObservable;
|
||||
empty(scheduler?: IScheduler): IObservable;
|
||||
fromArray(array: any[], scheduler?: IScheduler): IObservable;
|
||||
fromArray(array: { length: number;[index: number]: any; }, scheduler?: IScheduler): IObservable;
|
||||
generate(initialState: any, condition: (state: any) =>bool, iterate: (state: any) =>any, resultSelector: (state: any) =>any, scheduler?: IScheduler): IObservable;
|
||||
never(): IObservable;
|
||||
range(start: number, count: number, scheduler?: IScheduler): IObservable;
|
||||
repeat(value: any, repeatCount?: number, scheduler?: IScheduler): IObservable;
|
||||
returnValue(value: any, scheduler?: IScheduler): IObservable;
|
||||
throwException(exception: any, scheduler?: IScheduler): IObservable;
|
||||
using(resourceFactory: () =>any, observableFactory: (resource: any) =>IObservable): IObservable;
|
||||
amb(...sources: IObservable[]): IObservable;
|
||||
catchException(sources: IObservable[]): IObservable;
|
||||
catchException(...sources: IObservable[]): IObservable;
|
||||
concat(...sources: IObservable[]): IObservable;
|
||||
concat(sources: IObservable[]): IObservable;
|
||||
merge(...sources: IObservable[]): IObservable;
|
||||
merge(sources: IObservable[]): IObservable;
|
||||
merge(scheduler: IScheduler, ...sources: IObservable[]): IObservable;
|
||||
merge(scheduler: IScheduler, sources: IObservable[]): IObservable;
|
||||
onErrorResumeNext(...sources: IObservable[]): IObservable;
|
||||
onErrorResumeNext(sources: IObservable[]): IObservable;
|
||||
}
|
||||
|
||||
export module Internals {
|
||||
interface IAnonymousObservable extends IObservable { }
|
||||
export module AnonymousObservable {
|
||||
function new (subscribe: (observer: IObserver) =>_IDisposable): IAnonymousObservable;
|
||||
export interface AnonymousObservable {
|
||||
(subscribe: (observer: IObserver) =>_IDisposable): IAnonymousObservable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,10 +439,10 @@ declare module Rx {
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
export module Subject {
|
||||
function new (): ISubject;
|
||||
export interface Subject {
|
||||
(): ISubject;
|
||||
|
||||
function create(observer: IObserver, observable: IObservable): ISubject;
|
||||
create(observer: IObserver, observable: IObservable): ISubject;
|
||||
}
|
||||
|
||||
interface IAsyncSubject extends IObservable, IObserver {
|
||||
@@ -454,8 +454,8 @@ declare module Rx {
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
export module AsyncSubject {
|
||||
function new (): IAsyncSubject;
|
||||
export interface AsyncSubject {
|
||||
(): IAsyncSubject;
|
||||
}
|
||||
|
||||
interface IAnonymousSubject extends IObservable {
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
///<reference path="rx.js.d.ts"/>
|
||||
|
||||
declare module Rx {
|
||||
export module Observable {
|
||||
function fromEvent(element: HTMLElement, eventName: string) : IObservable;
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
/// <reference path="scroller.d.ts"/>
|
||||
|
||||
class EasyScroller {
|
||||
declare class EasyScroller {
|
||||
constructor (content: any, options: ScrollerOptions);
|
||||
|
||||
render(): void;
|
||||
|
||||
@@ -41,7 +41,7 @@ function test_canvas() {
|
||||
function test_domlist() {
|
||||
var container = document.getElementById("container");
|
||||
var content = document.getElementById("content");
|
||||
var refreshElem = <HTMLCanvasElement>content.getElementsByTagName("div")[0];
|
||||
var refreshElem = content.getElementsByTagName("div")[0];
|
||||
var scroller = new Scroller(render, {
|
||||
scrollingX: false
|
||||
});
|
||||
|
||||
Vendored
+1
-1
@@ -28,7 +28,7 @@ interface ScrollValuesWithZoom extends ScrollValues {
|
||||
zoom: number;
|
||||
}
|
||||
|
||||
class Scroller {
|
||||
declare class Scroller {
|
||||
constructor (callback: (left: number, top: number, zoom: number) => void , options: ScrollerOptions);
|
||||
|
||||
setDimensions(clientWidth: number, clientHeight: number, contentWidth: number, contentHeight: number): void;
|
||||
|
||||
Vendored
+2
-2
@@ -65,7 +65,7 @@ interface HubProxy {
|
||||
(connection: HubConnection, hubName: string): HubProxy;
|
||||
init(connection: HubConnection, hubName: string): void;
|
||||
hasSubscriptions(): bool;
|
||||
on(eventName: string, callback: (msg) => void ): HubProxy;
|
||||
on(eventName: string, callback: (...msg) => void ): HubProxy;
|
||||
off(eventName: string, callback: (msg) => void ): HubProxy;
|
||||
invoke(methodName: string, ...args: any[]): JQueryDeferred;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ interface HubConnectionSettings {
|
||||
interface HubConnection extends SignalR {
|
||||
//(url?: string, queryString?: any, logging?: bool): HubConnection;
|
||||
proxies;
|
||||
received(callback: (data: { Id; Method; Hub; State; Args; }) => void ): void;
|
||||
received(callback: (data: { Id; Method; Hub; State; Args; }) => void ): HubConnection;
|
||||
createHubProxy(hubName: string): HubProxy;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
module createjs {
|
||||
declare module createjs {
|
||||
export class FlashPlugin {
|
||||
// properties
|
||||
static BASE_PATH: string;
|
||||
|
||||
Vendored
+3
-2
@@ -7,9 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
interface WebGLRenderingContext {};
|
||||
interface WebGLRenderingContext {}
|
||||
|
||||
module THREE {
|
||||
declare module THREE {
|
||||
export var REVISION: string;
|
||||
|
||||
// GL STATE CONSTANTS
|
||||
@@ -5259,6 +5259,7 @@ module THREE {
|
||||
lensFlares: LensFlareProperty[];
|
||||
positionScreen: Vector3;
|
||||
customUpdateCallback: () => void;
|
||||
add(object: Object3D): void;
|
||||
add(texture?: Texture, size?: number, distance?: number, blending?: Blending, color?: number, opacity?: number): void;
|
||||
updateLensFlares(): void;
|
||||
}
|
||||
|
||||
+69
-63
@@ -3235,7 +3235,7 @@ interface HTMLElement{
|
||||
|
||||
// Cubes
|
||||
|
||||
var geometry = new THREE.CubeGeometry( 50, 50, 50 );
|
||||
geometry = new THREE.CubeGeometry( 50, 50, 50 );
|
||||
var materialCube = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } );
|
||||
|
||||
for ( var i = 0; i < 100; i ++ ) {
|
||||
@@ -4085,7 +4085,7 @@ var container, stats;
|
||||
|
||||
// line
|
||||
|
||||
var geometry = shape.createPointsGeometry();
|
||||
geometry = shape.createPointsGeometry();
|
||||
var materialLine = new THREE.LineBasicMaterial( { linewidth: 10, color: 0x333333, transparent: true } );
|
||||
|
||||
var line = new THREE.Line( geometry, materialLine );
|
||||
@@ -4783,7 +4783,7 @@ var container, stats;
|
||||
|
||||
// Cubes
|
||||
|
||||
var geometry = new THREE.CubeGeometry( 50, 50, 50 );
|
||||
geometry = new THREE.CubeGeometry( 50, 50, 50 );
|
||||
var cubeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } );
|
||||
|
||||
for ( var i = 0; i < 100; i ++ ) {
|
||||
@@ -5725,7 +5725,7 @@ var container, stats;
|
||||
|
||||
// Spheres
|
||||
|
||||
var geometry = new THREE.SphereGeometry( 100, 14, 7 );
|
||||
geometry = new THREE.SphereGeometry( 100, 14, 7 );
|
||||
|
||||
var materials:THREE.Material[] = [
|
||||
|
||||
@@ -6708,7 +6708,7 @@ var container, stats;
|
||||
|
||||
// https://github.com/mrdoob/three.js/blob/master/examples/canvas_particles_sprites.html
|
||||
|
||||
()=>{
|
||||
() => {
|
||||
var container, stats;
|
||||
var camera, scene, renderer, particle;
|
||||
var mouseX = 0, mouseY = 0;
|
||||
@@ -6721,43 +6721,43 @@ var container, stats;
|
||||
|
||||
function init() {
|
||||
|
||||
container = document.createElement( 'div' );
|
||||
document.body.appendChild( container );
|
||||
container = document.createElement('div');
|
||||
document.body.appendChild(container);
|
||||
|
||||
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 5000 );
|
||||
camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 5000);
|
||||
camera.position.z = 1000;
|
||||
|
||||
scene = new THREE.Scene();
|
||||
|
||||
var material = new THREE.ParticleBasicMaterial( { map: new THREE.Texture( generateSprite() ), blending: THREE.AdditiveBlending } );
|
||||
var material = new THREE.ParticleBasicMaterial({ map: new THREE.Texture(generateSprite()), blending: THREE.AdditiveBlending });
|
||||
|
||||
for ( var i = 0; i < 1000; i++ ) {
|
||||
for (var i = 0; i < 1000; i++) {
|
||||
|
||||
particle = new THREE.Particle( material );
|
||||
particle = new THREE.Particle(material);
|
||||
|
||||
initParticle( particle, i * 10 );
|
||||
initParticle(particle, i * 10);
|
||||
|
||||
scene.add( particle );
|
||||
scene.add(particle);
|
||||
}
|
||||
|
||||
renderer = new THREE.CanvasRenderer();
|
||||
renderer.setSize( window.innerWidth, window.innerHeight );
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
renderer.sortElements = false;
|
||||
renderer.setClearColorHex( 0x0000ff, 0.25 );
|
||||
container.appendChild( renderer.domElement );
|
||||
renderer.setClearColorHex(0x0000ff, 0.25);
|
||||
container.appendChild(renderer.domElement);
|
||||
|
||||
stats = new Stats();
|
||||
stats.domElement.style.position = 'absolute';
|
||||
stats.domElement.style.top = '0px';
|
||||
container.appendChild( stats.domElement );
|
||||
container.appendChild(stats.domElement);
|
||||
|
||||
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
|
||||
document.addEventListener( 'touchstart', onDocumentTouchStart, false );
|
||||
document.addEventListener( 'touchmove', onDocumentTouchMove, false );
|
||||
document.addEventListener('mousemove', onDocumentMouseMove, false);
|
||||
document.addEventListener('touchstart', onDocumentTouchStart, false);
|
||||
document.addEventListener('touchmove', onDocumentTouchMove, false);
|
||||
|
||||
//
|
||||
|
||||
window.addEventListener( 'resize', onWindowResize, false );
|
||||
window.addEventListener('resize', onWindowResize, false);
|
||||
|
||||
}
|
||||
|
||||
@@ -6769,31 +6769,31 @@ var container, stats;
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
renderer.setSize( window.innerWidth, window.innerHeight );
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
|
||||
}
|
||||
|
||||
function generateSprite() {
|
||||
|
||||
var canvas = document.createElement( 'canvas' );
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = 16;
|
||||
canvas.height = 16;
|
||||
|
||||
var context = canvas.getContext( '2d' );
|
||||
var gradient = context.createRadialGradient( canvas.width / 2, canvas.height / 2, 0, canvas.width / 2, canvas.height / 2, canvas.width / 2 );
|
||||
gradient.addColorStop( 0, 'rgba(255,255,255,1)' );
|
||||
gradient.addColorStop( 0.2, 'rgba(0,255,255,1)' );
|
||||
gradient.addColorStop( 0.4, 'rgba(0,0,64,1)' );
|
||||
gradient.addColorStop( 1, 'rgba(0,0,0,1)' );
|
||||
var context = canvas.getContext('2d');
|
||||
var gradient = context.createRadialGradient(canvas.width / 2, canvas.height / 2, 0, canvas.width / 2, canvas.height / 2, canvas.width / 2);
|
||||
gradient.addColorStop(0, 'rgba(255,255,255,1)');
|
||||
gradient.addColorStop(0.2, 'rgba(0,255,255,1)');
|
||||
gradient.addColorStop(0.4, 'rgba(0,0,64,1)');
|
||||
gradient.addColorStop(1, 'rgba(0,0,0,1)');
|
||||
|
||||
context.fillStyle = gradient;
|
||||
context.fillRect( 0, 0, canvas.width, canvas.height );
|
||||
context.fillRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
return canvas;
|
||||
|
||||
}
|
||||
|
||||
function initParticle( particle, delay ) {
|
||||
function initParticle(particle, delay) {
|
||||
|
||||
var particle = this instanceof THREE.Particle ? this : particle;
|
||||
var delay = delay !== undefined ? delay : 0;
|
||||
@@ -6803,53 +6803,53 @@ var container, stats;
|
||||
particle.position.z = 0;
|
||||
particle.scale.x = particle.scale.y = Math.random() * 3 + 1;
|
||||
|
||||
new TWEEN.Tween( particle )
|
||||
.delay( delay )
|
||||
.to( {}, 10000 )
|
||||
.onComplete( initParticle )
|
||||
new TWEEN.Tween(particle)
|
||||
.delay(delay)
|
||||
.to({}, 10000)
|
||||
.onComplete(initParticle)
|
||||
.start();
|
||||
|
||||
new TWEEN.Tween( particle.position )
|
||||
.delay( delay )
|
||||
.to( { x: Math.random() * 4000 - 2000, y: Math.random() * 1000 - 500, z: Math.random() * 4000 - 2000 }, 10000 )
|
||||
new TWEEN.Tween(particle.position)
|
||||
.delay(delay)
|
||||
.to({ x: Math.random() * 4000 - 2000, y: Math.random() * 1000 - 500, z: Math.random() * 4000 - 2000 }, 10000)
|
||||
.start();
|
||||
|
||||
new TWEEN.Tween( particle.scale )
|
||||
.delay( delay )
|
||||
.to( { x: 0, y: 0 }, 10000 )
|
||||
new TWEEN.Tween(particle.scale)
|
||||
.delay(delay)
|
||||
.to({ x: 0, y: 0 }, 10000)
|
||||
.start();
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
function onDocumentMouseMove( event ) {
|
||||
function onDocumentMouseMove(event) {
|
||||
|
||||
mouseX = event.clientX - windowHalfX;
|
||||
mouseY = event.clientY - windowHalfY;
|
||||
}
|
||||
|
||||
function onDocumentTouchStart( event ) {
|
||||
function onDocumentTouchStart(event) {
|
||||
|
||||
if ( event.touches.length == 1 ) {
|
||||
if (event.touches.length == 1) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
mouseX = event.touches[ 0 ].pageX - windowHalfX;
|
||||
mouseY = event.touches[ 0 ].pageY - windowHalfY;
|
||||
mouseX = event.touches[0].pageX - windowHalfX;
|
||||
mouseY = event.touches[0].pageY - windowHalfY;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onDocumentTouchMove( event ) {
|
||||
function onDocumentTouchMove(event) {
|
||||
|
||||
if ( event.touches.length == 1 ) {
|
||||
if (event.touches.length == 1) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
mouseX = event.touches[ 0 ].pageX - windowHalfX;
|
||||
mouseY = event.touches[ 0 ].pageY - windowHalfY;
|
||||
mouseX = event.touches[0].pageX - windowHalfX;
|
||||
mouseY = event.touches[0].pageY - windowHalfY;
|
||||
|
||||
}
|
||||
|
||||
@@ -6859,7 +6859,7 @@ var container, stats;
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimationFrame( animate );
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
render();
|
||||
stats.update();
|
||||
@@ -6870,14 +6870,16 @@ var container, stats;
|
||||
|
||||
TWEEN.update();
|
||||
|
||||
camera.position.x += ( mouseX - camera.position.x ) * 0.05;
|
||||
camera.position.y += ( - mouseY - camera.position.y ) * 0.05;
|
||||
camera.lookAt( scene.position );
|
||||
camera.position.x += (mouseX - camera.position.x) * 0.05;
|
||||
camera.position.y += (- mouseY - camera.position.y) * 0.05;
|
||||
camera.lookAt(scene.position);
|
||||
|
||||
renderer.render( scene, camera );
|
||||
renderer.render(scene, camera);
|
||||
|
||||
}
|
||||
var container, stats;
|
||||
};
|
||||
() => {
|
||||
var container, stats;
|
||||
var camera, scene, renderer, particle;
|
||||
var mouseX = 0, mouseY = 0;
|
||||
|
||||
@@ -16400,7 +16402,7 @@ function render() {
|
||||
|
||||
F.prototype = klass.prototype;
|
||||
|
||||
return new F( klass, args );
|
||||
return F( klass, args );
|
||||
|
||||
};
|
||||
|
||||
@@ -17263,7 +17265,7 @@ function render() {
|
||||
|
||||
F.prototype = klass.prototype;
|
||||
|
||||
return new F( klass, args );
|
||||
return F( klass, args );
|
||||
|
||||
};
|
||||
|
||||
@@ -20869,7 +20871,7 @@ function render() {
|
||||
|
||||
objects = [];
|
||||
|
||||
var sphere, geometry, material;
|
||||
var sphere, material;
|
||||
|
||||
for ( var i = 0, l = materials.length; i < l; i ++ ) {
|
||||
|
||||
@@ -21374,7 +21376,8 @@ function render() {
|
||||
|
||||
object: null,
|
||||
buttons: null,
|
||||
materials: null
|
||||
materials: null,
|
||||
mmap: null
|
||||
|
||||
},
|
||||
|
||||
@@ -21390,7 +21393,8 @@ function render() {
|
||||
|
||||
object: null,
|
||||
buttons: null,
|
||||
materials: null
|
||||
materials: null,
|
||||
mmap: null
|
||||
|
||||
},
|
||||
|
||||
@@ -21406,7 +21410,8 @@ function render() {
|
||||
|
||||
object: null,
|
||||
buttons: null,
|
||||
materials: null
|
||||
materials: null,
|
||||
mmap: null
|
||||
|
||||
},
|
||||
|
||||
@@ -21422,7 +21427,8 @@ function render() {
|
||||
|
||||
object: null,
|
||||
buttons: null,
|
||||
materials: null
|
||||
materials: null,
|
||||
mmap: null
|
||||
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
interface WebGLRenderingContext {}
|
||||
|
||||
module THREE {
|
||||
declare module THREE {
|
||||
export var REVISION: string;
|
||||
|
||||
// GL STATE CONSTANTS
|
||||
@@ -1277,7 +1277,7 @@ module THREE {
|
||||
degToRad(degrees: number): number;
|
||||
|
||||
radToDeg(radians: number): number;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -5777,7 +5777,8 @@ module THREE {
|
||||
constructor(texture?: Texture, size?: number, distance?: number, blending?: Blending, color?: Color);
|
||||
lensFlares: LensFlareProperty[];
|
||||
positionScreen: Vector3;
|
||||
customUpdateCallback: (object:LensFlare) => void;
|
||||
customUpdateCallback: (object: LensFlare) => void;
|
||||
add(object: Object3D): void;
|
||||
add(texture?: Texture, size?: number, distance?: number, blending?: Blending, color?: Color, opacity?: number): void;
|
||||
updateLensFlares(): void;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/// <reference path="underscore.d.ts" />
|
||||
import _ = require("underscore")
|
||||
|
||||
declare var $;
|
||||
declare function alert(any);
|
||||
|
||||
_.each([1, 2, 3], (num) => alert(num));
|
||||
_.each({ one: 1, two: 2, three: 3 }, (num, key) => alert(num));
|
||||
@@ -205,7 +206,7 @@ var moe2 = { name: 'moe' };
|
||||
moe2 === _.identity(moe);
|
||||
|
||||
var genie;
|
||||
_(3).times(function(n){ genie.grantWishNumber(n); });
|
||||
_(3).times(function (n) { genie.grantWishNumber(n); });
|
||||
|
||||
_.random(0, 100);
|
||||
|
||||
@@ -214,7 +215,6 @@ _.mixin({
|
||||
return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase();
|
||||
}
|
||||
});
|
||||
_("fabio").capitalize();
|
||||
|
||||
_.uniqueId('contact_');
|
||||
|
||||
@@ -240,10 +240,8 @@ var template2 = _.template("Hello {{ name }}!");
|
||||
template2({ name: "Mustache" });
|
||||
_.template("Using 'with': <%= data.answer %>", { answer: 'no' }, { variable: 'data' });
|
||||
|
||||
// fix: http://stackoverflow.com/questions/14585324/how-to-use-underscore-lib-from-definitelytyped-with-typescript
|
||||
// fix: https://github.com/borisyankov/DefinitelyTyped/issues/225
|
||||
declare var _: UnderscoreStatic;
|
||||
|
||||
_.countBy([1,2,3], function(item) {
|
||||
return item%2;
|
||||
|
||||
_.countBy([1, 2, 3], function (item) {
|
||||
return item % 2;
|
||||
});
|
||||
Vendored
+336
-181
@@ -3,230 +3,385 @@
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare function _<T>(value: Array<T>): _<T>;
|
||||
declare function _<T>(value: T): _<T>;
|
||||
|
||||
interface UnderscoreWrappedObject {
|
||||
value () : any;
|
||||
filter(arg?) : any;
|
||||
}
|
||||
declare module _ {
|
||||
|
||||
interface TemplateSettings {
|
||||
evaluate?: RegExp;
|
||||
interpolate?: RegExp;
|
||||
escape?: RegExp;
|
||||
}
|
||||
interface TemplateSettings {
|
||||
evaluate?: RegExp;
|
||||
interpolate?: RegExp;
|
||||
escape?: RegExp;
|
||||
}
|
||||
|
||||
interface ListIterator {
|
||||
(value, key, list?): void;
|
||||
}
|
||||
interface ListIterator<T, TResult> {
|
||||
(value: T, index: number, list?: List<T>): TResult;
|
||||
}
|
||||
|
||||
interface ObjectIterator {
|
||||
(element, index, list?): void;
|
||||
}
|
||||
interface ObjectIterator<T, TResult> {
|
||||
(element: T, key: string, list?: any): TResult;
|
||||
}
|
||||
|
||||
// Common interface between Arrays and jQuery objects
|
||||
interface List {
|
||||
[index: number]: any;
|
||||
length: number;
|
||||
}
|
||||
interface Collection<T> { }
|
||||
|
||||
interface UnderscoreStatic {
|
||||
(arg?:any) : any;
|
||||
// Common interface between Arrays and jQuery objects
|
||||
interface List<T> extends Collection<T> {
|
||||
[index: number]: T;
|
||||
length: number;
|
||||
}
|
||||
|
||||
interface Dictionary<T> extends Collection<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
|
||||
/****
|
||||
Collections
|
||||
Collections
|
||||
*****/
|
||||
each(list: List, iterator: ListIterator, context?: any): any[];
|
||||
each(object: any, iterator: ObjectIterator, context?: any): any[];
|
||||
forEach(list: List, iterator: ObjectIterator, context?: any): any[];
|
||||
forEach(object: any, iterator: ListIterator, context?: any): any[];
|
||||
export function each<T>(list: List<T>, iterator: ListIterator<T, void >, context?: any): void;
|
||||
export function each<T>(object: Dictionary<T>, iterator: ObjectIterator<T, void >, context?: any): void;
|
||||
export function forEach<T>(list: List<T>, iterator: ListIterator<T, void >, context?: any): void;
|
||||
export function forEach<T>(object: Dictionary<T>, iterator: ObjectIterator<T, void >, context?: any): void;
|
||||
|
||||
map(list: List, iterator: ListIterator, context?: any): any[];
|
||||
map(object: any, iterator: ObjectIterator, context?: any): any[];
|
||||
collect(list: List, iterator: ListIterator, context?: any): any[];
|
||||
collect(object: any, iterator: ObjectIterator, context?: any): any[];
|
||||
export function map<T, TResult>(list: List<T>, iterator: ListIterator<T, TResult>, context?: any): TResult[];
|
||||
export function map<T, TResult>(object: Dictionary<T>, iterator: ObjectIterator<T, TResult>, context?: any): TResult[];
|
||||
export function collect<T, TResult>(list: List<T>, iterator: ListIterator<T, TResult>, context?: any): TResult[];
|
||||
export function collect<T, TResult>(object: Dictionary<T>, iterator: ObjectIterator<T, TResult>, context?: any): TResult[];
|
||||
|
||||
reduce(list: List, iterator: any, memo: any, context?: any): any;
|
||||
reduce(list: any[], iterator: any, memo: any, context?: any): any;
|
||||
inject(list: List, iterator: any, memo: any, context?: any): any;
|
||||
inject(list: any[], iterator: any, memo: any, context?: any): any;
|
||||
foldl(list: List, iterator: any, memo: any, context?: any): any;
|
||||
foldl(list: any[], iterator: any, memo: any, context?: any): any;
|
||||
export function reduce<T, TResult>(list: Collection<T>, iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
export function inject<T, TResult>(list: Collection<T>, iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
|
||||
reduceRight(list: List, iterator: any, memo: any, context?: any): any[];
|
||||
reduceRight(list: any[], iterator: any, memo: any, context?: any): any[];
|
||||
foldr(list: List, iterator: any, memo: any, context?: any): any[];
|
||||
foldr(list: any[], iterator: any, memo: any, context?: any): any[];
|
||||
export function reduceRight<T, TResult>(list: Collection<T>, iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
export function foldr<T, TResult>(list: Collection<T>, iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
|
||||
find(list: List, iterator: any, context?: any): any;
|
||||
find(list: any[], iterator: any, context?: any): any;
|
||||
detect(list: List, iterator: any, context?: any): any;
|
||||
detect(list: any[], iterator: any, context?: any): any;
|
||||
export function find<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): T;
|
||||
export function detect<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): T;
|
||||
|
||||
filter(list: List, iterator: any, context?: any): any[];
|
||||
filter(list: any[], iterator: any, context?: any): any[];
|
||||
select(list: List, iterator: any, context?: any): any[];
|
||||
select(list: any[], iterator: any, context?: any): any[];
|
||||
export function filter<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): T[];
|
||||
export function select<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): T[];
|
||||
|
||||
where(list: List, properties: any): any[];
|
||||
where(list: any[], properties: any): any[];
|
||||
export function where<T>(list: Collection<T>, properties: any): T[];
|
||||
|
||||
reject(list: List, iterator: any, context?: any): any[];
|
||||
reject(list: any[], iterator: any, context?: any): any[];
|
||||
export function reject<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): T[];
|
||||
|
||||
all(list: List, iterator: any, context?: any): bool;
|
||||
all(list: any[], iterator: any, context?: any): bool;
|
||||
every(list: List, iterator: any, context?: any): bool;
|
||||
every(list: any[], iterator: any, context?: any): bool;
|
||||
export function all<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): boolean;
|
||||
export function every<T>(list: Collection<T>, iterator: (x: T) => boolean, context?: any): boolean;
|
||||
|
||||
any(list: List, iterator?: any, context?: any): bool;
|
||||
any(list: any[], iterator?: any, context?: any): bool;
|
||||
some(list: List, iterator?: any, context?: any): bool;
|
||||
some(list: any[], iterator?: any, context?: any): bool;
|
||||
export function any<T>(list: Collection<T>, iterator?: (x: T) => boolean, context?: any): boolean;
|
||||
export function some<T>(list: Collection<T>, iterator?: (x: T) => boolean, context?: any): boolean;
|
||||
|
||||
contains(list: any, value: any): bool;
|
||||
contains(list: List, value: any): bool;
|
||||
include(list: any, value: any): bool;
|
||||
include(list: List, value: any): bool;
|
||||
export function contains<T>(list: Collection<T>, value: T): boolean;
|
||||
export function include<T>(list: Collection<T>, value: T): boolean;
|
||||
|
||||
invoke(list: List, methodName: string, arguments: any[]): any;
|
||||
invoke(object: any, methodName: string, ...arguments: any[]): any;
|
||||
export function invoke<T>(list: Collection<T>, methodName: string, ...arguments: any[]): any;
|
||||
|
||||
pluck(list: List, propertyName: string): string[];
|
||||
pluck(list: any[], propertyName: string): string[];
|
||||
max(list: List, iterator?: any, context?: any): any;
|
||||
max(list: any[], iterator?: any, context?: any): any;
|
||||
min(list: List, iterator?: any, context?: any): any;
|
||||
min(list: any[], iterator?: any, context?: any): any;
|
||||
sortBy(list: List, iterator?: any, context?: any): any;
|
||||
sortBy(list: any[], iterator?: any, context?: any): any;
|
||||
groupBy(list: List, iterator: any): any;
|
||||
groupBy(list: any[], iterator: any): any;
|
||||
countBy(list: List, iterator: any): any;
|
||||
countBy(list: any[], iterator: any): any;
|
||||
shuffle(list: any[]): any[];
|
||||
toArray(list: any): any[];
|
||||
size(list: any): number;
|
||||
export function pluck<T>(list: Collection<T>, propertyName: string): any[];
|
||||
|
||||
export function max<T>(list: Collection<T>, iterator?: (x: T) => any, context?: any): T;
|
||||
export function min<T>(list: Collection<T>, iterator?: (x: T) => any, context?: any): T;
|
||||
|
||||
export function sortBy<T>(list: List<T>, iterator?: (x: T) => any, context?: any): T[];
|
||||
export function sortBy<T>(list: any, iterator?: (x: T) => any, context?: any): T[];
|
||||
export function sortBy<T>(list: List<T>, iterator: string, context?: any): T[];
|
||||
export function sortBy<T>(list: any, iterator: string, context?: any): T[];
|
||||
|
||||
export function groupBy<T>(list: List<T>, iterator?: (x: T) => any, context?: any): Dictionary<List<T>>;
|
||||
export function groupBy<T>(list: any, iterator?: (x: T) => any, context?: any): Dictionary<List<T>>;
|
||||
export function groupBy<T>(list: List<T>, iterator: string, context?: any): Dictionary<List<T>>;
|
||||
export function groupBy<T>(list: any, iterator: string, context?: any): Dictionary<List<T>>;
|
||||
|
||||
export function countBy<T>(list: List<T>, iterator?: (x: T) => any, context?: any): Dictionary<List<number>>;
|
||||
export function countBy<T>(list: any, iterator?: (x: T) => any, context?: any): Dictionary<List<number>>;
|
||||
export function countBy<T>(list: List<T>, iterator: string, context?: any): Dictionary<List<number>>;
|
||||
export function countBy<T>(list: any, iterator: string, context?: any): Dictionary<List<number>>;
|
||||
|
||||
export function shuffle<T>(list: Collection<T>): T[];
|
||||
|
||||
export function toArray<T>(list: Collection<T>): T[];
|
||||
|
||||
export function size<T>(list: Collection<T>): number;
|
||||
|
||||
/****
|
||||
Arrays
|
||||
Arrays
|
||||
*****/
|
||||
first(array: List, n?: number): any;
|
||||
first(array: any[], n?: number): any;
|
||||
head(array: List, n?: number): any;
|
||||
head(array: any[], n?: number): any;
|
||||
take(array: List, n?: number): any;
|
||||
take(array: any[], n?: number): any;
|
||||
export function first<T>(array: List<T>): T;
|
||||
export function first<T>(array: List<T>, n: number): T[];
|
||||
export function head<T>(array: List<T>): T;
|
||||
export function head<T>(array: List<T>, n: number): T[];
|
||||
export function take<T>(array: List<T>): T;
|
||||
export function take<T>(array: List<T>, n: number): T[];
|
||||
|
||||
initial(array: List, n?: number): any[];
|
||||
initial(array: any[], n?: number): any[];
|
||||
export function initial<T>(array: List<T>, n?: number): T[];
|
||||
|
||||
last(array: List, n?: number): any;
|
||||
last(array: any[], n?: number): any;
|
||||
export function last<T>(array: List<T>): T;
|
||||
export function last<T>(array: List<T>, n: number): T[];
|
||||
|
||||
rest(array: List, n?: number): any[];
|
||||
rest(array: any[], n?: number): any[];
|
||||
tail(array: List, n?: number): any[];
|
||||
tail(array: any[], n?: number): any[];
|
||||
drop(array: List, n?: number): any[];
|
||||
drop(array: any[], n?: number): any[];
|
||||
export function rest<T>(array: List<T>, n?: number): T[];
|
||||
export function tail<T>(array: List<T>, n?: number): T[];
|
||||
export function drop<T>(array: List<T>, n?: number): T[];
|
||||
|
||||
compact(array: any[]): any[];
|
||||
flatten(array: List, shallow?: bool): any[];
|
||||
flatten(array: any[], shallow?: bool): any[];
|
||||
without(array: List, ...values: any[]): any[];
|
||||
without(array: any[], ...values: any[]): any[];
|
||||
union(...arrays: any[][]): any[];
|
||||
intersection(...arrays: any[][]): any[];
|
||||
difference(array: List, ...others: any[][]): any[];
|
||||
difference(array: any[], ...others: any[][]): any[];
|
||||
export function compact<T>(array: List<T>): T[];
|
||||
|
||||
uniq(array: List, isSorted?: bool, iterator?: any): any[];
|
||||
uniq(array: any[], isSorted?: bool, iterator?: any): any[];
|
||||
unique(array: List, isSorted?: bool, iterator?: any): any[];
|
||||
unique(array: any[], isSorted?: bool, iterator?: any): any[];
|
||||
export function flatten(array: any[], shallow?: boolean): any[];
|
||||
|
||||
export function without<T>(array: List<T>, ...values: T[]): T[];
|
||||
|
||||
export function union<T>(...arrays: List<T>[]): T[];
|
||||
|
||||
export function intersection<T>(...arrays: List<T>[]): T[];
|
||||
|
||||
export function difference<T>(array: List<T>, ...others: List<T>[]): T[];
|
||||
|
||||
export function uniq<T>(array: List<T>, isSorted?: boolean, iterator?: (x: T) => any): T[];
|
||||
export function unique<T>(array: List<T>, isSorted?: boolean, iterator?: (x: T) => any): T[];
|
||||
|
||||
export function zip(...arrays: any[]): any[];
|
||||
|
||||
export function object(list: any[], values?: any): any;
|
||||
|
||||
export function indexOf<T>(array: List<T>, value: T, isSorted?: boolean): number;
|
||||
export function indexOf<T>(array: List<T>, value: T, startFrom: number): number;
|
||||
|
||||
export function lastIndexOf<T>(array: List<T>, value: T, fromIndex?: number): number;
|
||||
|
||||
export function sortedIndex<T>(list: List<T>, value: T, iterator?: (x: T) => any, context?: any): number;
|
||||
|
||||
export function range(stop: number): any[];
|
||||
export function range(start: number, stop: number, step?: number): any[];
|
||||
|
||||
/****
|
||||
Functions
|
||||
*****/
|
||||
export function bind(func: (...as: any[]) => any, context: any, ...arguments: any[]): () => any;
|
||||
export function bindAll(object: any, ...methodNames: string[]): any;
|
||||
export function memoize(func: any, hashFunction?: any): any;
|
||||
export function defer(func: () => any);
|
||||
export function delay(func: any, wait: number, ...arguments: any[]): any;
|
||||
export function delay(func: any, ...arguments: any[]): any;
|
||||
export function throttle(func: any, wait: number): any;
|
||||
export function debounce(func: any, wait: number, immediate?: boolean): any;
|
||||
export function once(func: any): any;
|
||||
export function after(count: number, func: any): any;
|
||||
export function wrap(func: (...as: any[]) => any, wrapper: any): () => any;
|
||||
export function compose(...functions: any[]): any;
|
||||
|
||||
/****
|
||||
Objects
|
||||
*****/
|
||||
export function keys(object: any): string[];
|
||||
export function values<T>(object: Dictionary<T>): T[];
|
||||
export function pairs(object: any): any[];
|
||||
export function invert(object: any): any;
|
||||
export function functions(object: any): string[];
|
||||
export function methods(object: any): string[];
|
||||
export function extend(destination: any, ...sources: any[]): any;
|
||||
export function pick(object: any, keys: string[]): any;
|
||||
export function pick(object: any, ...keys: string[]): any;
|
||||
export function omit(object: any, keys: string[]): any;
|
||||
export function omit(object: any, ...keys: string[]): any;
|
||||
export function defaults(object: any, ...defaults: any[]): any;
|
||||
export function clone<T>(object: T): T;
|
||||
export function tap(object: any, interceptor: (...as: any[]) => any): any;
|
||||
export function has(object: any, key: string): boolean;
|
||||
export function isEqual(object: any, other: any): boolean;
|
||||
export function isEmpty(object: any): boolean;
|
||||
export function isElement(object: any): boolean;
|
||||
export function isArray(object: any): boolean;
|
||||
export function isObject(value: any): boolean;
|
||||
export function isArguments(object: any): boolean;
|
||||
export function isFunction(object: any): boolean;
|
||||
export function isString(object: any): boolean;
|
||||
export function isNumber(object: any): boolean;
|
||||
export function isFinite(object: any): boolean;
|
||||
export function isBoolean(object: any): boolean;
|
||||
export function isDate(object: any): boolean;
|
||||
export function isRegExp(object: any): boolean;
|
||||
export function isNaN(object: any): boolean;
|
||||
export function isNull(object: any): boolean;
|
||||
export function isUndefined(value: any): boolean;
|
||||
|
||||
/****
|
||||
Utility
|
||||
*****/
|
||||
export function noConflict(): any;
|
||||
export function identity(value: any): any;
|
||||
export function times(n: number, iterator: (index: number) => void , context?: any): void;
|
||||
export function random(min: number, max: number): number;
|
||||
export function mixin(object: any): void;
|
||||
export function uniqueId(prefix: string): string;
|
||||
export function uniqueId(): number;
|
||||
export function escape(str: string): string;
|
||||
export function result(object: any, property: string): any;
|
||||
export var templateSettings: TemplateSettings;
|
||||
export function template(templateString: string, data?: any, settings?: any): (...data: any[]) => string;
|
||||
|
||||
/****
|
||||
Chaining
|
||||
*****/
|
||||
export function chain(object): any;
|
||||
}
|
||||
|
||||
declare class _<T> {
|
||||
|
||||
each(iterator: _.ListIterator<T, void >, context?: any): void;
|
||||
forEach(iterator: _.ListIterator<T, void >, context?: any): void;
|
||||
|
||||
map<TResult>(iterator: _.ListIterator<T, TResult>, context?: any): TResult[];
|
||||
collect<TResult>(iterator: _.ListIterator<T, TResult>, context?: any): TResult[];
|
||||
|
||||
reduce<T, TResult>(iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
inject<T, TResult>(iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
|
||||
reduceRight<T, TResult>(iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
foldr<T, TResult>(iterator: (prev: TResult, curr: T) => TResult, memo: TResult, context?: any): TResult;
|
||||
|
||||
find<T>(iterator: (x: T) => boolean, context?: any): T;
|
||||
detect<T>(iterator: (x: T) => boolean, context?: any): T;
|
||||
|
||||
filter<T>(iterator: (x: T) => boolean, context?: any): T[];
|
||||
select<T>(iterator: (x: T) => boolean, context?: any): T[];
|
||||
|
||||
where<T>(properties: any): T[];
|
||||
|
||||
reject<T>(iterator: (x: T) => boolean, context?: any): T[];
|
||||
|
||||
all<T>(iterator: (x: T) => boolean, context?: any): boolean;
|
||||
every<T>(iterator: (x: T) => boolean, context?: any): boolean;
|
||||
|
||||
any<T>(iterator?: (x: T) => boolean, context?: any): boolean;
|
||||
some<T>(iterator?: (x: T) => boolean, context?: any): boolean;
|
||||
|
||||
contains<T>(value: T): boolean;
|
||||
include<T>(value: T): boolean;
|
||||
|
||||
invoke<T>(methodName: string, ...arguments: any[]): any;
|
||||
|
||||
pluck<T>(propertyName: string): any[];
|
||||
|
||||
max<T>(iterator?: (x: T) => any, context?: any): T;
|
||||
min<T>(iterator?: (x: T) => any, context?: any): T;
|
||||
|
||||
sortBy<T>(iterator?: (x: T) => any, context?: any): T[];
|
||||
sortBy<T>(iterator: string, context?: any): T[];
|
||||
|
||||
groupBy<T>(iterator?: (x: T) => any, context?: any): _.Dictionary<_.List<T>>;
|
||||
groupBy<T>(iterator: string, context?: any): _.Dictionary<_.List<T>>;
|
||||
|
||||
countBy<T>(iterator?: (x: T) => any, context?: any): _.Dictionary<_.List<number>>;
|
||||
countBy<T>(iterator: string, context?: any): _.Dictionary<_.List<number>>;
|
||||
|
||||
shuffle<T>(): T[];
|
||||
|
||||
toArray<T>(): T[];
|
||||
|
||||
size<T>(): number;
|
||||
|
||||
/****
|
||||
Arrays
|
||||
*****/
|
||||
first<T>(n?: number): T[];
|
||||
head<T>(n?: number): T[];
|
||||
take<T>(n?: number): T[];
|
||||
initial<T>(n?: number): T[];
|
||||
last<T>(n?: number): T[];
|
||||
rest<T>(n?: number): T[];
|
||||
tail<T>(n?: number): T[];
|
||||
drop<T>(n?: number): T[];
|
||||
|
||||
compact<T>(): T[];
|
||||
|
||||
flatten(shallow?: boolean): any[];
|
||||
|
||||
without<T>(...values: T[]): T[];
|
||||
|
||||
union<T>(...arrays: _.List<T>[]): T[];
|
||||
|
||||
intersection<T>(...arrays: _.List<T>[]): T[];
|
||||
|
||||
difference<T>(...others: _.List<T>[]): T[];
|
||||
|
||||
uniq<T>(isSorted?: boolean, iterator?: (x: T) => any): T[];
|
||||
unique<T>(isSorted?: boolean, iterator?: (x: T) => any): T[];
|
||||
|
||||
zip(...arrays: any[]): any[];
|
||||
object(list: List, values?: any[]): any;
|
||||
object(list: any[], values?: any[]): any;
|
||||
indexOf(array: List, value: any, isSorted?: bool): number;
|
||||
indexOf(array: any[], value: any, isSorted?: bool): number;
|
||||
lastIndexOf(array: List, value: any, fromIndex?: number): number;
|
||||
lastIndexOf(array: any[], value: any, fromIndex?: number): number;
|
||||
sortedIndex(list: List, valueL: any, iterator?: any): number;
|
||||
sortedIndex(list: any[], valueL: any, iterator?: any): number;
|
||||
range(stop: number): any[];
|
||||
range(start: number, stop: number, step?: number): any[];
|
||||
|
||||
object(values?: any): any;
|
||||
|
||||
indexOf<T>(value: T, isSorted?: boolean): number;
|
||||
indexOf<T>(value: T, startFrom: number): number;
|
||||
|
||||
lastIndexOf<T>(value: T, fromIndex?: number): number;
|
||||
|
||||
sortedIndex<T>(value: T, iterator?: (x: T) => any, context?: any): number;
|
||||
|
||||
/****
|
||||
Functions
|
||||
Functions
|
||||
*****/
|
||||
bind(func: (...as : any[]) => any, context: any, ...arguments: any[]): () => any;
|
||||
bindAll(object: any, ...methodNames: string[]): any;
|
||||
memoize(func: any, hashFunction?: any): any;
|
||||
defer(func: () => any);
|
||||
delay(func: any, wait: number, ...arguments: any[]): any;
|
||||
delay(func: any, ...arguments: any[]): any;
|
||||
throttle(func: any, wait: number): any;
|
||||
debounce(func: any, wait: number, immediate?: bool): any;
|
||||
once(func: any): any;
|
||||
after(count: number, func: any): any;
|
||||
wrap(func: (...as : any[]) => any, wrapper: any): () => any;
|
||||
bind(func: (...as: any[]) => any, context: any, ...arguments: any[]): () => any;
|
||||
bindAll(...methodNames: string[]): any;
|
||||
memoize(hashFunction?: any): any;
|
||||
defer();
|
||||
delay(wait: number, ...arguments: any[]): any;
|
||||
delay(...arguments: any[]): any;
|
||||
throttle(wait: number): any;
|
||||
debounce(wait: number, immediate?: boolean): any;
|
||||
once(): any;
|
||||
after(func: any): any;
|
||||
wrap(wrapper: any): () => any;
|
||||
compose(...functions: any[]): any;
|
||||
|
||||
/****
|
||||
Objects
|
||||
Objects
|
||||
*****/
|
||||
keys(object: any): any[];
|
||||
values(object: any): any[];
|
||||
pairs(object: any): any[];
|
||||
invert(object: any): any;
|
||||
|
||||
functions(object: any): string[];
|
||||
methods(object: any): string[];
|
||||
|
||||
extend(destination: any, ...sources: any[]): any;
|
||||
pick(object: any, ...keys: string[]): any;
|
||||
omit(object: any, ...keys: string[]): any;
|
||||
defaults(object: any, ...defaults: any[]): any;
|
||||
clone(object: any): any;
|
||||
tap(object: any, interceptor: (...as : any[]) => any): any;
|
||||
has(object: any, key: string): bool;
|
||||
isEqual(object: any, other: any): bool;
|
||||
isEmpty(object: any): bool;
|
||||
isElement(object: any): bool;
|
||||
isArray(object: any): bool;
|
||||
isObject(value: any): bool;
|
||||
isArguments(object: any): bool;
|
||||
isFunction(object: any): bool;
|
||||
isString(object: any): bool;
|
||||
isNumber(object: any): bool;
|
||||
isFinite(object: any): bool;
|
||||
isBoolean(object: any): bool;
|
||||
isDate(object: any): bool;
|
||||
isRegExp(object: any): bool;
|
||||
isNaN(object: any): bool;
|
||||
isNull(object: any): bool;
|
||||
isUndefined(value: any): bool;
|
||||
keys(): string[];
|
||||
values<T>(): T[];
|
||||
pairs(): any[];
|
||||
invert(): any;
|
||||
functions(): string[];
|
||||
methods(): string[];
|
||||
extend(...sources: any[]): any;
|
||||
pick(keys: string[]): any;
|
||||
pick(...keys: string[]): any;
|
||||
omit(keys: string[]): any;
|
||||
omit(...keys: string[]): any;
|
||||
defaults(...defaults: any[]): any;
|
||||
clone(): T;
|
||||
tap(interceptor: (...as: any[]) => any): any;
|
||||
has(key: string): boolean;
|
||||
isEqual(other: any): boolean;
|
||||
isEmpty(): boolean;
|
||||
isElement(): boolean;
|
||||
isArray(): boolean;
|
||||
isObject(): boolean;
|
||||
isArguments(): boolean;
|
||||
isFunction(): boolean;
|
||||
isString(): boolean;
|
||||
isNumber(): boolean;
|
||||
isFinite(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isDate(): boolean;
|
||||
isRegExp(): boolean;
|
||||
isNaN(): boolean;
|
||||
isNull(): boolean;
|
||||
isUndefined(): boolean;
|
||||
|
||||
/****
|
||||
Utility
|
||||
Utility
|
||||
*****/
|
||||
noConflict(): any;
|
||||
identity(value: any): any;
|
||||
times(n: number, iterator: (index : number) => void, context?: any): void;
|
||||
random(min: number, max: number): number;
|
||||
mixin(object: any): void;
|
||||
uniqueId(prefix: string): string;
|
||||
uniqueId(): number;
|
||||
escape(str: string): string;
|
||||
result(object: any, property: string): any;
|
||||
templateSettings: TemplateSettings;
|
||||
template(templateString: string, data?: any, settings?: any): (...data: any[]) => string;
|
||||
identity(): any;
|
||||
times(iterator: (index: number) => void , context?: any): void;
|
||||
random(max: number): number;
|
||||
mixin(): void;
|
||||
uniqueId(): string;
|
||||
escape(): string;
|
||||
result(property: string): any;
|
||||
template(data?: any, settings?: any): (...data: any[]) => string;
|
||||
|
||||
/****
|
||||
Chaining
|
||||
Chaining
|
||||
*****/
|
||||
chain(object: any): UnderscoreWrappedObject;
|
||||
chain(): any;
|
||||
}
|
||||
|
||||
declare var _: UnderscoreStatic;
|
||||
declare module "underscore" {
|
||||
export = _;
|
||||
}
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@ declare class UnitySettings {
|
||||
public onInit:Function;
|
||||
}
|
||||
|
||||
enum UnityPlaybackState {
|
||||
declare enum UnityPlaybackState {
|
||||
Playing,
|
||||
Paused
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -71,7 +71,7 @@ interface AudioNode {
|
||||
numberOfInputs: number;
|
||||
numberOfOutputs: number;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
interface AudioSourceNode extends AudioNode {
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -93,7 +93,7 @@ interface DelayNode extends AudioNode {
|
||||
|
||||
delayTime: AudioParam;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
interface AudioBuffer {
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -597,7 +597,7 @@ interface AudioProcessingEvent extends Event {
|
||||
outputBuffer: AudioBuffer;
|
||||
}
|
||||
|
||||
enum PanningModelType {
|
||||
declare enum PanningModelType {
|
||||
/**
|
||||
* A simple and efficient spatialization algorithm using equal-power panning.
|
||||
*/
|
||||
@@ -614,7 +614,7 @@ enum PanningModelType {
|
||||
soundfield
|
||||
}
|
||||
|
||||
enum DistanceModelType {
|
||||
declare enum DistanceModelType {
|
||||
/**
|
||||
* A linear distance model which calculates distanceGain according to:
|
||||
* 1 - rolloffFactor * (distance - refDistance) / (maxDistance - refDistance)
|
||||
@@ -895,7 +895,7 @@ interface DynamicsCompressorNode extends AudioNode {
|
||||
|
||||
}
|
||||
|
||||
enum BiquadFilterType {
|
||||
declare enum BiquadFilterType {
|
||||
/**
|
||||
* A lowpass filter allows frequencies below the cutoff frequency to pass through and attenuates frequencies above the cutoff. It implements a standard second-order resonant lowpass filter with 12dB/octave rolloff.
|
||||
*
|
||||
@@ -1043,7 +1043,7 @@ interface WaveShaperNode extends AudioNode {
|
||||
curve: Float32Array;
|
||||
}
|
||||
|
||||
enum OscillatorType {
|
||||
declare enum OscillatorType {
|
||||
sine,
|
||||
square,
|
||||
sawtooth,
|
||||
|
||||
Vendored
+10
-10
@@ -110,7 +110,7 @@ interface MediaStreamTrack {
|
||||
onunmute: (event: Event) => void;
|
||||
onended: (event: Event) => void;
|
||||
}
|
||||
var MediaStramTrack: {
|
||||
declare var MediaStramTrack: {
|
||||
prototype: MediaStreamTrack;
|
||||
new (): MediaStreamTrack;
|
||||
LIVE: number; // = 0;
|
||||
@@ -118,19 +118,19 @@ var MediaStramTrack: {
|
||||
ENDED: number; // = 2;
|
||||
}
|
||||
|
||||
interface URL {
|
||||
createObjectURL(stream: MediaStream): string;
|
||||
}
|
||||
var URL: {
|
||||
prototype: MediaStreamTrack;
|
||||
new (): URL;
|
||||
interface streamURL extends URL {
|
||||
createObjectURL(stream: MediaStream): string;
|
||||
}
|
||||
//declare var URL: {
|
||||
// prototype: MediaStreamTrack;
|
||||
// new (): URL;
|
||||
// createObjectURL(stream: MediaStream): string;
|
||||
//}
|
||||
|
||||
interface WebkitURL extends URL {
|
||||
interface WebkitURL extends streamURL {
|
||||
}
|
||||
var webkitURL: {
|
||||
declare var webkitURL: {
|
||||
prototype: WebkitURL;
|
||||
new (): URL;
|
||||
new (): streamURL;
|
||||
createObjectURL(stream: MediaStream): string;
|
||||
}
|
||||
Vendored
+14
-14
@@ -9,7 +9,7 @@
|
||||
interface RTCConfiguration {
|
||||
iceServers: RTCIceServer[];
|
||||
}
|
||||
var RTCConfiguration: {
|
||||
declare var RTCConfiguration: {
|
||||
prototype: RTCConfiguration;
|
||||
new (): RTCConfiguration;
|
||||
}
|
||||
@@ -18,21 +18,21 @@ interface RTCIceServer {
|
||||
url: string;
|
||||
credential?: string;
|
||||
}
|
||||
var RTCIceServer: {
|
||||
declare var RTCIceServer: {
|
||||
prototype: RTCIceServer;
|
||||
new (): RTCIceServer;
|
||||
}
|
||||
|
||||
interface webkitRTCPeerConnection extends RTCPeerConnection {
|
||||
}
|
||||
var webkitRTCPeerConnection: {
|
||||
declare var webkitRTCPeerConnection: {
|
||||
prototype: webkitRTCPeerConnection;
|
||||
new (settings: RTCPeerConnectionConfig, constraints?:MediaConstraints): webkitRTCPeerConnection;
|
||||
}
|
||||
|
||||
interface IceState {
|
||||
}
|
||||
var IceState: {
|
||||
declare var IceState: {
|
||||
prototype: IceState;
|
||||
new (): IceState;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ interface RTCSessionDescription {
|
||||
type?: RTCSdpType;
|
||||
sdp?: string;
|
||||
}
|
||||
var RTCSessionDescription: {
|
||||
declare var RTCSessionDescription: {
|
||||
prototype: RTCSessionDescription;
|
||||
new (descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ interface RTCSessionDescriptionInit {
|
||||
type: RTCSdpType;
|
||||
sdp: string;
|
||||
}
|
||||
var RTCSessionDescriptionInit: {
|
||||
declare var RTCSessionDescriptionInit: {
|
||||
prototype: RTCSessionDescriptionInit;
|
||||
new (): RTCSessionDescriptionInit;
|
||||
}
|
||||
@@ -75,13 +75,13 @@ interface RTCDataChannelInit {
|
||||
reliable: bool;
|
||||
}
|
||||
|
||||
enum RTCSdpType {
|
||||
declare enum RTCSdpType {
|
||||
offer,
|
||||
pranswer,
|
||||
answer
|
||||
}
|
||||
|
||||
enum RTCDataChannelState {
|
||||
declare enum RTCDataChannelState {
|
||||
connecting,
|
||||
open,
|
||||
closing,
|
||||
@@ -112,7 +112,7 @@ interface RTCDataChannelEvent extends Event {
|
||||
constructor (eventInitDict: RTCDataChannelEventInit);
|
||||
channel: RTCDataChannel;
|
||||
}
|
||||
var RTCDataChannelEvent: {
|
||||
declare var RTCDataChannelEvent: {
|
||||
prototype: RTCDataChannelEvent;
|
||||
new (eventInitDict: RTCDataChannelEventInit);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ interface RTCPeerConnection {
|
||||
onicecandidate: (event: RTCIceCandidateEvent)=> void;
|
||||
onidentityresult: (event: Event)=> void;
|
||||
}
|
||||
var RTCPeerConnection: {
|
||||
declare var RTCPeerConnection: {
|
||||
prototype: RTCPeerConnection;
|
||||
new (configuration: RTCConfiguration, constraints?: MediaConstraints): RTCPeerConnection;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ interface RTCIceCandidate {
|
||||
sdpMid?: string;
|
||||
sdpMLineIndex?: number;
|
||||
}
|
||||
var RTCIceCandidate: {
|
||||
declare var RTCIceCandidate: {
|
||||
prototype: RTCIceCandidate;
|
||||
new (candidateInitDict?: RTCIceCandidate);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ interface RTCIceCandidateInit {
|
||||
sdpMid: string;
|
||||
sdpMLineIndex: number;
|
||||
}
|
||||
var RTCIceCandidateInit:{
|
||||
declare var RTCIceCandidateInit:{
|
||||
prototype: RTCIceCandidateInit;
|
||||
new (): RTCIceCandidateInit;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ interface PeerConnectionIceEvent {
|
||||
peer: RTCPeerConnection;
|
||||
candidate: RTCIceCandidate;
|
||||
}
|
||||
var PeerConnectionIceEvent: {
|
||||
declare var PeerConnectionIceEvent: {
|
||||
prototype: PeerConnectionIceEvent;
|
||||
new (): PeerConnectionIceEvent;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ var PeerConnectionIceEvent: {
|
||||
interface RTCPeerConnectionConfig {
|
||||
iceServers: RTCIceServer[];
|
||||
}
|
||||
var RTCPeerConnectionConfig: {
|
||||
declare var RTCPeerConnectionConfig: {
|
||||
prototype: RTCPeerConnectionConfig;
|
||||
new (): RTCPeerConnectionConfig;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -4,7 +4,7 @@
|
||||
// Updated by: Ian Obermiller <http://ianobermiller.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
module YT {
|
||||
declare module YT {
|
||||
interface EventArgs {
|
||||
target: Player;
|
||||
data: any;
|
||||
@@ -148,5 +148,5 @@ module YT {
|
||||
ENDED,
|
||||
PAUSED,
|
||||
PLAYING
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user