From 0dfc96c879fd3f51884aeac15b2d20f3ab3110cb Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Mon, 12 May 2014 12:23:18 +0200 Subject: [PATCH 01/84] Update CONTRIBUTORS.md Added ocLazyLoad entry --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 74c0363b0..52d08fd66 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -221,6 +221,7 @@ All definitions files include a header with the author and editors, so at some p * [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker)) * [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel)) * [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/)) +* [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/)) * [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/)) * [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz)) * [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) From a27ca9eadb45ddec2b3228f451ed881ab8b4b42a Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Mon, 12 May 2014 12:24:24 +0200 Subject: [PATCH 02/84] Update CONTRIBUTORS.md removed oclazyload again (wrong branch) --- CONTRIBUTORS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 52d08fd66..74c0363b0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -221,7 +221,6 @@ All definitions files include a header with the author and editors, so at some p * [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker)) * [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel)) * [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/)) -* [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/)) * [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/)) * [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz)) * [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) From e7c3b12277cd3b0489e2c0c565477f4def5252b7 Mon Sep 17 00:00:00 2001 From: slozier Date: Thu, 29 May 2014 10:00:36 -0400 Subject: [PATCH 03/84] Update SlickGrid.d.ts Added the overload for setData. --- slickgrid/SlickGrid.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index b7810f467..ddd36932b 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -779,11 +779,18 @@ declare module Slick { /** * Sets a new source for databinding and removes all rendered rows. Note that this doesn't render the new rows - you can follow it with a call to render() to do that. - * @param newData New databinding source. This can either be a regular JavaScript array or a custom object exposing getItem(index) and getLength() functions. + * @param newData New databinding source using a regular JavaScript array.. * @param scrollToTop If true, the grid will reset the vertical scroll position to the top of the grid. **/ public setData(newData: T[], scrollToTop: boolean): void; + /** + * Sets a new source for databinding and removes all rendered rows. Note that this doesn't render the new rows - you can follow it with a call to render() to do that. + * @param newData New databinding source using a custom object exposing getItem(index) and getLength() functions. + * @param scrollToTop If true, the grid will reset the vertical scroll position to the top of the grid. + **/ + public setData(newData: { getItem: (index: number) => T; getLength: () => number; }, scrollToTop: boolean): void; + /** * Returns the size of the databinding source. * @return From 2a3bb99eb74d3f9067028fea44868f6f87cd41c5 Mon Sep 17 00:00:00 2001 From: slozier Date: Thu, 29 May 2014 10:31:34 -0400 Subject: [PATCH 04/84] Update SlickGrid.d.ts Updated DataProvider to DataProvider --- slickgrid/SlickGrid.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index ddd36932b..9e66b9647 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -689,8 +689,8 @@ declare module Slick { topPanelHeight?: number; } - export interface DataProvider { - getItem(index: number): SlickData; + export interface DataProvider { + getItem(index: number): T; getLength(): number; } @@ -705,7 +705,7 @@ declare module Slick { * The grid also provides two helper methods to simplify development - getSelectedRows() and setSelectedRows(rowsArray), as well as an onSelectedRowsChanged event. * SlickGrid includes two pre-made selection models - Slick.CellSelectionModel and Slick.RowSelectionModel, but you can easily write a custom one. **/ - export class SelectionModel { + export class SelectionModel { /** * An initializer function that will be called with an instance of the grid whenever a selection model is registered with setSelectionModel. The selection model can use this to initialize its state and subscribe to grid events. **/ @@ -740,12 +740,12 @@ declare module Slick { options: GridOptions); constructor( container: string, - data: DataProvider, + data: DataProvider, columns: Column[], options: GridOptions); constructor( container: HTMLElement, - data: DataProvider, + data: DataProvider, columns: Column[], options: GridOptions); @@ -789,7 +789,7 @@ declare module Slick { * @param newData New databinding source using a custom object exposing getItem(index) and getLength() functions. * @param scrollToTop If true, the grid will reset the vertical scroll position to the top of the grid. **/ - public setData(newData: { getItem: (index: number) => T; getLength: () => number; }, scrollToTop: boolean): void; + public setData(newData: DataProvider, scrollToTop: boolean): void; /** * Returns the size of the databinding source. @@ -1485,7 +1485,7 @@ declare module Slick { * Item -> Data by index * Row -> Data by row **/ - export class DataView implements DataProvider { + export class DataView implements DataProvider { constructor(options?: DataViewOptions); @@ -1555,7 +1555,7 @@ declare module Slick { public syncGridCellCssStyles(grid: Grid, key: string): void; public getLength(): number; - public getItem(index: number): SlickData; + public getItem(index: number): T; public getItemMetadata(): void; public onRowCountChanged: Slick.Event; From d3ecd9555476a18f05cafe1a6d0cc4f7951ced76 Mon Sep 17 00:00:00 2001 From: CyberFoxHax Date: Thu, 29 May 2014 17:55:13 +0200 Subject: [PATCH 05/84] Generics I have to ask why collection layers aren't generic. --- leaflet/leaflet.d.ts | 82 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index a2d91032a..c3e5ce8c5 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -474,7 +474,7 @@ declare module L { * positions. * Default value: 'topright'. */ - position: string; + position?: string; } } @@ -773,20 +773,20 @@ declare module L { /** * Create a layer group, optionally given an initial set of layers. */ - function featureGroup(layers?: ILayer[]): FeatureGroup; + function featureGroup(layers?: T[]): FeatureGroup; - export class FeatureGroup extends LayerGroup implements ILayer, IEventPowered { + export class FeatureGroup extends LayerGroup implements ILayer, IEventPowered> { /** * Create a layer group, optionally given an initial set of layers. */ - constructor(layers?: ILayer[]); + constructor(layers?: T[]); /** * Binds a popup with a particular HTML content to a click on any layer from the * group that has a bindPopup method. */ - bindPopup(htmlContent: string, options?: PopupOptions): FeatureGroup; + bindPopup(htmlContent: string, options?: PopupOptions): FeatureGroup; /** * Returns the LatLngBounds of the Feature Group (created from bounds and coordinates @@ -797,17 +797,17 @@ declare module L { /** * Sets the given path options to each layer of the group that has a setStyle method. */ - setStyle(style: PathOptions): FeatureGroup; + setStyle(style: PathOptions): FeatureGroup; /** * Brings the layer group to the top of all other layers. */ - bringToFront(): FeatureGroup; + bringToFront(): FeatureGroup; /** * Brings the layer group to the bottom of all other layers. */ - bringToBack(): FeatureGroup; + bringToBack(): FeatureGroup; //////////// //////////// @@ -826,20 +826,20 @@ declare module L { //////////////// //////////////// - addEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; - addOneTimeEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; - removeEventListener(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup; + addEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; + addOneTimeEventListener(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; + removeEventListener(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup; hasEventListeners(type: string): boolean; - fireEvent(type: string, data?: any): FeatureGroup; - on(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; - once(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; - off(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup; - fire(type: string, data?: any): FeatureGroup; - addEventListener(eventMap: any, context?: any): FeatureGroup; - removeEventListener(eventMap?: any, context?: any): FeatureGroup; - clearAllEventListeners(): FeatureGroup; - on(eventMap: any, context?: any): FeatureGroup; - off(eventMap?: any, context?: any): FeatureGroup; + fireEvent(type: string, data?: any): FeatureGroup; + on(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; + once(type: string, fn: (e: LeafletEvent) => void, context?: any): FeatureGroup; + off(type: string, fn?: (e: LeafletEvent) => void, context?: any): FeatureGroup; + fire(type: string, data?: any): FeatureGroup; + addEventListener(eventMap: any, context?: any): FeatureGroup; + removeEventListener(eventMap?: any, context?: any): FeatureGroup; + clearAllEventListeners(): FeatureGroup; + on(eventMap: any, context?: any): FeatureGroup; + off(eventMap?: any, context?: any): FeatureGroup; } } @@ -882,7 +882,7 @@ declare module L { */ function geoJson(geojson?: any, options?: GeoJSONOptions): GeoJSON; - export class GeoJSON extends FeatureGroup { + export class GeoJSON extends FeatureGroup { /** * Creates a GeoJSON layer. Optionally accepts an object in GeoJSON format @@ -1539,34 +1539,34 @@ declare module L { /** * Create a layer group, optionally given an initial set of layers. */ - function layerGroup(layers?: ILayer[]): LayerGroup; + function layerGroup(layers?: T[]): LayerGroup; - export class LayerGroup extends Class implements ILayer { + export class LayerGroup extends Class implements ILayer { /** * Create a layer group, optionally given an initial set of layers. */ - constructor(layers?: ILayer[]); + constructor(layers?: T[]); /** * Adds the group of layers to the map. */ - addTo(map: Map): LayerGroup; + addTo(map: Map): LayerGroup; /** * Adds a given layer to the group. */ - addLayer(layer: ILayer): LayerGroup; + addLayer(layer: ILayer): LayerGroup; /** * Removes a given layer from the group. */ - removeLayer(layer: ILayer): LayerGroup; + removeLayer(layer: ILayer): LayerGroup; /** * Removes a given layer of the given id from the group. */ - removeLayer(id: string): LayerGroup; + removeLayer(id: string): LayerGroup; /** * Returns true if the given layer is currently added to the group. @@ -1576,23 +1576,23 @@ declare module L { /** * Returns the layer with the given id. */ - getLayer(id: string): ILayer; + getLayer(id: string): T; /** * Returns an array of all the layers added to the group. */ - getLayers(): ILayer[]; + getLayers(): T[]; /** * Removes all the layers from the group. */ - clearLayers(): LayerGroup; + clearLayers(): LayerGroup; /** * Iterates over the layers of the group, optionally specifying context of * the iterator function. */ - eachLayer(fn: (layer: ILayer) => void, context?: any): LayerGroup; + eachLayer(fn: (layer: ILayer) => void, context?: any): LayerGroup; /** * Returns a GeoJSON representation of the layer group (GeoJSON FeatureCollection). @@ -2794,7 +2794,7 @@ declare module L { */ function multiPolygon(latlngs: LatLng[][], options?: PolylineOptions): MultiPolygon; - export class MultiPolygon extends FeatureGroup { + export class MultiPolygon extends FeatureGroup { /** * Instantiates a multi-polyline object given an array of latlngs arrays (one @@ -2829,7 +2829,7 @@ declare module L { */ function multiPolyline(latlngs: LatLng[][], options?: PolylineOptions): MultiPolyline; - export class MultiPolyline extends FeatureGroup { + export class MultiPolyline extends FeatureGroup { /** * Instantiates a multi-polyline object given an array of arrays of geographical @@ -3655,27 +3655,27 @@ declare module L { } } - export interface TileLayerFactory { + export interface TileLayerFactory { /** * Instantiates a tile layer object given a URL template and optionally an options * object. */ - (urlTemplate: string, options?: TileLayerOptions): TileLayer; + (urlTemplate: string, options?: TileLayerOptions): TileLayer; /** * Instantiates a WMS tile layer object given a base URL of the WMS service and * a WMS parameters/options object. */ - wms(baseUrl: string, options: WMSOptions): L.TileLayer.WMS; + wms(baseUrl: string, options: WMSOptions): L.TileLayer.WMS; /** * Instantiates a Canvas tile layer object given an options object (optionally). */ - canvas(options?: TileLayerOptions): L.TileLayer.Canvas; + canvas(options?: TileLayerOptions): L.TileLayer.Canvas; } - - export var tileLayer: TileLayerFactory; + + export var tileLayer: TileLayerFactory; } declare module L { From 2cc004f73a492e687c069e1d0e78d8748f34dcf8 Mon Sep 17 00:00:00 2001 From: CyberFoxHax Date: Thu, 29 May 2014 18:05:15 +0200 Subject: [PATCH 06/84] More generics Forgot T in some places --- leaflet/leaflet.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index c3e5ce8c5..54f0fe4f0 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -1556,12 +1556,12 @@ declare module L { /** * Adds a given layer to the group. */ - addLayer(layer: ILayer): LayerGroup; + addLayer(layer: T): LayerGroup; /** * Removes a given layer from the group. */ - removeLayer(layer: ILayer): LayerGroup; + removeLayer(layer: T): LayerGroup; /** * Removes a given layer of the given id from the group. @@ -1571,7 +1571,7 @@ declare module L { /** * Returns true if the given layer is currently added to the group. */ - hasLayer(layer: ILayer): boolean; + hasLayer(layer: T): boolean; /** * Returns the layer with the given id. @@ -1592,7 +1592,7 @@ declare module L { * Iterates over the layers of the group, optionally specifying context of * the iterator function. */ - eachLayer(fn: (layer: ILayer) => void, context?: any): LayerGroup; + eachLayer(fn: (layer: T) => void, context?: any): LayerGroup; /** * Returns a GeoJSON representation of the layer group (GeoJSON FeatureCollection). From 019ed4afa050a12ed4dbd49af0a528c93a6d16eb Mon Sep 17 00:00:00 2001 From: kubosho_ Date: Mon, 2 Jun 2014 18:05:38 +0900 Subject: [PATCH 07/84] Add flipsnap.js type definitions --- flipsnap/flipsnap.d.ts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 flipsnap/flipsnap.d.ts diff --git a/flipsnap/flipsnap.d.ts b/flipsnap/flipsnap.d.ts new file mode 100644 index 000000000..b46081a52 --- /dev/null +++ b/flipsnap/flipsnap.d.ts @@ -0,0 +1,36 @@ +// Type definitions for flipsnap.js +// Project: http://pxgrid.github.io/js-flipsnap/ +// Definitions by: kubosho_ & gsino +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface Flipsnap { + hasPrev(): boolean; + hasNext(): boolean; + toPrev(transitionDuration?: number): void; + toNext(transitionDuration?: number): void; + moveToPoint(point: number, transitionDuration?: number): void; + element: HTMLElement; +} + +interface FlipsnapStatic { + (element: HTMLElement, opts?: FlipsnapOptions): Flipsnap; + (element: string, opts?: FlipsnapOptions): Flipsnap; +} + +interface FlipsnapOptions { + maxPoint?: number; + distance?: number; + transitionDuration?: number; + disableTouch?: boolean; + disable3d?: boolean; +} + +interface HTMLElement { + addEventListener(type: "fstouchend", listener: (ev: FlipsnapEvent) => any, useCapture?: boolean): void; +} + +interface FlipsnapEvent extends Event { + newPoint: number; +} + +declare var Flipsnap: FlipsnapStatic; \ No newline at end of file From f4109366f50ea09e372f917e76fd0c3302cbb757 Mon Sep 17 00:00:00 2001 From: Jesica Fera Date: Wed, 4 Jun 2014 17:37:03 -0300 Subject: [PATCH 08/84] - Updated definition to version 1.2.5 of jquery.dynatree - Solved conflict that happens when using jquery.dynatree definitions and jqueryui definitions together --- jquery.dynatree/jquery.dynatree.d.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/jquery.dynatree/jquery.dynatree.d.ts b/jquery.dynatree/jquery.dynatree.d.ts index 91425644d..a63148723 100644 --- a/jquery.dynatree/jquery.dynatree.d.ts +++ b/jquery.dynatree/jquery.dynatree.d.ts @@ -1,22 +1,23 @@ -// Type definitions for jquery.dynatree 1.2 +// Type definitions for jquery.dynatree 1.2.5 // Project: http://code.google.com/p/dynatree/ // Definitions by: https://github.com/fdecampredon // Definitions: https://github.com/borisyankov/DefinitelyTyped /// +/// + +declare module JQueryUI { + interface UI { + dynatree: DynatreeNamespace + } +} interface JQuery { dynatree(options?: DynatreeOptions): DynaTree; dynatree(option?: string, ...rest: any[]): any; } -interface JQueryStatic { - ui: { - dynatree: DynatreeNamespace; - }; -} - interface DynaTree { activateKey(key: string): DynaTreeNode; count(): number; @@ -39,7 +40,7 @@ interface DynaTree { renderInvisibleNodes(): void; selectKey(key: string, flag: string): DynaTreeNode; serializeArray(stopOnParents: boolean): any[]; - toDict(): any; + toDict(includeRoot: boolean): any; visit(fn: (node: DynaTreeNode) =>boolean, includeRoot: boolean): void; } @@ -77,6 +78,7 @@ interface DynaTreeNode { makeVisible(): boolean; move(targetNode: DynaTreeNode, mode: string): boolean; reload(force: boolean): void; + reloadChildren(callback?: (node: DynaTreeNode, isOk: boolean) => any): void; remove(): void; removeChildren(): void; render(useEffects: boolean, includeInvisible: boolean): void; @@ -177,7 +179,7 @@ interface DynaTreeDataModel { interface DynaTreeDNDOptions { autoExpandMS?: number; // Expand nodes after n milliseconds of hovering. preventVoidMoves?: boolean; // Prevent dropping nodes 'before self', etc. - + revert: boolean; // true: slide helper back to source if drop is rejected // Make tree nodes draggable: onDragStart?: (sourceNode: any) =>void; // Callback(sourceNode), return true, to enable dnd @@ -239,4 +241,4 @@ interface DynatreeNamespace { getNode(element: HTMLElement): DynaTreeNode; getPersistData(cookieId: string, cookieOpts: DynaTreeCookieOptions): any; version: number; -} +} \ No newline at end of file From 14e95050b595f63ce6263be4fb549c4df813bac5 Mon Sep 17 00:00:00 2001 From: Panu Horsmalahti Date: Thu, 5 Jun 2014 18:43:48 +0300 Subject: [PATCH 09/84] Add .reload() definition. Add test for it and other tests for the ng.ui.IStateService --- angular-ui/angular-ui-router-tests.ts | 23 ++++++++++++++++++++--- angular-ui/angular-ui-router.d.ts | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/angular-ui/angular-ui-router-tests.ts b/angular-ui/angular-ui-router-tests.ts index 4804ad297..5b0dec0ff 100644 --- a/angular-ui/angular-ui-router-tests.ts +++ b/angular-ui/angular-ui-router-tests.ts @@ -78,12 +78,13 @@ interface IUrlLocatorTestService { // Service for determining who the currently logged on user is. class UrlLocatorTestService implements IUrlLocatorTestService { - static $inject = ["$http", "$rootScope", "$urlRouter"]; + static $inject = ["$http", "$rootScope", "$urlRouter", "$state"]; constructor( private $http: ng.IHttpService, private $rootScope: ng.IRootScopeService, - private $urlRouter: ng.ui.IUrlRouterService + private $urlRouter: ng.ui.IUrlRouterService, + private $state: ng.ui.IStateService ) { $rootScope.$on("$locationChangeSuccess", (event: ng.IAngularEvent) => this.onLocationChangeSuccess(event)); } @@ -107,6 +108,23 @@ class UrlLocatorTestService implements IUrlLocatorTestService { }); } } + + private stateServiceTest() { + this.$state.go("myState"); + this.$state.transitionTo("myState"); + if (this.$state.includes("myState") === true) { + // + } + if (this.$state.is("myState") === true) { + // + } + if (this.$state.href("myState") === "/myState") { + // + } + this.$state.get("myState"); + this.$state.get(); + this.$state.reload(); + } } myApp.service("urlLocatorTest", UrlLocatorTestService); @@ -124,4 +142,3 @@ module UiViewScrollProviderTests { $uiViewScrollProvider.useAnchorScroll(); }]); } - diff --git a/angular-ui/angular-ui-router.d.ts b/angular-ui/angular-ui-router.d.ts index 499f1c474..3b233c86a 100644 --- a/angular-ui/angular-ui-router.d.ts +++ b/angular-ui/angular-ui-router.d.ts @@ -86,6 +86,7 @@ declare module ng.ui { get(): IState[]; current: IState; params: IStateParamsService; + reload(): void; } interface IStateParamsService { From 05215ffa2c1e616393b1837eb2df756ca610b83c Mon Sep 17 00:00:00 2001 From: Sean Xu Date: Thu, 5 Jun 2014 14:49:16 -0700 Subject: [PATCH 10/84] Removed references and dependencies to winrt.d.ts. --- winjs/winjs.d.ts | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/winjs/winjs.d.ts b/winjs/winjs.d.ts index 2b8e95c35..8bf65f2e7 100644 --- a/winjs/winjs.d.ts +++ b/winjs/winjs.d.ts @@ -18,8 +18,6 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -/// - /** * Defines an Element object. **/ @@ -31,11 +29,6 @@ interface Element { * Utility class for easy access to operations on application folders **/ interface IOHelper { - /** - * Instance of the currently wrapped application folder - **/ - folder: Windows.Storage.StorageFolder; - /** * Determines whether the specified file exists in the folder. * @param filename The name of the file. @@ -1219,7 +1212,7 @@ declare module WinJS { /** * Provides a mechanism to schedule work to be done on a value that has not yet been computed. It is an abstraction for managing interactions with asynchronous APIs. For more information about asynchronous programming, see Asynchronous programming. For more information about promises in JavaScript, see Asynchronous programming in JavaScript. For more information about using promises, see the WinJS Promise sample. **/ - class Promise implements Windows.Foundation.IPromise { + class Promise { //#region Constructors /** @@ -1316,7 +1309,7 @@ declare module WinJS { * @param onProgress The function to be called if the promise reports progress. Data about the progress is passed as the single argument. Promises are not required to support progress. * @returns The promise whose value is the result of executing the onComplete function. **/ - then(onComplete?: (value: T) => Windows.Foundation.IPromise, onError?: (error: any) => Windows.Foundation.IPromise, onProgress?: (progress: any) => void): Windows.Foundation.IPromise; + then(onComplete?: (value: T) => Promise, onError?: (error: any) => Promise, onProgress?: (progress: any) => void): Promise; /** * Allows you to specify the work to be done on the fulfillment of the promised value, the error handling to be performed if the promise fails to fulfill a value, and the handling of progress notifications along the way. For more information about the differences between then and done, see the following topics: Quickstart: using promises in JavaScript How to handle errors when using promises in JavaScript Chaining promises in JavaScript. @@ -1325,7 +1318,7 @@ declare module WinJS { * @param onProgress The function to be called if the promise reports progress. Data about the progress is passed as the single argument. Promises are not required to support progress. * @returns The promise whose value is the result of executing the onComplete function. **/ - then(onComplete?: (value: T) => Windows.Foundation.IPromise, onError?: (error: any) => U, onProgress?: (progress: any) => void): Windows.Foundation.IPromise; + then(onComplete?: (value: T) => Promise, onError?: (error: any) => U, onProgress?: (progress: any) => void): Promise; /** * Allows you to specify the work to be done on the fulfillment of the promised value, the error handling to be performed if the promise fails to fulfill a value, and the handling of progress notifications along the way. For more information about the differences between then and done, see the following topics: Quickstart: using promises in JavaScript How to handle errors when using promises in JavaScript Chaining promises in JavaScript. @@ -1334,7 +1327,7 @@ declare module WinJS { * @param onProgress The function to be called if the promise reports progress. Data about the progress is passed as the single argument. Promises are not required to support progress. * @returns The promise whose value is the result of executing the onComplete function. **/ - then(onComplete?: (value: T) => U, onError?: (error: any) => Windows.Foundation.IPromise, onProgress?: (progress: any) => void): Windows.Foundation.IPromise; + then(onComplete?: (value: T) => U, onError?: (error: any) => Promise, onProgress?: (progress: any) => void): Promise; /** * Allows you to specify the work to be done on the fulfillment of the promised value, the error handling to be performed if the promise fails to fulfill a value, and the handling of progress notifications along the way. For more information about the differences between then and done, see the following topics: Quickstart: using promises in JavaScript How to handle errors when using promises in JavaScript Chaining promises in JavaScript. @@ -1343,7 +1336,7 @@ declare module WinJS { * @param onProgress The function to be called if the promise reports progress. Data about the progress is passed as the single argument. Promises are not required to support progress. * @returns The promise whose value is the result of executing the onComplete function. **/ - then(onComplete?: (value: T) => U, onError?: (error: any) => U, onProgress?: (progress: any) => void): Windows.Foundation.IPromise; + then(onComplete?: (value: T) => U, onError?: (error: any) => U, onProgress?: (progress: any) => void): Promise; /** * Performs an operation on all the input promises and returns a promise that has the shape of the input and contains the result of the operation that has been performed on each input. @@ -6379,7 +6372,7 @@ declare module WinJS.UI { * Specifies whether suggestions based on local files are automatically displayed in the search pane, and defines the criteria that Windows uses to locate and filter these suggestions. * @param settings The new settings for local content suggestions. **/ - setLocalContentSuggestionSettings(settings: Windows.ApplicationModel.Search.LocalContentSuggestionSettings): void; + setLocalContentSuggestionSettings(settings: any): void; //#endregion Methods @@ -6672,7 +6665,7 @@ declare module WinJS.UI { * @param query The IStorageQueryResultBase that the StorageDataSource obtains its items from. Instead of IStorageQueryResultBase, you can also pass one of these string values: Music, Pictures, Videos, Documents. * @param options The set of properties and values to apply to the new StorageDataSource. Properties on this object may include: mode , requestedThumbnailSize , thumbnailOptions , synchronous . **/ - constructor(query: Windows.Storage.Search.IStorageQueryResultBase, options?: any); + constructor(query: any, options?: any); //#endregion Constructors From d0978a1750ac81c8b971b1f6c80ea4f6f79c2801 Mon Sep 17 00:00:00 2001 From: Sean Xu Date: Thu, 5 Jun 2014 16:46:52 -0700 Subject: [PATCH 11/84] Updated microsoft-live-connect.d.ts that relied on winjs.d.ts pulling in winrt.d.ts. --- microsoft-live-connect/microsoft-live-connect.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/microsoft-live-connect/microsoft-live-connect.d.ts b/microsoft-live-connect/microsoft-live-connect.d.ts index 04ff3ef79..860a31df3 100644 --- a/microsoft-live-connect/microsoft-live-connect.d.ts +++ b/microsoft-live-connect/microsoft-live-connect.d.ts @@ -1,4 +1,5 @@ /// +/// // Type definitions for Microsoft Live Connect v5.0. // Project: http://msdn.microsoft.com/en-us/library/live/hh243643.aspx // Definitions by: John Vilk From 5e1c4e156a74c60c50504b9ac55f3074848c78fe Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Fri, 6 Jun 2014 16:08:25 -0400 Subject: [PATCH 12/84] Add definitions for decoders and ajaxsettings, further defined some instances of "Function" and "any" --- amplifyjs/amplifyjs-tests.ts | 14 ++++++++++++-- amplifyjs/amplifyjs.d.ts | 34 ++++++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/amplifyjs/amplifyjs-tests.ts b/amplifyjs/amplifyjs-tests.ts index c26955348..a104d4a7c 100644 --- a/amplifyjs/amplifyjs-tests.ts +++ b/amplifyjs/amplifyjs-tests.ts @@ -176,8 +176,7 @@ amplify.request("twitter-mentions", { user: "amplifyjs" }); //Example: -amplify.request.decoders.appEnvelope = -function (data, status, xhr, success, error) { +var appEnvelopeDecoder: amplifyDecoder = function (data, status, xhr, success, error) { if (data.status === "success") { success(data.data); } else if (data.status === "fail" || data.status === "error") { @@ -187,6 +186,17 @@ function (data, status, xhr, success, error) { } }; +//a new decoder can be added to the amplifyDecoders interface +interface amplifyDecoders { + appEnvelope: amplifyDecoder; +} + +amplify.request.decoders.appEnvelope = appEnvelopeDecoder; + +//but you can also just add it via an index +amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder; + + amplify.request.define("decoderExample", "ajax", { url: "/myAjaxUrl", type: "POST", diff --git a/amplifyjs/amplifyjs.d.ts b/amplifyjs/amplifyjs.d.ts index c8de7260a..a918b7c73 100644 --- a/amplifyjs/amplifyjs.d.ts +++ b/amplifyjs/amplifyjs.d.ts @@ -1,3 +1,5 @@ +/// + // Type definitions for AmplifyJs 1.1.0 // Project: http://amplifyjs.com/ // Definitions by: Jonas Eriksson @@ -6,8 +8,28 @@ interface amplifyRequestSettings { resourceId: string; data?: any; - success?: Function; - error?: Function; + success?: (...args: any[]) => void; + error?: (...args: any[]) => void; +} + +interface amplifyDecoder { + ( + data?: any, + status?: string, + xhr?: JQueryXHR, + success?: (...args: any[]) => void, + error?: (...args: any[]) => void + ): void +} + +interface amplifyDecoders { + [decoderName: string]: amplifyDecoder; + jsSend: amplifyDecoder; +} + +interface amplifyAjaxSettings extends JQueryAjaxSettings { + cache?: any; + decoder?: any /* string or amplifyDecoder */; } interface amplifyRequest { @@ -39,7 +61,7 @@ interface amplifyRequest { * cache: See the cache section for more details. * decoder: See the decoder section for more details. */ - define(resourceId: string, requestType: string, settings?: any): void; + define(resourceId: string, requestType: string, settings?: amplifyAjaxSettings): void; /*** * Define a custom request. @@ -50,9 +72,9 @@ interface amplifyRequest { * success: Callback to invoke on success. * error: Callback to invoke on error. */ - define(resourceId: string, resource: Function): void; - - decoders: any; + define(resourceId: string, resource: (settings: amplifyRequestSettings) => void): void; + + decoders: amplifyDecoders; cache: any; } From f8502147494d856626816fc14255a5615b8ef0f5 Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Sat, 7 Jun 2014 11:57:20 +0200 Subject: [PATCH 13/84] Added queue.push() method overload that accepts array of strongly typed objects. --- async/async-tests.ts | 16 ++++++++++++++++ async/async.d.ts | 1 + 2 files changed, 17 insertions(+) diff --git a/async/async-tests.ts b/async/async-tests.ts index ae92bbff9..169bc9cb1 100644 --- a/async/async-tests.ts +++ b/async/async-tests.ts @@ -156,6 +156,22 @@ q.push([{ name: 'baz' }, { name: 'bay' }, { name: 'bax' }], function (err) { console.log('finished processing bar'); }); +// tests for strongly typed tasks +var q2 = async.queue(function (task: string, callback) { + console.log('Task: ' + task); + callback(); +}, 1); + +q2.push('task1'); + +q2.push('task2', function (error, results: string[]) { + console.log('Finished tasks: ' + results.join(', ')); +}); + +q2.push(['task3', 'task4', 'task5'], function (error, results: string[]) { + console.log('Finished tasks: ' + results.join(', ')); +}); + var filename = ''; async.auto({ get_data: function (callback) { }, diff --git a/async/async.d.ts b/async/async.d.ts index d85679b68..25736941f 100644 --- a/async/async.d.ts +++ b/async/async.d.ts @@ -16,6 +16,7 @@ interface AsyncQueue { length(): number; concurrency: number; push(task: T, callback?: AsyncMultipleResultsCallback): void; + push(task: T[], callback?: AsyncMultipleResultsCallback): void; saturated: AsyncMultipleResultsCallback; empty: AsyncMultipleResultsCallback; drain: AsyncMultipleResultsCallback; From fa21128d08e51bd690a397400a0d1918ed9e048b Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Sat, 7 Jun 2014 23:29:11 +0100 Subject: [PATCH 14/84] Update hammerjs for version 1.1.3. --- hammerjs/hammerjs.d.ts | 62 +++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/hammerjs/hammerjs.d.ts b/hammerjs/hammerjs.d.ts index 72f09a5e0..f2dff3046 100644 --- a/hammerjs/hammerjs.d.ts +++ b/hammerjs/hammerjs.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Hammer.js 1.0.10 +// Type definitions for Hammer.js 1.1.3 // Project: http://eightmedia.github.com/hammer.js/ // Definitions by: Boris Yankov +// Drew Noakes // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -31,8 +32,6 @@ interface HammerStatic { plugins: any; gestures: any; READY: boolean; - - } declare class HammerInstance { @@ -42,40 +41,51 @@ declare class HammerInstance { off(gesture: string, handler: (event: HammerEvent) => void): HammerInstance; enable(toggle: boolean): HammerInstance; - // You shouldn't use this, this is an internally method use by the gestures. Only use it when you know what you're doing! You can read the sourcecode about how to use this. + // You shouldn't normally use this internal method. Only use it when you know what you're doing! You can read the sourcecode for information about how to use this. trigger(gesture: string, eventData: HammerGestureEventData): HammerInstance; } // Gesture Options : https://github.com/EightMedia/hammer.js/wiki/Getting-Started#gesture-options interface HammerOptions { + behavior?: { + contentZooming?: string; + tapHighlightColor?: string; + touchAction?: string; + touchCallout?: string; + userDrag?: string; + userSelect?: string; + }; + doubleTapDistance?: number; + doubleTapInterval?: number; drag?: boolean; - drag_block_horizontal?: boolean; - drag_block_vertical?: boolean; - drag_lock_to_axis?: boolean; - drag_max_touches?: number; - drag_min_distance?: number; + dragBlockHorizontal?: boolean; + dragBlockVertical?: boolean; + dragDistanceCorrection?: boolean; + dragLockMinDistance?: number; + dragLockToAxis?: boolean; + dragMaxTouches?: number; + dragMinDistance?: number; + gesture?: boolean; hold?: boolean; - hold_threshold?: number; - hold_timeout?: number; - prevent_default?: boolean; - prevent_mouseevents?: boolean; + holdThreshold?: number; + holdTimeout?: number; + preventDefault?: boolean; + preventMouse?: boolean; release?: boolean; - show_touches?: boolean; - stop_browser_behavior?: any; + showTouches?: boolean; swipe?: boolean; - swipe_max_touches?: number; - swipe_velocity?: number; + swipeMaxTouches?: number; + swipeMinTouches?: number; + swipeVelocityX?: number; + swipeVelocityY?: number; tap?: boolean; - tap_always?: boolean; - tap_max_distance?: number; - tap_max_touchtime?: number; - doubletap_distance?: number; - doubletap_interval?: number; + tapAlways?: boolean; + tapMaxDistance?: number; + tapMaxTime?: number; touch?: boolean; transform?: boolean; - transform_always_block?: boolean; - transform_min_rotation?: number; - transform_min_scale?: number; + transformMinRotation?: number; + transformMinScale?: number; } interface HammerGestureEventData { @@ -106,6 +116,8 @@ interface HammerGestureEventData { } interface HammerPoint { + clientX: number; + clientY: number; pageX: number; pageY: number; } From 305768698d48c9bcd17e943fdc1559fe0e47f841 Mon Sep 17 00:00:00 2001 From: Atsushi Kanehara Date: Mon, 9 Jun 2014 15:12:47 +0900 Subject: [PATCH 15/84] fix handleUpgrade signature --- ws/ws.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ws/ws.d.ts b/ws/ws.d.ts index b0b590b92..ef7acc3ba 100644 --- a/ws/ws.d.ts +++ b/ws/ws.d.ts @@ -110,7 +110,7 @@ declare module "ws" { constructor(options?: IServerOptions, callback?: Function); close(): void; - handleUpgrade(request: http.ClientRequest, socket: net.Socket, + handleUpgrade(request: http.ServerRequest, socket: net.Socket, upgradeHead: Buffer, callback: (client: WebSocket) => void): void; // Events From 844eb77d820aa25b337d2066a23db0c7f51c80c5 Mon Sep 17 00:00:00 2001 From: clement911 Date: Tue, 10 Jun 2014 19:14:27 +1000 Subject: [PATCH 16/84] Fix for ix.js groupBy method definition Fix for ix.js groupBy method definition - groupBy returns an Enumerable of group instead of a single group. --- ix.js/l2o.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 209c9b675..dd2220eea 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -91,9 +91,9 @@ declare module Ix { comparer?: EqualityComparer): Enumerable; groupBy( keySelector: (item: T) => TKey, - elementSelector: (item: T) => TElement): Grouping; + elementSelector: (item: T) => TElement): Enumerable>; groupBy( - keySelector: (item: T) => TKey): Grouping; + keySelector: (item: T) => TKey): Enumerable>; // if need to set comparer without resultSelector groupBy( From bcde09c16d9191bfdc3e89e334ef55727fd28a98 Mon Sep 17 00:00:00 2001 From: clement911 Date: Tue, 10 Jun 2014 19:27:58 +1000 Subject: [PATCH 17/84] Fix two more groupBy method overload return types Fix two more groupBy method overload return types --- ix.js/l2o.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index dd2220eea..310e31f01 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -100,7 +100,7 @@ declare module Ix { keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement, _: boolean, - comparer: EqualityComparer): Grouping; + comparer: EqualityComparer): Enumerable>; // if need to set resultSelector without elementSelector groupBy( keySelector: (item: T) => TKey, @@ -112,7 +112,7 @@ declare module Ix { keySelector: (item: T) => TKey, _: boolean, __: boolean, - comparer: EqualityComparer): Grouping; + comparer: EqualityComparer): Enumerable>; groupJoin( inner: Enumerable, From 48a2c183842b9f8ca1141e5f6fa3f0bbcd23fed0 Mon Sep 17 00:00:00 2001 From: Michel Salib Date: Tue, 10 Jun 2014 16:43:12 +0200 Subject: [PATCH 18/84] Adding denodeify definition for Q --- q/Q-tests.ts | 8 +++++--- q/Q.d.ts | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/q/Q-tests.ts b/q/Q-tests.ts index 6b69fb228..56ce130f0 100644 --- a/q/Q-tests.ts +++ b/q/Q-tests.ts @@ -26,7 +26,7 @@ Q.delay("asdf", 1000).then(x => x.length); var eventualAdd = Q.promised((a?: number, b?: number) => a + b); eventualAdd(Q(1), Q(2)).then(x => x.toExponential()); -var eventually = function (eventually) { +var eventually = function (eventually: any) { return Q.delay(eventually, 1000); }; @@ -38,7 +38,7 @@ Q.when(x, function (x) { Q.all([ eventually(10), eventually(20) -]).spread(function (x, y) { +]).spread(function (x: any, y: any) { console.log(x, y); }); @@ -97,7 +97,7 @@ Q.when(Q(8), num => num + "!").then(str => str.split(',')); declare function saveToDisk(): Q.Promise; declare function saveToCloud(): Q.Promise; -Q.allSettled([saveToDisk(), saveToCloud()]).spread(function (disk, cloud) { +Q.allSettled([saveToDisk(), saveToCloud()]).spread(function (disk: any, cloud: any) { console.log("saved to disk:", disk.state === "fulfilled"); console.log("saved to cloud:", cloud.state === "fulfilled"); @@ -115,3 +115,5 @@ var nodeStyle = (input: string, cb: Function) => { Q.nfapply(nodeStyle, ["foo"]).done((result: string) => {}); Q.nfcall(nodeStyle, "foo").done((result: string) => {}); +Q.denodeify(nodeStyle)('foo').done((result: string) => {}); +Q.nfbind(nodeStyle)('foo').done((result: string) => {}); \ No newline at end of file diff --git a/q/Q.d.ts b/q/Q.d.ts index 65b2b8223..af3e8bea0 100644 --- a/q/Q.d.ts +++ b/q/Q.d.ts @@ -207,6 +207,7 @@ declare module Q { export function invoke(obj: any, functionName: string, ...args: any[]): Promise; export function mcall(obj: any, functionName: string, ...args: any[]): Promise; + export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; export function nfcall(nodeFunction: Function, ...args: any[]): Promise; export function nfapply(nodeFunction: Function, args: any[]): Promise; From 592d67eb21a7ffff9d769f5e8c88584656e49cf4 Mon Sep 17 00:00:00 2001 From: Michel Salib Date: Tue, 10 Jun 2014 17:13:54 +0200 Subject: [PATCH 19/84] Add xml2js definition --- CONTRIBUTORS.md | 1 + xml2js/xml2js-tests.ts | 7 +++++++ xml2js/xml2js.d.ts | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 xml2js/xml2js-tests.ts create mode 100644 xml2js/xml2js.d.ts diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 801a1d07a..e026bac5b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -326,6 +326,7 @@ All definitions files include a header with the author and editors, so at some p * [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) (from TypeScript samples) * [ws](http://einaros.github.io/ws/) (by [Paul Loyd](https://github.com/loyd)) * [x2js](https://code.google.com/p/x2js/) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) +* [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) (by [Michel Salib](https://github.com/michelsalib)) * [XRegExp](http://xregexp.com/) (by [Bart van der Schoor](https://github.com/Bartvds)) * [YouTube](https://developers.google.com/youtube/) (by [Daz Wilkin](https://github.com/DazWilkin/)) * [YouTube Analytics API](https://developers.google.com/youtube/analytics/) (by [Frank M](https://github.com/sgtfrankieboy)) diff --git a/xml2js/xml2js-tests.ts b/xml2js/xml2js-tests.ts new file mode 100644 index 000000000..3e3fbb661 --- /dev/null +++ b/xml2js/xml2js-tests.ts @@ -0,0 +1,7 @@ +/// + +import xml2js = require('xml2js'); + +xml2js.parseString("Hello xml2js!", (err: any, result: any) => { }); + +xml2js.parseString("Hello xml2js!", {trim: true}, (err: any, result: any) => { }); diff --git a/xml2js/xml2js.d.ts b/xml2js/xml2js.d.ts new file mode 100644 index 000000000..2b5aabc4d --- /dev/null +++ b/xml2js/xml2js.d.ts @@ -0,0 +1,36 @@ +// Type definitions for node-xml2js +// Project: https://github.com/Leonidas-from-XIV/node-xml2js +// Definitions by: Michel Salib +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'xml2js' { + + export = xml2js; + + module xml2js { + function parseString(xml:string, callback: (err: any, result:any) => void): void; + function parseString(xml:string, options: Options, callback: (err: any, result:any) => void): void; + + interface Options { + attrkey?: string; + charkey?: string; + explicitCharkey?: boolean; + trim?: boolean; + normalizeTags?: boolean; + normalize?: boolean; + explicitRoot?: boolean; + emptyTag?: any; + explicitArray?: boolean; + ignoreAttrs?: boolean; + mergeAttrs?: boolean; + validator?: Function; + xmlns?: boolean; + explicitChildren?: boolean; + charsAsChildren?: boolean; + async?: boolean; + strict?: boolean; + attrNameProcessors?: (name: string) => string; + tagNameProcessors?: (name: string) => string; + } + } +} From 85785cef1ae7e77ea07fdf3d52bac1207f313a0b Mon Sep 17 00:00:00 2001 From: Jesica Fera Date: Tue, 10 Jun 2014 12:15:35 -0300 Subject: [PATCH 20/84] Making parameter optional --- jquery.dynatree/jquery.dynatree.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.dynatree/jquery.dynatree.d.ts b/jquery.dynatree/jquery.dynatree.d.ts index a63148723..adf8b5399 100644 --- a/jquery.dynatree/jquery.dynatree.d.ts +++ b/jquery.dynatree/jquery.dynatree.d.ts @@ -40,7 +40,7 @@ interface DynaTree { renderInvisibleNodes(): void; selectKey(key: string, flag: string): DynaTreeNode; serializeArray(stopOnParents: boolean): any[]; - toDict(includeRoot: boolean): any; + toDict(includeRoot?: boolean): any; visit(fn: (node: DynaTreeNode) =>boolean, includeRoot: boolean): void; } From 86146879bdbdd5efe89a667dd44b0853188537a9 Mon Sep 17 00:00:00 2001 From: Dan Spencer Date: Tue, 10 Jun 2014 17:20:28 +0100 Subject: [PATCH 21/84] Changed .reply definition to allow objects as for body parameter --- nock/nock-tests.ts | 3 +++ nock/nock.d.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/nock/nock-tests.ts b/nock/nock-tests.ts index b3b68dd20..f3c166aa1 100644 --- a/nock/nock-tests.ts +++ b/nock/nock-tests.ts @@ -7,6 +7,7 @@ var str: string; var bool: boolean; var data: string; var num: number; +var obj: {}; var value: any; var regex: RegExp; var options: nock.Options; @@ -29,7 +30,9 @@ inst = inst.intercept(str, str, str, value); inst = inst.reply(num); inst = inst.reply(num, str); + inst = inst.reply(num, str, headers); +inst = inst.reply(num, obj, headers); inst = inst.reply(num, (uri: string, body: string) => { return str; }); diff --git a/nock/nock.d.ts b/nock/nock.d.ts index 9c8aaac2e..40b728d49 100644 --- a/nock/nock.d.ts +++ b/nock/nock.d.ts @@ -23,6 +23,7 @@ declare module "nock" { intercept(path: string, verb: string, body?: string, options?: any): Scope; reply(responseCode: number, body?: string, headers?: Object): Scope; + reply(responseCode: number, body?: Object, headers?: Object): Scope; reply(responseCode: number, callback: (uri: string, body: string) => string, headers?: Object): Scope; replyWithFile(responseCode: number, fileName: string): Scope; From 5d678c6a5b3c33fed5e0944f135947ce1fde5f65 Mon Sep 17 00:00:00 2001 From: Jesica Fera Date: Tue, 10 Jun 2014 16:38:06 -0300 Subject: [PATCH 22/84] Adding type definitions for bootstrap-datetimepicker for bootstrap v3 --- .../boostrap.v3.datetimepicker-tests.ts | 31 ++++++ .../bootstrap.v3.datetimepicker.d.ts | 100 ++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 bootstrap.v3.datetimepicker/boostrap.v3.datetimepicker-tests.ts create mode 100644 bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts diff --git a/bootstrap.v3.datetimepicker/boostrap.v3.datetimepicker-tests.ts b/bootstrap.v3.datetimepicker/boostrap.v3.datetimepicker-tests.ts new file mode 100644 index 000000000..6abf38f94 --- /dev/null +++ b/bootstrap.v3.datetimepicker/boostrap.v3.datetimepicker-tests.ts @@ -0,0 +1,31 @@ +/// +/// + +function test_cases() { + $('#datetimepicker').datetimepicker(); + $('#datetimepicker').datetimepicker({ + pickDate: false + }); + $('#datetimepicker').datetimepicker({ + pickTime: false + }); + $('#datetimepicker').datetimepicker({ + minDate: '2012-12-31' + }); + + $('#datetimepicker').data("DateTimePicker").setMaxDate('2012-12-31'); + + var startDate = new Date(2012, 1, 20); + var endDate = new Date(2012, 1, 25); + $('#datetimepicker2') + .datetimepicker() + .on("dp.change", function (ev) { + if (ev.date.valueOf() > endDate.valueOf()) { + $('#alert').show().find('strong').text('The start date must be before the end date.'); + } else { + $('#alert').hide(); + startDate = ev.date; + $('#date-start-display').text($('#date-start').data('date')); + } + }); +} \ No newline at end of file diff --git a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts b/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts new file mode 100644 index 000000000..6f1147cc1 --- /dev/null +++ b/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts @@ -0,0 +1,100 @@ +// Type definitions for Bootstrap datetimepicker v3 +// Project: http://eonasdan.github.io/bootstrap-datetimepicker +// Definitions by: Jesica N. Fera +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/** + * bootstrap-datetimepicker.js 3.0.0 Copyright (c) 2014 Jonathan Peterson + * Available via the MIT license. + * see: http://eonasdan.github.io/bootstrap-datetimepicker or https://github.com/Eonasdan/bootstrap-datetimepicker for details. + */ + +/// + +declare module BootstrapV3DatetimePicker { + interface DatetimepickerChangeEventObject extends JQueryEventObject { + date: any; + oldDate: any; + } + + interface DatetimepickerEventObject extends JQueryEventObject { + date: any; + } + + interface DatetimepickerIcons { + time?: string; + date?: string; + up?: string; + down?: string; + } + + interface DatetimepickerOptions { + pickDate?: boolean; + pickTime?: boolean; + useMinutes?: boolean; + useSeconds?: boolean; + useCurrent?: boolean; + minuteStepping?: number; + minDate?: any; + maxDate?: any; + showToday?: boolean; + collapse?: boolean; + language?: string; + defaultDate?: string; + disabledDates?: Array; + enabledDates?: Array; + icons?: DatetimepickerIcons; + useStrict?: boolean; + direction?: string; + sideBySide?: boolean; + daysOfWeekDisabled?: Array; + } + + interface Datetimepicker { + setDate(date: any): void; + setMinDate(date: any): void; + setMaxDate(date: any): void; + show(): void; + disable(): void; + enable(): void; + getDate(): void; + } + +} + + +interface JQuery { + + datetimepicker(): JQuery; + datetimepicker(options: BootstrapV3DatetimePicker.DatetimepickerOptions): JQuery; + + off(events: "dp.change", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery; + off(events: "dp.change", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery; + + on(events: "dp.change", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery; + on(events: "dp.change", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery; + on(events: 'dp.change', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerChangeEventObject) => any): JQuery; + + off(events: "dp.show", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + off(events: "dp.show", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + + on(events: "dp.show", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + on(events: "dp.show", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + on(events: 'dp.show', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + + off(events: "dp.hide", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + off(events: "dp.hide", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + + on(events: "dp.hide", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + on(events: "dp.hide", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + on(events: 'dp.hide', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + + off(events: "dp.error", selector?: string, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + off(events: "dp.error", handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + + on(events: "dp.error", selector: string, data: any, handler?: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + on(events: "dp.error", selector: string, handler: (eventobject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + on(events: 'dp.error', handler: (eventObject: BootstrapV3DatetimePicker.DatetimepickerEventObject) => any): JQuery; + + data(key: 'DateTimePicker'): BootstrapV3DatetimePicker.Datetimepicker; +} \ No newline at end of file From 18643316988e5d2855d1e87e8cb4ad614c7cc065 Mon Sep 17 00:00:00 2001 From: Vadim Safiullin Date: Wed, 11 Jun 2014 02:07:39 +0400 Subject: [PATCH 23/84] Added support for Google Chrome Notification API API described at https://developer.chrome.com/extensions/notifications --- chrome/chrome.d.ts | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index e8e0f0639..d7aee083e 100755 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1232,6 +1232,68 @@ declare module chrome.management { var onEnabled: ManagementEnabledEvent; } +//////////////////// +// Notifications +// https://developer.chrome.com/extensions/notifications +//////////////////// +declare module chrome.notifications { + interface ButtonOptions { + title: string; + iconUrl?: string; + } + + interface ItemOptions { + title: string; + message: string; + } + + interface NotificationOptions { + type?: string; + iconUrl?: string; + title?: string; + message?: string; + contextMessage?: string; + priority?: number; + eventTime?: number; + buttons?: Array; + items?: Array; + progress?: number; + isClickable?: boolean; + } + + interface OnClosed { + addListener(callback: (notificationId: string, byUser: boolean) => void): void; + } + + interface OnClicked { + addListener(callback: (notificationId: string) => void): void; + } + + interface OnButtonClicked { + addListener(callback: (notificationId: string, buttonIndex: number) => void): void; + } + + interface OnPermissionLevelChanged { + addListener(callback: (level: string) => void): void; + } + + interface OnShowSettings { + addListener(callback: Function): void; + } + + export var onClosed: OnClosed; + export var onClicked: OnClicked; + export var onButtonClicked: OnButtonClicked; + export var onPermissionLevelChanged: OnPermissionLevelChanged; + export var onShowSettings: OnShowSettings; + + export function create(notificationId: string, options: NotificationOptions, callback: (notificationId: string) => void): void; + export function update(notificationId: string, options: NotificationOptions, callback: (wasUpdated: boolean) => void): void; + export function clear(notificationId: string, callback: (wasCleared: boolean) => void): void; + export function getAll(callback: (notifications: any) => void): void; + export function getPermissionLevel(callback: (level: string) => void): void; +} + //////////////////// // Omnibox //////////////////// From 1a1301e6d2aa8644e46b4ff6909e717f22e3cc36 Mon Sep 17 00:00:00 2001 From: Knut Eirik Leira Hjelle Date: Wed, 11 Jun 2014 09:41:33 +0200 Subject: [PATCH 24/84] Added Mixpanel definition. --- mixpanel/mixpanel-tests.ts | 72 ++++++++++++++++++++++++++++++++++++++ mixpanel/mixpanel.d.ts | 69 ++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 mixpanel/mixpanel-tests.ts create mode 100644 mixpanel/mixpanel.d.ts diff --git a/mixpanel/mixpanel-tests.ts b/mixpanel/mixpanel-tests.ts new file mode 100644 index 000000000..fd52bd989 --- /dev/null +++ b/mixpanel/mixpanel-tests.ts @@ -0,0 +1,72 @@ +/// +var mixpanel = new Mixpanel(); + +function mixpanel_base() +{ + mixpanel.init("new token", { your: "config" }, "library_name"); + + mixpanel.push(['register', { a: 'b' }]); + + mixpanel.disable(['my_event']); + + mixpanel.track("Registered", {"Gender": "Male", "Age": 21}); + + mixpanel.track_links("#nav", "Clicked Nav Link"); + + mixpanel.track_forms("#register", "Created Account"); + + mixpanel.register({device: 'android', version: '4.0.1'}); + + mixpanel.register_once({device: 'android', version: '4.0.1'}); + + mixpanel.unregister('device'); + + mixpanel.identify('234234sdfdsf'); + + mixpanel.get_distinct_id(); + + mixpanel.alias('w3erwfsdf', '234234sdfdsf'); + + mixpanel.set_config({test: true}); + + mixpanel.get_config(); + + mixpanel.get_property('device'); +} + +function mixpanel_people() +{ + mixpanel.people.set('gender', 'm'); + mixpanel.people.set({ + 'Company': 'Acme', + 'Plan': 'Premium', + 'Upgrade date': new Date() + }); + + mixpanel.people.set_once('First Login Date', new Date()); + mixpanel.people.set_once({ + 'First Login Date': new Date(), + 'Starting Plan': 'Premium' + }); + + mixpanel.people.increment('page_views', 1); + mixpanel.people.increment('page_views'); + mixpanel.people.increment('credits_left', -1); + mixpanel.people.increment({ + counter1: 1, + counter2: 1 + }); + + mixpanel.people.append('pages_visited', 'homepage'); + mixpanel.people.append({ + list1: 'bob', + list2: 123 + }); + + mixpanel.people.track_charge(50); + mixpanel.people.track_charge(30.50, {'$time': new Date('jan 1 2012')}); + + mixpanel.people.clear_charges(); + + mixpanel.people.delete_user(); +} diff --git a/mixpanel/mixpanel.d.ts b/mixpanel/mixpanel.d.ts new file mode 100644 index 000000000..236899632 --- /dev/null +++ b/mixpanel/mixpanel.d.ts @@ -0,0 +1,69 @@ +// Type definitions for Mixpanel +// Project: https://mixpanel.com/ (https://github.com/mixpanel/mixpanel-js) +// Definitions by: Knut Eirik Leira Hjelle +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare class Mixpanel +{ + people:Mixpanel.People; + + init(token:string, config:{[index:string]:any}, libraryName:string):Mixpanel; + + push(item:any[]):void; + + disable(events?:string[]):void; + + track(eventName:string, params?:{[index:string]:any}, callback?:() => void):void; + + track_links(querySelector:string, eventName:string, params?:{[index:string]:any}):void; + + track_forms(querySelector:string, eventName:string, params?:{[index:string]:any}):void; + + register(params:{[index:string]:any}, days?:number):void; + + register_once(params:{[index:string]:any}, defaultValue?:string, days?:number):void; + + unregister(propertyName:string):void; + + identify(id:string):void; + + get_distinct_id():string; + + alias(alias:string, currentId?:string):void; + + set_config(config:{[index:string]:any}):void; + + get_config():{[index:string]:any}; + + get_property(propertyName:string):any; +} + +declare module Mixpanel +{ + class People + { + set(keys:{[index:string]:any}, callback?:() => void):void; + + set(key:string, value:any, callback?:() => void):void; + + set_once(keys:{[index:string]:any}, callback?:() => void):void; + + set_once(key:string, value:any, callback?:() => void):void; + + increment(key:string):void; + + increment(keys:{[index:string]:number}):void; + + increment(key:string, value:number):void; + + append(keys:{[index:string]:any}):void; + + append(key:string, value:any):void; + + track_charge(amount:number, params?:{[index:string]:any}, callback?:() => void):void; + + clear_charges():void; + + delete_user():void; + } +} \ No newline at end of file From 7643a269b2697e7be29f65fe920d53db55421c09 Mon Sep 17 00:00:00 2001 From: noxhj Date: Wed, 11 Jun 2014 13:01:26 +0200 Subject: [PATCH 25/84] Add responseJSON attribute to JQueryXHR --- jquery/jquery-tests.ts | 3 +++ jquery/jquery.d.ts | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index 81ddb3ae1..b0f5dfc9a 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -86,6 +86,9 @@ function test_ajax() { success: function (data) { $('.result').html(data); alert('Load was performed.'); + }, + error: function (jqXHR, textStatus, errorThrown) { + alert('Load ailed. responseJSON=' + jqXHR.responseJSON); } }); var _super = jQuery.ajaxSettings.xhr; diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 70a9532ab..bb5a73fd9 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -80,7 +80,7 @@ interface JQueryAjaxSettings { /** * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. */ - error? (jqXHR: JQueryXHR, textStatus: string, errorThrow: string): any; + error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any; /** * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. */ @@ -168,6 +168,10 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise { */ overrideMimeType(mimeType: string): any; abort(statusText?: string): void; + /** + * Property containing the parsed response if the response Content-Type is json + */ + responseJSON: any; } /** From 1555e362532efa5e61acb5ef909b2c2d6d789f36 Mon Sep 17 00:00:00 2001 From: Nicholas Oxh Date: Wed, 11 Jun 2014 16:35:24 +0200 Subject: [PATCH 26/84] Update jquery-tests.ts Fix spelling... --- jquery/jquery-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index b0f5dfc9a..85020c870 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -6,7 +6,7 @@ function test_add() { $('li').add('p').css('background-color', 'red'); $('li').add(document.getElementsByTagName('p')[0]) - .css('background-color', 'red'); + .css('background-coailor', 'red'); $('li').add('

new paragraph

') .css('background-color', 'red'); $("div").css("border", "2px solid red") @@ -88,7 +88,7 @@ function test_ajax() { alert('Load was performed.'); }, error: function (jqXHR, textStatus, errorThrown) { - alert('Load ailed. responseJSON=' + jqXHR.responseJSON); + alert('Load failed. responseJSON=' + jqXHR.responseJSON); } }); var _super = jQuery.ajaxSettings.xhr; From 73e8a6b08e4818490848216d49705d31daf157ee Mon Sep 17 00:00:00 2001 From: Nicholas Oxh Date: Thu, 12 Jun 2014 07:06:12 +0200 Subject: [PATCH 27/84] Update jquery.d.ts Make responseJSON optional, since it is only present on jqXHR if the Content-Type of the response is "application/json". Since responseJSON is an "output" parameter on jqXHR, I don't think it makes any functional difference, if it is marked as optional or not, but logically it probably makes more sense... --- jquery/jquery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index bb5a73fd9..e6cba94d2 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -171,7 +171,7 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise { /** * Property containing the parsed response if the response Content-Type is json */ - responseJSON: any; + responseJSON?: any; } /** From ddf90b4d8138fdd42bd8c4f6f12a80ec296baacc Mon Sep 17 00:00:00 2001 From: Knut Eirik Leira Hjelle Date: Thu, 12 Jun 2014 10:24:36 +0200 Subject: [PATCH 28/84] Changed definition to interfaces, added global var mixpanel. --- mixpanel/mixpanel-tests.ts | 2 -- mixpanel/mixpanel.d.ts | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mixpanel/mixpanel-tests.ts b/mixpanel/mixpanel-tests.ts index fd52bd989..a9cf296c3 100644 --- a/mixpanel/mixpanel-tests.ts +++ b/mixpanel/mixpanel-tests.ts @@ -1,6 +1,4 @@ /// -var mixpanel = new Mixpanel(); - function mixpanel_base() { mixpanel.init("new token", { your: "config" }, "library_name"); diff --git a/mixpanel/mixpanel.d.ts b/mixpanel/mixpanel.d.ts index 236899632..9d1ef9527 100644 --- a/mixpanel/mixpanel.d.ts +++ b/mixpanel/mixpanel.d.ts @@ -3,7 +3,7 @@ // Definitions by: Knut Eirik Leira Hjelle // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare class Mixpanel +interface Mixpanel { people:Mixpanel.People; @@ -40,7 +40,7 @@ declare class Mixpanel declare module Mixpanel { - class People + interface People { set(keys:{[index:string]:any}, callback?:() => void):void; @@ -66,4 +66,6 @@ declare module Mixpanel delete_user():void; } -} \ No newline at end of file +} + +declare var mixpanel:Mixpanel; \ No newline at end of file From 32c78eedd876b6456d8082cfbc2f960e0cde6b1b Mon Sep 17 00:00:00 2001 From: Knut Eirik Leira Hjelle Date: Thu, 12 Jun 2014 10:28:18 +0200 Subject: [PATCH 29/84] Added contribution entry. --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 801a1d07a..9bc1f3698 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -218,6 +218,7 @@ All definitions files include a header with the author and editors, so at some p * [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) (by [John Vilk](https://github.com/jvilk)) * [Minimatch](https://github.com/isaacs/minimatch) (by [vvakame](https://github.com/vvakame)) * [minimist](https://github.com/substack/minimist) (by [Bart van der Schoor](https://github.com/Bartvds)) +* [Mixpanel](https://github.com/mixpanel/mixpanel-js) (by [Knut Eirik Leira Hjelle](https://github.com/hjellek)) * [mixto](https://github.com/atom/mixto) (by [vvakame](https://github.com/vvakame)) * [Modernizr](http://modernizr.com/) (by [Boris Yankov](https://github.com/borisyankov) and [Theodore Brown](https://github.com/theodorejb/)) * [Moment.js](https://github.com/timrwood/moment) (by [Michael Lakerveld](https://github.com/Lakerfield)) From e9be9177f6ef097329e080c70010f81dab08bf4d Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 12 Jun 2014 18:36:47 +0900 Subject: [PATCH 30/84] remove not required .tscparams --- async/async.d.ts.tscparams | 1 - async/asyncamd-tests.ts.tscparams | 1 - chai/chai-assert-tests.ts.tscparams | 1 - q/Q-tests.ts.tscparams | 1 - 4 files changed, 4 deletions(-) delete mode 100644 async/async.d.ts.tscparams delete mode 100644 async/asyncamd-tests.ts.tscparams delete mode 100644 chai/chai-assert-tests.ts.tscparams delete mode 100644 q/Q-tests.ts.tscparams diff --git a/async/async.d.ts.tscparams b/async/async.d.ts.tscparams deleted file mode 100644 index e16c76dff..000000000 --- a/async/async.d.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ -"" diff --git a/async/asyncamd-tests.ts.tscparams b/async/asyncamd-tests.ts.tscparams deleted file mode 100644 index e16c76dff..000000000 --- a/async/asyncamd-tests.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ -"" diff --git a/chai/chai-assert-tests.ts.tscparams b/chai/chai-assert-tests.ts.tscparams deleted file mode 100644 index e16c76dff..000000000 --- a/chai/chai-assert-tests.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ -"" diff --git a/q/Q-tests.ts.tscparams b/q/Q-tests.ts.tscparams deleted file mode 100644 index e16c76dff..000000000 --- a/q/Q-tests.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ -"" From c757d598845158c06b95cf4e63e05d0876df1198 Mon Sep 17 00:00:00 2001 From: Greg Smith Date: Thu, 12 Jun 2014 11:36:40 -0500 Subject: [PATCH 31/84] Add type definitions for Fuse.js --- fuse/fuse-tests.ts | 73 ++++++++++++++++++++++++++++++++++++++++++++++ fuse/fuse.d.ts | 28 ++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 fuse/fuse-tests.ts create mode 100644 fuse/fuse.d.ts diff --git a/fuse/fuse-tests.ts b/fuse/fuse-tests.ts new file mode 100644 index 000000000..3aa5576fe --- /dev/null +++ b/fuse/fuse-tests.ts @@ -0,0 +1,73 @@ +/// + +function test_fuse_find_identifiers() { + var books = [{ + id: 1, + title: 'The Great Gatsby', + author: 'F. Scott Fitzgerald' + }, { + id: 2, + title: 'The DaVinci Code', + author: 'Dan Brown' + }, { + id: 3, + title: 'Angels & Demons', + author: 'Dan Brown' + }]; + var options = { + keys: ['author', 'title'], // keys to search in + id: 'id' // return a list of identifiers only + }; + var f = new Fuse(books, options); + var result = f.search('brwn'); // Fuzzy-search for pattern 'brwn' +} + +function test_fuse_find_records() { + var books = [{ + id: 1, + title: 'The Great Gatsby', + author: 'F. Scott Fitzgerald' + }, { + id: 2, + title: 'The DaVinci Code', + author: 'Dan Brown' + }, { + id: 3, + title: 'Angels & Demons', + author: 'Dan Brown' + }]; + var options = { + keys: ['author', 'title'] + }; + var f = new Fuse(books, options); + var result = f.search('brwn'); +} + +function test_fuse_flat_array() { + var books = ["Old Man's War", "The Lock Artist", "HTML5", "Right Ho Jeeves", "The Code of the Wooster", "Thank You Jeeves", "The DaVinci Code", "Angels & Demons", "The Silmarillion", "Syrup", "The Lost Symbol", "The Book of Lies", "Lamb", "Fool", "Incompetence", "Fat", "Colony", "Backwards, Red Dwarf", "The Grand Design", "The Book of Samson", "The Preservationist", "Fallen", "Monster 1959"]; + var f = new Fuse(books); + var result = f.search('Falen'); +} + +function test_fuse_deep_key_search() { + var books = [{ + id: 1, + title: 'The Great Gatsby', + author: { + firstName: 'F. Scott', + lastName: 'Fitzgerald' + } + }, { + title: 'The DaVinci Code', + author: { + firstName: 'Dan', + lastName: 'Brown' + } + }]; + + var options = { + keys: ['author.firstName'] + } + var f = new Fuse(books, options); + var result = f.search('brwn'); +} diff --git a/fuse/fuse.d.ts b/fuse/fuse.d.ts new file mode 100644 index 000000000..bf175bff6 --- /dev/null +++ b/fuse/fuse.d.ts @@ -0,0 +1,28 @@ +// Type definitions for Fuse.js 1.1.5 +// Project: https://github.com/krisk/Fuse +// Definitions by: Greg Smith +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare class Fuse { + constructor(list: any[], options?: fuse.IFuseOptions); + search(pattern: string): any[]; +} + +declare module fuse { + interface IFuseOptions extends ISearchOptions { + caseSensitive?: boolean; + includeScore?: boolean; + shouldSort?: boolean; + searchFn?: any; + sortFn?: (a: {score: number}, b: {score: number}) => number; + getFn?: (obj: any, path: string) => any; + keys?: string[]; + } + + interface ISearchOptions { + location?: number; + distance?: number; + threshold?: number; + maxPatternLength?: number; + } +} From 9668910c1a874dfed1d2008fc858da7389aefeb4 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Fri, 13 Jun 2014 01:24:17 +0200 Subject: [PATCH 32/84] updated parsimmon to v0.4.0 --- parsimmon/parsimmon-tests.ts | 15 +++++++++++++-- parsimmon/parsimmon.d.ts | 20 +++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/parsimmon/parsimmon-tests.ts b/parsimmon/parsimmon-tests.ts index 16d1510b5..d1f3d4e6b 100644 --- a/parsimmon/parsimmon-tests.ts +++ b/parsimmon/parsimmon-tests.ts @@ -55,6 +55,11 @@ foo = fooPar.parse(str); fooPar = fooPar.or(fooPar); anyPar = fooPar.or(barPar); +barPar = fooPar.chain((f) => { + foo = f; + return barPar; +}); + barPar = fooPar.then((f) => { foo = f; return barPar; @@ -82,6 +87,8 @@ fooArrPar = fooPar.atLeast(num); fooMarkPar = fooPar.mark(); +fooPar = fooPar.desc(str); + // -- -- -- -- -- -- -- -- -- -- -- -- -- strPar = P.string(str); @@ -92,6 +99,10 @@ fooPar = P.succeed(foo); fooArrPar = P.seq(fooPar, fooPar); anyArrPar = P.seq(barPar, fooPar, numPar); +fooPar = P.alt(fooPar, fooPar); +anyPar = P.alt(barPar, fooPar, numPar); + + fooPar = P.lazy(() => { return fooPar; }); @@ -112,5 +123,5 @@ strPar = P.optWhitespace; strPar = P.any; strPar = P.all; -strPar = P.eof; -numPar = P.index; \ No newline at end of file +voidPar = P.eof; +numPar = P.index; diff --git a/parsimmon/parsimmon.d.ts b/parsimmon/parsimmon.d.ts index 435ea285a..2bf24cba7 100644 --- a/parsimmon/parsimmon.d.ts +++ b/parsimmon/parsimmon.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Parsimmon 0.3.0 +// Type definitions for Parsimmon 0.4.0 // Project: https://github.com/jayferd/parsimmon // Definitions by: Bart van der Schoor // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -24,6 +24,10 @@ declare module 'parsimmon' { */ or(otherParser: Parser): Parser; or(otherParser: Parser): Parser; + /* + returns a new parser which tries parser, and on success calls the given function with the result of the parse, which is expected to return another parser, which will be tried next + */ + chain(next: (result: T) => Parser): Parser; /* returns a new parser which tries parser, and on success calls the given function with the result of the parse, which is expected to return another parser. */ @@ -65,9 +69,11 @@ declare module 'parsimmon' { */ atLeast(n: number): Parser; /* - yields an object with start, value, and end keys, where value is the original value yielded by the parser, and start and end are the indices in the stream that contain the parsed text. + returns a new parser whose failure message is the passed description. */ mark(): Parser>; + + desc(description: string): Parser; } /* is a parser that expects to find "my-string", and will yield the same. @@ -87,12 +93,20 @@ declare module 'parsimmon' { /* accepts a variable number of parsers that it expects to find in order, yielding an array of the results. */ + export function seq(...parsers: Parser[]): Parser; export function seq(...parsers: Parser[]): Parser; + /* + accepts a variable number of parsers, and yields the value of the first one that succeeds, backtracking in between. + */ + export function alt(...parsers: Parser[]): Parser; + export function alt(...parsers: Parser[]): Parser; + /* accepts a function that returns a parser, which is evaluated the first time the parser is used. This is useful for referencing parsers that haven't yet been defined. */ export function lazy(f: () => Parser): Parser; + export function lazy(description: string, f: () => Parser): Parser; /* fail paring with a message @@ -135,7 +149,7 @@ declare module 'parsimmon' { /* expects the end of the stream. */ - export var eof: Parser; + export var eof: Parser; /* is a parser that yields the current index of the parse. */ From a1fb03f3b6e07261d9c3176b8a097ce3b729cfb0 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Fri, 13 Jun 2014 10:44:14 +0200 Subject: [PATCH 33/84] updated Joi to v4.6.0 --- joi/joi-tests.ts | 320 ++++++++++++++++++++++++++++++++++++----------- joi/joi.d.ts | 140 ++++++++++++++++++--- 2 files changed, 366 insertions(+), 94 deletions(-) diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index 45a46dcd0..26048a9dc 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -29,27 +29,6 @@ var funcArr: Function[] = []; // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -var validOpts: Joi.ValidationOptions = null; - -validOpts = {abortEarly: bool}; -validOpts = {convert: bool}; -validOpts = {allowUnknown: bool}; -validOpts = {skipFunctions: bool}; -validOpts = {stripUnknown: bool}; -validOpts = {language: bool}; - -// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- - -var renOpts: Joi.RenameOptions = null; - -renOpts = {alias: bool}; -renOpts = {multiple: bool}; -renOpts = {override: bool}; - -var validErr: Joi.ValidationError = null; - -// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- - var schema: Joi.Schema = null; var anySchema: Joi.AnySchema = null; @@ -61,9 +40,66 @@ var binSchema: Joi.BinarySchema = null; var dateSchema: Joi.DateSchema = null; var funcSchema: Joi.FunctionSchema = null; var objSchema: Joi.ObjectSchema = null; +var altSchema: Joi.AlternativesSchema = null; var schemaArr: Joi.Schema[] = []; +var ref: Joi.Reference = null; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +var validOpts: Joi.ValidationOptions = null; + +validOpts = {abortEarly: bool}; +validOpts = {convert: bool}; +validOpts = {allowUnknown: bool}; +validOpts = {skipFunctions: bool}; +validOpts = {stripUnknown: bool}; +validOpts = {language: bool}; +validOpts = {context: obj}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +var renOpts: Joi.RenameOptions = null; + +renOpts = {alias: bool}; +renOpts = {multiple: bool}; +renOpts = {override: bool}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +var whenOpts: Joi.WhenOptions = null; + +whenOpts = {is: schema}; +whenOpts = {is: schema, then: schema}; +whenOpts = {is: schema, otherwise: schema}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +var refOpts: Joi.ReferenceOptions = null; + +refOpts = {alias: bool}; +refOpts = {multiple: bool}; +refOpts = {override: bool}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +var validErr: Joi.ValidationError = null; +var validErrItem: Joi.ValidationErrorItem; + +validErrItem= { + message: str, + type: str, + path: str +}; + +validErrItem = { + message: str, + type: str, + path: str, + options: validOpts +}; + // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- schema = anySchema; @@ -76,6 +112,8 @@ schema = dateSchema; schema = funcSchema; schema = objSchema; +schema = ref; + anySchema = anySchema; anySchema = numSchema; anySchema = strSchema; @@ -99,18 +137,22 @@ schemaMap = { anySchema = Joi.any(); -anySchema.validate(x, (err: Joi.ValidationError, value: any) => { - -}); - module common { anySchema = anySchema.allow(x); + anySchema = anySchema.allow(x, x); + anySchema = anySchema.allow([x, x, x]); anySchema = anySchema.valid(x); + anySchema = anySchema.valid(x, x); + anySchema = anySchema.valid([x, x, x]); anySchema = anySchema.invalid(x); + anySchema = anySchema.invalid(x, x); + anySchema = anySchema.invalid([x, x, x]); + anySchema = anySchema.default(x); anySchema = anySchema.required(); anySchema = anySchema.optional(); + anySchema = anySchema.forbidden(); anySchema = anySchema.description(str); anySchema = anySchema.notes(str); @@ -118,8 +160,16 @@ module common { anySchema = anySchema.tags(str); anySchema = anySchema.tags(strArr); + anySchema = anySchema.meta(obj); + anySchema = anySchema.example(obj); + anySchema = anySchema.unit(str); + anySchema = anySchema.options(validOpts); anySchema = anySchema.strict(); + anySchema = anySchema.concat(x); + + altSchema = anySchema.when(str, whenOpts); + altSchema = anySchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -140,14 +190,23 @@ arrSchema = arrSchema.excludes([numSchema, strSchema]); // - - - - - - - - -module common { - arrSchema = arrSchema.allow(anyArr); - arrSchema = arrSchema.valid(anyArr); - arrSchema = arrSchema.invalid(anyArr); - arrSchema = arrSchema.default(anyArr); +module common_copy_paste { + // use search & replace from any + anySchema = anySchema.allow(x); + anySchema = anySchema.allow(x, x); + anySchema = anySchema.allow([x, x, x]); + anySchema = anySchema.valid(x); + anySchema = anySchema.valid(x, x); + anySchema = anySchema.valid([x, x, x]); + anySchema = anySchema.invalid(x); + anySchema = anySchema.invalid(x, x); + anySchema = anySchema.invalid([x, x, x]); + + anySchema = anySchema.default(x); arrSchema = arrSchema.required(); arrSchema = arrSchema.optional(); + arrSchema = arrSchema.forbidden(); arrSchema = arrSchema.description(str); arrSchema = arrSchema.notes(str); @@ -155,8 +214,16 @@ module common { arrSchema = arrSchema.tags(str); arrSchema = arrSchema.tags(strArr); + arrSchema = arrSchema.meta(obj); + arrSchema = arrSchema.example(obj); + arrSchema = arrSchema.unit(str); + arrSchema = arrSchema.options(validOpts); arrSchema = arrSchema.strict(); + arrSchema = arrSchema.concat(x); + + altSchema = arrSchema.when(str, whenOpts); + altSchema = arrSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -164,14 +231,22 @@ module common { boolSchema = Joi.bool(); boolSchema = Joi.boolean(); -module common { - boolSchema = boolSchema.allow(bool); - boolSchema = boolSchema.valid(bool); - boolSchema = boolSchema.invalid(bool); - boolSchema = boolSchema.default(bool); +module common_copy_paste { + boolSchema = boolSchema.allow(x); + boolSchema = boolSchema.allow(x, x); + boolSchema = boolSchema.allow([x, x, x]); + boolSchema = boolSchema.valid(x); + boolSchema = boolSchema.valid(x, x); + boolSchema = boolSchema.valid([x, x, x]); + boolSchema = boolSchema.invalid(x); + boolSchema = boolSchema.invalid(x, x); + boolSchema = boolSchema.invalid([x, x, x]); + + boolSchema = boolSchema.default(x); boolSchema = boolSchema.required(); boolSchema = boolSchema.optional(); + boolSchema = boolSchema.forbidden(); boolSchema = boolSchema.description(str); boolSchema = boolSchema.notes(str); @@ -179,8 +254,16 @@ module common { boolSchema = boolSchema.tags(str); boolSchema = boolSchema.tags(strArr); + boolSchema = boolSchema.meta(obj); + boolSchema = boolSchema.example(obj); + boolSchema = boolSchema.unit(str); + boolSchema = boolSchema.options(validOpts); boolSchema = boolSchema.strict(); + boolSchema = boolSchema.concat(x); + + altSchema = boolSchema.when(str, whenOpts); + altSchema = boolSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -192,13 +275,21 @@ binSchema = binSchema.max(num); binSchema = binSchema.length(num); module common { - binSchema = binSchema.allow(bin); - binSchema = binSchema.valid(bin); - binSchema = binSchema.invalid(bin); - binSchema = binSchema.default(bin); + binSchema = binSchema.allow(x); + binSchema = binSchema.allow(x, x); + binSchema = binSchema.allow([x, x, x]); + binSchema = binSchema.valid(x); + binSchema = binSchema.valid(x, x); + binSchema = binSchema.valid([x, x, x]); + binSchema = binSchema.invalid(x); + binSchema = binSchema.invalid(x, x); + binSchema = binSchema.invalid([x, x, x]); + + binSchema = binSchema.default(x); binSchema = binSchema.required(); binSchema = binSchema.optional(); + binSchema = binSchema.forbidden(); binSchema = binSchema.description(str); binSchema = binSchema.notes(str); @@ -206,8 +297,16 @@ module common { binSchema = binSchema.tags(str); binSchema = binSchema.tags(strArr); + binSchema = binSchema.meta(obj); + binSchema = binSchema.example(obj); + binSchema = binSchema.unit(str); + binSchema = binSchema.options(validOpts); binSchema = binSchema.strict(); + binSchema = binSchema.concat(x); + + altSchema = binSchema.when(str, whenOpts); + altSchema = binSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -224,23 +323,21 @@ dateSchema = dateSchema.min(num); dateSchema = dateSchema.max(num); module common { - dateSchema = dateSchema.allow(date); - dateSchema = dateSchema.valid(date); - dateSchema = dateSchema.invalid(date); - dateSchema = dateSchema.default(date); - - dateSchema = dateSchema.allow(num); - dateSchema = dateSchema.valid(num); - dateSchema = dateSchema.invalid(num); - dateSchema = dateSchema.default(num); - - dateSchema = dateSchema.allow(str); - dateSchema = dateSchema.valid(str); - dateSchema = dateSchema.invalid(str); - dateSchema = dateSchema.default(str); + dateSchema = dateSchema.allow(x); + dateSchema = dateSchema.allow(x, x); + dateSchema = dateSchema.allow([x, x, x]); + dateSchema = dateSchema.valid(x); + dateSchema = dateSchema.valid(x, x); + dateSchema = dateSchema.valid([x, x, x]); + dateSchema = dateSchema.invalid(x); + dateSchema = dateSchema.invalid(x, x); + dateSchema = dateSchema.invalid([x, x, x]); + + dateSchema = dateSchema.default(x); dateSchema = dateSchema.required(); dateSchema = dateSchema.optional(); + dateSchema = dateSchema.forbidden(); dateSchema = dateSchema.description(str); dateSchema = dateSchema.notes(str); @@ -248,8 +345,16 @@ module common { dateSchema = dateSchema.tags(str); dateSchema = dateSchema.tags(strArr); + dateSchema = dateSchema.meta(obj); + dateSchema = dateSchema.example(obj); + dateSchema = dateSchema.unit(str); + dateSchema = dateSchema.options(validOpts); dateSchema = dateSchema.strict(); + dateSchema = dateSchema.concat(x); + + altSchema = dateSchema.when(str, whenOpts); + altSchema = dateSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -265,13 +370,21 @@ numSchema = numSchema.max(num); numSchema = numSchema.integer(); module common { - numSchema = numSchema.allow(num); - numSchema = numSchema.valid(num); - numSchema = numSchema.invalid(num); - numSchema = numSchema.default(num); + numSchema = numSchema.allow(x); + numSchema = numSchema.allow(x, x); + numSchema = numSchema.allow([x, x, x]); + numSchema = numSchema.valid(x); + numSchema = numSchema.valid(x, x); + numSchema = numSchema.valid([x, x, x]); + numSchema = numSchema.invalid(x); + numSchema = numSchema.invalid(x, x); + numSchema = numSchema.invalid([x, x, x]); + + numSchema = numSchema.default(x); numSchema = numSchema.required(); numSchema = numSchema.optional(); + numSchema = numSchema.forbidden(); numSchema = numSchema.description(str); numSchema = numSchema.notes(str); @@ -279,8 +392,16 @@ module common { numSchema = numSchema.tags(str); numSchema = numSchema.tags(strArr); + numSchema = numSchema.meta(obj); + numSchema = numSchema.example(obj); + numSchema = numSchema.unit(str); + numSchema = numSchema.options(validOpts); numSchema = numSchema.strict(); + numSchema = numSchema.concat(x); + + altSchema = numSchema.when(str, whenOpts); + altSchema = numSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -295,29 +416,48 @@ objSchema = objSchema.min(num); objSchema = objSchema.max(num); objSchema = objSchema.length(num); +objSchema = objSchema.pattern(exp, schema); + +objSchema = objSchema.and(str, str, str); +objSchema = objSchema.and(strArr); + +objSchema = objSchema.or(str, str, str); +objSchema = objSchema.or(strArr); + +objSchema = objSchema.xor(str, str, str); +objSchema = objSchema.xor(strArr); + objSchema = objSchema.with(str, str); objSchema = objSchema.with(str, strArr); objSchema = objSchema.without(str, str); objSchema = objSchema.without(str, strArr); -objSchema = objSchema.xor(str, str, str); -objSchema = objSchema.xor(strArr); - -objSchema = objSchema.or(str, str, str); -objSchema = objSchema.or(strArr); - objSchema = objSchema.rename(str, str); objSchema = objSchema.rename(str, str, renOpts); +objSchema = objSchema.assert(str, schema, str); +objSchema = objSchema.assert(ref, schema, str); + +objSchema = objSchema.unknown(); +objSchema = objSchema.unknown(bool); + module common { - objSchema = objSchema.allow(obj); - objSchema = objSchema.valid(obj); - objSchema = objSchema.invalid(obj); - objSchema = objSchema.default(obj); + objSchema = objSchema.allow(x); + objSchema = objSchema.allow(x, x); + objSchema = objSchema.allow([x, x, x]); + objSchema = objSchema.valid(x); + objSchema = objSchema.valid(x, x); + objSchema = objSchema.valid([x, x, x]); + objSchema = objSchema.invalid(x); + objSchema = objSchema.invalid(x, x); + objSchema = objSchema.invalid([x, x, x]); + + objSchema = objSchema.default(x); objSchema = objSchema.required(); objSchema = objSchema.optional(); + objSchema = objSchema.forbidden(); objSchema = objSchema.description(str); objSchema = objSchema.notes(str); @@ -325,8 +465,16 @@ module common { objSchema = objSchema.tags(str); objSchema = objSchema.tags(strArr); + objSchema = objSchema.meta(obj); + objSchema = objSchema.example(obj); + objSchema = objSchema.unit(str); + objSchema = objSchema.options(validOpts); objSchema = objSchema.strict(); + objSchema = objSchema.concat(x); + + altSchema = objSchema.when(str, whenOpts); + altSchema = objSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -343,35 +491,43 @@ strSchema = strSchema.token(); strSchema = strSchema.email(); strSchema = strSchema.guid(); strSchema = strSchema.isoDate(); +strSchema = strSchema.lowercase(); +strSchema = strSchema.uppercase(); +strSchema = strSchema.trim(); module common { strSchema = strSchema.allow(x); strSchema = strSchema.allow(x, x); - strSchema = strSchema.allow(anyArr); - + strSchema = strSchema.allow([x, x, x]); strSchema = strSchema.valid(x); strSchema = strSchema.valid(x, x); - strSchema = strSchema.valid(anyArr); - + strSchema = strSchema.valid([x, x, x]); strSchema = strSchema.invalid(x); strSchema = strSchema.invalid(x, x); - strSchema = strSchema.invalid(anyArr); + strSchema = strSchema.invalid([x, x, x]); + + strSchema = strSchema.default(x); strSchema = strSchema.required(); - strSchema = strSchema.optional(); + strSchema = strSchema.forbidden(); strSchema = strSchema.description(str); - strSchema = strSchema.notes(str); strSchema = strSchema.notes(strArr); - strSchema = strSchema.tags(str); strSchema = strSchema.tags(strArr); + strSchema = strSchema.meta(obj); + strSchema = strSchema.example(obj); + strSchema = strSchema.unit(str); + strSchema = strSchema.options(validOpts); strSchema = strSchema.strict(); - strSchema = strSchema.default(x); + strSchema = strSchema.concat(x); + + altSchema = strSchema.when(str, whenOpts); + altSchema = strSchema.when(ref, whenOpts); } // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- @@ -390,6 +546,13 @@ Joi.validate(value, schema, validOpts, (err, value) => { str = err.details[0].message; str = err.details[0].type; }); +Joi.validate(value, schema, (err, value) => { + x = value; + str = err.message; + str = err.details[0].path; + str = err.details[0].message; + str = err.details[0].type; +}); // variant Joi.validate(num, schema, validOpts, (err, value) => { num = value; @@ -401,3 +564,8 @@ Joi.validate(value, {}); // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- schema = Joi.compile(obj); + +Joi.assert(obj, schema); + +ref = Joi.ref(str, refOpts); +ref = Joi.ref(str); diff --git a/joi/joi.d.ts b/joi/joi.d.ts index 10bc7225e..57e48a023 100644 --- a/joi/joi.d.ts +++ b/joi/joi.d.ts @@ -1,8 +1,10 @@ -// Type definitions for joi v4.0.0 +// Type definitions for joi v4.6.0 // Project: https://github.com/spumko/joi // Definitions by: Bart van der Schoor // Definitions: https://github.com/borisyankov/DefinitelyTyped +// TODO express type of Schema in a type-parameter (.default, .valid, .example etc) + declare module 'joi' { export interface ValidationOptions { @@ -18,6 +20,8 @@ declare module 'joi' { stripUnknown?: boolean; // overrides individual error messages. Defaults to no override ({}). language?: Object + // provides an external data set to be used in references + context?: Object; } export interface RenameOptions { @@ -29,6 +33,20 @@ declare module 'joi' { override?: boolean; } + export interface WhenOptions { + // the required condition joi type. + is: Schema; + // the alternative schema type if the condition is true. Required if otherwise is missing. + then?: Schema; + // the alternative schema type if the condition is false. Required if then is missing + otherwise?: Schema; + } + + export interface ReferenceOptions { + separator?: string; + contextPrefix?: string; + } + export interface ValidationError { message: string; details: ValidationErrorItem[]; @@ -48,12 +66,14 @@ declare module 'joi' { } export interface Schema extends AnySchema { + + } + + export interface Reference extends Schema { + } export interface AnySchema> { - - validate(value: U, options?: ValidationOptions, callback?: (err: ValidationError, value: U) => void): void; - /** * Whitelists a value */ @@ -82,6 +102,11 @@ declare module 'joi' { */ optional(): T; + /** + * Marks a key as forbidden which will not allow any value except undefined. Used to explicitly forbid keys. + */ + forbidden(): T; + /** * Annotates the key */ @@ -100,7 +125,22 @@ declare module 'joi' { tags(notes: string[]): T; /** - * Overrides the global validate() options for the current key and any sub-key + * Attaches metadata to the key. + */ + meta(meta: Object): T; + + /** + * Annotates the key with an example value, must be valid. + */ + example(value: any): T; + + /** + * Annotates the key with an unit name. + */ + unit(name: string): T; + + /** + * Overrides the global validate() options for the current key and any sub-key. */ options(options: ValidationOptions): T; @@ -110,9 +150,20 @@ declare module 'joi' { strict(): T; /** - * Sets a default value if the original value is undefined + * Sets a default value if the original value is undefined. */ default(value: any): T; + + /** + * Returns a new type that is the result of adding the rules of one type to another. + */ + concat(schema: T): T; + + /** + * Converts the type into an alternatives type where the conditions are merged into the type definition where: + */ + when(ref: string, options: WhenOptions): AlternativesSchema; + when(ref: Reference, options: WhenOptions): AlternativesSchema; } export interface BooleanSchema extends AnySchema { @@ -187,6 +238,20 @@ declare module 'joi' { */ isoDate(): StringSchema; + /** + * Requires the string value to be all lowercase. If the validation convert option is on (enabled by default), the string will be forced to lowercase. + */ + lowercase(): StringSchema; + + /** + * Requires the string value to be all uppercase. If the validation convert option is on (enabled by default), the string will be forced to uppercase. + */ + uppercase(): StringSchema; + + /** + * Requires the string value to contain no whitespace before or after. If the validation convert option is on (enabled by default), the string will be trimmed. + */ + trim(): StringSchema; } export interface ArraySchema extends AnySchema { @@ -240,6 +305,29 @@ declare module 'joi' { */ length(limit: number): ObjectSchema; + /** + * Specify validation rules for unknown keys matching a pattern. + */ + pattern(regex: RegExp, schema: Schema): ObjectSchema; + + /** + * Defines an all-or-nothing relationship between keys where if one of the peers is present, all of them are required as well. + */ + and(peer1: string, peer2: string, ...peers: string[]): ObjectSchema; + and(peers: string[]): ObjectSchema; + + /** + * Defines a relationship between keys where one of the peers is required (and more than one is allowed). + */ + or(peer1: string, peer2: string, ...peers: string[]): ObjectSchema; + or(peers: string[]): ObjectSchema; + + /** + * Defines an exclusive relationship between a set of keys. one of them is required but not at the same time where: + */ + xor(peer1: string, peer2: string, ...peers: string[]): ObjectSchema; + xor(peers: string[]): ObjectSchema; + /** * Requires the presence of other keys whenever the specified key is present. */ @@ -252,22 +340,21 @@ declare module 'joi' { without(key: string, peers: string): ObjectSchema; without(key: string, peers: string[]): ObjectSchema; - /** - * Defines an exclusive relationship between a set of keys. one of them is required but not at the same time where: - */ - xor(peer1: string, peer2: string, ...peers: string[]): ObjectSchema; - xor(peers: string[]): ObjectSchema; - - /** - * Defines a relationship between keys where one of the peers is required (and more than one is allowed). - */ - or(peer1: string, peer2: string, ...peers: string[]): ObjectSchema; - or(peers: string[]): ObjectSchema; - /** * Renames a key to another name (deletes the renamed key). */ rename(from: string, to: string, options?: RenameOptions): ObjectSchema; + + /** + * Verifies an assertion where. + */ + assert(ref: string, schema: Schema, message: string): ObjectSchema; + assert(ref: Reference, schema: Schema, message: string): ObjectSchema; + + /** + * Overrides the handling of unknown keys for the scope of the current object only (does not apply to children). + */ + unknown(allow?:boolean): ObjectSchema; } export interface BinarySchema extends AnySchema { @@ -308,6 +395,12 @@ declare module 'joi' { } + export interface AlternativesSchema extends AnySchema { + try(schemas: Schema[]): AlternativesSchema; + when(ref: string, options: WhenOptions): AlternativesSchema; + when(ref: Reference, options: WhenOptions): AlternativesSchema; + } + // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- /** @@ -368,10 +461,21 @@ declare module 'joi' { */ export function validate(value: T, schema: Schema, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): void; export function validate(value: T, schema: Object, options?: ValidationOptions, callback?: (err: ValidationError, value: T) => void): void; + export function validate(value: T, schema: Schema, callback: (err: ValidationError, value: T) => void): void; + export function validate(value: T, schema: Object, callback: (err: ValidationError, value: T) => void): void; /** * Converts literal schema definition to joi schema object (or returns the same back if already a joi schema object). */ export function compile(schema: Object): Schema; + /** + * Validates a value against a schema and throws if validation fails. + */ + export function assert(value: any, schema: Schema): void; + + /** + * Generates a reference to the value of the named key. + */ + export function ref(key:string, options?: ReferenceOptions): Reference; } From 17d7f5e46d17326a499f298b6fee50aea5199109 Mon Sep 17 00:00:00 2001 From: Geir Sagberg Date: Fri, 13 Jun 2014 13:31:26 +0200 Subject: [PATCH 34/84] Declare purl as string literal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Declare purl as string literal so we can do ´import purl = require("purl")´. --- purl/purl.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/purl/purl.d.ts b/purl/purl.d.ts index e937a68f4..00312595e 100644 --- a/purl/purl.d.ts +++ b/purl/purl.d.ts @@ -48,3 +48,7 @@ declare function purl(): purl.Url; * @param someUrl the url to be parsed */ declare function purl(someUrl: string): purl.Url; + +declare module "purl" { + export = purl; +} From 645ce5a19b3ffa59546a7c506917d1e6691f7147 Mon Sep 17 00:00:00 2001 From: Greg Smith Date: Fri, 13 Jun 2014 15:45:56 -0500 Subject: [PATCH 35/84] Type definitions for Velocity --- velocity-animate/velocity-animate-tests.ts | 295 +++++++++++++++++++++ velocity-animate/velocity-animate.d.ts | 44 +++ 2 files changed, 339 insertions(+) create mode 100644 velocity-animate/velocity-animate-tests.ts create mode 100644 velocity-animate/velocity-animate.d.ts diff --git a/velocity-animate/velocity-animate-tests.ts b/velocity-animate/velocity-animate-tests.ts new file mode 100644 index 000000000..548729977 --- /dev/null +++ b/velocity-animate/velocity-animate-tests.ts @@ -0,0 +1,295 @@ +/// + +function basics_arguments() { + var $el: JQuery; + $el.velocity({ + top: 10, + left: 10 + }, { + /* Velocity's default options: */ + duration: 400, + easing: "swing", + queue: "", + begin: null, + progress: null, + complete: null, + loop: false, + delay: false, + display: false, + mobileHA: true + }); + + $el.velocity({ top: 50 }, 1000); + $el.velocity({ top: 50 }, 1000, "swing"); + $el.velocity({ top: 50 }, "swing"); + $el.velocity({ top: 50 }, 1000, function() { alert("Hi"); }); + + $el.velocity({ + properties: { opacity: 1 }, + options: { duration: 500 } + }); +} + +function basics_values() { + var $el: JQuery; + $el.velocity({ + top: 50, // Defaults to the px unit type + left: "50%", + width: "+=5rem", // Add 5rem to the current rem value + height: "*=2" // Double the current height + }); +} + +function options_duration() { + var $el: JQuery; + $el.velocity({ opacity: 1 }, { duration: 1000 }); + $el.velocity({ opacity: 1 }, { duration: "slow" }); +} + +function options_easing() { + var $el: JQuery; + /* Use one of the jQuery UI easings. */ + $el.velocity({ width: 50 }, "easeInSine"); + /* Use a custom bezier curve. */ + $el.velocity({ width: 50 }, [ 0.17, 0.67, 0.83, 0.67 ]); + /* Use spring physics. */ + $el.velocity({ width: 50 }, [ 250, 15 ]); + + $el.velocity({ + borderBottomWidth: [ "2px", "spring" ], // Uses "spring" + width: [ "100px", [ 250, 15 ] ], // Uses custom spring physics + height: "100px" // Defaults to easeInSine + }, { + easing: "easeInSine" // The call's default easing + }); +} + +function options_queue() { + var $el: JQuery; + /* Trigger the first animation: Animate width. */ + $el.velocity({ width: "500px" }, { duration: 10000 }); + /* Trigger the second animation: Animate height. */ + setTimeout(function() { + /* Will run in parallel starting at the 5000ms mark. */ + $el.velocity({ height: "500px" }, { queue: false }); + }, 5000); +} + +function options_complete() { + var $el: JQuery; + $el.velocity({ + opacity: 0 + }, { + /* Logs all the animated divs. */ + complete: function(elements) { console.log(elements); } + }); +} + +function options_begin() { + var $el: JQuery; + $el.velocity({ + opacity: 0 + }, { + /* Logs all the animated divs. */ + begin: function(elements) { console.log(elements); } + }); +} + +function options_progress() { + var $el: JQuery; + var $percentComplete: JQuery; + var $timeRemaining: JQuery; + $el.velocity({ + opacity: 0 + }, { + progress: function(elements, percentComplete, timeRemaining, timeStart) { + $percentComplete.html((percentComplete * 100) + "%"); + $timeRemaining.html(timeRemaining + "ms remaining!"); + } + }); +} + +function options_mobileHA() { + var $el: JQuery; + $el.velocity({ height: "10em" }, { mobileHA: false }); +} + +function options_loop() { + var $el: JQuery; + $el.velocity({ height: "10em" }, { loop: 2 }); +} + +function options_delay() { + var $el: JQuery; + $el.velocity({ + height: "+=10em" + }, { + loop: 4, + /* Wait 100ms before alternating. */ + delay: 100 + }); +} + +function options_display() { + var $el: JQuery; + /* Animate down to zero then set display to "none". */ + $el.velocity({ opacity: 0 }, { display: "none" }); + /* Set display to "block" then animate from opacity:0. */ + $el.velocity({ opacity: 1 }, { display: "block" }); +} + +function command_scroll() { + var $el: JQuery; + $el + .velocity("scroll", { duration: 1500, easing: "spring" }) + .velocity({ opacity: 1 }); + + /* Scroll container to the top of the targeted div. */ + $el.velocity("scroll", { container: $("#container") }); + + /* Scroll the browser to the LEFT edge of the targeted div. */ + $el.velocity("scroll", { axis: "x" }); + + /* Scroll to a position 50 pixels above the div. */ + $el + .velocity("scroll", { duration: 750, offset: -50 }) + /* Then scroll to a position 250 pixels beyond the div. */ + .velocity("scroll", { duration: 750, offset: 250 }); +} + +function command_stop() { + var $el: JQuery; + $el.velocity("stop"); +} + +function command_reverse() { + var $el: JQuery; + $el.velocity("reverse"); + $el.velocity("reverse", { duration: 2000 }); +} + +function command_fadeIn_fadeOut() { + var $el: JQuery; + $el + .velocity("fadeIn", { duration: 1500 }) + .velocity("fadeOut", { delay: 500, duration: 1500 }); +} + +function command_slideDown_slideUp() { + var $el: JQuery; + $el + .velocity("slideDown", { duration: 1500 }) + .velocity("slideUp", { delay: 500, duration: 1500 }); +} + +function feature_transforms() { + var $el: JQuery; + /* Translate to the right and rotate clockwise. */ + $el.velocity({ + translateX: "200px", + rotateZ: "45deg" + }); + + /* Translate to the right and rotate clockwise. */ + $el.velocity({ + translateZ: 0, // Force HA by animating a 3D property + translateX: "200px", + rotateZ: "45deg" + }); +} + +function feature_hooks() { + var $el: JQuery; + $el.velocity({ textShadowBlur: "10px" }); +} + +function feature_colors() { + var $el: JQuery; + $el.velocity({ + /* Animate red to 50% (0.5 * 255). */ + colorRed: "50%", + /* Concurrently animate to a richer blue. */ + colorBlue: "+=50", + /* Fade the text down to 85% opacity. */ + colorAlpha: 0.85 + }); +} + +function feature_sequences() { + var $el: JQuery; + $.Velocity.Sequences.hover = function (element, options) { + var duration = options.duration || 750; + $.Velocity.animate(element, + { + translateY: "-=10px", + }, { + /* Delay is relative to user-adjustable duration. */ + delay: duration * 0.033, + duration: duration, + loop: 3, + easing: "easeInOutSine" + }); + }; + + /* Later on in your code, trigger the sequence: */ + /* Note: As normal, you may optionally pass in options. */ + $el.velocity("hover", { duration: 450 }); + + $.Velocity.Sequences.hover = function (element, options) { + var duration = options.duration || 750; + /* Pre-construct animation maps before chaining. */ + var calls = [ + { + properties: { translateY: "-10px" }, + options: { + delay: duration * 0.033, + duration: duration, + loop: 3, + easing: "easeInOutSine" + } + } + ]; + /* Iteratively chain the calls. */ + $.each(calls, function(i, call) { + $.Velocity.animate( + element, + call.properties, + call.options + ); + }); + }; +} + +function advanced_value_functions() { + var $el: JQuery; + $el.velocity({ + opacity: function() { return Math.random() } + }); + $el.velocity({ + translateX: function(i, total) { + /* Generate translateX's end value. */ + return (i * 10) + "px"; + } + }); +} + +function advanced_forcefeeding() { + var $el: JQuery; + $el.velocity({ + translateX: [ 500, 0 ], + opacity: [ 0, "easeInSine", 1 ] + }); + $el + .velocity({ translateX: [ 500, 0 ] }) + .velocity({ translateX: 1000 }); +} + +function advanced_utility_function () { + var divs = document.getElementsByTagName("div"); + $.Velocity.animate(divs, { opacity: 0 }, { duration: 1500 }); + $.Velocity.animate({ + elements: divs, + properties: { opacity: 0 }, + options: { duration: 1500 } + }); +} diff --git a/velocity-animate/velocity-animate.d.ts b/velocity-animate/velocity-animate.d.ts new file mode 100644 index 000000000..cd5c42ab1 --- /dev/null +++ b/velocity-animate/velocity-animate.d.ts @@ -0,0 +1,44 @@ +// Type definitions for Velocity 0.0.22 +// Project: http://velocityjs.org/ +// Definitions by: Greg Smith +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface JQuery { + velocity(options: {properties: Object; options: jquery.velocity.VelocityOptions}): JQuery; + velocity(properties: Object, options: jquery.velocity.VelocityOptions): JQuery; + velocity(properties: Object, duration?: number, easing?: string, complete?: Function): JQuery; + velocity(properties: Object, duration?: number, easing?: number[], complete?: Function): JQuery; + velocity(properties: Object, duration?: number, complete?: Function): JQuery; + velocity(properties: Object, easing?: string, complete?: Function): JQuery; + velocity(properties: Object, easing?: number[], complete?: Function): JQuery; + velocity(properties: Object, complete?: Function): JQuery; +} + +interface JQueryStatic { + Velocity: jquery.velocity.VelocityStatic; +} + +declare module jquery.velocity { + interface VelocityStatic { + Sequences: any; + animate(options: {elements: NodeListOf; properties: Object; options: VelocityOptions}): void; + animate(elements: NodeListOf, properties: Object, options: VelocityOptions): void; + animate(element: HTMLElement, properties: Object, options: VelocityOptions): void; + } + + interface VelocityOptions { + queue?: any; + duration?: any; + easing?: any; + begin?: Function; + complete?: Function; + progress?: Function; + display?: any; + loop?: any; + delay?: any; + mobileHA?: boolean; + _cacheValues?: boolean; + } +} From 96e986ba0ba672b549064eb9fc2ddf6d5df924c3 Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sat, 14 Jun 2014 11:47:07 +0200 Subject: [PATCH 36/84] Added $setValidity() method to IFormController. IWindowService, IBrowserService and IRouteParamsService now all have a [key: string]: any declaration, so that code like $window['someProperty'] is allowed to compile. --- angularjs/angular-route.d.ts | 4 +++- angularjs/angular.d.ts | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts index 4e2aa7607..d4e35b7e2 100644 --- a/angularjs/angular-route.d.ts +++ b/angularjs/angular-route.d.ts @@ -15,7 +15,9 @@ declare module ng.route { // RouteParamsService // see http://docs.angularjs.org/api/ngRoute.$routeParams /////////////////////////////////////////////////////////////////////////// - interface IRouteParamsService {} + interface IRouteParamsService { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // RouteService diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index ec8c5cb5b..dbcf9a185 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -203,6 +203,7 @@ declare module ng { $error: any; $addControl(control: ng.INgModelController): void; $removeControl(control: ng.INgModelController): void; + $setValidity(control: ng.INgModelController): void; $setDirty(): void; $setPristine(): void; } @@ -302,13 +303,17 @@ declare module ng { // WindowService // see http://docs.angularjs.org/api/ng.$window /////////////////////////////////////////////////////////////////////////// - interface IWindowService extends Window {} + interface IWindowService extends Window { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // BrowserService // TODO undocumented, so we need to get it from the source code /////////////////////////////////////////////////////////////////////////// - interface IBrowserService {} + interface IBrowserService { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // TimeoutService From 2f7080ea0533da583bdd4d58c8e296552261be5a Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sat, 14 Jun 2014 17:52:32 +0200 Subject: [PATCH 37/84] fixed $setValidity() signature. --- angularjs/angular.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index ec8c5cb5b..92a02eef8 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -203,6 +203,7 @@ declare module ng { $error: any; $addControl(control: ng.INgModelController): void; $removeControl(control: ng.INgModelController): void; + $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void; $setDirty(): void; $setPristine(): void; } @@ -302,13 +303,17 @@ declare module ng { // WindowService // see http://docs.angularjs.org/api/ng.$window /////////////////////////////////////////////////////////////////////////// - interface IWindowService extends Window {} + interface IWindowService extends Window { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // BrowserService // TODO undocumented, so we need to get it from the source code /////////////////////////////////////////////////////////////////////////// - interface IBrowserService {} + interface IBrowserService { + [key: string]: any; + } /////////////////////////////////////////////////////////////////////////// // TimeoutService From 1a3ff12ab32520bf084c5b9c438254172020164c Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sat, 14 Jun 2014 17:57:21 +0200 Subject: [PATCH 38/84] Fixed $setValidity() signature (thanx Basarat) --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index dbcf9a185..92a02eef8 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -203,7 +203,7 @@ declare module ng { $error: any; $addControl(control: ng.INgModelController): void; $removeControl(control: ng.INgModelController): void; - $setValidity(control: ng.INgModelController): void; + $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void; $setDirty(): void; $setPristine(): void; } From 7e2e5883d484104a1777b334bfd4b6a5979f4970 Mon Sep 17 00:00:00 2001 From: Greg Smith Date: Sat, 14 Jun 2014 14:23:22 -0500 Subject: [PATCH 39/84] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4c2fbc8e1..44f3f4938 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -87,6 +87,7 @@ All definitions files include a header with the author and editors, so at some p * [FPSMeter](http://darsa.in/fpsmeter/) (by [Aaron Lampros](https://github.com/alampros)) * [fs-extra](https://github.com/jprichardson/node-fs-extra) (by [midknight41](https://github.com/midknight41)) * [FullCalendar](http://arshaw.com/fullcalendar/) (by [Neil Stalker](https://github.com/nestalk)) +* [Fuse.js](https://github.com/krisk/Fuse) (by [Greg Smith](https://github.com/smrq)) * [Gamepad](http://www.w3.org/TR/gamepad/) (by [Kon](http://phyzkit.net/)) * [GeoJSON](http://geojson.org/) (by [Jake Bruun](https://github.com/cobster)) * [Giraffe](https://github.com/barc/backbone.giraffe) (by [Matt McCray](https://github.com/darthapo)) From 6c8cd94c7595dd86c93099491e30fd0cf27e39b9 Mon Sep 17 00:00:00 2001 From: Greg Smith Date: Sat, 14 Jun 2014 14:35:54 -0500 Subject: [PATCH 40/84] Fix implicit-any errors, update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + velocity-animate/velocity-animate-tests.ts | 42 +++++++++++----------- velocity-animate/velocity-animate.d.ts | 26 +++++++++----- 3 files changed, 39 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4c2fbc8e1..a6d20f6ad 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -317,6 +317,7 @@ All definitions files include a header with the author and editors, so at some p * [urlrouter](https://github.com/fengmk2/urlrouter) (by [Carlos Ballesteros Velasco](https://github.com/soywiz)) * [UUID.js](https://github.com/LiosK/UUID.js) (by [Jason Jarrett](https://github.com/staxmanade)) * [Valerie](https://github.com/davewatts/valerie) (by [Howard Richards](https://github.com/conficient)) +* [Velocity](http://velocityjs.org/) (by [Greg Smith](https://github.com/smrq)) * [Viewporter](https://github.com/zynga/viewporter) (by [Boris Yankov](https://github.com/borisyankov)) * [Vimeo](http://developer.vimeo.com/player/js-api) (by [Daz Wilkin](https://github.com/DazWilkin/)) * [vinyl](https://github.com/wearefractal/vinyl) (by [vvakame](https://github.com/vvakame/)) diff --git a/velocity-animate/velocity-animate-tests.ts b/velocity-animate/velocity-animate-tests.ts index 548729977..96400d365 100644 --- a/velocity-animate/velocity-animate-tests.ts +++ b/velocity-animate/velocity-animate-tests.ts @@ -2,7 +2,7 @@ function basics_arguments() { var $el: JQuery; - $el.velocity({ + $el.velocity({ top: 10, left: 10 }, { @@ -24,7 +24,7 @@ function basics_arguments() { $el.velocity({ top: 50 }, "swing"); $el.velocity({ top: 50 }, 1000, function() { alert("Hi"); }); - $el.velocity({ + $el.velocity({ properties: { opacity: 1 }, options: { duration: 500 } }); @@ -32,7 +32,7 @@ function basics_arguments() { function basics_values() { var $el: JQuery; - $el.velocity({ + $el.velocity({ top: 50, // Defaults to the px unit type left: "50%", width: "+=5rem", // Add 5rem to the current rem value @@ -42,7 +42,7 @@ function basics_values() { function options_duration() { var $el: JQuery; - $el.velocity({ opacity: 1 }, { duration: 1000 }); + $el.velocity({ opacity: 1 }, { duration: 1000 }); $el.velocity({ opacity: 1 }, { duration: "slow" }); } @@ -59,7 +59,7 @@ function options_easing() { borderBottomWidth: [ "2px", "spring" ], // Uses "spring" width: [ "100px", [ 250, 15 ] ], // Uses custom spring physics height: "100px" // Defaults to easeInSine - }, { + }, { easing: "easeInSine" // The call's default easing }); } @@ -79,7 +79,7 @@ function options_complete() { var $el: JQuery; $el.velocity({ opacity: 0 - }, { + }, { /* Logs all the animated divs. */ complete: function(elements) { console.log(elements); } }); @@ -89,7 +89,7 @@ function options_begin() { var $el: JQuery; $el.velocity({ opacity: 0 - }, { + }, { /* Logs all the animated divs. */ begin: function(elements) { console.log(elements); } }); @@ -101,7 +101,7 @@ function options_progress() { var $timeRemaining: JQuery; $el.velocity({ opacity: 0 - }, { + }, { progress: function(elements, percentComplete, timeRemaining, timeStart) { $percentComplete.html((percentComplete * 100) + "%"); $timeRemaining.html(timeRemaining + "ms remaining!"); @@ -121,9 +121,9 @@ function options_loop() { function options_delay() { var $el: JQuery; - $el.velocity({ + $el.velocity({ height: "+=10em" - }, { + }, { loop: 4, /* Wait 100ms before alternating. */ delay: 100 @@ -141,7 +141,7 @@ function options_display() { function command_scroll() { var $el: JQuery; $el - .velocity("scroll", { duration: 1500, easing: "spring" }) + .velocity("scroll", { duration: 1500, easing: "spring" }) .velocity({ opacity: 1 }); /* Scroll container to the top of the targeted div. */ @@ -164,7 +164,7 @@ function command_stop() { function command_reverse() { var $el: JQuery; - $el.velocity("reverse"); + $el.velocity("reverse"); $el.velocity("reverse", { duration: 2000 }); } @@ -185,13 +185,13 @@ function command_slideDown_slideUp() { function feature_transforms() { var $el: JQuery; /* Translate to the right and rotate clockwise. */ - $el.velocity({ + $el.velocity({ translateX: "200px", rotateZ: "45deg" }); /* Translate to the right and rotate clockwise. */ - $el.velocity({ + $el.velocity({ translateZ: 0, // Force HA by animating a 3D property translateX: "200px", rotateZ: "45deg" @@ -217,12 +217,12 @@ function feature_colors() { function feature_sequences() { var $el: JQuery; - $.Velocity.Sequences.hover = function (element, options) { + $.Velocity.Sequences.hover = function (element: HTMLElement, options: {duration?: number}) { var duration = options.duration || 750; $.Velocity.animate(element, - { + { translateY: "-=10px", - }, { + }, { /* Delay is relative to user-adjustable duration. */ delay: duration * 0.033, duration: duration, @@ -235,13 +235,13 @@ function feature_sequences() { /* Note: As normal, you may optionally pass in options. */ $el.velocity("hover", { duration: 450 }); - $.Velocity.Sequences.hover = function (element, options) { + $.Velocity.Sequences.hover = function (element: HTMLElement, options: {duration?: number}) { var duration = options.duration || 750; /* Pre-construct animation maps before chaining. */ var calls = [ - { + { properties: { translateY: "-10px" }, - options: { + options: { delay: duration * 0.033, duration: duration, loop: 3, @@ -266,7 +266,7 @@ function advanced_value_functions() { opacity: function() { return Math.random() } }); $el.velocity({ - translateX: function(i, total) { + translateX: function(i: number, total: number) { /* Generate translateX's end value. */ return (i * 10) + "px"; } diff --git a/velocity-animate/velocity-animate.d.ts b/velocity-animate/velocity-animate.d.ts index cd5c42ab1..00c421896 100644 --- a/velocity-animate/velocity-animate.d.ts +++ b/velocity-animate/velocity-animate.d.ts @@ -8,12 +8,12 @@ interface JQuery { velocity(options: {properties: Object; options: jquery.velocity.VelocityOptions}): JQuery; velocity(properties: Object, options: jquery.velocity.VelocityOptions): JQuery; - velocity(properties: Object, duration?: number, easing?: string, complete?: Function): JQuery; - velocity(properties: Object, duration?: number, easing?: number[], complete?: Function): JQuery; - velocity(properties: Object, duration?: number, complete?: Function): JQuery; - velocity(properties: Object, easing?: string, complete?: Function): JQuery; - velocity(properties: Object, easing?: number[], complete?: Function): JQuery; - velocity(properties: Object, complete?: Function): JQuery; + velocity(properties: Object, duration?: number, easing?: string, complete?: jquery.velocity.ElementCallback): JQuery; + velocity(properties: Object, duration?: number, easing?: number[], complete?: jquery.velocity.ElementCallback): JQuery; + velocity(properties: Object, duration?: number, complete?: jquery.velocity.ElementCallback): JQuery; + velocity(properties: Object, easing?: string, complete?: jquery.velocity.ElementCallback): JQuery; + velocity(properties: Object, easing?: number[], complete?: jquery.velocity.ElementCallback): JQuery; + velocity(properties: Object, complete?: jquery.velocity.ElementCallback): JQuery; } interface JQueryStatic { @@ -21,6 +21,14 @@ interface JQueryStatic { } declare module jquery.velocity { + interface ElementCallback { + (elements: NodeListOf): void; + } + + interface ProgressCallback { + (elements: NodeListOf, percentComplete: number, timeRemaining: number, timeStart: number): void; + } + interface VelocityStatic { Sequences: any; animate(options: {elements: NodeListOf; properties: Object; options: VelocityOptions}): void; @@ -32,9 +40,9 @@ declare module jquery.velocity { queue?: any; duration?: any; easing?: any; - begin?: Function; - complete?: Function; - progress?: Function; + begin?: ElementCallback; + complete?: ElementCallback; + progress?: ProgressCallback; display?: any; loop?: any; delay?: any; From 50d54a90796583b0e4842e9f16f6a3b3769bcaa0 Mon Sep 17 00:00:00 2001 From: balrob Date: Sun, 15 Jun 2014 15:02:33 +1200 Subject: [PATCH 41/84] Create date.format.d.ts Definition file for date.format.js (developed by Steven Levithan - http://blog.stevenlevithan.com/archives/date-time-format) --- date.format.js/date.format.d.ts | 203 ++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 date.format.js/date.format.d.ts diff --git a/date.format.js/date.format.d.ts b/date.format.js/date.format.d.ts new file mode 100644 index 000000000..249926eae --- /dev/null +++ b/date.format.js/date.format.d.ts @@ -0,0 +1,203 @@ +/****************************************************************************** + Portions Copyright (c) Microsoft Corporation. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */ + +// Typing for the date.format.js from Steven Levithan +// reproduces "Date" and adds format() - seemed to be the only way ... + +/** Enables basic storage and retrieval of dates and times. */ +interface Date { + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; + /** Returns a date as a string value. */ + toDateString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; + /** Gets the time value in milliseconds. */ + getTime(): number; + /** Gets the year, using local time. */ + getFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; + /** Gets the month, using local time. */ + getMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; + /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */ + getTimezoneOffset(): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): void; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): void; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): void; + + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): void; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): void; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): void; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): void; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): void; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): void; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): void; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): void; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): void; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): void; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): void; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): void; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; + + format(mask: string, utc?: boolean) : string; +} + + +declare var Date: { + new (): Date; + new (value: number): Date; + new (value: string): Date; + new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + (): string; + prototype: Date; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param month The month as an number between 0 and 11 (January to December). + * @param date The date as an number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds. + * @param ms An number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + now(): number; +}; + +declare function dateFormat(date?: any, mask?: string, utc?: boolean ) : string; From 7ff25c8eeb8e4566b27a663550317143042f1660 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Sun, 15 Jun 2014 16:30:03 +1000 Subject: [PATCH 42/84] expectjs fix indenting --- expect.js/expect.js.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expect.js/expect.js.d.ts b/expect.js/expect.js.d.ts index 64c5871b0..21bffb44a 100644 --- a/expect.js/expect.js.d.ts +++ b/expect.js/expect.js.d.ts @@ -17,7 +17,7 @@ declare module Expect { * * @param fn callback to match error string against */ - throwError(fn?: (exception: any) => void): void; + throwError(fn?: (exception: any) => void): void; /** * Assert that the function throws. From 626a765e5c996dd226c7732d0edbd64aa16a517b Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sun, 15 Jun 2014 12:21:55 +0200 Subject: [PATCH 43/84] Added definitions and tests for timelinejs (https://github.com/NUKnightLab/TimelineJS) --- timelinejs/timelinejs-tests.ts | 41 ++++++++++ timelinejs/timelinejs.d.ts | 136 +++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 timelinejs/timelinejs-tests.ts create mode 100644 timelinejs/timelinejs.d.ts diff --git a/timelinejs/timelinejs-tests.ts b/timelinejs/timelinejs-tests.ts new file mode 100644 index 000000000..da6aef966 --- /dev/null +++ b/timelinejs/timelinejs-tests.ts @@ -0,0 +1,41 @@ +/** + * Created by Roland on 6/15/2014. + */ +/// + +var timelineSource:knightlab.ITimelineModel = { + timeline: { + headline: 'Test Headline', + type: 'default', + text: 'Test Text', + asset: { + media: 'http://www.vertex42.com/ExcelArticles/Images/timeline/Timeline-for-Benjamin-Franklin.gif', + credit: 'http://www.vertex42.com', + caption: 'Test Caption' + }, + date: [ + { + startDate: '2011,12,09', + endDate: '2011,12,10', + headline: 'Test Date Headline', + text: 'Test test test test' + }, + { + startDate: '2012,12,09', + endDate: '2012,12,10', + headline: 'Test Date Headline 2', + text: 'Test2 test2 test2 test2' + } + ] + } +}; + +var source:knightlab.ITimeLineConfiguration = { + width: '100%', + height: '100%', + type: 'timeline', + embed_id: 'test', + source: timelineSource +}; + +createStoryJS(source); \ No newline at end of file diff --git a/timelinejs/timelinejs.d.ts b/timelinejs/timelinejs.d.ts new file mode 100644 index 000000000..6101b93aa --- /dev/null +++ b/timelinejs/timelinejs.d.ts @@ -0,0 +1,136 @@ +// Type definitions for timelinejs +// Project: https://github.com/NUKnightLab/TimelineJS +// Definitions by: Roland Zwaga +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare function createStoryJS(config:knightlab.ITimeLineConfiguration):void; + +declare module knightlab { + + export interface ITimeLineConfiguration { + width: string; + height: string; + /* + * path to json/ or link to googlespreadsheet + * source Should be either the path to the JSON resource to load, or a JavaScript object corresponding to the + * Timeline model. + * + * Here is an example using a data object: + * + * var dataObject = {timeline: {headline: "Headline", type: ... }} + * createStoryJS({ + * type: 'timeline', + * width: '800', + * height: '600', + * source: dataObject, + * embed_id: 'my-timeline' + * }); + * If source is a string, we will try to automatically recognize resources that are Twitter searches, Google + * Spreadsheets or Storify stories. Failing that, we assume the source is either JSON or JSONP. If string + * matches on .jsonp, we will treat it as JSONP, otherwise, we will append ?callback=onJSONP_Data. + */ + source: any; + type?: string; + /* + * Optional use a different div id for embed + */ + embed_id?: string; + /* + * Optional start at latest date + */ + start_at_end?: boolean; + /* + * Optional start at specific slide + */ + start_at_slide?: string; + /* + * Optional tweak the default zoom level + */ + start_zoom_adjust?: string; + /* + * Optional location bar hashes + */ + hash_bookmark?: boolean; + /* + * Optional font + */ + font?: string; + /* + * Optional debug to console + */ + debug?: boolean; + /* + * Optional language + */ + lang?: string; + /* + * Optional path to css + */ + css?: string; + /* + * Optional path to js + */ + js?: string; + /* + * required in order to use maptype + */ + gmap_key?: string; + /* + * Stamen Maps: + * toner + * toner-lines + * toner-labels + * watercolor + * sterrain + * + * Google Maps: + * ROADMAP + * TERRAIN + * HYBRID + * SATELLITE + * + * OpenStreetMap: + * osm + */ + maptype?: string; + } + + export interface ITimelineModel { + timeline:ITimeLine; + } + + export interface ITimeLine { + headline?:string; + type?:string; + text?:string; + asset?:ITimeLineAsset; + date?:ITimelineDate[]; + era?:ITimelineEra[]; + } + + export interface ITimeLineAsset { + media:string; + thumbnail?:string; + credit:string; + caption:string; + } + + export interface ITimelineDate extends ITimelineEra { + classname?:string; + asset?:ITimeLineAsset; + } + + export interface ITimelineEra { + /* + * format example: 2011,12,10 + */ + startDate:string; + /* + * format example: 2011,12,10 + */ + endDate:string; + headline:string; + text:string; + tag?:string; + } +} \ No newline at end of file From 8f4bfa0a9acf61dd79611104ed6285dcaf4abfb4 Mon Sep 17 00:00:00 2001 From: Roland Zwaga Date: Sun, 15 Jun 2014 12:24:44 +0200 Subject: [PATCH 44/84] Added entry for TimelineJS --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4c2fbc8e1..9e0c76e96 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -301,6 +301,7 @@ All definitions files include a header with the author and editors, so at some p * [Teechart](http://www.steema.com) (by [Steema](http://www.steema.com)) * [text-buffer](https://github.com/atom/text-buffer) (by [vvakame](https://github.com/vvakame)) * [three.js](http://mrdoob.github.com/three.js/) (by [Kon](http://phyzkit.net/)) +* [TimelineJS](https://github.com/NUKnightLab/TimelineJS) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [Toastr](https://github.com/CodeSeven/toastr) (by [Boris Yankov](https://github.com/borisyankov)) * [trunk8](https://github.com/rviscomi/trunk8) (by [Blake Niemyjski](https://github.com/niemyjski)) * [TweenJS](http://www.createjs.com/#!/TweenJS) (by [Pedro Ferreira](https://bitbucket.org/drk4)) From 8d7e5ce44892a21d3fb5575d4c6351c47198b707 Mon Sep 17 00:00:00 2001 From: gandjustas Date: Sun, 15 Jun 2014 16:41:43 +0400 Subject: [PATCH 45/84] Added SharePoint definitions and fixed bugs. --- sharepoint/SharePoint.d.ts | 1209 ++++++++++++++++++++++++++++++------ 1 file changed, 1036 insertions(+), 173 deletions(-) diff --git a/sharepoint/SharePoint.d.ts b/sharepoint/SharePoint.d.ts index b0417fd33..f3b2c9932 100644 --- a/sharepoint/SharePoint.d.ts +++ b/sharepoint/SharePoint.d.ts @@ -154,6 +154,7 @@ declare var $get: { (id: string): HTMLElement; }; declare var $addHandler: { (element: HTMLElement, eventName: string, handler: (e: Event) => void): void; }; declare var $removeHandler: { (element: HTMLElement, eventName: string, handler: (e: Event) => void): void; }; + declare module SP { export class SOD { static execute(fileName: string, functionName: string, ...args: any[]): void; @@ -172,9 +173,108 @@ declare module SP { static get_ribbonImagePrefetchEnabled(): boolean; static set_ribbonImagePrefetchEnabled(value: boolean): void; - - } + + export enum ListLevelPermissionMask { + viewListItems,//: 1, + insertListItems,//: 2, + editListItems,//: 4, + deleteListItems,//: 8, + approveItems,//: 16, + openItems,//: 32, + viewVersions,//: 64, + deleteVersions,//: 128, + breakCheckout,//: 256, + managePersonalViews,//: 512, + manageLists//: 2048 + } + + export class HtmlBuilder { + constructor(); + addAttribute(name: string, value: string): void; + addCssClass(cssClassName: string): void; + addCommunitiesCssClass(cssClassName: string): void; + renderBeginTag(tagName: string): void; + renderEndTag(): void; + write(s: string): void; + writeEncoded(s: string): void; + toString(): string; + } + + export class ScriptHelpers { + static disableWebpartSelection(context: SPClientTemplates.RenderContext): void; + static getDocumentQueryPairs(): { [index: string]: string; }; + static getFieldFromSchema(schema: SPClientTemplates.ListSchema, fieldName: string): SPClientTemplates.FieldSchema; + static getLayoutsPageUrl(pageName: string, webServerRelativeUrl: string): string; + static getListLevelPermissionMask(jsonItem: string): number; + static getTextAreaElementValue(textAreaElement: HTMLTextAreaElement): string; + static getUrlQueryPairs(docUrl: string): { [index: string]: string; }; + static getUserFieldProperty(item: ListItem, fieldName: string, propertyName: string): any; + static hasPermission(listPermissionMask: number, listPermission: ListLevelPermissionMask): boolean; + static newGuid(): SP.Guid; + static isNullOrEmptyString(str: string): boolean; + static isNullOrUndefined(obj: any): boolean; + static isNullOrUndefinedOrEmpty(str: string): boolean; + static isUndefined(obj: any): boolean; + static replaceOrAddQueryString(url: string, key: string, value: string): string; + static removeHtml(str: string): string; + static removeStyleChildren(element: HTMLElement); + static removeHtmlAndTrimStringWithEllipsis(str: string, maxLength: number): string; + static setTextAreaElementValue(textAreaElement: HTMLTextAreaElement, newValue: string): void; + static truncateToInt(n: number): number; + static urlCombine(path1: string, path2: string): string; + static resizeImageToSquareLength(imgElement: HTMLImageElement, squareLength: number): void; + } + + + export class PageContextInfo { + static get_siteServerRelativeUrl(): string; + static get_webServerRelativeUrl(): string; + static get_webAbsoluteUrl(): string; + static get_serverRequestPath(): string; + static get_siteAbsoluteUrl(): string; + static get_webTitle(): string; + static get_tenantAppVersion(): string; + static get_webLogoUrl(): string; + static get_webLanguage(): number; + static get_currentLanguage(): number; + static get_pageItemId(): number; + static get_pageListId(): string; + static get_webPermMasks(): { High: number; Low: number; }; + static get_currentCultureName(): string; + static get_currentUICultureName(): string; + static get_clientServerTimeDelta(): number; + static get_userLoginName(): string; + static get_webTemplate(): string; + get_pagePersonalizationScope(): string; + } + + export class ContextPermissions { + has(perm: number): boolean; + hasPermissions(high: number, low: number): boolean; + fromJson(json: { High: number; Low: number; }): void; + } + + export module ListOperation { + export module ViewOperation { + export function getSelectedView(): string; + export function navigateUp(viewId: string): void; + export function refreshView(viewId: string): void; + } + export module Selection { + export function selectListItem(iid: string, bSelect: boolean); + export function getSelectedItems(): { id: number; fsObjType: FileSystemObjectType; }[]; + export function getSelectedList(): string; + export function getSelectedView(): string; + export function navigateUp(viewId: string): void; + export function deselectAllListItems(iid: string); + } + export module Overrides { + export function overrideDeleteConfirmation(listId: string, overrideText:string):void; + } + } + + } /** Register function to rerun on partial update in MDS-enabled site.*/ @@ -229,6 +329,143 @@ declare function AddEvtHandler(element: HTMLElement, event: string, func: EventL /** Gets query string parameter */ declare function GetUrlKeyValue(key: string): string; + +declare class AjaxNavigate { + update(url:string, updateParts:Object, fullNavigate:boolean, anchorName:string):void; + add_navigate(handler: Function): void; + remove_navigate(handler:Function):void; + submit(formToSubmit:HTMLFormElement):void; + getParam(paramName:string):string; + getSavedFormAction():string; + get_href(): string; + get_hash(): string; + get_search():string; + convertMDSURLtoRegularURL(mdsPath:string):string; +} + +declare var ajaxNavigate: AjaxNavigate; + +declare class Browseris { + firefox: boolean; + firefox36up: boolean; + firefox3up: boolean; + firefox4up: boolean; + ie: boolean; + ie55up: boolean; + ie5up: boolean; + ie7down: boolean; + ie8down: boolean; + ie9down: boolean; + ie8standard: boolean; + ie8standardUp: boolean; + ie9standardUp: boolean; + ipad: boolean; + windowsphone: boolean; + chrome: boolean; + chrome7up: boolean; + chrome8up: boolean; + chrome9up: boolean; + iever: boolean; + mac: boolean; + major: boolean; + msTouch: boolean; + isTouch: boolean; + nav: boolean; + nav6: boolean; + nav6up: boolean; + nav7up: boolean; + osver: boolean; + safari: boolean; + safari125up: boolean; + safari3up: boolean; + verIEFull: boolean; + w3c: boolean; + webKit: boolean; + win: boolean; + win8AppHost: boolean; + win32: boolean; + win64bit: boolean; + winnt: boolean; + armProcessor: boolean +} + +declare var browseris: Browseris; + +interface ContextInfo extends SPClientTemplates.RenderContext { + AllowGridMode: boolean; + BasePermissions: any; + BaseViewID: any; + CascadeDeleteWarningMessage: string; + ContentTypesEnabled: boolean; + CurrentSelectedItems: boolean; + CurrentUserId: number; + EnableMinorVersions: boolean; + ExternalDataList: boolean; + HasRelatedCascadeLists: boolean; + HttpPath: string; + HttpRoot: string; + LastSelectableRowIdx: number; + LastSelectedItemIID: number; + LastRowIndexSelected: number; + RowFocusTimerID: number; + ListData: any;// SPClientTemplates.ListData_InView | SPClientTemplates.ListData_InForm + ListSchema: SPClientTemplates.ListSchema; + ModerationStatus: number; + PortalUrl: string; + RecycleBinEnabled: number; + SelectAllCbx: HTMLElement; + SendToLocationName: string; + SendToLocationUrl: string; + StateInitDone: boolean; + TableCbxFocusHandler: Function; + TableMouseoverHandler: Function; + TotalListItems: number; + WorkflowsAssociated: boolean; + clvp: any; + ctxId: number; + ctxType: any; + dictSel: any; + displayFormUrl: string; + editFormUrl: string; + imagesPath: string; + inGridMode: boolean; + inGridFullRender: boolean; + isForceCheckout: boolean; + isModerated: boolean; + isPortalTemplate: boolean; + isVersions: boolean; + isWebEditorPreview: boolean; + leavingGridMode: boolean; + loadingAsyncData: boolean; + listBaseType: number; + listName: string; + listTemplate: string; + listUrlDir: string; + newFormUrl: string; + onRefreshFailed: Function; + overrideDeleteConfirmation: string; + overrideFilterQstring: string; + recursiveView: boolean; + rootFolderForDisplay: string; + serverUrl: string; + verEnabled: boolean; + view: string; + queryString: string; + IsClientRendering: boolean; + wpq: string; + rootFolder: string; + IsAppWeb: boolean; + NewWOPIDocumentEnabled: boolean; + NewWOPIDocumentUrl: string; + AllowCreateFolder: boolean; + CanShareLinkForNewDocument: boolean; + noGroupCollapse: boolean; + SiteTemplateId: number; + ExcludeFromOfflineClient: boolean; + +} + +declare function GetCurrentCtx():ContextInfo; declare module SP { export enum RequestExecutorErrors { requestAbortedOrTimedout, @@ -246,8 +483,8 @@ declare module SP { set_formDigestHandlingEnabled(value: boolean): void; get_iFrameSourceUrl(): string; set_iFrameSourceUrl(value: string): void; - executeAsync(requestInfo: RequestInfo): void; - attemptLogin(returnUrl: string, success: (response: ResponseInfo) => void, error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void): void; + executeAsync(requestInfo:RequestInfo): void; + attemptLogin(returnUrl:string, success: (response: ResponseInfo) => void , error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void): void; } export interface RequestInfo { @@ -287,12 +524,13 @@ declare module SP { createWebRequestExecutor(): ProxyWebRequestExecutor; } } -interface MQuery { +interface MQuery +{ (selector: string, context?: any): MQueryResultSetElements; (element: HTMLElement): MQueryResultSetElements; (object: MQueryResultSetElements): MQueryResultSetElements; (object: MQueryResultSet): MQueryResultSet; - (object: T): MQueryResultSet; + (object: T): MQueryResultSet; (elementArray: HTMLElement[]): MQueryResultSetElements; (array: T[]): MQueryResultSet; (): MQueryResultSet; @@ -321,7 +559,7 @@ interface MQuery { isObject(obj: any): boolean; isEmptyObject(obj: any): boolean; - ready(callback: () => void): void; + ready(callback: () => void ): void; contains(container: HTMLElement, contained: HTMLElement): boolean; proxy(fn: (...args: any[]) => any, context: any, ...args: any[]): Function; @@ -363,7 +601,7 @@ interface MQuery { hasData(element: HTMLElement): boolean; } -interface MQueryResultSetElements extends MQueryResultSet { +interface MQueryResultSetElements extends MQueryResultSet{ append(node: HTMLElement): MQueryResultSetElements; append(mQuerySet: MQueryResultSetElements): MQueryResultSetElements; append(html: string): MQueryResultSetElements; @@ -471,26 +709,26 @@ interface MQueryResultSetElements extends MQueryResultSet { submit(): MQueryResultSetElements; submit(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; unload(): MQueryResultSetElements; - unload(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + unload(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; } -interface MQueryResultSet { +interface MQueryResultSet { [index: number]: T; contains(contained: T): boolean; - + filter(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): MQueryResultSet; - filter(fn: (elementOfArray: T) => boolean, context?: any): MQueryResultSet; + filter(fn: (elementOfArray: T) => boolean, context?: any): MQueryResultSet; every(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; every(fn: (elementOfArray: T) => boolean, context?: any): boolean; - + some(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; some(fn: (elementOfArray: T) => boolean, context?: any): boolean; - + map(callback: (elementOfArray: T, indexInArray: number) => any): MQueryResultSet; map(callback: (elementOfArray: T) => any): MQueryResultSet; - + forEach(fn: (elementOfArray: T, indexInArray: number) => void, context?: any): void; forEach(fn: (elementOfArray: T) => void, context?: any): void; @@ -579,12 +817,12 @@ declare class CalloutAction { render(): void; isEnabled(): boolean; isVisible(): boolean; - set(options: CalloutActionOptions): void; + set (options: CalloutActionOptions): void; } declare class Callout { /** Sets options for the callout. Not all options can be changed for the callout after its creation. */ - set(options: CalloutOptions); + set (options: CalloutOptions); /** Adds event handler to the callout. @param eventName one of the following: "opened", "opening", "closing", "closed" */ addEventCallback(eventName: string, callback: (callout: Callout) => void); @@ -867,17 +1105,26 @@ declare module SPClientTemplates { PictureOnly: boolean; PictureSize: string; } - /** Represents field schema in Grid mode and on list forms. - Consider casting objects of this type to more specific field types, e.g. FieldSchemaInForm_Lookup */ - export interface FieldSchema_InForm { + + export interface FieldSchema { /** Specifies if the field can be edited while list view is in the Grid mode */ AllowGridEditing: boolean; + /** String representation of the field type, e.g. "Lookup". Same as SPField.TypeAsString */ + FieldType: string; + /** Internal name of the field */ + Name: string; + /** For OOTB fields, returns the type of field. For "UserMulti" returns "User", for "LookupMulti" returns "Lookup". + For custom field types, returns base type of the field. */ + Type: string; + } + +/** Represents field schema in Grid mode and on list forms. + Consider casting objects of this type to more specific field types, e.g. FieldSchemaInForm_Lookup */ + export interface FieldSchema_InForm extends FieldSchema { /** Description for this field. */ Description: string; /** Direction of the reading order for the field. */ Direction: string; - /** String representation of the field type, e.g. "Lookup". Same as SPField.TypeAsString */ - FieldType: string; /** Indicates whether the field is hidden */ Hidden: boolean; /** Guid of the field */ @@ -885,8 +1132,6 @@ declare module SPClientTemplates { /** Specifies Input Method Editor (IME) mode bias to use for the field. The IME enables conversion of keystrokes between languages when one writing system has more characters than can be encoded for the given keyboard. */ IMEMode: any; - /** Internal name of the field */ - Name: string; /** Specifies if the field is read only */ ReadOnlyField: boolean; /** Specifies wherever field requires values */ @@ -894,13 +1139,16 @@ declare module SPClientTemplates { RestrictedMode: boolean; /** Title of the field */ Title: string; - /** For OOTB fields, returns the type of field. For "UserMulti" returns "User", for "LookupMulti" returns "Lookup". - For custom field types, returns base type of the field. */ - Type: string; /** If SPFarm.Local.UseMinWidthForHtmlPicker is true, UseMinWidth will be set to true. Undefined in other cases. */ UseMinWidth: boolean; } - export interface ListSchema_InForm { + + export interface ListSchema { + Field: FieldSchema[]; + } + + + export interface ListSchema_InForm extends ListSchema { Field: FieldSchema_InForm[]; } export interface ListData_InForm { @@ -945,9 +1193,7 @@ declare module SPClientTemplates { DefaultRender: string; } /** Represents field schema in a list view. */ - export interface FieldSchema_InView { - /** Either "TRUE" or "FALSE" */ - AllowGridEditing: string; + export interface FieldSchema_InView extends FieldSchema { /** Either "TRUE" or "FALSE" */ CalloutMenu: string; ClassInfo: string; // e.g. "Menu" @@ -957,8 +1203,6 @@ declare module SPClientTemplates { Explicit: string; fieldRenderer: any; FieldTitle: string; - /** Represents SPField.TypeAsString, e.g. "Computed", "UserMulti", etc. */ - FieldType: string; /** Indicates whether the field can be filtered. Either "TRUE" or "FALSE" */ Filterable: string; /** Set to "TRUE" for fields that comply to the following Xpath query: @@ -971,16 +1215,14 @@ declare module SPClientTemplates { /** Specifies if the field contains list item menu. Corresponds to ViewFields/FieldRef/@ListItemMenu attribute. Either "TRUE" or "FALSE" and might be missing. */ listItemMenu: string; - Name: string; RealFieldName: string; /** Either "TRUE" or "FALSE" */ ReadOnly: string; ResultType: string; /** Indicates whether the field can be sorted. Either "TRUE" or "FALSE" */ Sortable: string; - Type: string; } - export interface ListSchema_InView { + export interface ListSchema_InView extends ListSchema { /** Key-value object that represents all aggregations defined for the view. Key specifies the field internal name, and value specifies the type of the aggregation. */ Aggregate: { [name: string]: string; }; @@ -992,7 +1234,6 @@ declare module SPClientTemplates { /** Either "0" or "1" */ EffectivePresenceEnabled: string; /** If in grid mode (context.inGridMode == true), cast to FieldSchema_InForm[], otherwise cast to FieldSchema_InView[] */ - Field: any[]; FieldSortParam: string; Filter: any; /** Either "0" or "1" */ @@ -1180,26 +1421,26 @@ declare module SPClientTemplates { } export interface RenderContext { - BaseViewID: number; - ControlMode: ClientControlMode; - CurrentCultureName: string; - CurrentLanguage: number; - CurrentSelectedItems: any; - CurrentUICultureName: string; - ListTemplateType: number; - OnPostRender: any; - OnPreRender: any; - onRefreshFailed: any; - RenderBody: (renderContext: RenderContext) => string; - RenderFieldByName: (renderContext: RenderContext, fieldName: string) => string; - RenderFields: (renderContext: RenderContext) => string; - RenderFooter: (renderContext: RenderContext) => string; - RenderGroups: (renderContext: RenderContext) => string; - RenderHeader: (renderContext: RenderContext) => string; - RenderItems: (renderContext: RenderContext) => string; - RenderView: (renderContext: RenderContext) => string; - SiteClientTag: string; - Templates: TemplateOverrides; + BaseViewID?: number; + ControlMode?: ClientControlMode; + CurrentCultureName?: string; + CurrentLanguage?: number; + CurrentSelectedItems?: any; + CurrentUICultureName?: string; + ListTemplateType?: number; + OnPostRender?: any; + OnPreRender?: any; + onRefreshFailed?: any; + RenderBody?: (renderContext: RenderContext) => string; + RenderFieldByName?: (renderContext: RenderContext, fieldName: string) => string; + RenderFields?: (renderContext: RenderContext) => string; + RenderFooter?: (renderContext: RenderContext) => string; + RenderGroups?: (renderContext: RenderContext) => string; + RenderHeader?: (renderContext: RenderContext) => string; + RenderItems?: (renderContext: RenderContext) => string; + RenderView?: (renderContext: RenderContext) => string; + SiteClientTag?: string; + Templates?: Templates; } export interface SingleTemplateCallback { @@ -1214,6 +1455,12 @@ declare module SPClientTemplates { /** Must return null in order to fall back to a more common template or to a system default template */ (renderContext: RenderContext): string; } + + export interface FieldCallback { + /** Must return null in order to fall back to a more common template or to a system default template */ + (renderContext: RenderContext): string; + } + export interface FieldInFormCallback { /** Must return null in order to fall back to a more common template or to a system default template */ (renderContext: RenderContext_FieldInForm): string; @@ -1234,6 +1481,27 @@ declare module SPClientTemplates { View?: FieldInViewCallback; } + export interface FieldTemplates { + [fieldInternalName: string]: FieldCallback; + } + + export interface Templates { + View?: (renderContext: any) => string; // TODO: determine appropriate context type and purpose of this template + Body?: (renderContext: any) => string; // TODO: determine appropriate context type and purpose of this template + /** Defines templates for rendering groups (aggregations). */ + Group?: GroupCallback; + /** Defines templates for list items rendering. */ + Item?: ItemCallback; + /** Defines template for rendering list view header. + Can be either string or SingleTemplateCallback */ + Header?: SingleTemplateCallback; + /** Defines template for rendering list view footer. + Can be either string or SingleTemplateCallback */ + Footer?: SingleTemplateCallback; + /** Defines templates for fields rendering. The field is specified by it's internal name. */ + Fields?: FieldTemplates; + } + export interface FieldTemplateMap { [fieldInternalName: string]: FieldTemplateOverrides; } @@ -1276,6 +1544,7 @@ declare module SPClientTemplates { } export class TemplateManager { static RegisterTemplateOverrides(renderCtx: TemplateOverridesOptions): void; + static GetTemplates(renderCtx: any): Templates; } export interface ClientUserValue { @@ -1349,13 +1618,13 @@ declare module SPClientTemplates { EnableVesioning: boolean; Id: string; }; - registerInitCallback(fieldname: string, callback: () => void): void; - registerFocusCallback(fieldname: string, callback: () => void): void; - registerValidationErrorCallback(fieldname: string, callback: (error: any) => void): void; + registerInitCallback(fieldname: string, callback: () => void ): void; + registerFocusCallback(fieldname: string, callback: () => void ): void; + registerValidationErrorCallback(fieldname: string, callback: (error: any) => void ): void; registerGetValueCallback(fieldname: string, callback: () => any): void; updateControlValue(fieldname: string, value: any): void; registerClientValidator(fieldname: string, validator: SPClientForms.ClientValidation.ValidatorSet): void; - registerHasValueChangedCallback(fieldname: string, callback: (eventArg?: any) => void); + registerHasValueChangedCallback(fieldname: string, callback: (eventArg?: any) => void ); } } @@ -1434,23 +1703,23 @@ declare module SPAnimation { GetDataIndex(attributeId: Attribute): number } - export class Object { - constructor(animationID: ID, delay: number, element: HTMLElement, finalState: State, finishFunc?: (data: any) => void, data?: any); - constructor(animationID: ID, delay: number, element: HTMLElement[], finalState: State, finishFunc?: (data: any) => void, data?: any); + export class Object{ + constructor(animationID: ID, delay: number, element: HTMLElement, finalState: State, finishFunc?: (data: any) => void , data?: any); + constructor(animationID: ID, delay: number, element: HTMLElement[], finalState: State, finishFunc?: (data: any) => void , data?: any); RunAnimation(): void; } } -declare module SPAnimationUtility { +declare module SPAnimationUtility{ export class BasicAnimator { - static FadeIn(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void; - static FadeOut(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void; - static Move(element: HTMLElement, posX: number, posY: number, finishFunc?: (data: any) => void, data?: any): void; - static StrikeThrough(element: HTMLElement, strikeThroughWidth: number, finishFunc?: (data: any) => void, data?: any): void; - static Resize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void, data?: any): void; - static CommonResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: (data: any) => void, data: any, animationId: SPAnimation.ID): void; - static QuickResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void, data?: any): void; - static ResizeContainerAndFillContent(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: () => void, fAddToEnd: boolean): void; + static FadeIn(element: HTMLElement, finishFunc?: (data: any) => void , data?: any): void; + static FadeOut (element: HTMLElement, finishFunc?: (data: any) => void , data?: any): void; + static Move(element: HTMLElement, posX:number, posY:number, finishFunc?: (data: any) => void , data?: any): void; + static StrikeThrough(element: HTMLElement, strikeThroughWidth: number, finishFunc?: (data: any) => void , data?: any): void; + static Resize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void , data?: any): void; + static CommonResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: (data: any) => void , data: any, animationId:SPAnimation.ID): void; + static QuickResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void , data?: any): void; + static ResizeContainerAndFillContent(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: () => void , fAddToEnd: boolean): void; static GetWindowScrollPosition(): { x: number; y: number; }; static GetLeftOffset(element: HTMLElement): number; static GetTopOffset(element: HTMLElement): number; @@ -1702,13 +1971,13 @@ declare module SP { get_expectedContentType(): string; set_expectedContentType(value: string): void; post(body: string): void; - get(): void; - static doPost(url: string, body: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void, failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; - static doGet(url: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void, failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; - add_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void): void; - remove_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void): void; - add_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; - remove_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; + get (): void; + static doPost(url: string, body: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void , failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; + static doGet(url: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void , failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; + add_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void ): void; + remove_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void ): void; + add_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; + remove_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; constructor(); } export class ResResources { @@ -1962,10 +2231,10 @@ declare module SP { export class ClientRequest { static get_nextSequenceId(): number; get_webRequest(): Sys.Net.WebRequest; - add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; - remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; - add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; - remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; + add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; + remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; + add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; + remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; get_navigateWhenServerRedirect(): boolean; set_navigateWhenServerRedirect(value: boolean): void; } @@ -2000,18 +2269,18 @@ declare module SP { set_webRequestExecutorFactory(value: SP.IWebRequestExecutorFactory): void; get_pendingRequest(): SP.ClientRequest; get_hasPendingRequest(): boolean; - add_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void): void; - remove_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void): void; - add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; - remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; - add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; - remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; - add_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void; - remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void; + add_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void ): void; + remove_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void ): void; + add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; + remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; + add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; + remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; + add_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void ): void; + remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void ): void; get_requestTimeout(): number; set_requestTimeout(value: number): void; - executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void, failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; - executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; + executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void , failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; + executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; executeQueryAsync(): void; get_staticObjects(): any; castTo(obj: SP.ClientObject, type: any): SP.ClientObject; @@ -2390,7 +2659,7 @@ declare module SP { constructor(); } export class BasePermissions extends SP.ClientValueObject { - set(perm: SP.PermissionKind): void; + set (perm: SP.PermissionKind): void; clear(perm: SP.PermissionKind): void; clearAll(): void; has(perm: SP.PermissionKind): boolean; @@ -3719,7 +3988,7 @@ declare module SP { choiceField, minMaxField, textField, - } + } /** Represents an item or row in a list. */ export class ListItem extends SP.SecurableObject { get_fieldValues(): any; @@ -4153,7 +4422,7 @@ declare module SP { get_value(): string; static newObject(context: SP.ClientRuntimeContext): SP.RequestVariable; append(value: string): void; - set(value: string): void; + set (value: string): void; } export class RoleAssignment extends SP.ClientObject { get_member(): SP.Principal; @@ -4846,8 +5115,8 @@ declare module SP { set_moreColorsPicker(value: SP.Application.UI.MoreColorsPicker): void; } export class ThemeWebPage extends Sys.UI.Control { - add_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void): void; - remove_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void): void; + add_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void ): void; + remove_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void ): void; constructor(e: HTMLElement); initialize(): void; dispose(): void; @@ -5033,11 +5302,11 @@ declare module Microsoft.SharePoint.Client.Search { getQuerySuggestionsWithResults: (iNumberOfQuerySuggestions: number, - iNumberOfResultSuggestions: number, - fPreQuerySuggestions: boolean, - fHitHighlighting: boolean, - fCapitalizeFirstLetters: boolean, - fPrefixMatchAllTerms: boolean) => QuerySuggestionResults; + iNumberOfResultSuggestions: number, + fPreQuerySuggestions: boolean, + fHitHighlighting: boolean, + fCapitalizeFirstLetters: boolean, + fPrefixMatchAllTerms: boolean) => QuerySuggestionResults; } @@ -5083,15 +5352,15 @@ declare module Microsoft.SharePoint.Client.Search { executeQuery: (query: Query) => SP.JsonObjectResult; executeQueries: (queryIds: string[], queries: Query[], handleExceptions: boolean) => SP.JsonObjectResult; recordPageClick: ( - pageInfo: string, - clickType: string, - blockType: number, - clickedResultId: string, - subResultIndex: number, - immediacySourceId: string, - immediacyQueryString: string, - immediacyTitle: string, - immediacyUrl: string) => void; + pageInfo: string, + clickType: string, + blockType: number, + clickedResultId: string, + subResultIndex: number, + immediacySourceId: string, + immediacyQueryString: string, + immediacyTitle: string, + immediacyUrl: string) => void; exportPopularQueries: (web: SP.Web, sourceId: SP.Guid) => SP.JsonObjectResult; } @@ -5212,7 +5481,7 @@ declare module Microsoft.SharePoint.Client.Search { itemAt: (index: number) => Sort; get_item: (index: number) => Sort; get_childItemType: () => Object; - add: (property: Sort) => void; + add: (strProperty: string, sortDirection: SortDirection) => void; clear: () => void; } @@ -5397,14 +5666,14 @@ declare module Microsoft.SharePoint.Client.Search { export class DocumentCrawlLog extends SP.ClientObject { constructor(context: SP.ClientContext, site: SP.Site); getCrawledUrls: (getCountOnly: boolean, - maxRows: { High: number; Low: number; }, - queryString: string, - isLike: boolean, - contentSourceID: number, - errorLevel: number, - errorID: number, - startDateTime: Date, - endDateTime: Date) => SP.JsonObjectResult; + maxRows: { High: number; Low: number; }, + queryString: string, + isLike: boolean, + contentSourceID: number, + errorLevel: number, + errorID: number, + startDateTime: Date, + endDateTime: Date) => SP.JsonObjectResult; } export class SearchObjectOwner extends SP.ClientObject { @@ -6062,7 +6331,7 @@ declare module SP { /** Provides access to social feeds. It provides methods to create posts, delete posts, read posts, and perform other operations on posts. */ export class SocialFeedManager extends SP.ClientObject { - constructor(); + constructor(context: SP.ClientRuntimeContext); /** Returns the current user */ get_owner(): SocialActor; /** Specifies the URI of the personal site portal. */ @@ -6138,7 +6407,7 @@ declare module SP { set_newerThan(value: string): string; get_olderThan(): string; set_olderThan(value: string): string; - get_sortOrder(): SocialFeedSortOrder; + get_sortOrder():SocialFeedSortOrder; set_sortOrder(value: SocialFeedSortOrder): SocialFeedSortOrder; } @@ -6547,7 +6816,7 @@ declare module SP { get_isReused(): boolean; get_isRoot(): boolean; get_isSourceTerm(): boolean; - get_labels: LabelCollection; + get_labels(): LabelCollection; get_localCustomProperties(): { [key: string]: string; }; get_mergedTermIds(): SP.Guid[]; get_parent(): Term; @@ -6807,7 +7076,7 @@ declare module SP { get_selectedEntities(): any; set_selectedEntities(value: any): void; get_callback(): (sender: any, e: Sys.EventArgs) => void; - set_callback(value: (sender: any, e: Sys.EventArgs) => void): void; + set_callback(value: (sender: any, e: Sys.EventArgs) => void ): void; get_scopeKey(): string; get_componentType(): SP.UI.ApplicationPages.SelectorType; revertTo(ent: SP.UI.ApplicationPages.ResolveEntity): void; @@ -6825,7 +7094,7 @@ declare module SP { static instance(): SP.UI.ApplicationPages.CalendarSelector; registerSelector(selector: SP.UI.ApplicationPages.ISelectorComponent): void; getSelector(type: SP.UI.ApplicationPages.SelectorType, scopeKey: string): SP.UI.ApplicationPages.ISelectorComponent; - addHandler(scopeKey: string, people: boolean, resource: boolean, handler: (sender: any, selection: SP.UI.ApplicationPages.SelectorSelectionEventArgs) => void): void; + addHandler(scopeKey: string, people: boolean, resource: boolean, handler: (sender: any, selection: SP.UI.ApplicationPages.SelectorSelectionEventArgs) => void ): void; revertTo(scopeKey: string, ent: SP.UI.ApplicationPages.ResolveEntity): void; removeEntity(scopeKey: string, ent: SP.UI.ApplicationPages.ResolveEntity): void; constructor(); @@ -6837,7 +7106,7 @@ declare module SP { get_selectedEntities(): any; set_selectedEntities(value: any): void; get_callback(): (sender: any, e: Sys.EventArgs) => void; - set_callback(value: (sender: any, e: Sys.EventArgs) => void): void; + set_callback(value: (sender: any, e: Sys.EventArgs) => void ): void; revertTo(ent: SP.UI.ApplicationPages.ResolveEntity): void; removeEntity(ent: SP.UI.ApplicationPages.ResolveEntity): void; setEntity(ent: SP.UI.ApplicationPages.ResolveEntity): void; @@ -6952,39 +7221,27 @@ declare module SP { get_textElement(): HTMLElement; constructor(); } - export class Notify { - static addNotification(strHtml: string, bSticky: boolean): string; - static removeNotification(nid: string): void; - constructor(); - } - export enum ContainerID { - Basic, - Status, - } - export enum EventID { - OnShow, - OnHide, - OnDisplayNotification, - OnRemoveNotification, - OnNotificationCountChanged, - } - export class SPNotification { - constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string, onclickHandler: () => void, extraData: any); - constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string, onclickHandler: () => void); - constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string); - constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean); - constructor(containerId: SP.UI.ContainerID, strHtml: string); - get_id(): string; - Show(bNoAnimate: boolean): void; - Hide(bNoAnimate: boolean): void; - } - export class SPNotificationContainer { - constructor(id: number, element: any, layer: number, notificationLimit: number); - constructor(id: number, element: any, layer: number); - Clear(): void; - GetCount(): number; - SetEventHandler(eventId: SP.UI.EventID, eventHandler: any): void; + + export module Notify { + export function addNotification(strHtml: string, bSticky: boolean): string; + export function removeNotification(nid: string): void; + export function showLoadingNotification(bSticky: boolean): string; + + + export class Notification { + constructor(containerId: SPNotifications.ContainerID, strHtml: string, bSticky?: boolean, strTooltip?: string, onclickHandler?: () => void, extraData?: SPStatusNotificationData); + get_id(): string; + Show(bNoAnimate: boolean): void; + Hide(bNoAnimate: boolean): void; + } + export class NotificationContainer { + constructor(id: number, element: any, layer: number, notificationLimit?: number); + Clear(): void; + GetCount(): number; + SetEventHandler(eventId: SPNotifications.EventID, eventHandler: any): void; + } } + export class Status { static addStatus(strTitle: string, strHtml: string, atBegining: boolean): string; static appendStatus(sid: string, strTitle: string, strHtml: string): string; @@ -6994,9 +7251,10 @@ declare module SP { static removeAllStatus(hide: boolean): void; constructor(); } - export class Workspace { - static add_resized(handler: () => void): void; - static remove_resized(handler: () => void): void; + + export module Workspace { + export function add_resized(handler: () => void): void; + export function remove_resized(handler: () => void): void; } export class Menu { static create(id: string): SP.UI.Menu; @@ -7139,9 +7397,122 @@ declare module SP { close(dialogResult: SP.UI.DialogResult): void; } + + export class Command { + constructor(name: string, displayName: string); + get_displayName(): string; + set_displayName(value: string): string; + + get_tooltip(): string; + set_tooltip(value: string): string; + + get_isEnabled(): boolean; + set_isEnabled(value: boolean): boolean; + + get_href(): string; + get_name(): string; + get_elementIDPrefix(): string; + set_elementIDPrefix(value: string): string; + + get_linkElement():HTMLAnchorElement; + + get_isDropDownCommand(): boolean; + set_isDropDownCommand(value: boolean): boolean; + + attachEvents(): void; + render(builder: HtmlBuilder): void; + + + /**Should override*/ + onClick(): void; + + } + + + export class CommandBar { + constructor(); + get_commands():Command[]; + get_dropDownThreshold(): number; + set_dropDownThreshold(value: number): number; + get_elementID(): string; + get_overrideClass(): string; + set_overrideClass(value: string): string; + addCommand(action:Command):void; + insertCommand(action: Command, position:number): void; + render(builder: HtmlBuilder): void; + attachEvents(): void; + findCommandByName(name:string):Command; + } + + + export class PagingControl { + constructor(id: string); + render(innerContent:string): string; + postRender():void; + get_innerContent():HTMLSpanElement; + get_innerContentClass():string; + setButtonState(buttonId:number, state:number):void; + getButtonState(buttonId: number): number; + onWindowResized(): void; + + /**Should override*/ + onPrev(): void; + onNext(): void; + + static ButtonIDs: { + prev: number; + next: number; + } + + static ButtonState: { + hidden: number + disabled: number; + enabled: number; + } + } + + export module UIUtility { + export function generateRandomElement(): string; + export function cancelEvent(evt: Event): void; + export function clearChildNodes(elem: HTMLElement): void; + export function hideElement(elem: HTMLElement): void; + export function showElement(elem: HTMLElement): void; + export function insertBefore(elem: HTMLElement, targetElement: HTMLElement): void; + export function insertAfter(elem: HTMLElement, targetElement: HTMLElement): void; + export function removeNode(elem: HTMLElement): void; + export function calculateOffsetLeft(elem: HTMLElement): number; + export function calculateOffsetTop(elem: HTMLElement): number; + export function createHtmlInputText(text: string): HTMLInputElement; + export function createHtmlInputCheck(isChecked: boolean): HTMLInputElement; + export function setInnerText(elem: HTMLElement, value: string): void; + export function getInnerText(elem: HTMLElement): string; + export function isTextNode(elem: HTMLElement): boolean; + export function isSvgNode(elem: HTMLElement): boolean; + export function isNodeOfType(elem: HTMLElement, tagNames: string[]): boolean; + export function focusValidOnThisNode(elem: HTMLElement): boolean; + } } } +declare module SPNotifications { + + export enum ContainerID { + Basic, + Status, + } + export enum EventID { + OnShow, + OnHide, + OnDisplayNotification, + OnRemoveNotification, + OnNotificationCountChanged, + } +} + +declare class SPStatusNotificationData { + constructor(text: string, subText: string, imageUrl: string, sip: string); +} + declare module SP { export module UI { export module Controls { @@ -7804,8 +8175,20 @@ declare module SP { /** Same as get_url() */ toString(): string; } - } + export class LocUtility { + static getLocalizedCountValue(locText:string, intervals:string, count:number):string; + } + + export class VersionUtility { + static get_layoutsLatestVersionRelativeUrl():string; + static get_layoutsLatestVersionUrl(): string; + static getLayoutsPageUrl(pageName:string): string; + static getImageUrl(imageName:string): string; + } + + } + export module DateTimeUtil { export class SimpleDate { construction(year: number, month: number, day: number, era: number); @@ -8684,12 +9067,338 @@ declare module SP { } } } -declare class SPClientAutoFill { - static MenuOptionType: { + +declare module SP { + export module CompliancePolicy { + export enum SPContainerType { + site,//: 0, + web,//: 1, + list//: 2 + } + + export class SPContainerId extends ClientObject { + constructor(context: ClientRuntimeContext, objectPath: ObjectPath); + static createFromList(context: ClientRuntimeContext, list: List): SPContainerId; + static createFromWeb(context: ClientRuntimeContext, web: Web): SPContainerId; + static createFromSite(context: ClientRuntimeContext, site: Site): SPContainerId; + static create(context: ClientRuntimeContext, containerId): SPContainerId; + + get_containerType(): ContentType; + set_containerType(value: ContentType): ContentType; + + get_listId(): SP.Guid; + set_listId(value: SP.Guid): SP.Guid; + + get_siteId(): SP.Guid; + set_siteId(value: SP.Guid): SP.Guid; + + get_siteUrl(): string; + set_siteUrl(value: string): string; + + get_tenantId(): SP.Guid; + set_tenantId(value: SP.Guid): SP.Guid; + + get_title(): string; + set_title(value: string): string; + + get_version(): any; + set_version(value: any): any; + + get_webId(): SP.Guid; + set_webId(value: SP.Guid): SP.Guid; + + serialize(): SP.StringResult; + } + + export class SPPolicyAssociation extends ClientObject { + constructor(context: ClientRuntimeContext, objectPath: ObjectPath); + + get_allowOverride(): boolean; + set_allowOverride(value: boolean): boolean; + + get_comment(): string; + set_comment(value: string): string; + + get_defaultPolicyDefinitionConfigId(): any[]; + set_defaultPolicyDefinitionConfigId(value: any[]): any[]; + + get_description(): string; + set_description(value: string): string; + + get_identity(): boolean; + set_identity(value: boolean): boolean; + + get_name(): string; + set_name(value: string): string; + + get_policyApplyStatus(): any; + set_policyApplyStatus(value: any): any; + + get_policyDefinitionConfigIds(): any[]; + set_policyDefinitionConfigIds(value: any[]): any[]; + + get_scope(): any; + set_scope(value: any): any; + + get_source(): any; + set_source(value: any): any; + + get_version(): any; + set_version(value: any): any; + + get_whenAppliedUTC(): Date; + set_whenAppliedUTC(value: Date): Date; + + get_whenChangedUTC(): Date; + set_whenChangedUTC(value: Date): Date; + + get_whenCreatedUTC(): Date; + set_whenCreatedUTC(value: Date): Date; + } + + export class SPPolicyBinding extends ClientObject { + constructor(context: ClientRuntimeContext, objectPath: ObjectPath); + + get_identity(): any; + set_identity(value: any): any; + + get_isExempt(): boolean; + set_isExempt(value: boolean): boolean; + + get_mode(): any; + set_mode(value: any): any; + + get_name(): string; + set_name(value: string): string; + + get_policyApplyStatus(): any; + set_policyApplyStatus(value: any): any; + + get_policyAssociationConfigId(): any; + set_policyAssociationConfigId(value: any): any; + + get_policyDefinitionConfigId(): any; + set_policyDefinitionConfigId(value: any): any; + + get_policyRuleConfigId(): any; + set_policyRuleConfigId(value: any): any; + + get_scope(): any; + set_scope(value: any): any; + + get_source(): any; + set_source(value: any): any; + + get_version(): any; + set_version(value: any): any; + + get_whenAppliedUTC(): Date; + set_whenAppliedUTC(value: Date): Date; + + get_whenChangedUTC(): Date; + set_whenChangedUTC(value: Date): Date; + + get_whenCreatedUTC(): Date; + set_whenCreatedUTC(value: Date): Date; + } + + export class SPPolicyDefinition extends ClientObject { + constructor(context: ClientRuntimeContext, objectPath: ObjectPath); + + get_comment(): string; + set_comment(value: string): string; + + get_createdBy(): any; + set_createdBy(value: any): any; + + get_defaultPolicyRuleConfigId + set_defaultPolicyRuleConfigId + + get_description(): string; + set_description(value: string): string; + + get_enabled(): boolean; + set_enabled(value: boolean): boolean; + + get_identity(): any; + set_identity(value: any): any; + + get_lastModifiedBy(): any; + set_lastModifiedBy(value: any): any; + + get_name(): string; + set_name(value: string): string; + + get_mode(): any; + set_mode(value: any): any; + + get_scenario(): any; + set_scenario(value: any): any; + + get_source(): any; + set_source(value: any): any; + + get_version(): any; + set_version(value: any): any; + + get_whenChangedUTC(): Date; + set_whenChangedUTC(value: Date): Date; + + get_whenCreatedUTC(): Date; + set_whenCreatedUTC(value: Date): Date; + + + } + + export class SPPolicyRule extends ClientObject { + constructor(context: ClientRuntimeContext, objectPath: ObjectPath); + + get_comment(): string; + set_comment(value: string): string; + + get_createdBy(): any; + set_createdBy(value: any): any; + + get_description(): string; + set_description(value: string): string; + + get_enabled(): boolean; + set_enabled(value: boolean): boolean; + get_identity(): any; + set_identity(value: any): any; + + get_lastModifiedBy(): any; + set_lastModifiedBy(value: any): any; + + get_mode(): any; + set_mode(value: any): any; + + get_name(): string; + set_name(value: string): string; + + get_policyDefinitionConfigId(): any; + set_policyDefinitionConfigId(value: any): any; + + get_priority(): any; + set_priority(value: any): any; + + get_ruleBlob(): any; + set_ruleBlob(value: any): any; + + get_whenChangedUTC(): Date; + set_whenChangedUTC(value: Date): Date; + + get_whenCreatedUTC(): Date; + set_whenCreatedUTC(value: Date): Date; + } + + export class SPPolicyStore extends ClientObject { + constructor(context: ClientRuntimeContext, web: Web); + + static createPolicyDefinition(context: ClientRuntimeContext): SPPolicyDefinition; + static createPolicyBinding(context: ClientRuntimeContext):SPPolicyBinding; + static createPolicyAssociation(context: ClientRuntimeContext):SPPolicyAssociation; + static createPolicyRule(context: ClientRuntimeContext): SPPolicyRule; + + + updatePolicyRule(policyRule:SPPolicyRule):void; + + getPolicyRule(policyRuleId:any, throwIfNull:boolean):SPPolicyRule; + + deletePolicyRule(policyRuleId: any);void; + + notifyUnifiedPolicySync(notificationId, syncSvcUrl:string, changeInfos, syncNow:boolean, fullSyncForTenant):void; + + updatePolicyDefinition(policyDefinition:SPPolicyDefinition):void; + + getPolicyDefinition(policyDefinitionId):SPPolicyDefinition; + + deletePolicyDefinition(policyDefinitionId):void; + + getPolicyDefinitions(scenario): ClientObjectList; + + updatePolicyBinding(policyBinding:SPPolicyBinding):void; + + getPolicyBinding(policyBindingId): SPPolicyBinding; + + deletePolicyBinding(policyBindingId): void; + + updatePolicyAssociation(policyAssociation: SPPolicyAssociation): void; + + getPolicyAssociation(policyAssociationId): SPPolicyAssociation; + + getPolicyAssociationForContainer(containerId: SPContainerId): SPPolicyAssociation; + + deletePolicyAssociation(policyAssociationId): void; + } + + export class SPPolicyStoreProxy extends ClientObject { + constructor(context: ClientRuntimeContext, web: Web); + + get_policyStoreUrl(): string; + } + + } + + export module Discovery { + + export enum ExportStatus { + notStarted,//: 0, + started,//: 1, + complete,//: 2, + failed//: 3 + } + + export class Case extends ClientObject { + constructor(context: ClientRuntimeContext, web: Web); + getExportContent(sourceIds: number[]): SP.StringResult; + } + export class Export extends ClientObject { + constructor(context: ClientRuntimeContext, item: ListItem); + get_status(): ExportStatus; + set_status(value: ExportStatus): ExportStatus; + update(): void; + getExportContent(): SP.StringResult; + } + } + + export module InformationPolicy { + export class ProjectPolicy extends SP.ClientObject { + constructor(context: ClientRuntimeContext, objectPath: ObjectPath); + get_description(): string; + + get_emailBody(): string; + set_emailBody(value: string): string; + + get_emailBodyWithTeamMailbox(): string; + set_emailBodyWithTeamMailbox(value: string): string; + + get_emailSubject(): string; + set_emailSubject(value: string): string; + + get_name(): string; + savePolicy(): void; + + + static getProjectPolicies(context: ClientRuntimeContext, web: Web): ClientObjectList; + static getCurrentlyAppliedProject(context: ClientRuntimeContext, web: Web): ProjectPolicy; + static applyProjectPolicy(context: ClientRuntimeContext, web: Web, projectPolicy: ProjectPolicy): void; + static openProject(context: ClientRuntimeContext, web: Web): void; + static closeProject(context: ClientRuntimeContext, web: Web): void; + static postponeProject(context: ClientRuntimeContext, web: Web): void; + static doesProjectHavePolicy(context: ClientRuntimeContext, web: Web): SP.BooleanResult; + static isProjectClosed(context: ClientRuntimeContext, web: Web): SP.BooleanResult; + static getProjectCloseDate(context: ClientRuntimeContext, web: Web): SP.DateTimeResult; + static getProjectExpirationDate(context: ClientRuntimeContext, web: Web): SP.DateTimeResult; + } + } +} +declare class SPClientAutoFill{ + static MenuOptionType : { Option: number; Footer: number; Separator: number; - Loading: number; + Loading:number; } static KeyProperty: string; //= 'AutoFillKey'; @@ -8702,7 +9411,7 @@ declare class SPClientAutoFill { static GetAutoFillObjFromContainer(elmChild: HTMLElement): SPClientAutoFill; static GetAutoFillMenuItemFromOption(elmChild: HTMLElement): HTMLElement; - constructor(elmTextId: string, elmContainerId: string, fnPopulateAutoFill: (targetElement: HTMLInputElement) => void); + constructor(elmTextId: string, elmContainerId: string, fnPopulateAutoFill: (targetElement: HTMLInputElement) => void ); public TextElementId: string; public AutoFillContainerId: string; public AutoFillMenuId: string; @@ -8713,16 +9422,16 @@ declare class SPClientAutoFill { public AutoFillCallbackTimeoutID: string; public FuncOnAutoFillClose: (elmTextId: string, ojData: ISPClientAutoFillData) => void; public FuncPopulateAutoFill: (targetElement: HTMLElement) => void; - public AllOptionData: { [key: string]: ISPClientAutoFillData }; + public AllOptionData: { [key:string]: ISPClientAutoFillData }; - PopulateAutoFill(jsonObjSuggestions: ISPClientAutoFillData[], fnOnAutoFillCloseFuncName: (elmTextId: string, objData: ISPClientAutoFillData) => void): void; + PopulateAutoFill(jsonObjSuggestions: ISPClientAutoFillData[], fnOnAutoFillCloseFuncName: (elmTextId: string, objData:ISPClientAutoFillData) => void ): void; IsAutoFillOpen(): boolean; SetAutoFillHeight(): void; - SelectAutoFillOption(elemOption: HTMLElement): void; - FocusAutoFill(): void; + SelectAutoFillOption(elemOption:HTMLElement): void; + FocusAutoFill() :void; BlurAutoFill(): void; CloseAutoFill(ojData: ISPClientAutoFillData): void; - UpdateAutoFillMenuFocus(bMoveNextLink: boolean): void; + UpdateAutoFillMenuFocus(bMoveNextLink:boolean): void; UpdateAutoFillPosition(): void; } @@ -8894,4 +9603,158 @@ declare module Microsoft { } } } +/** Available only in SharePoint Online*/ +declare module Define { + export function loadScript(url: string, successCallback: () => void, errCallback: () => void); + /** Loads script from _layouts/15/[req].js */ + export function require(req: string, callback: Function): void; + /** Loads script from _layouts/15/[req].js */ + export function require(req: string[], callback: Function): void; + export function define(name: string, deps: string[], def: Function): void; +} +/** Available only in SharePoint Online*/ +declare module Verify { + export function ArgumentType(arg: string, expected: any); +} + + +/** Available only in SharePoint Online*/ +declare module BrowserStorage { + export var local: CachedStorage; + export var session: CachedStorage; + + /** Available only in SharePoint Online*/ + interface CachedStorage { + getItem(key: string): string; + setItem(key: string, value: string); + removeItem(key: string): void; + clead(): void; + length: number; + } +} + +/** Available only in SharePoint Online*/ +declare module BrowserDetection { + export var browseris: Browseris; +} + +/** Available only in SharePoint Online*/ +declare module CSSUtil { + export function HasClass(elem: HTMLElement, className: string): boolean; + export function AddClass(elem: HTMLElement, className: string): void; + export function RemoveClass(elem: HTMLElement, className: string): void; + export function pxToFloat(pxString: string): number; + export function pxToNum(px: string): number; + export function numToPx(n: number): string; + export function getCurrentEltStyleByNames(elem: HTMLElement, styleNames: string[]): string; + export function getCurrentStyle(elem: HTMLElement, cssStyle: string): string; + export function getCurrentStyleCorrect(element: HTMLElement, camelStyleName: string, dashStyleName: string): string; + export function getOpacity(element: HTMLElement): number; + export function setOpacity(element: HTMLElement, value: number): void; +} + +/** Available only in SharePoint Online*/ +declare module DOM { + export var rightToLeft: boolean; + export function cancelDefault(evt: Event): void; + export function AbsLeft(el: HTMLElement): number; + export function AbsTop(el: HTMLElement): number; + export function CancelEvent(evt: Event): void; + export function GetElementsByName(nae: string): NodeList; + export function GetEventCoords(evt: Event): { x: number; y: number; }; + export function GetEventSrcElement(evt: Event): HTMLElement; + export function GetInnerText(el: HTMLElement): string; + export function PreventDefaultNavigation(evt: Event): void; + export function SetEvent(eventName: string, eventFunc: Function, el: HTMLElement); +} + +/** Available only in SharePoint Online*/ +declare module Encoding { + export function EncodeScriptQuote(str: string): string; + export function HtmlEncode(str: string): string; + export function HtmlDecode(str: string): string; + export function AttrQuote(str: string): string; + export function ScriptEncode(str: string): string; + export function ScriptEncodeWithQuote(str: string): string; + export function CanonicalizeUrlEncodingCase(str: string): string; +} + +/** Available only in SharePoint Online*/ +declare module IE8Support { + export function arrayIndexOf(array: T[], item: T, startIdx?: number): number; + export function attachDOMContentLoaded(handler: Function): void; + export function getComputedStyle(domObj: HTMLElement, camelStyleName: string, dashStyleName: string): string; + export function stopPropagation(evt: Event): void; +} + +/** Available only in SharePoint Online*/ +declare module StringUtil { + export function BuildParam(stPattern: string, ...params: any[]); + export function ApplyStringTemplate(str: string, ...params: any[]); +} + +/** Available only in SharePoint Online*/ +declare module TypeUtil { + export function IsArray(value: any): boolean; + export function IsNullOrUndefined(value: any): boolean; +} + +/** Available only in SharePoint Online*/ +declare module Nav { + export var ajaxNavigate: AjaxNavigate; + export function convertRegularURLtoMDSURL(webUrl: string, fullPath: string): string; + export function isMDSUrl(url: string): boolean; + export function isPageUrlValid(url: string): boolean; + export function isPortalTemplatePage(url: string): boolean; + export function getAjaxLocationWindow(): string; + export function getSource(defaultSource?: string): string; + export function getUrlKeyValue(keyName: string, bNoDecode: boolean, url: string, bCaseInsensitive: boolean): string; + export function getWindowLocationNoHash(hre: string): string; + export function goToHistoryLink(el: HTMLAnchorElement, strVersion: string): void; + export function getGoToLinkUrl(el: HTMLAnchorElement): string; + export function goToLink(el: HTMLAnchorElement): void; + export function goToLinkOrDialogNewWindow(el: HTMLAnchorElement): void; + export function goToDiscussion(url: string): void; + export function onClickHook(evt: Event, topElm: HTMLElement): void; + export function pageUrlValidation(url: string, alertString: string): string; + export function parseHash(hash: string): Object; + export function navigate(url: string): void; + export function removeMDSQueryParametersFromUrl(url: string): string; + export function urlFromHashBag(hashObject: Object): string; + export function wantsNewTab(evt: Event): boolean; +} + +/** Available only in SharePoint Online*/ +declare module URI_Encoding { + export function encodeURIComponent(str: string, bAsUrl?: boolean, bForFilterQuery?: boolean, bForCallback?: boolean): string; + export function escapeUrlForCallback(str: string): string; +} + +interface IListItem { + ID: number; + ContentTypeId: string; +} + +/** Available only in SharePoint Online*/ +declare module ListModule { + export module Util { + export function createViewEditUrl(renderCtx: SPClientTemplates.RenderContext, listItem: IListItem, useEditFormUrl?: boolean, appendSource?: boolean): string; + export function createItemPropertiesTitle(renderCtx: SPClientTemplates.RenderContext, listItem: IListItem): string; + export function clearSelectedItemsDict(context: any): void; + export function ctxInitItemState(context: any): void; + export function getAttributeFromItemTable(itemTableParam: HTMLElement, strAttributeName: string, strAttributeOldName: string): string + export function getSelectedItemsDict(context: any): any; + export function removeOnlyPagingArgs(url: string): string; + export function removePagingArgs(url: string): string; + export function showAttachmentRows(): void; + } +} + +/** Available only in SharePoint Online*/ +declare module SPThemeUtils { + export function ApplyCurrentTheme(): void; + export function WithCurrentTheme(resultCallback: Function): void; + export function UseClientSideTheming(): boolean; + export function Suspend(): void; +} From bc3401efbc3111c91d89b0236cba76cac79d439e Mon Sep 17 00:00:00 2001 From: gandjustas Date: Sun, 15 Jun 2014 19:13:04 +0400 Subject: [PATCH 46/84] Fixed bug --- sharepoint/SharePoint.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sharepoint/SharePoint.d.ts b/sharepoint/SharePoint.d.ts index f3b2c9932..1f7a2feaf 100644 --- a/sharepoint/SharePoint.d.ts +++ b/sharepoint/SharePoint.d.ts @@ -3,8 +3,6 @@ // Definitions by: Stanislav Vyshchepan , Andrey Markeev // Definitions: https://github.com/borisyankov/DefinitelyTyped - - declare module Sys { export class EventArgs { static Empty: Sys.EventArgs; @@ -7472,7 +7470,7 @@ declare module SP { } export module UIUtility { - export function generateRandomElement(): string; + export function generateRandomElementId(): string; export function cancelEvent(evt: Event): void; export function clearChildNodes(elem: HTMLElement): void; export function hideElement(elem: HTMLElement): void; @@ -9758,3 +9756,5 @@ declare module SPThemeUtils { export function UseClientSideTheming(): boolean; export function Suspend(): void; } + + From b5ad8ed044d94ef05f3a6a3d4b0adc6cd7dcb34d Mon Sep 17 00:00:00 2001 From: Junle Li Date: Sun, 15 Jun 2014 23:47:40 +0800 Subject: [PATCH 47/84] Add empty jquery.pjax definition and test file. --- jquery.pjax/jquery.pjax-tests.ts | 0 jquery.pjax/jquery.pjax.d.ts | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 jquery.pjax/jquery.pjax-tests.ts create mode 100644 jquery.pjax/jquery.pjax.d.ts diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts new file mode 100644 index 000000000..e69de29bb diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts new file mode 100644 index 000000000..e69de29bb From 1366742ab46eb5347f36845129ad0f504dc58ae2 Mon Sep 17 00:00:00 2001 From: Junle Li Date: Mon, 16 Jun 2014 01:23:02 +0800 Subject: [PATCH 48/84] Add definition and test for jquery.fn.pjax method. --- jquery.pjax/jquery.pjax-tests.ts | 9 ++++++++ jquery.pjax/jquery.pjax.d.ts | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index e69de29bb..710a8f9e7 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -0,0 +1,9 @@ +/// +/// + +function test_fn_pjax() { + $(document).pjax("a"); + $(document).pjax("a", "#pjax-container"); + $(document).pjax("a", {push: true}); + $(document).pjax("a", "#pjax-container", {push: true}); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index e69de29bb..ccab8bee5 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -0,0 +1,35 @@ +// Type definitions for jquery-pjax +// Project: https://github.com/defunkt/jquery-pjax + +/// + +interface JQuery { + /* + * Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container. + * Tries to make sure the back button and ctrl+click work the way you'd expect. + * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container, + * If such an attribute is not defined too, the context runs with this statement will be treated as container. + * @param delegationSelector The selector to limit which links PJAX should listen on. + * @param options A valid jQuery ajax options object that may include these pjax specific options: + * - container: A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * - push: Whether to pushState the URL. Defaults to true (of course). + * - replace: Want to use replaceState instead? That's cool. + * @return Returns the jQuery object + */ + pjax(delegationSelector: string, options?: JQueryAjaxSettings): JQuery; + + /* + * Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container. + * Tries to make sure the back button and ctrl+click work the way you'd expect. + * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container, + * If such an attribute is not defined too, the context runs with this statement will be treated as container. + * @param delegationSelector The selector to limit which links PJAX should listen on. + * @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * @param options A valid jQuery ajax options object that may include these pjax specific options: + * - container: A jQuery selector indicates where to stick the response body. The containerSelector has priority. + * - push: Whether to pushState the URL. Defaults to true (of course). + * - replace: Want to use replaceState instead? That's cool. + * @return Returns the jQuery object + */ + pjax(delegationSelector: string, containerSelector?: string, options?: JQueryAjaxSettings): JQuery; +} From 3487faa4eac104bcc886057cdbd8bbcd06435f6c Mon Sep 17 00:00:00 2001 From: Junle Date: Mon, 16 Jun 2014 01:53:56 +0800 Subject: [PATCH 49/84] Fix the asterisk bug and a trivial bug. --- jquery.pjax/jquery.pjax.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index ccab8bee5..96db1a525 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -4,10 +4,10 @@ /// interface JQuery { - /* + /** * Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container. * Tries to make sure the back button and ctrl+click work the way you'd expect. - * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container, + * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container. * If such an attribute is not defined too, the context runs with this statement will be treated as container. * @param delegationSelector The selector to limit which links PJAX should listen on. * @param options A valid jQuery ajax options object that may include these pjax specific options: @@ -18,10 +18,10 @@ interface JQuery { */ pjax(delegationSelector: string, options?: JQueryAjaxSettings): JQuery; - /* + /** * Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container. * Tries to make sure the back button and ctrl+click work the way you'd expect. - * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container, + * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container. * If such an attribute is not defined too, the context runs with this statement will be treated as container. * @param delegationSelector The selector to limit which links PJAX should listen on. * @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). From baca62733abd8b23755838c0b9d4a2bbbc27beaa Mon Sep 17 00:00:00 2001 From: Junle Date: Mon, 16 Jun 2014 02:00:21 +0800 Subject: [PATCH 50/84] Add PjaxSettings extending from JQueryAjaxSettings. --- jquery.pjax/jquery.pjax.d.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 96db1a525..e4f7bedc2 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -3,6 +3,25 @@ /// +interface PjaxSettings extends JQueryAjaxSettings { + /** + * A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * If it is not defined, the `data-pjax` attribute of the link will be treated as container. + * If such an attribute is not defined too, the context will be treated as container. + */ + container?: string; + + /** + * Whether to pushState the URL. Defaults to true. + */ + push?: boolean; + + /** + * Whether to replaceState the URL. Defaults to false. + */ + replace?: boolean; +} + interface JQuery { /** * Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container. @@ -16,7 +35,7 @@ interface JQuery { * - replace: Want to use replaceState instead? That's cool. * @return Returns the jQuery object */ - pjax(delegationSelector: string, options?: JQueryAjaxSettings): JQuery; + pjax(delegationSelector: string, options?: PjaxSettings): JQuery; /** * Tell PJAX to listen links with delegation selector that, when click on them, fetches the href with ajax into the container. @@ -31,5 +50,5 @@ interface JQuery { * - replace: Want to use replaceState instead? That's cool. * @return Returns the jQuery object */ - pjax(delegationSelector: string, containerSelector?: string, options?: JQueryAjaxSettings): JQuery; + pjax(delegationSelector: string, containerSelector?: string, options?: PjaxSettings): JQuery; } From 019525512bf31c8880d653971226274bac64b514 Mon Sep 17 00:00:00 2001 From: Junle Date: Mon, 16 Jun 2014 02:09:24 +0800 Subject: [PATCH 51/84] Format the test file. --- jquery.pjax/jquery.pjax-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 710a8f9e7..c0a9de43b 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -4,6 +4,6 @@ function test_fn_pjax() { $(document).pjax("a"); $(document).pjax("a", "#pjax-container"); - $(document).pjax("a", {push: true}); - $(document).pjax("a", "#pjax-container", {push: true}); + $(document).pjax("a", { push: true }); + $(document).pjax("a", "#pjax-container", { push: true }); } From 4857d168d2cde699e4156e4a80a6175574ab5da8 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Mon, 16 Jun 2014 01:22:33 +0200 Subject: [PATCH 52/84] updated parsimmon to v0.5.0 project url changed too --- parsimmon/parsimmon-tests.ts | 13 ++++++++++++- parsimmon/parsimmon.d.ts | 13 ++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/parsimmon/parsimmon-tests.ts b/parsimmon/parsimmon-tests.ts index d1f3d4e6b..3f8019891 100644 --- a/parsimmon/parsimmon-tests.ts +++ b/parsimmon/parsimmon-tests.ts @@ -3,6 +3,7 @@ import P = require('parsimmon'); import Parser = P.Parser; import Mark = P.Mark; +import Result = P.Result; // -- -- -- -- -- -- -- -- -- -- -- -- -- @@ -17,6 +18,7 @@ class Bar { // -- -- -- -- -- -- -- -- -- -- -- -- -- var str: string; +var bool: boolean; var num: number; var regex: RegExp; @@ -50,7 +52,16 @@ var fooMarkPar: Parser>; // -- -- -- -- -- -- -- -- -- -- -- -- -- -foo = fooPar.parse(str); +var fooResult: Result; + +bool = fooResult.status; +foo = fooResult.value; +str = fooResult.expected; +num = fooResult.index; + +// -- -- -- -- -- -- -- -- -- -- -- -- -- + +fooResult = fooPar.parse(str); fooPar = fooPar.or(fooPar); anyPar = fooPar.or(barPar); diff --git a/parsimmon/parsimmon.d.ts b/parsimmon/parsimmon.d.ts index 2bf24cba7..719e9c937 100644 --- a/parsimmon/parsimmon.d.ts +++ b/parsimmon/parsimmon.d.ts @@ -1,5 +1,5 @@ -// Type definitions for Parsimmon 0.4.0 -// Project: https://github.com/jayferd/parsimmon +// Type definitions for Parsimmon 0.5.0 +// Project: https://github.com/jneen/parsimmon // Definitions by: Bart van der Schoor // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -14,11 +14,18 @@ declare module 'parsimmon' { value: T; } + export interface Result { + status: boolean; + value?: T; + expected?: string; + index?: number; + } + export interface Parser { /* parse the string */ - parse(input: string): T; + parse(input: string): Result; /* returns a new parser which tries parser, and if it fails uses otherParser. */ From 7a6925d958595cc59cac177506eac398064f9bec Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Mon, 16 Jun 2014 10:07:54 +0200 Subject: [PATCH 53/84] node fs.utimes methods also accept Date's --- node/node.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/node/node.d.ts b/node/node.d.ts index f3a778e01..56306c665 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -868,9 +868,13 @@ declare module "fs" { export function openSync(path: string, flags: string, mode?: number): number; export function openSync(path: string, flags: string, mode?: string): number; export function utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; export function utimesSync(path: string, atime: number, mtime: number): void; + export function utimesSync(path: string, atime: Date, mtime: Date): void; export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; export function futimesSync(fd: number, atime: number, mtime: number): void; + export function futimesSync(fd: number, atime: Date, mtime: Date): void; export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fsyncSync(fd: number): void; export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; From 943bfad4bb984bc5873d33f2566e76c685944716 Mon Sep 17 00:00:00 2001 From: Mayuki Sawatari Date: Mon, 16 Jun 2014 20:53:18 +0900 Subject: [PATCH 54/84] Add interface members & some comments. --- flipsnap/flipsnap.d.ts | 71 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/flipsnap/flipsnap.d.ts b/flipsnap/flipsnap.d.ts index b46081a52..55e601704 100644 --- a/flipsnap/flipsnap.d.ts +++ b/flipsnap/flipsnap.d.ts @@ -1,36 +1,93 @@ // Type definitions for flipsnap.js // Project: http://pxgrid.github.io/js-flipsnap/ -// Definitions by: kubosho_ & gsino +// Definitions by: kubosho_ , gsino , Mayuki Sawatari // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface Flipsnap { +interface IFlipsnap { + /** + * Return true or false. true is returned when there is previous element. + */ hasPrev(): boolean; + + /** + * Return true or false. true is returned when there is next element. + */ hasNext(): boolean; + + /** + * Move to previous item. + */ toPrev(transitionDuration?: number): void; + + /** + * Move to next item. + */ toNext(transitionDuration?: number): void; + + /** + * Move to item of number. + */ moveToPoint(point: number, transitionDuration?: number): void; + + /** + * Recalculate values + */ + refresh(): void; + element: HTMLElement; } interface FlipsnapStatic { - (element: HTMLElement, opts?: FlipsnapOptions): Flipsnap; - (element: string, opts?: FlipsnapOptions): Flipsnap; + /** + * @param element The element + */ + (element: HTMLElement, opts?: FlipsnapOptions): IFlipsnap; + + /** + * @param selector The parameter must be CSS Selector. When set string, to get first element of result. Not all element. + */ + (selector: string, opts?: FlipsnapOptions): IFlipsnap; } interface FlipsnapOptions { + /** + * Stop point count. default is auto calculate from element item count. + */ maxPoint?: number; + /** + * Move distance. default is auto calculate from element width and maxPont. + */ distance?: number; + /** + * Transition duration (millisecond). default is 350. + */ transitionDuration?: number; + /** + * When set true, touch event is disabled. Only handling button or etc interface. default is false. + */ disableTouch?: boolean; + /** + * When support 3D transform browser and this option set true, it is not used 3D transform and use 2D transform. You should set true, when it is a device which has a bug in 3D transform(old Android or BlackBerry etc). default is false. + */ disable3d?: boolean; } interface HTMLElement { - addEventListener(type: "fstouchend", listener: (ev: FlipsnapEvent) => any, useCapture?: boolean): void; + addEventListener(type: "fstouchstart", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "fstouchmove", listener: (ev: FlipsnapTouchMoveEvent) => any, useCapture?: boolean): void; + addEventListener(type: "fstouchend", listener: (ev: FlipsnapTouchEndEvent) => any, useCapture?: boolean): void; } -interface FlipsnapEvent extends Event { +interface FlipsnapTouchMoveEvent extends Event { + delta: number; + direction: number; +} + +interface FlipsnapTouchEndEvent extends Event { + moved: boolean; + cancelled: boolean; newPoint: number; + originalPoint: number; } -declare var Flipsnap: FlipsnapStatic; \ No newline at end of file +declare var Flipsnap: FlipsnapStatic; From 97e861d24fb21f91e414f2d7d6a5eb0faa6fec20 Mon Sep 17 00:00:00 2001 From: clement911 Date: Mon, 16 Jun 2014 21:59:50 +1000 Subject: [PATCH 55/84] Augment min/max signature for non-numeric types Made min/max signature generic to support non-numeric types, such as dates. --- ix.js/l2o.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 310e31f01..f50d3369d 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -54,8 +54,10 @@ declare module Ix { some(predicate?: EnumerablePredicate, thisArg?: any): boolean; // alias average(selector?: EnumerableFunc): number; - max(selector?: EnumerableFunc): number; - min(selector?: EnumerableFunc): number; + max(): T; + max(selector: EnumerableFunc): TResult; + min(): T; + min(selector: EnumerableFunc): TResult; sum(selector?: EnumerableFunc): number; concat(...sources: Enumerable[]): Enumerable; From 4095a931bf536078c8dfb26a91386b6304a9d581 Mon Sep 17 00:00:00 2001 From: kubosho_ Date: Mon, 2 Jun 2014 18:05:38 +0900 Subject: [PATCH 56/84] Add flipsnap.js type definitions --- flipsnap/flipsnap.d.ts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 flipsnap/flipsnap.d.ts diff --git a/flipsnap/flipsnap.d.ts b/flipsnap/flipsnap.d.ts new file mode 100644 index 000000000..b46081a52 --- /dev/null +++ b/flipsnap/flipsnap.d.ts @@ -0,0 +1,36 @@ +// Type definitions for flipsnap.js +// Project: http://pxgrid.github.io/js-flipsnap/ +// Definitions by: kubosho_ & gsino +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface Flipsnap { + hasPrev(): boolean; + hasNext(): boolean; + toPrev(transitionDuration?: number): void; + toNext(transitionDuration?: number): void; + moveToPoint(point: number, transitionDuration?: number): void; + element: HTMLElement; +} + +interface FlipsnapStatic { + (element: HTMLElement, opts?: FlipsnapOptions): Flipsnap; + (element: string, opts?: FlipsnapOptions): Flipsnap; +} + +interface FlipsnapOptions { + maxPoint?: number; + distance?: number; + transitionDuration?: number; + disableTouch?: boolean; + disable3d?: boolean; +} + +interface HTMLElement { + addEventListener(type: "fstouchend", listener: (ev: FlipsnapEvent) => any, useCapture?: boolean): void; +} + +interface FlipsnapEvent extends Event { + newPoint: number; +} + +declare var Flipsnap: FlipsnapStatic; \ No newline at end of file From d5c6cfffd26f751a81b1acf96454da767a6fec15 Mon Sep 17 00:00:00 2001 From: Mayuki Sawatari Date: Mon, 16 Jun 2014 20:53:18 +0900 Subject: [PATCH 57/84] Add interface members & some comments. --- flipsnap/flipsnap.d.ts | 71 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/flipsnap/flipsnap.d.ts b/flipsnap/flipsnap.d.ts index b46081a52..55e601704 100644 --- a/flipsnap/flipsnap.d.ts +++ b/flipsnap/flipsnap.d.ts @@ -1,36 +1,93 @@ // Type definitions for flipsnap.js // Project: http://pxgrid.github.io/js-flipsnap/ -// Definitions by: kubosho_ & gsino +// Definitions by: kubosho_ , gsino , Mayuki Sawatari // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface Flipsnap { +interface IFlipsnap { + /** + * Return true or false. true is returned when there is previous element. + */ hasPrev(): boolean; + + /** + * Return true or false. true is returned when there is next element. + */ hasNext(): boolean; + + /** + * Move to previous item. + */ toPrev(transitionDuration?: number): void; + + /** + * Move to next item. + */ toNext(transitionDuration?: number): void; + + /** + * Move to item of number. + */ moveToPoint(point: number, transitionDuration?: number): void; + + /** + * Recalculate values + */ + refresh(): void; + element: HTMLElement; } interface FlipsnapStatic { - (element: HTMLElement, opts?: FlipsnapOptions): Flipsnap; - (element: string, opts?: FlipsnapOptions): Flipsnap; + /** + * @param element The element + */ + (element: HTMLElement, opts?: FlipsnapOptions): IFlipsnap; + + /** + * @param selector The parameter must be CSS Selector. When set string, to get first element of result. Not all element. + */ + (selector: string, opts?: FlipsnapOptions): IFlipsnap; } interface FlipsnapOptions { + /** + * Stop point count. default is auto calculate from element item count. + */ maxPoint?: number; + /** + * Move distance. default is auto calculate from element width and maxPont. + */ distance?: number; + /** + * Transition duration (millisecond). default is 350. + */ transitionDuration?: number; + /** + * When set true, touch event is disabled. Only handling button or etc interface. default is false. + */ disableTouch?: boolean; + /** + * When support 3D transform browser and this option set true, it is not used 3D transform and use 2D transform. You should set true, when it is a device which has a bug in 3D transform(old Android or BlackBerry etc). default is false. + */ disable3d?: boolean; } interface HTMLElement { - addEventListener(type: "fstouchend", listener: (ev: FlipsnapEvent) => any, useCapture?: boolean): void; + addEventListener(type: "fstouchstart", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "fstouchmove", listener: (ev: FlipsnapTouchMoveEvent) => any, useCapture?: boolean): void; + addEventListener(type: "fstouchend", listener: (ev: FlipsnapTouchEndEvent) => any, useCapture?: boolean): void; } -interface FlipsnapEvent extends Event { +interface FlipsnapTouchMoveEvent extends Event { + delta: number; + direction: number; +} + +interface FlipsnapTouchEndEvent extends Event { + moved: boolean; + cancelled: boolean; newPoint: number; + originalPoint: number; } -declare var Flipsnap: FlipsnapStatic; \ No newline at end of file +declare var Flipsnap: FlipsnapStatic; From 07bd983bae7a131aa81791eabe65c2909cb2c274 Mon Sep 17 00:00:00 2001 From: kubosho Date: Mon, 16 Jun 2014 23:36:22 +0900 Subject: [PATCH 58/84] Add test file for flipsnap --- flipsnap/flipsnap-tests.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 flipsnap/flipsnap-tests.ts diff --git a/flipsnap/flipsnap-tests.ts b/flipsnap/flipsnap-tests.ts new file mode 100644 index 000000000..a6b2f4fe8 --- /dev/null +++ b/flipsnap/flipsnap-tests.ts @@ -0,0 +1,13 @@ +/** + * Created by kubosho_ on 6/16/2014. + */ +/// + +Flipsnap('', { + maxPoint: 3, + distance: 230, + transitionDuration: 500, + disableTouch: true, + disable3d: false +}); + From 0673c6d91394dd8eccb2b7697d0f4060e85c4439 Mon Sep 17 00:00:00 2001 From: kubosho Date: Mon, 16 Jun 2014 23:40:26 +0900 Subject: [PATCH 59/84] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 532e0404e..18f86d444 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -83,6 +83,7 @@ All definitions files include a header with the author and editors, so at some p * [Firefox](https://developer.mozilla.org/en-US/docs/Web/API) (by [vvakame](https://github.com/vvakame)) * [FlexSlider](http://www.woothemes.com/flexslider/) (by [Diullei Gomes](https://github.com/Diullei)) * [Flight by Twitter](http://flightjs.github.com/flight/) (by [Jonathan Hedrén](https://github.com/jonathanhedren)) +* [flipsnap.js](http://pxgrid.github.io/js-flipsnap/) (by [kubosho_](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki)) * [Foundation](http://foundation.zurb.com/) (by [Boris Yankov](https://github.com/borisyankov)) * [FPSMeter](http://darsa.in/fpsmeter/) (by [Aaron Lampros](https://github.com/alampros)) * [fs-extra](https://github.com/jprichardson/node-fs-extra) (by [midknight41](https://github.com/midknight41)) From a2d2e1b26ddd789cb920296ed6a7fd471bcc0d06 Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Mon, 16 Jun 2014 14:29:59 -0400 Subject: [PATCH 60/84] Add chainable definitions for _(...).toArray. --- lodash/lodash-tests.ts | 6 +++++- lodash/lodash.d.ts | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index d58368b79..bc3727192 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -556,7 +556,11 @@ result = _([1, 2, 3]).sortBy(function (num) { return Math.sin(num); }) result = _([1, 2, 3]).sortBy(function (num) { return this.sin(num); }, Math).value(); result = _(['banana', 'strawberry', 'apple']).sortBy('length').value(); -(function (a: number, b: number, c: number, d: number) { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); +(function (a: number, b: number, c: number, d: number): Array { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); +result = _.toArray([1, 2, 3, 4]); +(function (a: number, b: number, c: number, d: number): Array { return _(arguments).toArray().slice(1).value(); })(1, 2, 3, 4); +result = _([1,2,3,4]).toArray().value(); + result = _.where(stoogesCombined, { 'age': 40 }); result = _.where(stoogesCombined, { 'quotes': ['Poifect!'] }); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index e51a59825..e198ebc57 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -4520,6 +4520,20 @@ declare module _ { toArray(collection: Dictionary): T[]; } + interface LoDashArrayWrapper { + /** + * @see _.toArray + **/ + toArray(): LoDashArrayWrapper; + } + + interface LoDashObjectWrapper { + /** + * @see _.toArray + **/ + toArray(): LoDashArrayWrapper; + } + //_.where interface LoDashStatic { /** From 6f61e6419b75ab21d222cbe22eaf99ac8fb7bb51 Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Mon, 16 Jun 2014 14:38:16 -0400 Subject: [PATCH 61/84] Add definitions for _.groupBy and _(...).groupBy when passed an object. --- lodash/lodash-tests.ts | 14 +++++++++--- lodash/lodash.d.ts | 51 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index bc3727192..cc4ab4408 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -425,9 +425,17 @@ result = <_.Dictionary>_.groupBy([4.2, 6.1, 6.4], function (num) { ret result = <_.Dictionary>_.groupBy([4.2, 6.1, 6.4], function (num) { return this.floor(num); }, Math); result = <_.Dictionary>_.groupBy(['one', 'two', 'three'], 'length'); -result = <_.LoDashObjectWrapper<_.Dictionary>>_([4.2, 6.1, 6.4]).groupBy(function (num) { return Math.floor(num); }); -result = <_.LoDashObjectWrapper<_.Dictionary>>_([4.2, 6.1, 6.4]).groupBy(function (num) { return this.floor(num); }, Math); -result = <_.LoDashObjectWrapper<_.Dictionary>>_(['one', 'two', 'three']).groupBy('length'); +result = <_.Dictionary>_.groupBy({ prop1: 4.2, prop2: 6.1, prop3: 6.4}, function (num) { return Math.floor(num); }); +result = <_.Dictionary>_.groupBy({ prop1: 4.2, prop2: 6.1, prop3: 6.4}, function (num) { return this.floor(num); }, Math); +result = <_.Dictionary>_.groupBy({ prop1: 'one', prop2: 'two', prop3: 'three'}, 'length'); + +result = <_.Dictionary>_([4.2, 6.1, 6.4]).groupBy(function (num) { return Math.floor(num); }).value(); +result = <_.Dictionary>_([4.2, 6.1, 6.4]).groupBy(function (num) { return this.floor(num); }, Math).value(); +result = <_.Dictionary>_(['one', 'two', 'three']).groupBy('length').value(); + +result = <_.Dictionary>_({ prop1: 4.2, prop2: 6.1, prop3: 6.4}).groupBy(function (num) { return Math.floor(num); }).value(); +result = <_.Dictionary>_({ prop1: 4.2, prop2: 6.1, prop3: 6.4}).groupBy(function (num) { return this.floor(num); }, Math).value(); +result = <_.Dictionary>_({ prop1: 'one', prop2: 'two', prop3: 'three'}).groupBy('length').value(); result = <_.Dictionary>_.indexBy(keys, 'dir'); result = <_.Dictionary>_.indexBy(keys, function (key) { return String.fromCharCode(key.code); }); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index e198ebc57..24e55836a 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -3169,6 +3169,30 @@ declare module _ { groupBy( collection: List, whereValue: W): Dictionary; + + /** + * @see _.groupBy + **/ + groupBy( + collection: Dictionary, + callback?: ListIterator, + thisArg?: any): Dictionary; + + /** + * @see _.groupBy + * @param pluckValue _.pluck style callback + **/ + groupBy( + collection: Dictionary, + pluckValue: string): Dictionary; + + /** + * @see _.groupBy + * @param whereValue _.where style callback + **/ + groupBy( + collection: Dictionary, + whereValue: W): Dictionary; } interface LoDashArrayWrapper { @@ -3177,19 +3201,40 @@ declare module _ { **/ groupBy( callback: ListIterator, - thisArg?: any): _.LoDashObjectWrapper>; + thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; /** * @see _.groupBy **/ groupBy( - pluckValue: string): _.LoDashObjectWrapper>; + pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; /** * @see _.groupBy **/ groupBy( - whereValue: W): _.LoDashObjectWrapper>; + whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; + } + + interface LoDashObjectWrapper { + /** + * @see _.groupBy + **/ + groupBy( + callback: ListIterator, + thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; + + /** + * @see _.groupBy + **/ + groupBy( + pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; + + /** + * @see _.groupBy + **/ + groupBy( + whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; } //_.indexBy From e16f61614562b34291d2490aab04a06aba233b73 Mon Sep 17 00:00:00 2001 From: balrob Date: Mon, 16 Jun 2014 18:02:05 +1200 Subject: [PATCH 62/84] Add test files & correct header Add test files & correct header for date.format.d.ts --- date.format.js/date.format-tests.ts | 8 ++++ date.format.js/date.format.d.ts | 59 ++++++++++++++++++++++++----- 2 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 date.format.js/date.format-tests.ts diff --git a/date.format.js/date.format-tests.ts b/date.format.js/date.format-tests.ts new file mode 100644 index 000000000..b14e7efe0 --- /dev/null +++ b/date.format.js/date.format-tests.ts @@ -0,0 +1,8 @@ +/// + +var now : string = dateFormat(); +var nowFullDate : string = dateFormat( dateFormat.masks.fullDate ); + +var then : Date = new Date( 2014, 1, 1 ); +var thenDefaultFormat : string = then.format(); +var thenCustomFormat : string = then.format('yyyy/m/d HH:MM'); diff --git a/date.format.js/date.format.d.ts b/date.format.js/date.format.d.ts index 249926eae..d40917644 100644 --- a/date.format.js/date.format.d.ts +++ b/date.format.js/date.format.d.ts @@ -1,6 +1,10 @@ -/****************************************************************************** - Portions Copyright (c) Microsoft Corporation. All rights reserved. +// Type definitions for Date Format 1.2.3 +// Project: http://blog.stevenlevithan.com/archives/date-time-format +// Definitions by: Rob Stutton +// Definitions: https://github.com/borisyankov/DefinitelyTyped +/* **************************************************************************** + Portions Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -14,9 +18,6 @@ and limitations under the License. ***************************************************************************** */ -// Typing for the date.format.js from Steven Levithan -// reproduces "Date" and adds format() - seemed to be the only way ... - /** Enables basic storage and retrieval of dates and times. */ interface Date { /** Returns a string representation of a date. The format of the string depends on the locale. */ @@ -169,11 +170,16 @@ interface Date { toISOString(): string; /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ toJSON(key?: any): string; - - format(mask: string, utc?: boolean) : string; + /** + * This is a convenience addition to the Date prototype + * Returns a formatted version of the date. + * The mask defaults to dateFormat.masks.default. + * @param {string=} mask + * @param {boolean=} utc + */ + format(mask?: string, utc?: boolean) : string; } - declare var Date: { new (): Date; new (value: number): Date; @@ -200,4 +206,39 @@ declare var Date: { now(): number; }; -declare function dateFormat(date?: any, mask?: string, utc?: boolean ) : string; +// Some common format strings +interface DateFormatMasks { + "default": string; + shortDate: string; + mediumDate: string; + longDate: string; + fullDate: string; + shortTime: string; + mediumTime: string; + longTime: string; + isoDate: string; + isoTime: string; + isoDateTime: string; + isoUtcDateTime: string; +} + +// Internationalization strings +interface DateFormatI18n { + dayNames: string[]; + monthNames: string[]; +} + +/** + * Accepts a date, a mask, or a date and a mask. + * Returns a formatted version of the given date. + * The date defaults to the current date/time. + * The mask defaults to dateFormat.masks.default. + * @param {Date=} date + * @param {string=} mask + * @param {boolean=} utc + */ +declare var dateFormat: { + (date?: any, mask?: string, utc?: boolean ): string; + masks : DateFormatMasks; + i18n : DateFormatI18n; +}; From 8a699244b3fe4f693065b62649366aa6af833b31 Mon Sep 17 00:00:00 2001 From: balrob Date: Tue, 17 Jun 2014 11:12:07 +1200 Subject: [PATCH 63/84] Minor update to comment - to allow a new commit --- date.format.js/date.format-tests.ts | 2 ++ date.format.js/date.format.d.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/date.format.js/date.format-tests.ts b/date.format.js/date.format-tests.ts index b14e7efe0..d06e78cb7 100644 --- a/date.format.js/date.format-tests.ts +++ b/date.format.js/date.format-tests.ts @@ -1,8 +1,10 @@ /// +// test dateFormat var now : string = dateFormat(); var nowFullDate : string = dateFormat( dateFormat.masks.fullDate ); +// test format() (on the prototype of Date) var then : Date = new Date( 2014, 1, 1 ); var thenDefaultFormat : string = then.format(); var thenCustomFormat : string = then.format('yyyy/m/d HH:MM'); diff --git a/date.format.js/date.format.d.ts b/date.format.js/date.format.d.ts index d40917644..6e4ef4ea6 100644 --- a/date.format.js/date.format.d.ts +++ b/date.format.js/date.format.d.ts @@ -3,7 +3,7 @@ // Definitions by: Rob Stutton // Definitions: https://github.com/borisyankov/DefinitelyTyped -/* **************************************************************************** +/***************************************************************************** Portions Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the From de2a2826ae34c6543d72127c5158700335788ac6 Mon Sep 17 00:00:00 2001 From: tbriz Date: Mon, 2 Jun 2014 17:09:25 -0700 Subject: [PATCH 64/84] Eliminated difference between GeoChartOptions and others --- .../google.visualization.d.ts | 36 +++++-------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/google.visualization/google.visualization.d.ts b/google.visualization/google.visualization.d.ts index 62b2a72d1..bdaa297d6 100644 --- a/google.visualization/google.visualization.d.ts +++ b/google.visualization/google.visualization.d.ts @@ -159,40 +159,19 @@ declare module google { enableRegionInteractivity?: boolean; height?: number; keepAspectRatio?: boolean; - legend?: GeoChartLegend; + legend?: ChartLegend; region?: string; magnifyingGlass?: GeoChartMagnifyingGlass; markerOpacity?: number; resolution?: string; - sizeAxis?: GeoChartAxis; - tooltip?: GeoChartTooltip; + sizeAxis?: ChartSizeAxis; + tooltip?: ChartTooltip; width?: number; } - export interface GeoChartAxis { - maxSize?: number; - maxValue?: number; - minSize?: number; - minValue?: number; - } - export interface GeoChartTextStyle { - color?: string; - fontName?: string; - fontSize?: number; - bold?: boolean; - italic?: boolean; - } - export interface GeoChartLegend { - numberFormat?: string; - textStyle?: GeoChartTextStyle; - } export interface GeoChartMagnifyingGlass { enable?: boolean; zoomFactor?: number; } - export interface GeoChartTooltip { - textStyle?: GeoChartTextStyle; - trigger?: string; - } export interface GeoChartRegionClickEvent { region: string; } @@ -276,6 +255,7 @@ declare module google { maxLines?: number; position?: string; textStyle?: ChartTextStyle; + numberFormat?: string; } // https://google-developers.appspot.com/chart/interactive/docs/animation @@ -766,10 +746,10 @@ declare module google { } export interface ChartSizeAxis { - maxSize: number; - maxValue: number; - minSize: number; - minValue: number; + maxSize?: number; + maxValue?: number; + minSize?: number; + minValue?: number; } //#endregion From bbd9ce12496c77914298c3a4eaad00def202aad5 Mon Sep 17 00:00:00 2001 From: Georgie Date: Mon, 16 Jun 2014 17:33:35 -0700 Subject: [PATCH 65/84] TimelineOptions.backgroundColor can be string or object, just like all the other charts --- google.visualization/google.visualization.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google.visualization/google.visualization.d.ts b/google.visualization/google.visualization.d.ts index bdaa297d6..38a08ef55 100644 --- a/google.visualization/google.visualization.d.ts +++ b/google.visualization/google.visualization.d.ts @@ -844,7 +844,7 @@ declare module google { // https://google-developers.appspot.com/chart/interactive/docs/gallery/timeline#Configuration_Options export interface TimelineOptions { avoidOverlappingGridLines?: boolean; - backgroundColor?: string; + backgroundColor?: any; colors?: string[]; enableInteractivity?: boolean; forceIFrame?: boolean; From edadb4b09bf0f6015444480668b0bd4015b00ba8 Mon Sep 17 00:00:00 2001 From: Phil McCloghry-Laing Date: Tue, 18 Mar 2014 12:49:45 +1100 Subject: [PATCH 66/84] Update for SockJS definition to fix constructor arguments --- sockjs/sockjs.d.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/sockjs/sockjs.d.ts b/sockjs/sockjs.d.ts index 7a4316ad6..db58683b2 100644 --- a/sockjs/sockjs.d.ts +++ b/sockjs/sockjs.d.ts @@ -36,10 +36,17 @@ interface SockJS extends EventTarget { declare var SockJS: { prototype: SockJS; - new (url: string, options?: { - debug: boolean; - devel: boolean; - protocols_whitelist: string[]; - }): SockJS; - -} \ No newline at end of file + new (url: string, _reserved: any, options?: { + debug?: boolean; + devel?: boolean; + protocols_whitelist?: string[]; + server?: string; + rtt?: number; + rto?: number; + info?: { + websocket?: boolean; + cookie_needed?: boolean; + null_origin?: boolean; + }; + }): SockJS; +}; \ No newline at end of file From f89ba04e050b571311a8211eb5ab3670a8c660a2 Mon Sep 17 00:00:00 2001 From: Maxime Fabre Date: Wed, 28 May 2014 12:29:08 +0200 Subject: [PATCH 67/84] Add Mapbox definitions Add some methods forgotten in the API Explicit declarations everywhere Add some options definitions Add FilterFunction interface Add some examples from Mapbox Swap tests --- CONTRIBUTORS.md | 1 + mapbox/mapbox-tests.ts | 41 ++++ mapbox/mapbox.d.ts | 452 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 494 insertions(+) create mode 100644 mapbox/mapbox-tests.ts create mode 100644 mapbox/mapbox.d.ts diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4c2fbc8e1..1bf91048c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -210,6 +210,7 @@ All definitions files include a header with the author and editors, so at some p * [Logg](https://github.com/dpup/node-logg) (by [Bret Little](https://github.com/blittle)) * [Long.js](https://github.com/dcodeIO/Long.js) (by [Toshihide Hara](https://github.com/kerug)) * [lz-string](https://github.com/pieroxy/lz-string) (by [Roman Nikitin](https://github.com/M0ns1gn0r)) +* [Mapbox](https://github.com/mapbox/mapbox.js/) (by [Maxime Fabre](https://github.com/anahkiasen)) * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) * [MathJax](https://github.com/mathjax/MathJax) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) (by [Sarah Williams](https://github.com/flurg)) diff --git a/mapbox/mapbox-tests.ts b/mapbox/mapbox-tests.ts new file mode 100644 index 000000000..0caebb042 --- /dev/null +++ b/mapbox/mapbox-tests.ts @@ -0,0 +1,41 @@ +/// + +var mapboxTiles = L.tileLayer('https://{s}.tiles.mapbox.com/v3/examples.map-i87786ca/{z}/{x}/{y}.png', { + attribution: 'Terms & Feedback' +}); + +var map = L.map('map').addLayer(mapboxTiles).setView(new L.LatLng([42.3610, -71.0587]), 15); + +var coordinates = document.getElementById('coordinates'); + +var marker = L.marker(new L.LatLng([0, 0]), { + icon: L.mapbox.marker.icon({ + 'marker-color': '#f86767' + }), + draggable: true +}).addTo(map); + +// every time the marker is dragged, update the coordinates container +marker.on('dragend', function() { + var m = marker.getLatLng(); + coordinates.innerHTML = 'Latitude: ' + m.lat + '
Longitude: ' + m.lng; +}); + +// Build a marker from a simple GeoJSON object: +var marker2 = L.mapbox.featureLayer({ + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-73.9840, 40.7271] + }, + properties: { + title: 'Hello world!', + 'marker-color': '#f86767' + } +}).addTo(map); + +// Iterate over the featureLayer we've called "marker" +// and open its popup instead of clicking to trigger it. +marker2.eachLayer(function(marker: L.Marker) { + marker.openPopup(); +}); \ No newline at end of file diff --git a/mapbox/mapbox.d.ts b/mapbox/mapbox.d.ts new file mode 100644 index 000000000..1cab6e1d9 --- /dev/null +++ b/mapbox/mapbox.d.ts @@ -0,0 +1,452 @@ +// Type definitions for Mapbox 1.6.3 +// Project: https://www.mapbox.com/mapbox.js/ +// Definitions by: Maxime Fabre +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +////////////////////////////////////////////////////////////////////// +///////////////////////////// MAP OBJECT ///////////////////////////// +////////////////////////////////////////////////////////////////////// + +// Map +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * Create and automatically configure a map with layers, markers, and interactivity. + */ + function map(element: string, id: string, options?: MapOptions): L.mapbox.Map; + function map(element: string, tilejson: any, options?: MapOptions): L.mapbox.Map; + + interface MapOptions extends L.MapOptions { + featureLayer? : FeatureLayerOptions; + gridLayer? : any; + tileLayer? : TileLayerOptions; + infoControl? : ControlOptions; + legendControl? : ControlOptions; + shareControl? : ShareControlOptions; + } + + interface FilterFunction { + (feature: any): boolean; + } + + interface Map extends L.Map { + tileLayer : L.mapbox.TileLayer; + gridLayer : L.mapbox.GridLayer; + featureLayer : L.mapbox.FeatureLayer; + + gridControl : L.mapbox.GridControl; + infoControl : L.mapbox.InfoControl; + legendControl : L.mapbox.LegendControl; + shareControl : L.mapbox.ShareControl; + + addLayer(layer: any): any; + getTileJSON(): any; + + } + +} + +////////////////////////////////////////////////////////////////////// +/////////////////////////////// LAYERS /////////////////////////////// +////////////////////////////////////////////////////////////////////// + +// TileLayer +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * You can add a tiled layer to your map with L.mapbox.tileLayer(), a simple interface to layers from Mapbox and elsewhere. + */ + function tileLayer(id: string, options?: TileLayerOptions): L.mapbox.TileLayer; + function tileLayer(tilejson: any, options?: TileLayerOptions): L.mapbox.TileLayer; + + interface TileLayerOptions extends L.TileLayerOptions { + retinaVersion?: string; + } + + interface TileLayer extends L.TileLayer { + + /** + * Returns this layer's TileJSON object which determines its tile source, zoom bounds and other metadata. + */ + getTileJSON(): any; + + /** + * Set the image format of tiles in this layer. You can use lower-quality tiles in order to load maps faster + */ + setFormat(format: string): TileLayer; + + } + +} + +// GridLayer +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * An L.mapbox.gridLayer loads UTFGrid tiles of interactivity into your map, which you can easily access with L.mapbox.gridControl. + */ + function gridLayer(id: string): L.mapbox.GridLayer; + function gridLayer(tilejson: any): L.mapbox.GridLayer; + + interface GridLayer { + + active(): boolean; + addTo(map: L.mapbox.Map): any; + onAdd(map: L.mapbox.Map): any; + onRemove(): any; + + /** + * Bind an event handler to a given event on this L.mapbox.gridLayer instance. GridLayers expose a number of useful events that give you access to UTFGrid data as the user interacts with the map. + */ + on(event: string, handler: Function, context?: any): any; + + /** + * Returns this layer's TileJSON object which determines its tile source, zoom bounds and other metadata. + */ + getTileJSON(): any; + + /** + * Load data for a given latitude, longitude point on the map, and call the callback function with that data, if any. + */ + getData(latlng: L.LatLng, callback: Function): any; + + } + +} + +// FeatureLayer +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * L.mapbox.featureLayer provides an easy way to integrate GeoJSON from Mapbox and elsewhere into your map. + */ + function featureLayer(): L.mapbox.FeatureLayer; + function featureLayer(id: string, options?: FeatureLayerOptions): L.mapbox.FeatureLayer; + function featureLayer(geojson: any, options?: FeatureLayerOptions): L.mapbox.FeatureLayer; + + interface FeatureLayerOptions { + filter? : FilterFunction; + sanitizer? : (template: string) => string; + } + + interface FeatureLayer extends L.FeatureGroup { + + /** + * Load GeoJSON data for this layer from the URL given by url. + */ + loadURL(url: string): any; + + /** + * Load marker GeoJSON data from a map with the given id on Mapbox. + */ + loadID(id: string): any; + + /** + * Sets the filter function for this data layer. + */ + setFilter(filter: FilterFunction): any; + + /** + * Gets the filter function for this data layer. + */ + getFilter(): FilterFunction; + + /** + * Set the contents of a markers layer: run the provided features through + * the filter function and then through the factory function to create + * elements for the map. If the layer already has features, they are + * replaced with the new features. An empty array will clear the + * layer of all features. + */ + setGeoJSON(geojson: any): L.mapbox.FeatureLayer; + + /** + * Get the contents of this layer as GeoJSON data. + */ + getGeoJSON(): any; + + } + +} + +////////////////////////////////////////////////////////////////////// +////////////////////////////// GEOCODING ///////////////////////////// +////////////////////////////////////////////////////////////////////// + +// Geocoder +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * A low-level interface to geocoding, useful for more complex uses and reverse-geocoding. + */ + function geocoder(id: string): L.mapbox.Geocoder; + + interface Geocoder { + + getURL(): string; + setURL(url: string): any; + setID(id: string): any; + setTileJSON(tilejson: any): any; + queryURL(url: string): string; + + /** + * Queries the geocoder with a query string, and returns its result, if any. + */ + query(queryString: string, callback: Function): any; + + /** + * Queries the geocoder with a location, and returns its result, if any. + */ + reverseQuery(location: any, callback: Function): any; + + } +} + +////////////////////////////////////////////////////////////////////// +//////////////////////////////// CONTROLS //////////////////////////// +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + interface ControlOptions extends L.ControlOptions { + sanitizer?: (template: string) => string; + } +} + +// InfoControl +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * A map control that shows a toggleable info container. If set, attribution is auto-detected from active layers and added to the info container. + */ + function infoControl(options?: ControlOptions): InfoControl; + + interface InfoControl extends L.Control { + + onAdd(map: L.mapbox.Map): any; + onRemove(map: L.mapbox.Map): any; + + /** + * Adds an info string to infoControl. + */ + addInfo(info: string): any; + + /** + * Removes an info string from infoControl + */ + removeInfo(info: string): any; + + } + +} + +// LegendControl +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * A map control that shows legends added to maps in Mapbox. + * Legends are auto-detected from active layers. + */ + function legendControl(options?: ControlOptions): LegendControl; + + interface LegendControl extends L.Control { + + onAdd(map: L.mapbox.Map): any; + + /** + * Adds a legend to the legendControl. + */ + addLegend(legend: string): any; + + /** + * Removes a legend from the legendControl. + */ + removeLegend(legend: string): any; + + } + +} + +// GridControl +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * Interaction is what we call interactive parts of maps that are created with + * the powerful tooltips & regions system in TileMill. Under the hood, it's powered by the open UTFGrid specification. + */ + function gridControl(layer: string, options?: GridControlOptions): GridControl; + + interface GridControlOptions extends ControlOptions { + template? : string; + follow? : boolean; + pinnable? : boolean; + touchTeaser? : boolean; + location? : boolean; + } + + interface GridControl extends L.Control { + + onAdd(map: L.mapbox.Map): any; + onRemove(map: L.mapbox.Map): any; + + /** + * If a tooltip is currently shown by the gridControl, hide and close it. + */ + hide(): any; + + /** + * Change the Mustache template used to transform the UTFGrid data in the map's interactivity into HTML for display. + */ + setTemplate(template: string): any; + + } + +} + +// GeocoderControl +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * Adds geocoder functionality as well as a UI element to a map. This uses the Mapbox Geocoding API. + */ + function geocoderControl(id: string, options?: GeocoderControlOptions): GeocoderControl; + + interface GeocoderControlOptions extends L.ControlOptions { + keepOpen?: boolean; + } + + interface GeocoderControl { + + getURL(): string; + onAdd(map: L.mapbox.Map): any; + + + /** + * Set the url used for geocoding. + */ + setURL(url: string): any; + + /** + * Set the map id used for geocoding. + */ + setID(id: string): any; + + /** + * Set the TileJSON used for geocoding. + */ + setTileJSON(tilejson: any): any; + + /** + * Bind a listener to an event emitted by the geocoder control. Supported additional events are + */ + on(event: string, callback: Function): any; + + } + +} + +// ShareControl +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * Adds a "Share" button to the map, which can be used to share the map to Twitter or Facebook, or generate HTML for a map embed. + */ + function shareControl(id: string, options?: ShareControlOptions): ShareControl; + + interface ShareControlOptions extends L.ControlOptions { + url?: string; + } + + interface ShareControl extends L.Control { + + onAdd(map: L.mapbox.Map): any; + + } + +} + +////////////////////////////////////////////////////////////////////// +////////////////////////////// MARKERS /////////////////////////////// +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox.marker { + + /** + * A core icon generator used in L.mapbox.marker.style + */ + function icon(feature: any): L.Icon; + + /** + * An icon generator for use in conjunction with pointToLayer to generate markers from the Mapbox Markers API and support the simplestyle-spec for features. + */ + function style(feature: any, latlng: any): L.Marker; + +} + +////////////////////////////////////////////////////////////////////// +////////////////////////////// SIMPLESTYLE /////////////////////////// +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox.simplestyle { + + /** + * Given a GeoJSON Feature with optional simplestyle-spec properties, return an options object formatted to be used as Leaflet Path options. + */ + function style(feature: any): L.PathOptions; + +} + +////////////////////////////////////////////////////////////////////// +/////////////////////////////// UTILITY ////////////////////////////// +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + + /** + * A HTML sanitization function, with the same effect as the default value of the sanitizer option of L.mapbox.featureLayer, L.mapbox.gridControl, and L.mapbox.legendControl. + */ + function sanitize(text: string): string; + + /** + * A mustache template rendering function, as used by the templating feature provided by L.mapbox.gridControl. + */ + function template(template: string, data?: any): string; + +} + +////////////////////////////////////////////////////////////////////// +///////////////////////////// CONFIGURATION ////////////////////////// +////////////////////////////////////////////////////////////////////// + +declare module L.mapbox { + export class config { + + static FORCE_HTTPS: boolean; + + static HTTP_URLS: string[]; + + static HTTPS_URLS: string[]; + + } +} From 2cc777e20f349be831209bedcbbe2bcf8310d451 Mon Sep 17 00:00:00 2001 From: Maxime Fabre Date: Tue, 17 Jun 2014 14:36:50 +0200 Subject: [PATCH 68/84] Update Mapbox to latest Leaflet definition --- mapbox/mapbox.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapbox/mapbox.d.ts b/mapbox/mapbox.d.ts index 1cab6e1d9..cf2da20b5 100644 --- a/mapbox/mapbox.d.ts +++ b/mapbox/mapbox.d.ts @@ -139,7 +139,7 @@ declare module L.mapbox { sanitizer? : (template: string) => string; } - interface FeatureLayer extends L.FeatureGroup { + interface FeatureLayer extends L.FeatureGroup { /** * Load GeoJSON data for this layer from the URL given by url. From 9c74f4c5d9a138a86937b96cf5ff69fa57f73c8c Mon Sep 17 00:00:00 2001 From: Audrey Date: Tue, 17 Jun 2014 15:53:02 -0400 Subject: [PATCH 69/84] Update signature of data method on Selection. --- d3/d3.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 41fc04dff..b2f0bf1c9 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -751,8 +751,8 @@ declare module D3 { empty: () => boolean; data: { - (values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => string): UpdateSelection; - (values: any[], key?: (data: any, index?: number) => string): UpdateSelection; + (values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => any): UpdateSelection; + (values: any[], key?: (data: any, index?: number) => any): UpdateSelection; (): any[]; }; From 3daf3f52be32f86e987a5b3562573a27f20bd602 Mon Sep 17 00:00:00 2001 From: zaneli Date: Wed, 18 Jun 2014 15:48:53 +0900 Subject: [PATCH 70/84] Append 'slide' function's return-type annotation --- reveal/reveal-tests.ts.tscparams | 1 - reveal/reveal.d.ts | 2 +- reveal/reveal.d.ts.tscparams | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 reveal/reveal-tests.ts.tscparams delete mode 100644 reveal/reveal.d.ts.tscparams diff --git a/reveal/reveal-tests.ts.tscparams b/reveal/reveal-tests.ts.tscparams deleted file mode 100644 index e16c76dff..000000000 --- a/reveal/reveal-tests.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ -"" diff --git a/reveal/reveal.d.ts b/reveal/reveal.d.ts index bfe56bf0b..14393d650 100644 --- a/reveal/reveal.d.ts +++ b/reveal/reveal.d.ts @@ -10,7 +10,7 @@ interface RevealStatic { configure:(diff:RevealOptions)=>void; // Navigation - slide(h:number, v:number, f?:number, o?:number); + slide(h:number, v:number, f?:number, o?:number):void; left():void; right():void; up():void; diff --git a/reveal/reveal.d.ts.tscparams b/reveal/reveal.d.ts.tscparams deleted file mode 100644 index e16c76dff..000000000 --- a/reveal/reveal.d.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ -"" From 6da3e2f5751f8c9e0a192d139192e3a6ee2d810b Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:12:26 +0800 Subject: [PATCH 71/84] Refine the definition of $.fn.pjax method. --- jquery.pjax/jquery.pjax.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index e4f7bedc2..e9932f465 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -29,10 +29,10 @@ interface JQuery { * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container. * If such an attribute is not defined too, the context runs with this statement will be treated as container. * @param delegationSelector The selector to limit which links PJAX should listen on. - * @param options A valid jQuery ajax options object that may include these pjax specific options: - * - container: A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). - * - push: Whether to pushState the URL. Defaults to true (of course). - * - replace: Want to use replaceState instead? That's cool. + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. * @return Returns the jQuery object */ pjax(delegationSelector: string, options?: PjaxSettings): JQuery; @@ -43,11 +43,11 @@ interface JQuery { * If `options.container` is not defined, the `data-pjax` attribute of the link will be treated as container. * If such an attribute is not defined too, the context runs with this statement will be treated as container. * @param delegationSelector The selector to limit which links PJAX should listen on. - * @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). - * @param options A valid jQuery ajax options object that may include these pjax specific options: - * - container: A jQuery selector indicates where to stick the response body. The containerSelector has priority. - * - push: Whether to pushState the URL. Defaults to true (of course). - * - replace: Want to use replaceState instead? That's cool. + * @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(containerSelector).html(xhr.responseBody). + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. The `containerSelector` parameter has priority. + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. * @return Returns the jQuery object */ pjax(delegationSelector: string, containerSelector?: string, options?: PjaxSettings): JQuery; From 0e5cb0478f5ad936b8dc7f9addfb6a763148513b Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:12:59 +0800 Subject: [PATCH 72/84] Add definition and test for $.pjax.click function. --- jquery.pjax/jquery.pjax-tests.ts | 7 +++++++ jquery.pjax/jquery.pjax.d.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index c0a9de43b..e5076a5a9 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -7,3 +7,10 @@ function test_fn_pjax() { $(document).pjax("a", { push: true }); $(document).pjax("a", "#pjax-container", { push: true }); } + +function test_click() { + var event = $.Event("click"); + $.pjax.click(event, "#pjax-container"); + $.pjax.click(event, { container: "#pjax-container" }); + $.pjax.click(event, "#pjax-container", { push: true }); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index e9932f465..aaeecf7d5 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -52,3 +52,30 @@ interface JQuery { */ pjax(delegationSelector: string, containerSelector?: string, options?: PjaxSettings): JQuery; } + +interface JQueryStatic { + pjax: PjaxStatic; +} + +interface PjaxStatic { + /** + * PJAX on click handler. + * @param event A jQuery click event. + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. + */ + click(event: JQueryEventObject, options?: PjaxSettings): void; + + /** + * PJAX on click handler. + * @param event A jQuery click event. + * @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(containerSelector).html(xhr.responseBody). + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. The `containerSelector` parameter has priority. + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. + */ + click(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; +} From 37d2280a3d4441610ba1419111260d963ec905d1 Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:16:01 +0800 Subject: [PATCH 73/84] Add definition and test for $.pjax.submit function. It is nearly same with $.pjax.click function. --- jquery.pjax/jquery.pjax-tests.ts | 7 +++++++ jquery.pjax/jquery.pjax.d.ts | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index e5076a5a9..4d3c18591 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -14,3 +14,10 @@ function test_click() { $.pjax.click(event, { container: "#pjax-container" }); $.pjax.click(event, "#pjax-container", { push: true }); } + +function test_submit() { + var event = $.Event("submit"); + $.pjax.submit(event, "#pjax-container"); + $.pjax.submit(event, { container: "#pjax-container" }); + $.pjax.submit(event, "#pjax-container", { push: true }); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index aaeecf7d5..b773dd461 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -78,4 +78,25 @@ interface PjaxStatic { * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ click(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; + + /** + * PJAX on form submit handler + * @param event A jQuery click event. + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. + */ + submit(event: JQueryEventObject, options?: PjaxSettings): void; + + /** + * PJAX on form submit handler + * @param event A jQuery click event. + * @param containerSelector A jQuery selector indicates where to stick the response body. E.g., $(containerSelector).html(xhr.responseBody). + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. The `containerSelector` parameter has priority. + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. + */ + submit(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; } From 2b42566ccac817280e5742626b225851b889c5b3 Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:31:28 +0800 Subject: [PATCH 74/84] Add definition and test for $.pjax function. --- jquery.pjax/jquery.pjax-tests.ts | 8 ++++++++ jquery.pjax/jquery.pjax.d.ts | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 4d3c18591..f394e7030 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -8,6 +8,14 @@ function test_fn_pjax() { $(document).pjax("a", "#pjax-container", { push: true }); } +function test_pjax() { + $.pjax(); + $.pjax({ + url: "hello.html", + container: "#main" + }); +} + function test_click() { var event = $.Event("click"); $.pjax.click(event, "#pjax-container"); diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index b773dd461..88118224d 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -58,6 +58,16 @@ interface JQueryStatic { } interface PjaxStatic { + /** + * Loads a URL with ajax, puts the response body inside a container, then pushState()'s the loaded URL. + * Works just like $.ajax in that it accepts a jQuery ajax settings object (with keys like url, type, data, etc). + * @param options PJAX settings, which is a superset of jQuery AJAX settings. It includes the following specific options: + * - container: a jQuery selector indicates where to stick the response body. E.g., $(container).html(xhr.responseBody). + * - push: a boolean indicates whether to pushState the URL. Default is true. + * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. + */ + (options?: PjaxSettings): JQueryXHR; + /** * PJAX on click handler. * @param event A jQuery click event. From 1912ed033413465999718abb03ec06e9f7f8ced1 Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:37:18 +0800 Subject: [PATCH 75/84] Add definition for $.pjax.enable and $.pjax.disable. --- jquery.pjax/jquery.pjax-tests.ts | 8 ++++++++ jquery.pjax/jquery.pjax.d.ts | 13 ++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index f394e7030..d5a9e1bb1 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -29,3 +29,11 @@ function test_submit() { $.pjax.submit(event, { container: "#pjax-container" }); $.pjax.submit(event, "#pjax-container", { push: true }); } + +function test_enable() { + $.pjax.enable(); +} + +function test_disable() { + $.pjax.disable(); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 88118224d..f26d69443 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -88,7 +88,7 @@ interface PjaxStatic { * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ click(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; - + /** * PJAX on form submit handler * @param event A jQuery click event. @@ -109,4 +109,15 @@ interface PjaxStatic { * - replace: a boolean indicates whether to use replaceState instead of pushState. Default is false. */ submit(event: JQueryEventObject, containerSelector?: string, options?: PjaxSettings): void; + + /** + * Install pjax functions on $.pjax to enable pushState behavior. Does nothing if already enabled. + */ + enable(): void; + + /** + * Disable pushState behavior. + * This is the case when a browser doesn't support pushState. It is sometimes useful to disable pushState for debugging on a modern browser. + */ + disable(): void; } From 0af5dfd73ba3fc4071492be0ab0657aa4aaa5f5f Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:40:00 +0800 Subject: [PATCH 76/84] Add definition and test for $.pjax.reload method. --- jquery.pjax/jquery.pjax-tests.ts | 4 ++++ jquery.pjax/jquery.pjax.d.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index d5a9e1bb1..b821ee14d 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -37,3 +37,7 @@ function test_enable() { function test_disable() { $.pjax.disable(); } + +function test_reload() { + $.pjax.reload(); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index f26d69443..51e059a2b 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -120,4 +120,9 @@ interface PjaxStatic { * This is the case when a browser doesn't support pushState. It is sometimes useful to disable pushState for debugging on a modern browser. */ disable(): void; + + /** + * Reload current page with pjax. + */ + reload(): JQueryXHR; } From 0040e5a97e8add789c9e7271b2a9a11bc9f53ba0 Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:43:24 +0800 Subject: [PATCH 77/84] Add definition and test for $.pjax.defaults property. --- jquery.pjax/jquery.pjax-tests.ts | 13 +++++++++++++ jquery.pjax/jquery.pjax.d.ts | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index b821ee14d..796b4bf91 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -41,3 +41,16 @@ function test_disable() { function test_reload() { $.pjax.reload(); } + +function test_defauluts() { + $.pjax.defaults = { + timeout: 650, + push: true, + replace: false, + type: 'GET', + dataType: 'html', + scrollTo: 0, + maxCacheLength: 20, + version: $.noop + }; +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 51e059a2b..82ab34020 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -58,6 +58,11 @@ interface JQueryStatic { } interface PjaxStatic { + /** + * PJAX default settings. + */ + defaults: PjaxSettings; + /** * Loads a URL with ajax, puts the response body inside a container, then pushState()'s the loaded URL. * Works just like $.ajax in that it accepts a jQuery ajax settings object (with keys like url, type, data, etc). From 5e08d655f17aa3d8ad979782cdb9e110c6d0f523 Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:46:16 +0800 Subject: [PATCH 78/84] Add definition and test for $.support.pjax property. --- jquery.pjax/jquery.pjax-tests.ts | 4 ++++ jquery.pjax/jquery.pjax.d.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 796b4bf91..214bb3922 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -54,3 +54,7 @@ function test_defauluts() { version: $.noop }; } + +function test_support() { + console.log($.support.pjax); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 82ab34020..cb9ed59c2 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -131,3 +131,10 @@ interface PjaxStatic { */ reload(): JQueryXHR; } + +interface JQuerySupport { + /** + * A boolean value indicates if pjax is supported by the browser. + */ + pjax: boolean; +} From 1eff13e6075e53399e1c5c8a0daa556c6f1a2644 Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:56:57 +0800 Subject: [PATCH 79/84] Update definition file header. --- jquery.pjax/jquery.pjax.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index cb9ed59c2..621d87d21 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -1,5 +1,7 @@ // Type definitions for jquery-pjax // Project: https://github.com/defunkt/jquery-pjax +// Definitions by: Junle Li +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 26109abe1589c294a0a1ba4d0c5291f8e90cdcc2 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Mon, 16 Jun 2014 01:17:24 +0200 Subject: [PATCH 80/84] dropped test-module --- test-module/test-addon.ts | 5 ----- test-module/test-module.d.ts | 7 ------- 2 files changed, 12 deletions(-) delete mode 100644 test-module/test-addon.ts delete mode 100644 test-module/test-module.d.ts diff --git a/test-module/test-addon.ts b/test-module/test-addon.ts deleted file mode 100644 index 14c5ba0d6..000000000 --- a/test-module/test-addon.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// - -declare module 'test-addon' { - export function addon(): Such; -} diff --git a/test-module/test-module.d.ts b/test-module/test-module.d.ts deleted file mode 100644 index 294e7ea43..000000000 --- a/test-module/test-module.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface Such { - amaze(): void; - much(): void; -} -declare module 'test-module' { - export function wow(): Such; -} From 1d345f6c1471fab46b7eb54ebe90013f578c78ca Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Mon, 16 Jun 2014 01:18:07 +0200 Subject: [PATCH 81/84] cleaned-up headers --- Finch/Finch.d.ts | 4 +- amplifyjs/amplifyjs.d.ts | 4 +- angular-translate/angular-translate.d.ts | 2 +- angular-ui/angular-ui-router.d.ts | 2 +- angularjs/angular-animate.d.ts | 2 +- angularjs/angular-cookies.d.ts | 2 +- angularjs/angular-resource.d.ts | 2 +- ansicolors/ansicolors.d.ts | 7 ++- asciify/asciify.d.ts | 4 +- auth0.widget/auth0.widget.d.ts | 4 +- auth0/auth0.d.ts | 4 +- backbone/backbone.d.ts | 4 +- chai-datetime/chai-datetime.d.ts | 2 +- chai-jquery/chai-jquery.d.ts | 2 +- chai/chai.d.ts | 3 +- chrome/chrome-app.d.ts | 4 +- chrome/chrome.d.ts | 4 +- cordova/cordova.d.ts | 4 +- createjs-lib/createjs-lib.d.ts | 4 +- createjs/createjs.d.ts | 4 +- crossroads/crossroads.d.ts | 2 +- expect.js/expect.js.d.ts | 2 +- expectations/expectations.d.ts | 4 +- express-validator/express-validator.d.ts | 2 +- express/express.d.ts | 2 +- fabricjs/fabricjs.d.ts | 2 +- filesystem/filesystem.d.ts | 2 +- filewriter/filewriter.d.ts | 2 +- gldatepicker/gldatepicker.d.ts | 4 +- .../google.maps.infobubble.d.ts | 8 +-- highlightjs/highlightjs.d.ts | 3 +- humane/humane.d.ts | 2 +- i18next/i18next.d.ts | 4 +- iscroll/iscroll-lite.d.ts | 2 +- iscroll/iscroll.d.ts | 2 +- jasmine-fixture/jasmine-fixture.d.ts | 4 +- jasmine-jquery/jasmine-jquery.d.ts | 2 +- jasmine/jasmine.d.ts | 2 +- jasmine/legacy/jasmine-1.3.d.ts | 2 +- jqrangeslider/jqrangeslider.d.ts | 2 +- jquery.address/jquery.address.d.ts | 2 +- .../jquery.clientSideLogging.d.ts | 2 +- jquery.colorbox/jquery.colorbox.d.ts | 2 +- jquery.cycle/jquery.cycle.d.ts | 6 +-- jquery.cycle2/jquery.cycle2.d.ts | 5 +- jquery.dynatree/jquery.dynatree.d.ts | 4 +- jquery.pnotify/jquery.pnotify.d.ts | 4 +- jquery.tagsmanager/jquery.tagsmanager.d.ts | 2 +- jquery.timepicker/jquery.timepicker.d.ts | 2 +- .../jquery.ui.datetimepicker.d.ts | 5 +- jquery.validation/jquery.validation.d.ts | 2 +- jquery.watermark/jquery.watermark.d.ts | 4 +- js-fixtures/fixtures.d.ts | 4 +- js-signals/js-signals.d.ts | 2 +- js-url/js-url.d.ts | 2 +- jsplumb/jquery.jsPlumb.d.ts | 50 +++++++++---------- jsrender/jsrender.d.ts | 2 +- karma-jasmine/karma-jasmine.d.ts | 2 +- kineticjs/kineticjs.d.ts | 4 +- knockout.editables/ko.editables.d.ts | 2 +- knockout.mapper/knockout.mapper.d.ts | 4 +- knockout.mapping/knockout.mapping.d.ts | 2 +- kolite/kolite.d.ts | 4 +- linq/linq.3.0.3-Beta4.d.ts | 4 +- linq/linq.jquery.d.ts | 2 +- marionette/marionette.d.ts | 4 +- mathjax/mathjax.d.ts | 4 +- .../microsoft-live-connect.d.ts | 27 +++++----- mixpanel/mixpanel.d.ts | 5 +- mocha/mocha.d.ts | 4 +- modernizr/modernizr.d.ts | 2 +- moment/moment.d.ts | 6 +-- mousetrap/mousetrap.d.ts | 2 +- ng-grid/ng-grid.d.ts | 4 +- node/node-0.8.8.d.ts | 1 + node/node.d.ts | 1 + passport-facebook/passport-facebook.d.ts | 4 +- passport/passport.d.ts | 2 +- phantomjs/phantomjs.d.ts | 2 +- promises-a-plus/promises-a-plus.d.ts | 5 ++ pubsubjs/pubsub.d.ts | 2 +- q-io/Q-io.d.ts | 6 +-- qunit/qunit.d.ts | 4 +- raphael/raphael.d.ts | 4 +- riotjs/riotjs-render.d.ts | 2 +- rx.js/rx-lite.d.ts | 4 +- rx.js/rx.aggregates.d.ts | 3 +- rx.js/rx.all.ts | 5 +- rx.js/rx.async-lite.d.ts | 2 + rx.js/rx.async.d.ts | 3 +- rx.js/rx.backpressure-lite.d.ts | 4 +- rx.js/rx.binding-lite.d.ts | 2 + rx.js/rx.binding.d.ts | 3 +- rx.js/rx.coincidence-lite.d.ts | 2 + rx.js/rx.coincidence.d.ts | 3 +- rx.js/rx.d.ts | 3 +- rx.js/rx.jquery.d.ts | 2 +- rx.js/rx.lite.d.ts | 3 +- rx.js/rx.time-lite.d.ts | 2 + rx.js/rx.time.d.ts | 3 +- rx.js/rx.virtualtime.d.ts | 3 +- sammyjs/sammyjs.d.ts | 3 +- scroller/easyscroller.d.ts | 4 +- scroller/scroller.d.ts | 4 +- should/should.d.ts | 2 +- signalr/signalr.d.ts | 3 +- sinon-chai/sinon-chai.d.ts | 2 +- sinon/sinon.d.ts | 2 +- smoothie/smoothie.d.ts | 3 +- sockjs/sockjs.d.ts | 2 +- spin/spin.d.ts | 2 +- state-machine/state-machine.d.ts | 4 +- stream-to-array/stream-to-array.d.ts | 6 +++ svgjs.draggable/svgjs.draggable.d.ts | 6 +++ threejs/three.d.ts | 2 +- underscore/underscore.d.ts | 3 +- viewporter/viewporter.d.ts | 4 +- webaudioapi/waa-20120802.d.ts | 2 +- webaudioapi/waa-nightly.d.ts | 2 +- x2js/xml2json.d.ts | 4 ++ xml2js/xml2js.d.ts | 2 +- youtube/youtube.d.ts | 3 +- yui/yui-test.d.ts | 4 +- zeroclipboard/zeroclipboard.d.ts | 4 +- 124 files changed, 238 insertions(+), 220 deletions(-) diff --git a/Finch/Finch.d.ts b/Finch/Finch.d.ts index e23e97ef5..e3dd86c70 100644 --- a/Finch/Finch.d.ts +++ b/Finch/Finch.d.ts @@ -1,6 +1,6 @@ // Type definitions for Finch 0.5.13 -// Project: https://github.com/stoodder/finchjs -// Definitions by: https://github.com/DavidSichau +// Project: https://github.com/stoodder/finchjs +// Definitions by: David Sichau // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/amplifyjs/amplifyjs.d.ts b/amplifyjs/amplifyjs.d.ts index a918b7c73..364845f3c 100644 --- a/amplifyjs/amplifyjs.d.ts +++ b/amplifyjs/amplifyjs.d.ts @@ -1,10 +1,10 @@ -/// - // Type definitions for AmplifyJs 1.1.0 // Project: http://amplifyjs.com/ // Definitions by: Jonas Eriksson // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + interface amplifyRequestSettings { resourceId: string; data?: any; diff --git a/angular-translate/angular-translate.d.ts b/angular-translate/angular-translate.d.ts index 6b6071102..47dfa63a5 100644 --- a/angular-translate/angular-translate.d.ts +++ b/angular-translate/angular-translate.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular Translate (pascalprecht.translate module) // Project: https://github.com/PascalPrecht/angular-translate -// Definitions by: Michel Salib +// Definitions by: Michel Salib // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/angular-ui/angular-ui-router.d.ts b/angular-ui/angular-ui-router.d.ts index 3b233c86a..6327719b5 100644 --- a/angular-ui/angular-ui-router.d.ts +++ b/angular-ui/angular-ui-router.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular JS 1.1.5+ (ui.router module) // Project: https://github.com/angular-ui/ui-router -// Definitions by: Michel Salib +// Definitions by: Michel Salib // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/angularjs/angular-animate.d.ts b/angularjs/angular-animate.d.ts index 696e6f834..9503e36d7 100644 --- a/angularjs/angular-animate.d.ts +++ b/angularjs/angular-animate.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular JS 1.2+ (ngAnimate module) // Project: http://angularjs.org -// Definitions by: Michel Salib +// Definitions by: Michel Salib // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/angularjs/angular-cookies.d.ts b/angularjs/angular-cookies.d.ts index 60eebbacb..622221675 100644 --- a/angularjs/angular-cookies.d.ts +++ b/angularjs/angular-cookies.d.ts @@ -1,4 +1,4 @@ -/// Type definitions for Angular JS 1.2 (ngCookies module) +// Type definitions for Angular JS 1.2 (ngCookies module) // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 51b93091f..597a58e40 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular JS 1.2 (ngResource module) // Project: http://angularjs.org -// Definitions by: Diego Vilar , Michael Jess (minor enhancements) +// Definitions by: Diego Vilar , Michael Jess // Definitions: https://github.com/daptiv/DefinitelyTyped /// diff --git a/ansicolors/ansicolors.d.ts b/ansicolors/ansicolors.d.ts index 0ffc99910..2f61b0435 100644 --- a/ansicolors/ansicolors.d.ts +++ b/ansicolors/ansicolors.d.ts @@ -1,4 +1,9 @@ +// Type definitions for ansicolors +// Project: https://github.com/thlorenz/ansicolors +// Definitions by: rogierschouten +// Definitions: https://github.com/borisyankov/DefinitelyTyped + declare module "ansicolors" { var colors: {[index: string]: (s: string) => string;}; - export = colors; + export = colors; } diff --git a/asciify/asciify.d.ts b/asciify/asciify.d.ts index 4dc47cd3a..33f82019b 100644 --- a/asciify/asciify.d.ts +++ b/asciify/asciify.d.ts @@ -1,6 +1,6 @@ // Type definitions for asciify 1.3.5 // Project: https://www.npmjs.org/package/asciify -// Definitions by: Alan Norbauer http://alan.norbauer.com +// Definitions by: Alan Norbauer // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -26,4 +26,4 @@ declare module "asciify" { } export = asciify -} \ No newline at end of file +} diff --git a/auth0.widget/auth0.widget.d.ts b/auth0.widget/auth0.widget.d.ts index 932d79c94..d45c3a212 100644 --- a/auth0.widget/auth0.widget.d.ts +++ b/auth0.widget/auth0.widget.d.ts @@ -1,5 +1,5 @@ // Type definitions for Auth0Widget.js -// Project: Auth0.com +// Project: http://auth0.com // Definitions by: Robert McLaws // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -45,4 +45,4 @@ declare var Auth0Widget: Auth0WidgetStatic; declare module "Auth0Widget" { export = Auth0Widget -} \ No newline at end of file +} diff --git a/auth0/auth0.d.ts b/auth0/auth0.d.ts index 02b8e0196..5d3149ead 100644 --- a/auth0/auth0.d.ts +++ b/auth0/auth0.d.ts @@ -1,5 +1,5 @@ // Type definitions for Auth0.js -// Project: Auth0.com +// Project: http://auth0.com // Definitions by: Robert McLaws // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -130,4 +130,4 @@ declare var Auth0: Auth0Static; declare module "Auth0" { export = Auth0 -} \ No newline at end of file +} diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 6fa7e6d60..b58c4652f 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -1,10 +1,8 @@ // Type definitions for Backbone 1.0.0 // Project: http://backbonejs.org/ -// Definitions by: Boris Yankov -// Definitions by: Natan Vivo +// Definitions by: Boris Yankov , Natan Vivo // Definitions: https://github.com/borisyankov/DefinitelyTyped - /// /// diff --git a/chai-datetime/chai-datetime.d.ts b/chai-datetime/chai-datetime.d.ts index 263034361..bce063443 100644 --- a/chai-datetime/chai-datetime.d.ts +++ b/chai-datetime/chai-datetime.d.ts @@ -1,7 +1,7 @@ // Type definitions for chai-datetime // Project: https://github.com/gaslight/chai-datetime.git // Definitions by: Cliff Burger -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/chai-jquery/chai-jquery.d.ts b/chai-jquery/chai-jquery.d.ts index 52fd4f3f5..826e66579 100644 --- a/chai-jquery/chai-jquery.d.ts +++ b/chai-jquery/chai-jquery.d.ts @@ -1,7 +1,7 @@ // Type definitions for chai-jquery 1.1.1 // Project: https://github.com/chaijs/chai-jquery // Definitions by: Kazi Manzur Rashid -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/chai/chai.d.ts b/chai/chai.d.ts index d840aba96..54d5770c9 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -1,8 +1,7 @@ // Type definitions for chai 1.7.2 // Project: http://chaijs.com/ // Definitions by: Jed Hunsaker -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped - +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module chai { diff --git a/chrome/chrome-app.d.ts b/chrome/chrome-app.d.ts index c8dd2e6d4..ad319394f 100644 --- a/chrome/chrome-app.d.ts +++ b/chrome/chrome-app.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Chrome packaged application development. +// Type definitions for Chrome packaged application development // Project: http://developer.chrome.com/apps/ // Definitions by: Adam Lay // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -92,4 +92,4 @@ declare module chrome.app.window { var onMaximized: WindowEvent; var onMinimized: WindowEvent; var onRestored: WindowEvent; -} \ No newline at end of file +} diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index d7aee083e..796635c27 100755 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Chrome extension development. +// Type definitions for Chrome extension development // Project: http://developer.chrome.com/extensions/ -// Definitions by: Matthew Kimber and otiai10 +// Definitions by: Matthew Kimber , otiai10 // Definitions: https://github.com/borisyankov/DefinitelyTyped //////////////////// diff --git a/cordova/cordova.d.ts b/cordova/cordova.d.ts index 95be38882..01e18299d 100644 --- a/cordova/cordova.d.ts +++ b/cordova/cordova.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Apache Cordova. +// Type definitions for Apache Cordova // Project: http://cordova.apache.org // Definitions by: Microsoft Open Technologies, Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -57,4 +57,4 @@ interface UrlUtil { } /** Apache Cordova instance */ -declare var cordova: Cordova; \ No newline at end of file +declare var cordova: Cordova; diff --git a/createjs-lib/createjs-lib.d.ts b/createjs-lib/createjs-lib.d.ts index 048fde92d..a61679aa7 100644 --- a/createjs-lib/createjs-lib.d.ts +++ b/createjs-lib/createjs-lib.d.ts @@ -1,5 +1,5 @@ -// Type definitions for EaselJS 0.7.1, TweenJS 0.5.1, SoundJS 0.5.2, PreloadJS 0.4.1 -// Project: http://www.createjs.com/#!/EaselJS +// Type definitions for CreateJS +// Project: http://www.createjs.com/ // Definitions by: Pedro Ferreira , Chris Smith , Satoru Kimura // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/createjs/createjs.d.ts b/createjs/createjs.d.ts index 7be29abbe..f064d07f6 100644 --- a/createjs/createjs.d.ts +++ b/createjs/createjs.d.ts @@ -1,5 +1,5 @@ -// Type definitions for EaselJS 0.7.1, TweenJS 0.5.1, SoundJS 0.5.2, PreloadJS 0.4.1 -// Project: http://www.createjs.com/#!/EaselJS +// Type definitions for CreateJS +// Project: http://www.createjs.com/ // Definitions by: Pedro Ferreira , Chris Smith , Satoru Kimura // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/crossroads/crossroads.d.ts b/crossroads/crossroads.d.ts index 76fad217a..e86e3154d 100644 --- a/crossroads/crossroads.d.ts +++ b/crossroads/crossroads.d.ts @@ -1,7 +1,7 @@ // Type definitions for Crossroads.js // Project: http://millermedeiros.github.io/crossroads.js/ // Definitions by: Diullei Gomes -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/expect.js/expect.js.d.ts b/expect.js/expect.js.d.ts index 21bffb44a..8e5cfe142 100644 --- a/expect.js/expect.js.d.ts +++ b/expect.js/expect.js.d.ts @@ -1,7 +1,7 @@ // Type definitions for expect.js 0.2.0 // Project: https://github.com/LearnBoost/expect.js // Definitions by: Teppei Sato -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare function expect(target?: any): Expect.Root; diff --git a/expectations/expectations.d.ts b/expectations/expectations.d.ts index 4b02e1c0c..8e2750583 100644 --- a/expectations/expectations.d.ts +++ b/expectations/expectations.d.ts @@ -1,7 +1,7 @@ // Type definitions for expectations.js 0.2.5 // Project: https://github.com/spmason/expectations // Definitions by: vvakame -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare var expect:Expectations.IExpectations; @@ -57,4 +57,4 @@ declare module Expectations { fail(why?:string, what?:any):any; } -} \ No newline at end of file +} diff --git a/express-validator/express-validator.d.ts b/express-validator/express-validator.d.ts index 5a1ba31b7..b18b17e96 100644 --- a/express-validator/express-validator.d.ts +++ b/express-validator/express-validator.d.ts @@ -1,7 +1,7 @@ // Type definitions for express-validator // Project: https://github.com/ctavan/express-validator // Definitions by: Nathan Ridley -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module ExpressValidator { export interface ValidationError { diff --git a/express/express.d.ts b/express/express.d.ts index eafc4c596..40be7e4ec 100644 --- a/express/express.d.ts +++ b/express/express.d.ts @@ -1,7 +1,7 @@ // Type definitions for Express 3.1 // Project: http://expressjs.com // Definitions by: Boris Yankov -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /* =================== USAGE =================== diff --git a/fabricjs/fabricjs.d.ts b/fabricjs/fabricjs.d.ts index 813782047..eec70c8f6 100644 --- a/fabricjs/fabricjs.d.ts +++ b/fabricjs/fabricjs.d.ts @@ -1,7 +1,7 @@ // Type definitions for FabricJS // Project: http://fabricjs.com/ // Definitions by: Oliver Klemencic -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module fabric { diff --git a/filesystem/filesystem.d.ts b/filesystem/filesystem.d.ts index 11fb48dd0..8b20b113c 100644 --- a/filesystem/filesystem.d.ts +++ b/filesystem/filesystem.d.ts @@ -1,4 +1,4 @@ -// Type Definitions for File System API +// Type definitions for File System API // Project: http://www.w3.org/TR/file-system-api/ // Definitions by: Kon // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/filewriter/filewriter.d.ts b/filewriter/filewriter.d.ts index f0d958afa..a4910d0b1 100644 --- a/filewriter/filewriter.d.ts +++ b/filewriter/filewriter.d.ts @@ -1,4 +1,4 @@ -// Type Definitions for File API: Writer +// Type definitions for File API: Writer // Project: http://www.w3.org/TR/file-writer-api/ // Definitions by: Kon // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/gldatepicker/gldatepicker.d.ts b/gldatepicker/gldatepicker.d.ts index 3ed84c219..0e517057e 100644 --- a/gldatepicker/gldatepicker.d.ts +++ b/gldatepicker/gldatepicker.d.ts @@ -1,6 +1,6 @@ // Type definitions for glDatePicker 2.0 // Project: http://glad.github.com/glDatePicker/ -// Definitions by: Dániel Tar https://github.com/qcz +// Definitions by: Dániel Tar // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -66,4 +66,4 @@ interface GlDatePicker { interface JQuery { glDatePicker(ret: boolean): GlDatePicker; glDatePicker(options?: GlDatePickerOptions): JQuery; -} \ No newline at end of file +} diff --git a/googlemaps.infobubble/google.maps.infobubble.d.ts b/googlemaps.infobubble/google.maps.infobubble.d.ts index 2d88d8645..e8d4d438c 100644 --- a/googlemaps.infobubble/google.maps.infobubble.d.ts +++ b/googlemaps.infobubble/google.maps.infobubble.d.ts @@ -1,10 +1,10 @@ -/// - // Type definitions for CSS3 InfoBubble with tabs for Google Maps API V3 // Project: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src/ -// Definitions by: Johan Nilsson https://github.com/Dashue +// Definitions by: Johan Nilsson // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + /** * @name CSS3 InfoBubble with tabs for Google Maps API V3 * @version 0.8 @@ -105,4 +105,4 @@ declare module google.maps.infobubble { */ shadowStyle?: number; } -} \ No newline at end of file +} diff --git a/highlightjs/highlightjs.d.ts b/highlightjs/highlightjs.d.ts index 9e3567cdb..d730029b5 100644 --- a/highlightjs/highlightjs.d.ts +++ b/highlightjs/highlightjs.d.ts @@ -1,7 +1,8 @@ // Type definitions for highlight.js // Project: https://github.com/isagalaev/highlight.js -// Definitions by: Niklas Mollenhauer +// Definitions by: Niklas Mollenhauer // Definitions: https://github.com/borisyankov/DefinitelyTyped + declare module "highlight.js" { module hljs diff --git a/humane/humane.d.ts b/humane/humane.d.ts index 06f865636..3be0a1d48 100644 --- a/humane/humane.d.ts +++ b/humane/humane.d.ts @@ -1,7 +1,7 @@ // Type definitions for Humane 3.0 // Project: http://wavded.github.com/humane-js/ // Definitions by: jmvrbanac -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface HumaneOptions { diff --git a/i18next/i18next.d.ts b/i18next/i18next.d.ts index 6fabcce44..e9083c4d5 100644 --- a/i18next/i18next.d.ts +++ b/i18next/i18next.d.ts @@ -1,6 +1,6 @@ -// Type definitions for i18next (v1.5.10 incl. jQuery) +// Type definitions for i18next v1.5.10 // Project: http://i18next.com -// Definitions by: Maarten Docter - Blog: http://www.maartendocter.nl +// Definitions by: Maarten Docter // Definitions: https://github.com/borisyankov/DefinitelyTyped // Sources: https://github.com/jamuhl/i18next/ diff --git a/iscroll/iscroll-lite.d.ts b/iscroll/iscroll-lite.d.ts index 1cd83b1dd..85d1a6934 100644 --- a/iscroll/iscroll-lite.d.ts +++ b/iscroll/iscroll-lite.d.ts @@ -1,6 +1,6 @@ // Type definitions for iScroll Lite 4.1 // Project: http://cubiq.org/iscroll-4 -// Definitions by: Boris Yankov and Christiaan Rakowski +// Definitions by: Boris Yankov , Christiaan Rakowski // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/iscroll/iscroll.d.ts b/iscroll/iscroll.d.ts index 34234c00a..ff615a5f8 100644 --- a/iscroll/iscroll.d.ts +++ b/iscroll/iscroll.d.ts @@ -1,6 +1,6 @@ // Type definitions for iScroll 4.2 // Project: http://cubiq.org/iscroll-4 -// Definitions by: Boris Yankov and Christiaan Rakowski +// Definitions by: Boris Yankov , Christiaan Rakowski // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/jasmine-fixture/jasmine-fixture.d.ts b/jasmine-fixture/jasmine-fixture.d.ts index 4c11fe94f..10da424f7 100644 --- a/jasmine-fixture/jasmine-fixture.d.ts +++ b/jasmine-fixture/jasmine-fixture.d.ts @@ -1,7 +1,7 @@ // Type definitions for Jasmine-fixture 1.0.7 // Project: https://github.com/searls/jasmine-fixture // Definitions by: Craig Brett -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /** Affixes the given jquery selectors into the body and will be removed after each spec * @param {string} selector The JQuery selector to be added to the dom @@ -13,4 +13,4 @@ interface JQuery { * @param {string} selector The JQuery selector to be added to the dom */ affix(selector: string): JQuery; -} \ No newline at end of file +} diff --git a/jasmine-jquery/jasmine-jquery.d.ts b/jasmine-jquery/jasmine-jquery.d.ts index 1d3c30cda..e1ed6c3c0 100644 --- a/jasmine-jquery/jasmine-jquery.d.ts +++ b/jasmine-jquery/jasmine-jquery.d.ts @@ -1,7 +1,7 @@ // Type definitions for Jasmine-JQuery 1.5.8 // Project: https://github.com/velesin/jasmine-jquery // Definitions by: Gregor Stamac -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// /// diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index d8132b4bc..63d7bde37 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -1,7 +1,7 @@ // Type definitions for Jasmine 2.0 // Project: http://pivotal.github.com/jasmine/ // Definitions by: Boris Yankov , Theodore Brown -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare function describe(description: string, specDefinitions: () => void): void; diff --git a/jasmine/legacy/jasmine-1.3.d.ts b/jasmine/legacy/jasmine-1.3.d.ts index b380959d0..c50621085 100644 --- a/jasmine/legacy/jasmine-1.3.d.ts +++ b/jasmine/legacy/jasmine-1.3.d.ts @@ -1,7 +1,7 @@ // Type definitions for Jasmine 1.3 // Project: http://pivotal.github.com/jasmine/ // Definitions by: Boris Yankov -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare function describe(description: string, specDefinitions: () => void): void; diff --git a/jqrangeslider/jqrangeslider.d.ts b/jqrangeslider/jqrangeslider.d.ts index ef688e5d9..b41df43c0 100644 --- a/jqrangeslider/jqrangeslider.d.ts +++ b/jqrangeslider/jqrangeslider.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQRangeSlider 4.2.8 // Project: http://ghusse.github.com/jQRangeSlider -// Definitions by: Dániel Tar https://github.com/qcz +// Definitions by: Dániel Tar // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/jquery.address/jquery.address.d.ts b/jquery.address/jquery.address.d.ts index bbf91d84a..59f534eff 100644 --- a/jquery.address/jquery.address.d.ts +++ b/jquery.address/jquery.address.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery.Address 1.5 // Project: https://github.com/asual/jquery-address -// Definitions by: Martin Duparc <@martinduparc> +// Definitions by: Martin Duparc // Definitions: https://github.com/borisyankov/DefinitelyTyped/ /// diff --git a/jquery.clientSideLogging/jquery.clientSideLogging.d.ts b/jquery.clientSideLogging/jquery.clientSideLogging.d.ts index b52f41be1..4f1318a1f 100644 --- a/jquery.clientSideLogging/jquery.clientSideLogging.d.ts +++ b/jquery.clientSideLogging/jquery.clientSideLogging.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jquery.clientSideLogging. +// Type definitions for jquery.clientSideLogging // Project: https://github.com/remybach/jQuery.clientSideLogging // Definitions by: Diullei Gomes // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/jquery.colorbox/jquery.colorbox.d.ts b/jquery.colorbox/jquery.colorbox.d.ts index d28422346..e13b0bbd5 100644 --- a/jquery.colorbox/jquery.colorbox.d.ts +++ b/jquery.colorbox/jquery.colorbox.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery.Colorbox 1.4.15 // Project: http://www.jacklmoore.com/colorbox/ -// Definitions by: Gidon Junge <@gjunge> +// Definitions by: Gidon Junge // Definitions: https://github.com/borisyankov/DefinitelyTyped/ /// diff --git a/jquery.cycle/jquery.cycle.d.ts b/jquery.cycle/jquery.cycle.d.ts index dfe8e1c5c..b482eda80 100644 --- a/jquery.cycle/jquery.cycle.d.ts +++ b/jquery.cycle/jquery.cycle.d.ts @@ -1,6 +1,6 @@ -// Type definitions for jQuery.cycle.js 2.9999.81 (15-JAN-2013) +// Type definitions for jQuery.cycle.js // Project: http://jquery.malsup.com/cycle/ -// Definitions by: Franois Guillot +// Definitions by: François Guillot // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -90,4 +90,4 @@ interface Cycle { interface JQuery { cycle: Cycle; -} \ No newline at end of file +} diff --git a/jquery.cycle2/jquery.cycle2.d.ts b/jquery.cycle2/jquery.cycle2.d.ts index 699d2aff8..d27fbf1c8 100644 --- a/jquery.cycle2/jquery.cycle2.d.ts +++ b/jquery.cycle2/jquery.cycle2.d.ts @@ -1,5 +1,6 @@ // Type definitions for jQuery Cycle2 version 2.1.2 (build 20140216) -// Project: http://jquery.malsup.com/cycle2/ (also https://github.com/malsup/cycle2) +// Project: http://jquery.malsup.com/cycle2/ +// https://github.com/malsup/cycle2 // Definitions by: Donny Nadolny // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -140,4 +141,4 @@ declare module JQueryCycle2 { interface Transition { before(opts: Options, curr: Element, next: Element, fwd: boolean): void; } -} \ No newline at end of file +} diff --git a/jquery.dynatree/jquery.dynatree.d.ts b/jquery.dynatree/jquery.dynatree.d.ts index adf8b5399..c2dc0f928 100644 --- a/jquery.dynatree/jquery.dynatree.d.ts +++ b/jquery.dynatree/jquery.dynatree.d.ts @@ -1,6 +1,6 @@ // Type definitions for jquery.dynatree 1.2.5 // Project: http://code.google.com/p/dynatree/ -// Definitions by: https://github.com/fdecampredon +// Definitions by: François de Campredon // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -241,4 +241,4 @@ interface DynatreeNamespace { getNode(element: HTMLElement): DynaTreeNode; getPersistData(cookieId: string, cookieOpts: DynaTreeCookieOptions): any; version: number; -} \ No newline at end of file +} diff --git a/jquery.pnotify/jquery.pnotify.d.ts b/jquery.pnotify/jquery.pnotify.d.ts index d467a9999..73d0411d5 100644 --- a/jquery.pnotify/jquery.pnotify.d.ts +++ b/jquery.pnotify/jquery.pnotify.d.ts @@ -1,6 +1,6 @@ // Type definitions for jquery.pnotify 1.3.1 -// Project: https://github.com/sciactive/pnotify -// Definitions by: https://github.com/DavidSichau +// Project: https://github.com/sciactive/pnotify +// Definitions by: David Sichau // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/jquery.tagsmanager/jquery.tagsmanager.d.ts b/jquery.tagsmanager/jquery.tagsmanager.d.ts index ce03f2dab..4523751c4 100644 --- a/jquery.tagsmanager/jquery.tagsmanager.d.ts +++ b/jquery.tagsmanager/jquery.tagsmanager.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery Tags Manager // Project: http://welldonethings.com/tags/manager -// Definitions by: https://github.com/vbortone +// Definitions by: Vincent Bortone // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/jquery.timepicker/jquery.timepicker.d.ts b/jquery.timepicker/jquery.timepicker.d.ts index a63e073bb..13a6d2e69 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts +++ b/jquery.timepicker/jquery.timepicker.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery UI Timepicker 0.3 // Project: http://fgelinas.com/code/timepicker/ -// Definitions by: https://github.com/anwarjaved +// Definitions by: Anwar Javed // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts b/jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts index 9d452332b..4e592e728 100644 --- a/jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts +++ b/jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts @@ -1,7 +1,6 @@ -// Type definitions for jQuery UI DateTimePicker 0.3 Addon -// +// Type definitions for jQuery UI DateTimePicker 0.3 // Project: http://trentrichardson.com/examples/timepicker/ -// Definitions by: https://github.com/dougajmcdonald +// Definitions by: dougajmcdonald // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/jquery.validation/jquery.validation.d.ts b/jquery.validation/jquery.validation.d.ts index 585fb484f..f66edadab 100644 --- a/jquery.validation/jquery.validation.d.ts +++ b/jquery.validation/jquery.validation.d.ts @@ -1,6 +1,6 @@ // Type definitions for jquery.validation 1.11.1 // Project: http://jqueryvalidation.org/ -// Definitions by: https://github.com/fdecampredon , https://github.com/johnnyreilly +// Definitions by: François de Campredon , Johj Reilly // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/jquery.watermark/jquery.watermark.d.ts b/jquery.watermark/jquery.watermark.d.ts index fd233ee67..cb746bee6 100644 --- a/jquery.watermark/jquery.watermark.d.ts +++ b/jquery.watermark/jquery.watermark.d.ts @@ -1,6 +1,6 @@ // Type definitions for Watermark plugin for jQuery 3.1 // Project: http://jquery-watermark.googlecode.com -// Definitions by: https://github.com/anwarjaved +// Definitions by: Anwar Javed // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -27,4 +27,4 @@ interface JQuery { interface JQueryStatic { watermark: Watermark; -} \ No newline at end of file +} diff --git a/js-fixtures/fixtures.d.ts b/js-fixtures/fixtures.d.ts index 92bd548e0..4adb6f378 100644 --- a/js-fixtures/fixtures.d.ts +++ b/js-fixtures/fixtures.d.ts @@ -1,7 +1,7 @@ // Type definitions for js-fixtures 1.2.0 // Project: https://github.com/badunk/js-fixtures // Definitions by: Kazi Manzur Rashid -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface Fixtures { path: string; @@ -18,4 +18,4 @@ interface Fixtures { cleanUp(): void; } -declare var fixtures: Fixtures; \ No newline at end of file +declare var fixtures: Fixtures; diff --git a/js-signals/js-signals.d.ts b/js-signals/js-signals.d.ts index 4d7d33344..c64c6db2a 100644 --- a/js-signals/js-signals.d.ts +++ b/js-signals/js-signals.d.ts @@ -1,7 +1,7 @@ // Type definitions for JS-Signals // Project: http://millermedeiros.github.io/js-signals/ // Definitions by: Diullei Gomes -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface SignalBinding { active: boolean; diff --git a/js-url/js-url.d.ts b/js-url/js-url.d.ts index ff974f15e..e5df9c246 100644 --- a/js-url/js-url.d.ts +++ b/js-url/js-url.d.ts @@ -1,4 +1,4 @@ -// Type definitions for url() v1.8.6 +// Type definitions for url v1.8.6 // Project: https://github.com/websanova/js-url // Definitions by: MIZUNE Pine // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/jsplumb/jquery.jsPlumb.d.ts b/jsplumb/jquery.jsPlumb.d.ts index ffa26eea8..39d5bf869 100644 --- a/jsplumb/jquery.jsPlumb.d.ts +++ b/jsplumb/jquery.jsPlumb.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsPlumb 1.3.16 jQuery adapter. +// Type definitions for jsPlumb 1.3.16 jQuery adapter // Project: http://jsplumb.org // Definitions by: Steve Shearn // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -19,26 +19,26 @@ interface jsPlumbInstance { addEndpoint(ep: string): any; removeClass(el: any, clazz: string): void; hasClass(el: any, clazz: string): void; - draggable(el: string, options?: DragOptions): jsPlumbInstance; - draggable(ids: string[], options?: DragOptions): jsPlumbInstance; + draggable(el: string, options?: DragOptions): jsPlumbInstance; + draggable(ids: string[], options?: DragOptions): jsPlumbInstance; connect(connection: ConnectParams, referenceParams?: ConnectParams): Connection; makeSource(el: string, options: SourceOptions): void; makeTarget(el: string, options: TargetOptions): void; repaintEverything(): void; detachEveryConnection(): void; detachAllConnections(el: string): void; - removeAllEndpoints(el: string, recurse?: boolean): jsPlumbInstance; - removeAllEndpoints(el: Element, recurse?: boolean): jsPlumbInstance; + removeAllEndpoints(el: string, recurse?: boolean): jsPlumbInstance; + removeAllEndpoints(el: Element, recurse?: boolean): jsPlumbInstance; select(params: SelectParams): Connections; getConnections(options?: any, flat?: any): any[]; - deleteEndpoint(uuid: string, doNotRepaintAfterwards?: boolean): jsPlumbInstance; - deleteEndpoint(endpoint: Endpoint, doNotRepaintAfterwards?: boolean): jsPlumbInstance; - repaint(el: string): jsPlumbInstance; - repaint(el: Element): jsPlumbInstance; - - SVG: string; - CANVAS: string; - VML: string; + deleteEndpoint(uuid: string, doNotRepaintAfterwards?: boolean): jsPlumbInstance; + deleteEndpoint(endpoint: Endpoint, doNotRepaintAfterwards?: boolean): jsPlumbInstance; + repaint(el: string): jsPlumbInstance; + repaint(el: Element): jsPlumbInstance; + + SVG: string; + CANVAS: string; + VML: string; } interface Defaults { @@ -48,8 +48,8 @@ interface Defaults { ConnectionsDetachable?: boolean; ReattachConnections?: boolean; ConnectionOverlays?: any[][]; - Container?: any; // string(selector or id) or element - DragOptions?: DragOptions; + Container?: any; // string(selector or id) or element + DragOptions?: DragOptions; } interface PaintStyle { @@ -76,8 +76,8 @@ interface Connections { } interface ConnectParams { - source?: any; // string, element or endpoint - target?: any; // string, element or endpoint + source?: any; // string, element or endpoint + target?: any; // string, element or endpoint detachable?: boolean; deleteEndpointsOnDetach?: boolean; endPoint?: string; @@ -118,11 +118,11 @@ interface SelectParams { target: string; } -interface Connection { - setDetachable(detachable: boolean): void; - setParameter(name: string, value: T): void; - endpoints: Endpoint[]; -} - -interface Endpoint { -} \ No newline at end of file +interface Connection { + setDetachable(detachable: boolean): void; + setParameter(name: string, value: T): void; + endpoints: Endpoint[]; +} + +interface Endpoint { +} diff --git a/jsrender/jsrender.d.ts b/jsrender/jsrender.d.ts index 8cdfa13a1..755b17f93 100644 --- a/jsrender/jsrender.d.ts +++ b/jsrender/jsrender.d.ts @@ -1,6 +1,6 @@ // Type definitions for JsRender // Project: http://www.jsviews.com/#jsrender -// Definitions by: https://github.com/zakki +// Definitions by: Kensuke Matsuzaki // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/karma-jasmine/karma-jasmine.d.ts b/karma-jasmine/karma-jasmine.d.ts index 92b5e962d..e4cdc5a81 100644 --- a/karma-jasmine/karma-jasmine.d.ts +++ b/karma-jasmine/karma-jasmine.d.ts @@ -1,6 +1,6 @@ // Type definitions for karma-jasmine plugin // Project: https://github.com/karma-runner/karma-jasmine -// Definitions by: Michel Salib +// Definitions by: Michel Salib // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/kineticjs/kineticjs.d.ts b/kineticjs/kineticjs.d.ts index bbe2d68e8..ecfbbae1f 100644 --- a/kineticjs/kineticjs.d.ts +++ b/kineticjs/kineticjs.d.ts @@ -1,7 +1,7 @@ // Type definitions for KineticJS // Project: http://kineticjs.com/ // Definitions by: Basarat Ali Syed , Ralph de Ruijter -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module Kinetic { @@ -544,4 +544,4 @@ declare module Kinetic { width: number; height: number; } -} \ No newline at end of file +} diff --git a/knockout.editables/ko.editables.d.ts b/knockout.editables/ko.editables.d.ts index b6da1f13f..8167b3eaf 100644 --- a/knockout.editables/ko.editables.d.ts +++ b/knockout.editables/ko.editables.d.ts @@ -1,5 +1,5 @@ // Type definitions for knockout-editables 0.9 -// Project:http://romanych.github.com/ko.editables/ +// Project: http://romanych.github.com/ko.editables/ // Definitions by: Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/knockout.mapper/knockout.mapper.d.ts b/knockout.mapper/knockout.mapper.d.ts index 8052e4cc7..30476f746 100644 --- a/knockout.mapper/knockout.mapper.d.ts +++ b/knockout.mapper/knockout.mapper.d.ts @@ -1,7 +1,7 @@ // Type definitions for Knockout.Mapper // Project: https://github.com/LucasLorentz/knockout.mapper // Definitions by: Brandon Meyer -// Definitions https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -12,4 +12,4 @@ interface KnockoutMapper { interface KnockoutStatic { mapper: KnockoutMapper; -} \ No newline at end of file +} diff --git a/knockout.mapping/knockout.mapping.d.ts b/knockout.mapping/knockout.mapping.d.ts index e8ffc807e..2c8af4785 100644 --- a/knockout.mapping/knockout.mapping.d.ts +++ b/knockout.mapping/knockout.mapping.d.ts @@ -1,7 +1,7 @@ // Type definitions for Knockout.Mapping 2.0 // Project: https://github.com/SteveSanderson/knockout.mapping // Definitions by: Boris Yankov -// Definitions https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/kolite/kolite.d.ts b/kolite/kolite.d.ts index 4aa55fd81..6310fcad4 100644 --- a/kolite/kolite.d.ts +++ b/kolite/kolite.d.ts @@ -1,7 +1,7 @@ // Type definitions for KoLite 1.1 // Project: https://github.com/CodeSeven/kolite // Definitions by: Boris Yankov -// Definitions https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -78,4 +78,4 @@ interface KnockoutUtils { interface KnockoutBindingHandlers { command: KnockoutBindingHandler; -} \ No newline at end of file +} diff --git a/linq/linq.3.0.3-Beta4.d.ts b/linq/linq.3.0.3-Beta4.d.ts index d75d0982b..ff550d675 100755 --- a/linq/linq.3.0.3-Beta4.d.ts +++ b/linq/linq.3.0.3-Beta4.d.ts @@ -1,6 +1,6 @@ -// Type definitions for linq.js, ver 3.0.3-Beta4 +// Type definitions for linq.js v3.0.3-Beta4 // Project: http://linqjs.codeplex.com/ -// Definitions by: neuecc (http://www.codeplex.com/site/users/view/neuecc) +// Definitions by: neuecc // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module linqjs { diff --git a/linq/linq.jquery.d.ts b/linq/linq.jquery.d.ts index c4b874bae..c79708f66 100755 --- a/linq/linq.jquery.d.ts +++ b/linq/linq.jquery.d.ts @@ -1,6 +1,6 @@ // Type definitions for linq.jquery (from linq.js) // Project: http://linqjs.codeplex.com/ -// Definitions by: neuecc (http://www.codeplex.com/site/users/view/neuecc) +// Definitions by: neuecc // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/marionette/marionette.d.ts b/marionette/marionette.d.ts index 7a52d7453..96672ca3f 100644 --- a/marionette/marionette.d.ts +++ b/marionette/marionette.d.ts @@ -1,8 +1,6 @@ // Type definitions for Marionette // Project: https://github.com/marionettejs/ -// Definitions by: Zeeshan Hamid -// Definitions by: Natan Vivo -// Definitions by: Sven Tschui +// Definitions by: Zeeshan Hamid , Natan Vivo , Sven Tschui // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/mathjax/mathjax.d.ts b/mathjax/mathjax.d.ts index 08b1950bf..65c10e3ad 100644 --- a/mathjax/mathjax.d.ts +++ b/mathjax/mathjax.d.ts @@ -1,7 +1,7 @@ // Type definitions for MathJax // Project: https://github.com/mathjax/MathJax // Definitions by: Roland Zwaga -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped // These are slightly preliminary and can use some more strong typing here and there. Please feel free to improve. declare var MathJax:jax.IMathJax; @@ -1697,4 +1697,4 @@ declare module jax { /*Indicates whether the mathematics has changed so that its output needs to be updated.*/ needsUpdate():boolean; } -} \ No newline at end of file +} diff --git a/microsoft-live-connect/microsoft-live-connect.d.ts b/microsoft-live-connect/microsoft-live-connect.d.ts index 860a31df3..d012f3195 100644 --- a/microsoft-live-connect/microsoft-live-connect.d.ts +++ b/microsoft-live-connect/microsoft-live-connect.d.ts @@ -1,10 +1,11 @@ -/// -/// -// Type definitions for Microsoft Live Connect v5.0. +// Type definitions for Microsoft Live Connect v5.0 // Project: http://msdn.microsoft.com/en-us/library/live/hh243643.aspx // Definitions by: John Vilk // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// +/// + declare module Microsoft.Live { //#region REST Object Information @@ -633,8 +634,8 @@ declare module Microsoft.Live { /** * A value that specifies whether the event is publicly visible. Valid * values are: - * - publicthe event is visible to anyone who can view the calendar. - * - private"the event is visible only to the event owner. + * - public�the event is visible to anyone who can view the calendar. + * - private"�the event is visible only to the event owner. * @default "public" */ visibility: string; @@ -695,8 +696,8 @@ declare module Microsoft.Live { /** * A value that specifies whether the event is publicly visible. Valid * values are: - * - publicthe event is visible to anyone who can view the calendar. - * - private"the event is visible only to the event owner. + * - public�the event is visible to anyone who can view the calendar. + * - private"�the event is visible only to the event owner. * @default "public" */ visibility?: string; @@ -767,8 +768,8 @@ declare module Microsoft.Live { /** * A value that specifies whether the event is publicly visible. Valid * values are: - * - publicthe event is visible to anyone who can view the calendar. - * - private"the event is visible only to the event owner. + * - public�the event is visible to anyone who can view the calendar. + * - private"�the event is visible only to the event owner. * @default "public" */ visibility: string; @@ -1041,10 +1042,10 @@ declare module Microsoft.Live { source: string; /** * The type of this image of this particular size. Valid values are: - * full (maximum size: 2048 2048 pixels) - * - normal (maximum size 800 800 pixels) - * - album (maximum size 176 176 pixels) - * - small (maximum size 96 96 pixels) + * full (maximum size: 2048 � 2048 pixels) + * - normal (maximum size 800 � 800 pixels) + * - album (maximum size 176 � 176 pixels) + * - small (maximum size 96 � 96 pixels) */ type: string; } diff --git a/mixpanel/mixpanel.d.ts b/mixpanel/mixpanel.d.ts index 9d1ef9527..03596a8aa 100644 --- a/mixpanel/mixpanel.d.ts +++ b/mixpanel/mixpanel.d.ts @@ -1,5 +1,6 @@ // Type definitions for Mixpanel -// Project: https://mixpanel.com/ (https://github.com/mixpanel/mixpanel-js) +// Project: https://mixpanel.com/ +// https://github.com/mixpanel/mixpanel-js // Definitions by: Knut Eirik Leira Hjelle // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -68,4 +69,4 @@ declare module Mixpanel } } -declare var mixpanel:Mixpanel; \ No newline at end of file +declare var mixpanel:Mixpanel; diff --git a/mocha/mocha.d.ts b/mocha/mocha.d.ts index ce0f15b38..64255a7ba 100644 --- a/mocha/mocha.d.ts +++ b/mocha/mocha.d.ts @@ -1,7 +1,7 @@ // Type definitions for mocha 1.17.1 // Project: http://visionmedia.github.io/mocha/ -// Definitions by: Kazi Manzur Rashid and otiai10 -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Kazi Manzur Rashid , otiai10 +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface Mocha { // Setup mocha with the given setting options. diff --git a/modernizr/modernizr.d.ts b/modernizr/modernizr.d.ts index 686f40e71..5827bbf9e 100644 --- a/modernizr/modernizr.d.ts +++ b/modernizr/modernizr.d.ts @@ -1,6 +1,6 @@ // Type definitions for Modernizr 2.6.2 // Project: http://modernizr.com/ -// Definitions by: Boris Yankov and Theodore Brown +// Definitions by: Boris Yankov , Theodore Brown // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/moment/moment.d.ts b/moment/moment.d.ts index f997026fd..879bf6eae 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -1,9 +1,7 @@ // Type definitions for Moment.js 2.5.0 // Project: https://github.com/timrwood/moment -// Definitions by: Michael Lakerveld -// Definitions by: Aaron King (2.4.0) -// Definitions by: Hiroki Horiuchi (2.5.0) -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Michael Lakerveld , Aaron King , Hiroki Horiuchi +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface MomentInput { years?: number; diff --git a/mousetrap/mousetrap.d.ts b/mousetrap/mousetrap.d.ts index d2ae42aa6..dee352b42 100644 --- a/mousetrap/mousetrap.d.ts +++ b/mousetrap/mousetrap.d.ts @@ -1,6 +1,6 @@ // Type definitions for Mousetrap 1.2.2 // Project: http://craig.is/killing/mice -// Definitions by: Dániel Tar https://github.com/qcz +// Definitions by: Dániel Tar // Definitions: https://github.com/borisyankov/DefinitelyTyped interface ExtendedKeyboardEvent extends KeyboardEvent { diff --git a/ng-grid/ng-grid.d.ts b/ng-grid/ng-grid.d.ts index 7aa8f8716..3bb3b2daa 100644 --- a/ng-grid/ng-grid.d.ts +++ b/ng-grid/ng-grid.d.ts @@ -1,7 +1,7 @@ // Type definitions for ng-grid // Project: http://angular-ui.github.io/ng-grid/ -// Definitions by: Ken Smith and Roland Zwaga and Kent Cooper -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Ken Smith , Roland Zwaga , Kent Cooper +// Definitions: https://github.com/borisyankov/DefinitelyTyped // These are very definitely preliminary. Please feel free to improve. diff --git a/node/node-0.8.8.d.ts b/node/node-0.8.8.d.ts index 7a1abbae3..01c477ee4 100644 --- a/node/node-0.8.8.d.ts +++ b/node/node-0.8.8.d.ts @@ -1,5 +1,6 @@ // Type definitions for Node.js v0.8.8 // Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript , DefinitelyTyped // Definitions: https://github.com/borisyankov/DefinitelyTyped /************************************************ diff --git a/node/node.d.ts b/node/node.d.ts index 56306c665..a852838ba 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -1,5 +1,6 @@ // Type definitions for Node.js v0.10.1 // Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript // Definitions: https://github.com/borisyankov/DefinitelyTyped /************************************************ diff --git a/passport-facebook/passport-facebook.d.ts b/passport-facebook/passport-facebook.d.ts index 47c9b68bb..76a3041a9 100644 --- a/passport-facebook/passport-facebook.d.ts +++ b/passport-facebook/passport-facebook.d.ts @@ -1,5 +1,5 @@ // Type definitions for passport-facebook 1.0.3 -// Project: https://github.com/jaredhanson/passport-facebook +// Project: https://github.com/jaredhanson/passport-facebook // Definitions by: James Roland Cabresos // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -24,4 +24,4 @@ declare module 'passport-facebook' { name: string; authenticate:(req: express.Request, options?: Object) => void; } -} \ No newline at end of file +} diff --git a/passport/passport.d.ts b/passport/passport.d.ts index cd86228f6..6ce6089b7 100644 --- a/passport/passport.d.ts +++ b/passport/passport.d.ts @@ -1,7 +1,7 @@ // Type definitions for Passport v0.2.0 // Project: http://passportjs.org // Definitions by: Horiuchi_H -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/phantomjs/phantomjs.d.ts b/phantomjs/phantomjs.d.ts index 58e202ac8..3682024b6 100644 --- a/phantomjs/phantomjs.d.ts +++ b/phantomjs/phantomjs.d.ts @@ -1,6 +1,6 @@ // Type definitions for PhantomJS v1.9.0 API // Project: https://github.com/ariya/phantomjs/wiki/API-Reference -// Definitions by: Jed Hunsaker and Mike Keesey +// Definitions by: Jed Hunsaker , Mike Keesey // Definitions: https://github.com/borisyankov/DefinitelyTyped declare function require(module: string): any; diff --git a/promises-a-plus/promises-a-plus.d.ts b/promises-a-plus/promises-a-plus.d.ts index 7a3bee776..808995dc9 100644 --- a/promises-a-plus/promises-a-plus.d.ts +++ b/promises-a-plus/promises-a-plus.d.ts @@ -1,3 +1,8 @@ +// Type definitions for promises-a-plus +// Project: http://promisesaplus.com/ +// Definitions by: Igor Oleinikov +// Definitions: https://github.com/borisyankov/DefinitelyTyped + declare module PromisesAPlus { interface PromiseCtor { (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): Thenable; diff --git a/pubsubjs/pubsub.d.ts b/pubsubjs/pubsub.d.ts index 40158c79b..e24c901a4 100644 --- a/pubsubjs/pubsub.d.ts +++ b/pubsubjs/pubsub.d.ts @@ -1,4 +1,4 @@ -// Type definitions for PubSubJS 1.3.5 +// Type definitions for PubSubJS 1.3.5 // Project: https://github.com/mroderick/PubSubJS // Definitions by: Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/q-io/Q-io.d.ts b/q-io/Q-io.d.ts index 9c3963376..1e16e3c33 100644 --- a/q-io/Q-io.d.ts +++ b/q-io/Q-io.d.ts @@ -1,7 +1,7 @@ // Type definitions for Q-io -// Project:https://github.com/kriskowal/q-io -// Definitions by:Bart van der Schoor -// Definitions:https://github.com/borisyankov/DefinitelyTyped +// Project: https://github.com/kriskowal/q-io +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// /// diff --git a/qunit/qunit.d.ts b/qunit/qunit.d.ts index 68d0163b6..5628feaa6 100644 --- a/qunit/qunit.d.ts +++ b/qunit/qunit.d.ts @@ -1,7 +1,7 @@ // Type definitions for QUnit 1.10 // Project: http://qunitjs.com/ // Definitions by: Diullei Gomes -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface DoneCallbackObject { @@ -720,4 +720,4 @@ declare function equiv(a: any, b: any): any; declare var raises: any; /* QUNIT */ -declare var QUnit: QUnitStatic; \ No newline at end of file +declare var QUnit: QUnitStatic; diff --git a/raphael/raphael.d.ts b/raphael/raphael.d.ts index fc0b26292..e57aa3954 100644 --- a/raphael/raphael.d.ts +++ b/raphael/raphael.d.ts @@ -1,7 +1,7 @@ // Type definitions for Raphael 2.1 // Project: http://raphaeljs.com -// Definitions by: https://github.com/CheCoxshall -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: CheCoxshall +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface BoundingBox { diff --git a/riotjs/riotjs-render.d.ts b/riotjs/riotjs-render.d.ts index fe6cf84dc..b2b044d93 100644 --- a/riotjs/riotjs-render.d.ts +++ b/riotjs/riotjs-render.d.ts @@ -1,4 +1,4 @@ -// Type definitions for riot.js (ext/render.js) +// Type definitions for riot.js // Project: https://github.com/moot/riotjs // Definitions by: vvakame // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx-lite.d.ts b/rx.js/rx-lite.d.ts index dfae2289d..9b9506676 100644 --- a/rx.js/rx-lite.d.ts +++ b/rx.js/rx-lite.d.ts @@ -1,4 +1,6 @@ -// This file contains common part of defintions for rx.d.ts and rx.lite.d.ts +// DefinitelyTyped: partial + +// This file contains common part of defintions for rx.d.ts and rx.lite.d.ts // Do not include the file separately. declare module Rx { diff --git a/rx.js/rx.aggregates.d.ts b/rx.js/rx.aggregates.d.ts index 1305c18db..3c942a8af 100644 --- a/rx.js/rx.aggregates.d.ts +++ b/rx.js/rx.aggregates.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-Aggregates v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy -// Definitions by: Igor Oleinikov +// Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.all.ts b/rx.js/rx.all.ts index 800baddef..f0d9eeb0b 100644 --- a/rx.js/rx.all.ts +++ b/rx.js/rx.all.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-All v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy -// Definitions by: Igor Oleinikov +// Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -14,4 +13,4 @@ /// /// /// -/// \ No newline at end of file +/// diff --git a/rx.js/rx.async-lite.d.ts b/rx.js/rx.async-lite.d.ts index ce0f96778..be13320c2 100644 --- a/rx.js/rx.async-lite.d.ts +++ b/rx.js/rx.async-lite.d.ts @@ -1,3 +1,5 @@ +// DefinitelyTyped: partial + // This file contains common part of defintions for rx.async.d.ts and rx.lite.d.ts // Do not include the file separately. diff --git a/rx.js/rx.async.d.ts b/rx.js/rx.async.d.ts index 582b60f43..4c8aaa798 100644 --- a/rx.js/rx.async.d.ts +++ b/rx.js/rx.async.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-Async v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: zoetrope -// Definitions by: Igor Oleinikov +// Definitions by: zoetrope , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.backpressure-lite.d.ts b/rx.js/rx.backpressure-lite.d.ts index 420a568f3..d1c244195 100644 --- a/rx.js/rx.backpressure-lite.d.ts +++ b/rx.js/rx.backpressure-lite.d.ts @@ -1,4 +1,6 @@ -// This file contains common part of defintions for rx.backpressure.d.ts and rx.lite.d.ts +// DefinitelyTyped: partial + +// This file contains common part of defintions for rx.backpressure.d.ts and rx.lite.d.ts // Do not include the file separately. /// diff --git a/rx.js/rx.binding-lite.d.ts b/rx.js/rx.binding-lite.d.ts index 1e5d95eaf..e1120e109 100644 --- a/rx.js/rx.binding-lite.d.ts +++ b/rx.js/rx.binding-lite.d.ts @@ -1,3 +1,5 @@ +// DefinitelyTyped: partial + // This file contains common part of defintions for rx.binding.d.ts and rx.lite.d.ts // Do not include the file separately. diff --git a/rx.js/rx.binding.d.ts b/rx.js/rx.binding.d.ts index b9ea37fe6..08a989f4b 100644 --- a/rx.js/rx.binding.d.ts +++ b/rx.js/rx.binding.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-Binding v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy -// Definitions by: Igor Oleinikov +// Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.coincidence-lite.d.ts b/rx.js/rx.coincidence-lite.d.ts index 8dee43a0c..801e42168 100644 --- a/rx.js/rx.coincidence-lite.d.ts +++ b/rx.js/rx.coincidence-lite.d.ts @@ -1,3 +1,5 @@ +// DefinitelyTyped: partial + // This file contains common part of defintions for rx.time.d.ts and rx.lite.d.ts // Do not include the file separately. diff --git a/rx.js/rx.coincidence.d.ts b/rx.js/rx.coincidence.d.ts index 1fc45a2c6..e21712bfe 100644 --- a/rx.js/rx.coincidence.d.ts +++ b/rx.js/rx.coincidence.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-Coincidence v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy -// Definitions by: Igor Oleinikov +// Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.d.ts b/rx.js/rx.d.ts index e88480f95..967b5aefa 100644 --- a/rx.js/rx.d.ts +++ b/rx.js/rx.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: gsino -// Definitions by: Igor Oleinikov +// Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.jquery.d.ts b/rx.js/rx.jquery.d.ts index f2dcb284a..75202142e 100644 --- a/rx.js/rx.jquery.d.ts +++ b/rx.js/rx.jquery.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bridging RxJS with jQuery. +// Type definitions for RxJS-jQuery // Project: https://github.com/Reactive-Extensions/RxJS-jQuery/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.lite.d.ts b/rx.js/rx.lite.d.ts index 20d8a3179..801a89bbd 100644 --- a/rx.js/rx.lite.d.ts +++ b/rx.js/rx.lite.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-Lite v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: gsino -// Definitions by: Igor Oleinikov +// Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.time-lite.d.ts b/rx.js/rx.time-lite.d.ts index 36a07a825..a5b102827 100644 --- a/rx.js/rx.time-lite.d.ts +++ b/rx.js/rx.time-lite.d.ts @@ -1,3 +1,5 @@ +// DefinitelyTyped: partial + // This file contains common part of defintions for rx.time.d.ts and rx.lite.d.ts // Do not include the file separately. diff --git a/rx.js/rx.time.d.ts b/rx.js/rx.time.d.ts index 49b2f6b5e..010de369e 100644 --- a/rx.js/rx.time.d.ts +++ b/rx.js/rx.time.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-Time v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: Carl de Billy -// Definitions by: Igor Oleinikov +// Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/rx.js/rx.virtualtime.d.ts b/rx.js/rx.virtualtime.d.ts index 25835e3ad..1b729a781 100644 --- a/rx.js/rx.virtualtime.d.ts +++ b/rx.js/rx.virtualtime.d.ts @@ -1,7 +1,6 @@ // Type definitions for RxJS-VirtualTime v2.2.25 // Project: http://rx.codeplex.com/ -// Definitions by: gsino -// Definitions by: Igor Oleinikov +// Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/sammyjs/sammyjs.d.ts b/sammyjs/sammyjs.d.ts index 136362fbf..dc41cbf6f 100644 --- a/sammyjs/sammyjs.d.ts +++ b/sammyjs/sammyjs.d.ts @@ -1,7 +1,6 @@ // Type definitions for Sammy.js // Project: http://sammyjs.org/ -// Definitions by: Boris Yankov -// Definitions by: Oisin Grehan +// Definitions by: Boris Yankov , Oisin Grehan // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/scroller/easyscroller.d.ts b/scroller/easyscroller.d.ts index edc3c55d6..fc0418a57 100644 --- a/scroller/easyscroller.d.ts +++ b/scroller/easyscroller.d.ts @@ -1,6 +1,6 @@ // Type definitions for Zynga EasyScroller // Project: https://github.com/zynga/scroller -// Definitions by: Boris Yankov https://github.com/borisyankov +// Definitions by: Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -12,4 +12,4 @@ declare class EasyScroller { render(): void; reflow(): void; bindEvents(): void; -} \ No newline at end of file +} diff --git a/scroller/scroller.d.ts b/scroller/scroller.d.ts index 842aa8ee0..09cbbc291 100644 --- a/scroller/scroller.d.ts +++ b/scroller/scroller.d.ts @@ -1,6 +1,6 @@ // Type definitions for Zynga Scroller // Project: https://github.com/zynga/scroller -// Definitions by: Boris Yankov https://github.com/borisyankov +// Definitions by: Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -47,4 +47,4 @@ declare class Scroller { doTouchStart(touches: any[], timeStamp: number): void; doTouchMove(touches: any[], timeStamp: number, scale?: number): void; doTouchEnd(timeStamp: number): void; -} \ No newline at end of file +} diff --git a/should/should.d.ts b/should/should.d.ts index 13eca9ccf..8b4c21fc1 100644 --- a/should/should.d.ts +++ b/should/should.d.ts @@ -1,6 +1,6 @@ // Type definitions for should.js 3.1.2 // Project: https://github.com/visionmedia/should.js -// Definitions by: Alex Varju and Maxime LUCE (1.3+) +// Definitions by: Alex Varju , Maxime LUCE // Definitions: https://github.com/borisyankov/DefinitelyTyped interface Object { diff --git a/signalr/signalr.d.ts b/signalr/signalr.d.ts index 6519f7051..2c6b0f266 100644 --- a/signalr/signalr.d.ts +++ b/signalr/signalr.d.ts @@ -1,7 +1,6 @@ // Type definitions for SignalR 1.0 // Project: http://www.asp.net/signalr -// Definitions by: Boris Yankov -// Modified by: T. Michael Keesey +// Definitions by: Boris Yankov , T. Michael Keesey // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/sinon-chai/sinon-chai.d.ts b/sinon-chai/sinon-chai.d.ts index fefeb1af6..f8166d4d6 100644 --- a/sinon-chai/sinon-chai.d.ts +++ b/sinon-chai/sinon-chai.d.ts @@ -1,7 +1,7 @@ // Type definitions for sinon-chai 2.4.0 // Project: https://github.com/domenic/sinon-chai // Definitions by: Kazi Manzur Rashid -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/sinon/sinon.d.ts b/sinon/sinon.d.ts index eb62a286e..f8bed61b0 100644 --- a/sinon/sinon.d.ts +++ b/sinon/sinon.d.ts @@ -1,7 +1,7 @@ // Type definitions for Sinon 1.8.1 // Project: http://sinonjs.org/ // Definitions by: William Sears -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface SinonSpyCallApi { // Properties diff --git a/smoothie/smoothie.d.ts b/smoothie/smoothie.d.ts index aae781d51..18f0cc0a5 100644 --- a/smoothie/smoothie.d.ts +++ b/smoothie/smoothie.d.ts @@ -1,7 +1,6 @@ // Type definitions for Smoothie Charts 1.21 // Project: https://github.com/joewalnes/smoothie -// Definitions by: Drew Noakes -// Mike H. Hawley +// Definitions by: Drew Noakes , Mike H. Hawley // Definitions: https://github.com/borisyankov/DefinitelyTyped/smoothie // NOTE this reference is here to make the DefinitelyTyped `npm test` suite pass and diff --git a/sockjs/sockjs.d.ts b/sockjs/sockjs.d.ts index db58683b2..3f823a5ee 100644 --- a/sockjs/sockjs.d.ts +++ b/sockjs/sockjs.d.ts @@ -1,7 +1,7 @@ // Type definitions for SockJS 0.3.x // Project: https://github.com/sockjs/sockjs-client // Definitions by: Emil Ivanov -// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface SockJSSimpleEvent { type: string; diff --git a/spin/spin.d.ts b/spin/spin.d.ts index c7ceac2b6..02a0e7cd2 100644 --- a/spin/spin.d.ts +++ b/spin/spin.d.ts @@ -1,6 +1,6 @@ // Type definitions for Spin.js 1.3.1 // Project: http://fgnass.github.com/spin.js/ -// Definitions by: Boris Yankov and Theodore Brown +// Definitions by: Boris Yankov , Theodore Brown // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/state-machine/state-machine.d.ts b/state-machine/state-machine.d.ts index c5c9c83bf..67f7012b1 100644 --- a/state-machine/state-machine.d.ts +++ b/state-machine/state-machine.d.ts @@ -1,8 +1,6 @@ // Type definitions for Finite State Machine 2.2 // Project: https://github.com/jakesgordon/javascript-state-machine -// Definitions by: Boris Yankov -// Definitions by: Maarten Docter (2013/01/22) -// Definitions by: William Sears (2013/01/25) +// Definitions by: Boris Yankov , Maarten Docter , William Sears // Definitions: https://github.com/borisyankov/DefinitelyTyped interface StateMachineErrorCallback { diff --git a/stream-to-array/stream-to-array.d.ts b/stream-to-array/stream-to-array.d.ts index 4fd48acdf..45239bbb1 100644 --- a/stream-to-array/stream-to-array.d.ts +++ b/stream-to-array/stream-to-array.d.ts @@ -1,3 +1,9 @@ +// Type definitions for stream-to-array +// Project: https://github.com/stream-utils/stream-to-array +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + /// declare module 'stream-to-array' { diff --git a/svgjs.draggable/svgjs.draggable.d.ts b/svgjs.draggable/svgjs.draggable.d.ts index 76837f58e..8a64868c5 100644 --- a/svgjs.draggable/svgjs.draggable.d.ts +++ b/svgjs.draggable/svgjs.draggable.d.ts @@ -1,3 +1,9 @@ +// Type definitions for svgjs.draggable +// Project: http://www.svgjs.com/ +// Definitions by: Luigi Trabacchin +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + declare module svgjs { export module draggable { export interface DragDelta { diff --git a/threejs/three.d.ts b/threejs/three.d.ts index 906774181..748900166 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -1,4 +1,4 @@ -// Type definitions for three.js -- r67 +// Type definitions for three.js r67 // Project: http://mrdoob.github.com/three.js/ // Definitions by: Kon , Satoru Kimura // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 5fa693b00..c9c699326 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -1,7 +1,6 @@ // Type definitions for Underscore 1.6.0 // Project: http://underscorejs.org/ -// Definitions by: Boris Yankov -// Definitions by: Josh Baldwin +// Definitions by: Boris Yankov , Josh Baldwin // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module _ { diff --git a/viewporter/viewporter.d.ts b/viewporter/viewporter.d.ts index c0f441c03..1e85cc5f6 100644 --- a/viewporter/viewporter.d.ts +++ b/viewporter/viewporter.d.ts @@ -1,6 +1,6 @@ // Type definitions for Zynga Viewporter v2.1 // Project: https://github.com/zynga/viewporter -// Definitions by: Boris Yankov https://github.com/borisyankov +// Definitions by: Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped interface Viewporter { @@ -15,4 +15,4 @@ interface Viewporter { refresh(): void; } -declare var viewporter: Viewporter; \ No newline at end of file +declare var viewporter: Viewporter; diff --git a/webaudioapi/waa-20120802.d.ts b/webaudioapi/waa-20120802.d.ts index 64dc65876..a2039bf61 100644 --- a/webaudioapi/waa-20120802.d.ts +++ b/webaudioapi/waa-20120802.d.ts @@ -1,6 +1,6 @@ // Type definitions for Web Audio API // Project: http://www.w3.org/TR/2012/WD-webaudio-20120802/ -// Definitions by: Baruch Berger (https://github.com/bbss) +// Definitions by: Baruch Berger // Definitions: https://github.com/borisyankov/DefinitelyTyped // Conforms to the: http://www.w3.org/TR/2012/WD-webaudio-20120802/ specification diff --git a/webaudioapi/waa-nightly.d.ts b/webaudioapi/waa-nightly.d.ts index 79566f939..0d83c2533 100644 --- a/webaudioapi/waa-nightly.d.ts +++ b/webaudioapi/waa-nightly.d.ts @@ -1,6 +1,6 @@ // Type definitions for Web Audio API (nightly) // Project: http://www.w3.org/TR/2012/WD-webaudio-20120802/ -// Definitions by: Baruch Berger (https://github.com/bbss) +// Definitions by: Baruch Berger // Definitions: https://github.com/borisyankov/DefinitelyTyped // Conforms to the: http://www.w3.org/TR/2012/WD-webaudio-20120802/ specification diff --git a/x2js/xml2json.d.ts b/x2js/xml2json.d.ts index c202eface..1b55262f2 100644 --- a/x2js/xml2json.d.ts +++ b/x2js/xml2json.d.ts @@ -1,3 +1,7 @@ +// Type definitions for x2js +// Project: https://code.google.com/p/x2js/ +// Definitions by: Horiuchi_H +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface IX2JS { new (config?: IX2JSOption): IX2JS; diff --git a/xml2js/xml2js.d.ts b/xml2js/xml2js.d.ts index 2b5aabc4d..30aa64a87 100644 --- a/xml2js/xml2js.d.ts +++ b/xml2js/xml2js.d.ts @@ -1,6 +1,6 @@ // Type definitions for node-xml2js // Project: https://github.com/Leonidas-from-XIV/node-xml2js -// Definitions by: Michel Salib +// Definitions by: Michel Salib // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'xml2js' { diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index efb4ba344..3f21dcb86 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -1,7 +1,6 @@ // Type definitions for YouTube // Project: https://developers.google.com/youtube/ -// Definitions by: Daz Wilkin -// Definitions by: Ian Obermiller +// Definitions by: Daz Wilkin , Ian Obermiller // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module YT { diff --git a/yui/yui-test.d.ts b/yui/yui-test.d.ts index f72784ffa..a9df72232 100644 --- a/yui/yui-test.d.ts +++ b/yui/yui-test.d.ts @@ -1,7 +1,7 @@ // Type definitions for yui 3.14.0 // Project: https://github.com/yui/yui3/blob/release-3.14.0/src/test/js -// Definitions by: -// Gia Bảo @ Sân Đình +// Definitions by: Gia Bảo @ Sân Đình +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module YUITest { interface YUITestStatic{ diff --git a/zeroclipboard/zeroclipboard.d.ts b/zeroclipboard/zeroclipboard.d.ts index 76086f5bd..6db1ba180 100644 --- a/zeroclipboard/zeroclipboard.d.ts +++ b/zeroclipboard/zeroclipboard.d.ts @@ -1,8 +1,6 @@ // Type definitions for ZeroClipboard // Project: https://github.com/jonrohan/ZeroClipboard -// Definitions by: Eric J. Smith -// Definitions by: Blake Niemyjski -// Definitions by: György Balássy +// Definitions by: Eric J. Smith , Blake Niemyjski , György Balássy // Definitions: https://github.com/borisyankov/DefinitelyTyped declare class ZeroClipboard { From e0953576fb9e540a5f5c770db5d1c4999c79595a Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Mon, 16 Jun 2014 01:45:38 +0200 Subject: [PATCH 82/84] split node-ffi created node-ffi-buffer.d.ts partial - ref.d.ts - ref-array.d.ts - ref-struct.d.ts - ref-union.d.ts --- node-ffi/node-ffi-buffer.d.ts | 59 +++++ node-ffi/node-ffi-tests.ts | 5 + node-ffi/node-ffi.d.ts | 407 +--------------------------------- ref-array/ref-array.d.ts | 53 +++++ ref-struct/ref-struct.d.ts | 64 ++++++ ref-union/ref-union.d.ts | 64 ++++++ ref/ref.d.ts | 190 ++++++++++++++++ 7 files changed, 439 insertions(+), 403 deletions(-) create mode 100644 node-ffi/node-ffi-buffer.d.ts create mode 100644 ref-array/ref-array.d.ts create mode 100644 ref-struct/ref-struct.d.ts create mode 100644 ref-union/ref-union.d.ts create mode 100644 ref/ref.d.ts diff --git a/node-ffi/node-ffi-buffer.d.ts b/node-ffi/node-ffi-buffer.d.ts new file mode 100644 index 000000000..5203a2d9e --- /dev/null +++ b/node-ffi/node-ffi-buffer.d.ts @@ -0,0 +1,59 @@ +// DefinitelyTyped: partial + +interface Buffer { + /** Shorthand for `ref.address`. */ + address(): number; + /** Shorthand for `ref.deref`. */ + deref(): any; + /** Shorthand for `ref.isNull`. */ + isNull(): boolean; + /** Shorthand for `ref.readCString`. */ + readCString(offset?: number): string; + /** Shorthand for `ref.readInt64BE`. */ + readInt64BE(offset?: number): string; + /** Shorthand for `ref.readInt64LE`. */ + readInt64LE(offset?: number): string; + /** Shorthand for `ref.readObject`. */ + readObject(offset?: number): string; + /** Shorthand for `ref.readPointer`. */ + readPointer(offset?: number): string; + /** Shorthand for `ref.readUInt64BE`. */ + readUInt64BE(offset?: number): string; + /** Shorthand for `ref.readUInt64LE`. */ + readUInt64LE(offset?: number): string; + /** Shorthand for `ref.ref`. */ + ref(): Buffer; + /** Shorthand for `ref.reinterpret`. */ + reinterpret(size: number, offset?: number): Buffer; + /** Shorthand for `ref.reinterpretUntilZeros`. */ + reinterpretUntilZeros(size: number, offset?: number): Buffer; + /** Shorthand for `ref.writeCString`. */ + writeCString(offset: number, string: string, encoding?: string): void; + /** Shorthand for `ref.writeInt64BE`. */ + writeInt64BE(offset: number, input: number): any; + /** Shorthand for `ref.writeInt64BE`. */ + writeInt64BE(offset: number, input: string): any; + /** Shorthand for `ref.writeInt64LE`. */ + writeInt64LE(offset: number, input: number): any; + /** Shorthand for `ref.writeInt64LE`. */ + writeInt64LE(offset: number, input: string): any; + /** Shorthand for `ref.writeObject`. */ + writeObject(offset: number, object: Object): void; + /** Shorthand for `ref.writePointer`. */ + writePointer(offset: number, pointer: Buffer): void; + /** Shorthand for `ref.writeUInt64BE`. */ + writeUInt64BE(offset: number, input: number): any; + /** Shorthand for `ref.writeUInt64BE`. */ + writeUInt64BE(offset: number, input: string): any; + /** Shorthand for `ref.writeUInt64LE`. */ + writeUInt64LE(offset: number, input: number): any; + /** Shorthand for `ref.writeUInt64LE`. */ + writeUInt64LE(offset: number, input: string): any; + + /** + * Generate string for inspecting. + * String includes the hex-encoded memory address of the Buffer instance. + * @override + */ + inspect(): string; +} diff --git a/node-ffi/node-ffi-tests.ts b/node-ffi/node-ffi-tests.ts index 383470503..ff9698bfd 100644 --- a/node-ffi/node-ffi-tests.ts +++ b/node-ffi/node-ffi-tests.ts @@ -1,5 +1,10 @@ /// +/// +/// +/// +/// + import ffi = require('ffi'); import ref = require('ref'); import Struct = require('ref-struct'); diff --git a/node-ffi/node-ffi.d.ts b/node-ffi/node-ffi.d.ts index e5ee74621..49d6069d4 100644 --- a/node-ffi/node-ffi.d.ts +++ b/node-ffi/node-ffi.d.ts @@ -1,9 +1,12 @@ -// Type definitions for node-ffi, ref, ref-array, ref-struct and ref-union +// Type definitions for node-ffi // Project: https://github.com/rbranson/node-ffi // Definitions by: Paul Loyd // Definitions: https://github.com/borisyankov/DefinitelyTyped /// +/// +/// +/// declare module "ffi" { import ref = require('ref'); @@ -190,405 +193,3 @@ declare module "ffi" { uint32: ref.Type; short: ref.Type; }; } - -declare module "ref" { - export interface Type { - /** The size in bytes required to hold this datatype. */ - size: number; - /** The current level of indirection of the buffer. */ - indirection: number; - /** To invoke when `ref.get` is invoked on a buffer of this type. */ - get(buffer: Buffer, offset: number): any; - /** To invoke when `ref.set` is invoked on a buffer of this type. */ - set(buffer: Buffer, offset: number, value: any): void; - /** The name to use during debugging for this datatype. */ - name?: string; - /** The alignment of this datatype when placed inside a struct. */ - alignment?: number; - } - - /** A Buffer that references the C NULL pointer. */ - export var NULL: Buffer; - /** A pointer-sized buffer pointing to NULL. */ - export var NULL_POINTER: Buffer; - /** Get the memory address of buffer. */ - export function address(buffer: Buffer): number; - /** Allocate the memory with the given value written to it. */ - export function alloc(type: Type, value?: any): Buffer; - /** Allocate the memory with the given value written to it. */ - export function alloc(type: string, value?: any): Buffer; - - /** - * Allocate the memory with the given string written to it with the given - * encoding (defaults to utf8). The buffer is 1 byte longer than the - * string itself, and is NULL terminated. - */ - export function allocCString(string: string, encoding?: string): Buffer; - - /** Coerce a type.*/ - export function coerceType(type: Type): Type; - /** Coerce a type. String are looked up from the ref.types object. */ - export function coerceType(type: string): Type; - - /** - * Get value after dereferencing buffer. - * That is, first it checks the indirection count of buffer's type, and - * if it's greater than 1 then it merely returns another Buffer, but with - * one level less indirection. - */ - export function deref(buffer: Buffer): any; - - /** Create clone of the type, with decremented indirection level by 1. */ - export function derefType(type: Type): Type; - /** Create clone of the type, with decremented indirection level by 1. */ - export function derefType(type: string): Type; - /** Represents the native endianness of the processor ("LE" or "BE"). */ - export var endianness: string; - /** Check the indirection level and return a dereferenced when necessary. */ - export function get(buffer: Buffer, offset?: number, type?: Type): any; - /** Check the indirection level and return a dereferenced when necessary. */ - export function get(buffer: Buffer, offset?: number, type?: string): any; - /** Get type of the buffer. Create a default type when none exists. */ - export function getType(buffer: Buffer): Type; - /** Check the NULL. */ - export function isNull(buffer: Buffer): boolean; - /** Read C string until the first NULL. */ - export function readCString(buffer: Buffer, offset?: number): string; - - /** - * Read a big-endian signed 64-bit int. - * If there is losing precision, then return a string, otherwise a number. - * @return {number|string} - */ - export function readInt64BE(buffer: Buffer, offset?: number): any; - - /** - * Read a little-endian signed 64-bit int. - * If there is losing precision, then return a string, otherwise a number. - * @return {number|string} - */ - export function readInt64LE(buffer: Buffer, offset?: number): any; - - /** Read a JS Object that has previously been written. */ - export function readObject(buffer: Buffer, offset?: number): Object; - /** Read data from the pointer. */ - export function readPointer(buffer: Buffer, offset?: number, - length?: number): Buffer; - /** - * Read a big-endian unsigned 64-bit int. - * If there is losing precision, then return a string, otherwise a number. - * @return {number|string} - */ - export function readUInt64BE(buffer: Buffer, offset?: number): any; - - /** - * Read a little-endian unsigned 64-bit int. - * If there is losing precision, then return a string, otherwise a number. - * @return {number|string} - */ - export function readUInt64LE(buffer: Buffer, offset?: number): any; - - /** Create pointer to buffer. */ - export function ref(buffer: Buffer): Buffer; - /** Create clone of the type, with incremented indirection level by 1. */ - export function refType(type: Type): Type; - /** Create clone of the type, with incremented indirection level by 1. */ - export function refType(type: string): Type; - - /** - * Create buffer with the specified size, with the same address as source. - * This function "attaches" source to the returned buffer to prevent it from - * being garbage collected. - */ - export function reinterpret(buffer: Buffer, size: number, - offset?: number): Buffer; - /** - * Scan past the boundary of the buffer's length until it finds size number - * of aligned NULL bytes. - */ - export function reinterpretUntilZeros(buffer: Buffer, size: number, - offset?: number): Buffer; - - /** Write pointer if the indirection is 1, otherwise write value. */ - export function set(buffer: Buffer, offset: number, value: any, type?: Type): void; - /** Write pointer if the indirection is 1, otherwise write value. */ - export function set(buffer: Buffer, offset: number, value: any, type?: string): void; - /** Write the string as a NULL terminated. Default encoding is utf8. */ - export function writeCString(buffer: Buffer, offset: number, - string: string, encoding?: string): void; - /** Write a big-endian signed 64-bit int. */ - export function writeInt64BE(buffer: Buffer, offset: number, input: number): void; - /** Write a big-endian signed 64-bit int. */ - export function writeInt64BE(buffer: Buffer, offset: number, input: string): void; - /** Write a little-endian signed 64-bit int. */ - export function writeInt64LE(buffer: Buffer, offset: number, input: number): void; - /** Write a little-endian signed 64-bit int. */ - export function writeInt64LE(buffer: Buffer, offset: number, input: string): void; - - /** - * Write the JS Object. This function "attaches" object to buffer to prevent - * it from being garbage collected. - */ - export function writeObject(buffer: Buffer, offset: number, object: Object): void; - - /** - * Write the memory address of pointer to buffer at the specified offset. This - * function "attaches" object to buffer to prevent it from being garbage collected. - */ - export function writePointer(buffer: Buffer, offset: number, - pointer: Buffer): void; - - /** Write a little-endian unsigned 64-bit int. */ - export function writeUInt64BE(buffer: Buffer, offset: number, input: number): void; - /** Write a little-endian unsigned 64-bit int. */ - export function writeUInt64BE(buffer: Buffer, offset: number, input: string): void; - - /** - * Attach object to buffer such. - * It prevents object from being garbage collected until buffer does. - */ - export function _attach(buffer: Buffer, object: Object): void; - - /** Same as ref.reinterpret, except that this version does not attach buffer. */ - export function _reinterpret(buffer: Buffer, size: number, - offset?: number): Buffer; - /** Same as ref.reinterpretUntilZeros, except that this version does not attach buffer. */ - export function _reinterpretUntilZeros(buffer: Buffer, size: number, - offset?: number): Buffer; - /** Same as ref.writePointer, except that this version does not attach pointer. */ - export function _writePointer(buffer: Buffer, offset: number, - pointer: Buffer): void; - /** Same as ref.writeObject, except that this version does not attach object. */ - export function _writeObject(buffer: Buffer, offset: number, object: Object): void; - - /** Default types. */ - export var types: { - void: Type; int64: Type; ushort: Type; - int: Type; uint64: Type; float: Type; - uint: Type; long: Type; double: Type; - int8: Type; ulong: Type; Object: Type; - uint8: Type; longlong: Type; CString: Type; - int16: Type; ulonglong: Type; bool: Type; - uint16: Type; char: Type; byte: Type; - int32: Type; uchar: Type; size_t: Type; - uint32: Type; short: Type; - }; -} - -interface Buffer { - /** Shorthand for `ref.address`. */ - address(): number; - /** Shorthand for `ref.deref`. */ - deref(): any; - /** Shorthand for `ref.isNull`. */ - isNull(): boolean; - /** Shorthand for `ref.readCString`. */ - readCString(offset?: number): string; - /** Shorthand for `ref.readInt64BE`. */ - readInt64BE(offset?: number): string; - /** Shorthand for `ref.readInt64LE`. */ - readInt64LE(offset?: number): string; - /** Shorthand for `ref.readObject`. */ - readObject(offset?: number): string; - /** Shorthand for `ref.readPointer`. */ - readPointer(offset?: number): string; - /** Shorthand for `ref.readUInt64BE`. */ - readUInt64BE(offset?: number): string; - /** Shorthand for `ref.readUInt64LE`. */ - readUInt64LE(offset?: number): string; - /** Shorthand for `ref.ref`. */ - ref(): Buffer; - /** Shorthand for `ref.reinterpret`. */ - reinterpret(size: number, offset?: number): Buffer; - /** Shorthand for `ref.reinterpretUntilZeros`. */ - reinterpretUntilZeros(size: number, offset?: number): Buffer; - /** Shorthand for `ref.writeCString`. */ - writeCString(offset: number, string: string, encoding?: string): void; - /** Shorthand for `ref.writeInt64BE`. */ - writeInt64BE(offset: number, input: number): any; - /** Shorthand for `ref.writeInt64BE`. */ - writeInt64BE(offset: number, input: string): any; - /** Shorthand for `ref.writeInt64LE`. */ - writeInt64LE(offset: number, input: number): any; - /** Shorthand for `ref.writeInt64LE`. */ - writeInt64LE(offset: number, input: string): any; - /** Shorthand for `ref.writeObject`. */ - writeObject(offset: number, object: Object): void; - /** Shorthand for `ref.writePointer`. */ - writePointer(offset: number, pointer: Buffer): void; - /** Shorthand for `ref.writeUInt64BE`. */ - writeUInt64BE(offset: number, input: number): any; - /** Shorthand for `ref.writeUInt64BE`. */ - writeUInt64BE(offset: number, input: string): any; - /** Shorthand for `ref.writeUInt64LE`. */ - writeUInt64LE(offset: number, input: number): any; - /** Shorthand for `ref.writeUInt64LE`. */ - writeUInt64LE(offset: number, input: string): any; - - /** - * Generate string for inspecting. - * String includes the hex-encoded memory address of the Buffer instance. - * @override - */ - inspect(): string; -} - -declare module "ref-array" { - import ref = require('ref'); - - interface ArrayType extends ref.Type { - BYTES_PER_ELEMENT: number; - fixedLength: number; - /** The reference to the base type. */ - type: ref.Type; - - /** - * Accepts a Buffer instance that should be an already-populated with data - * for the ArrayType. The "length" of the Array is determined by searching - * through the buffer's contents until an aligned NULL pointer is encountered. - */ - untilZeros(buffer: Buffer): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - - new (length?: number): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - new (data: number[], length?: number): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - new (data: Buffer, length?: number): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - (length?: number): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - (data: number[], length?: number): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - (data: Buffer, length?: number): { [i: number]: T; length: number; toArray(): T[]; - toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; - } - - /** - * The array type meta-constructor. - * The returned constructor's API is highly influenced by the WebGL - * TypedArray API. - */ - var ArrayType: { - new (type: ref.Type, length?: number): ArrayType; - new (type: string, length?: number): ArrayType; - (type: ref.Type, length?: number): ArrayType; - (type: string, length?: number): ArrayType; - }; - - export = ArrayType; -} - -declare module "ref-struct" { - import ref = require('ref'); - - /** - * This is the `constructor` of the Struct type that gets returned. - * - * Invoke it with `new` to create a new Buffer instance backing the struct. - * Pass it an existing Buffer instance to use that as the backing buffer. - * Pass in an Object containing the struct fields to auto-populate the - * struct with the data. - * - * @constructor - */ - interface StructType extends ref.Type { - /** Pass it an existing Buffer instance to use that as the backing buffer. */ - new (arg: Buffer, data?: {}): any; - new (data?: {}): any; - /** Pass it an existing Buffer instance to use that as the backing buffer. */ - (arg: Buffer, data?: {}): any; - (data?: {}): any; - - fields: {[key: string]: {type: ref.Type}}; - - /** - * Adds a new field to the struct instance with the given name and type. - * Note that this function will throw an Error if any instances of the struct - * type have already been created, therefore this function must be called at the - * beginning, before any instances are created. - */ - defineProperty(name: string, type: ref.Type): void; - - /** - * Adds a new field to the struct instance with the given name and type. - * Note that this function will throw an Error if any instances of the struct - * type have already been created, therefore this function must be called at the - * beginning, before any instances are created. - */ - defineProperty(name: string, type: string): void; - - /** - * Custom for struct type instances. - * @override - */ - toString(): string; - } - - /** The struct type meta-constructor. */ - var StructType: { - new (fields?: {}): StructType; - new (fields?: any[]): StructType; - (fields?: {}): StructType; - (fields?: any[]): StructType; - } - - export = StructType; -} - -declare module "ref-union" { - import ref = require('ref'); - - /** - * This is the `constructor` of the Struct type that gets returned. - * - * Invoke it with `new` to create a new Buffer instance backing the union. - * Pass it an existing Buffer instance to use that as the backing buffer. - * Pass in an Object containing the union fields to auto-populate the - * union with the data. - * - * @constructor - */ - interface UnionType extends ref.Type { - /** Pass it an existing Buffer instance to use that as the backing buffer. */ - new (arg: Buffer, data?: {}): any; - new (data?: {}): any; - /** Pass it an existing Buffer instance to use that as the backing buffer. */ - (arg: Buffer, data?: {}): any; - (data?: {}): any; - - fields: {[key: string]: {type: ref.Type}}; - - /** - * Adds a new field to the union instance with the given name and type. - * Note that this function will throw an Error if any instances of the union - * type have already been created, therefore this function must be called at the - * beginning, before any instances are created. - */ - defineProperty(name: string, type: ref.Type): void; - - /** - * Adds a new field to the union instance with the given name and type. - * Note that this function will throw an Error if any instances of the union - * type have already been created, therefore this function must be called at the - * beginning, before any instances are created. - */ - defineProperty(name: string, type: string): void; - - /** - * Custom for union type instances. - * @override - */ - toString(): string; - } - - /** The union type meta-constructor. */ - var UnionType: { - new (fields?: {}): UnionType; - new (fields?: any[]): UnionType; - (fields?: {}): UnionType; - (fields?: any[]): UnionType; - } - - export = UnionType; -} diff --git a/ref-array/ref-array.d.ts b/ref-array/ref-array.d.ts new file mode 100644 index 000000000..4066e0d65 --- /dev/null +++ b/ref-array/ref-array.d.ts @@ -0,0 +1,53 @@ +// Type definitions for ref-array +// Project: https://github.com/TooTallNate/ref-array +// Definitions by: Paul Loyd +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "ref-array" { + import ref = require('ref'); + + interface ArrayType extends ref.Type { + BYTES_PER_ELEMENT: number; + fixedLength: number; + /** The reference to the base type. */ + type: ref.Type; + + /** + * Accepts a Buffer instance that should be an already-populated with data + * for the ArrayType. The "length" of the Array is determined by searching + * through the buffer's contents until an aligned NULL pointer is encountered. + */ + untilZeros(buffer: Buffer): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + + new (length?: number): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + new (data: number[], length?: number): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + new (data: Buffer, length?: number): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + (length?: number): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + (data: number[], length?: number): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + (data: Buffer, length?: number): { [i: number]: T; length: number; toArray(): T[]; + toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; }; + } + + /** + * The array type meta-constructor. + * The returned constructor's API is highly influenced by the WebGL + * TypedArray API. + */ + var ArrayType: { + new (type: ref.Type, length?: number): ArrayType; + new (type: string, length?: number): ArrayType; + (type: ref.Type, length?: number): ArrayType; + (type: string, length?: number): ArrayType; + }; + +export = ArrayType; +} diff --git a/ref-struct/ref-struct.d.ts b/ref-struct/ref-struct.d.ts new file mode 100644 index 000000000..7c2019655 --- /dev/null +++ b/ref-struct/ref-struct.d.ts @@ -0,0 +1,64 @@ +// Type definitions for ref-union +// Project: https://github.com/TooTallNate/ref-struct +// Definitions by: Paul Loyd +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "ref-struct" { + import ref = require('ref'); + + /** + * This is the `constructor` of the Struct type that gets returned. + * + * Invoke it with `new` to create a new Buffer instance backing the struct. + * Pass it an existing Buffer instance to use that as the backing buffer. + * Pass in an Object containing the struct fields to auto-populate the + * struct with the data. + * + * @constructor + */ + interface StructType extends ref.Type { + /** Pass it an existing Buffer instance to use that as the backing buffer. */ + new (arg: Buffer, data?: {}): any; + new (data?: {}): any; + /** Pass it an existing Buffer instance to use that as the backing buffer. */ + (arg: Buffer, data?: {}): any; + (data?: {}): any; + + fields: {[key: string]: {type: ref.Type}}; + + /** + * Adds a new field to the struct instance with the given name and type. + * Note that this function will throw an Error if any instances of the struct + * type have already been created, therefore this function must be called at the + * beginning, before any instances are created. + */ + defineProperty(name: string, type: ref.Type): void; + + /** + * Adds a new field to the struct instance with the given name and type. + * Note that this function will throw an Error if any instances of the struct + * type have already been created, therefore this function must be called at the + * beginning, before any instances are created. + */ + defineProperty(name: string, type: string): void; + + /** + * Custom for struct type instances. + * @override + */ + toString(): string; + } + + /** The struct type meta-constructor. */ + var StructType: { + new (fields?: {}): StructType; + new (fields?: any[]): StructType; + (fields?: {}): StructType; + (fields?: any[]): StructType; + } + +export = StructType; +} diff --git a/ref-union/ref-union.d.ts b/ref-union/ref-union.d.ts new file mode 100644 index 000000000..23dbdae39 --- /dev/null +++ b/ref-union/ref-union.d.ts @@ -0,0 +1,64 @@ +// Type definitions for ref-union +// Project: https://github.com/TooTallNate/ref-union +// Definitions by: Paul Loyd +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "ref-union" { + import ref = require('ref'); + + /** + * This is the `constructor` of the Struct type that gets returned. + * + * Invoke it with `new` to create a new Buffer instance backing the union. + * Pass it an existing Buffer instance to use that as the backing buffer. + * Pass in an Object containing the union fields to auto-populate the + * union with the data. + * + * @constructor + */ + interface UnionType extends ref.Type { + /** Pass it an existing Buffer instance to use that as the backing buffer. */ + new (arg: Buffer, data?: {}): any; + new (data?: {}): any; + /** Pass it an existing Buffer instance to use that as the backing buffer. */ + (arg: Buffer, data?: {}): any; + (data?: {}): any; + + fields: {[key: string]: {type: ref.Type}}; + + /** + * Adds a new field to the union instance with the given name and type. + * Note that this function will throw an Error if any instances of the union + * type have already been created, therefore this function must be called at the + * beginning, before any instances are created. + */ + defineProperty(name: string, type: ref.Type): void; + + /** + * Adds a new field to the union instance with the given name and type. + * Note that this function will throw an Error if any instances of the union + * type have already been created, therefore this function must be called at the + * beginning, before any instances are created. + */ + defineProperty(name: string, type: string): void; + + /** + * Custom for union type instances. + * @override + */ + toString(): string; + } + + /** The union type meta-constructor. */ + var UnionType: { + new (fields?: {}): UnionType; + new (fields?: any[]): UnionType; + (fields?: {}): UnionType; + (fields?: any[]): UnionType; + } + +export = UnionType; +} diff --git a/ref/ref.d.ts b/ref/ref.d.ts new file mode 100644 index 000000000..86e7840be --- /dev/null +++ b/ref/ref.d.ts @@ -0,0 +1,190 @@ +// Type definitions for ref-union +// Project: https://github.com/TooTallNate/ref +// Definitions by: Paul Loyd +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "ref" { + export interface Type { + /** The size in bytes required to hold this datatype. */ + size: number; + /** The current level of indirection of the buffer. */ + indirection: number; + /** To invoke when `ref.get` is invoked on a buffer of this type. */ + get(buffer: Buffer, offset: number): any; + /** To invoke when `ref.set` is invoked on a buffer of this type. */ + set(buffer: Buffer, offset: number, value: any): void; + /** The name to use during debugging for this datatype. */ + name?: string; + /** The alignment of this datatype when placed inside a struct. */ + alignment?: number; + } + + /** A Buffer that references the C NULL pointer. */ + export var NULL: Buffer; + /** A pointer-sized buffer pointing to NULL. */ + export var NULL_POINTER: Buffer; + /** Get the memory address of buffer. */ + export function address(buffer: Buffer): number; + /** Allocate the memory with the given value written to it. */ + export function alloc(type: Type, value?: any): Buffer; + /** Allocate the memory with the given value written to it. */ + export function alloc(type: string, value?: any): Buffer; + + /** + * Allocate the memory with the given string written to it with the given + * encoding (defaults to utf8). The buffer is 1 byte longer than the + * string itself, and is NULL terminated. + */ + export function allocCString(string: string, encoding?: string): Buffer; + + /** Coerce a type.*/ + export function coerceType(type: Type): Type; + /** Coerce a type. String are looked up from the ref.types object. */ + export function coerceType(type: string): Type; + + /** + * Get value after dereferencing buffer. + * That is, first it checks the indirection count of buffer's type, and + * if it's greater than 1 then it merely returns another Buffer, but with + * one level less indirection. + */ + export function deref(buffer: Buffer): any; + + /** Create clone of the type, with decremented indirection level by 1. */ + export function derefType(type: Type): Type; + /** Create clone of the type, with decremented indirection level by 1. */ + export function derefType(type: string): Type; + /** Represents the native endianness of the processor ("LE" or "BE"). */ + export var endianness: string; + /** Check the indirection level and return a dereferenced when necessary. */ + export function get(buffer: Buffer, offset?: number, type?: Type): any; + /** Check the indirection level and return a dereferenced when necessary. */ + export function get(buffer: Buffer, offset?: number, type?: string): any; + /** Get type of the buffer. Create a default type when none exists. */ + export function getType(buffer: Buffer): Type; + /** Check the NULL. */ + export function isNull(buffer: Buffer): boolean; + /** Read C string until the first NULL. */ + export function readCString(buffer: Buffer, offset?: number): string; + + /** + * Read a big-endian signed 64-bit int. + * If there is losing precision, then return a string, otherwise a number. + * @return {number|string} + */ + export function readInt64BE(buffer: Buffer, offset?: number): any; + + /** + * Read a little-endian signed 64-bit int. + * If there is losing precision, then return a string, otherwise a number. + * @return {number|string} + */ + export function readInt64LE(buffer: Buffer, offset?: number): any; + + /** Read a JS Object that has previously been written. */ + export function readObject(buffer: Buffer, offset?: number): Object; + /** Read data from the pointer. */ + export function readPointer(buffer: Buffer, offset?: number, + length?: number): Buffer; + /** + * Read a big-endian unsigned 64-bit int. + * If there is losing precision, then return a string, otherwise a number. + * @return {number|string} + */ + export function readUInt64BE(buffer: Buffer, offset?: number): any; + + /** + * Read a little-endian unsigned 64-bit int. + * If there is losing precision, then return a string, otherwise a number. + * @return {number|string} + */ + export function readUInt64LE(buffer: Buffer, offset?: number): any; + + /** Create pointer to buffer. */ + export function ref(buffer: Buffer): Buffer; + /** Create clone of the type, with incremented indirection level by 1. */ + export function refType(type: Type): Type; + /** Create clone of the type, with incremented indirection level by 1. */ + export function refType(type: string): Type; + + /** + * Create buffer with the specified size, with the same address as source. + * This function "attaches" source to the returned buffer to prevent it from + * being garbage collected. + */ + export function reinterpret(buffer: Buffer, size: number, + offset?: number): Buffer; + /** + * Scan past the boundary of the buffer's length until it finds size number + * of aligned NULL bytes. + */ + export function reinterpretUntilZeros(buffer: Buffer, size: number, + offset?: number): Buffer; + + /** Write pointer if the indirection is 1, otherwise write value. */ + export function set(buffer: Buffer, offset: number, value: any, type?: Type): void; + /** Write pointer if the indirection is 1, otherwise write value. */ + export function set(buffer: Buffer, offset: number, value: any, type?: string): void; + /** Write the string as a NULL terminated. Default encoding is utf8. */ + export function writeCString(buffer: Buffer, offset: number, + string: string, encoding?: string): void; + /** Write a big-endian signed 64-bit int. */ + export function writeInt64BE(buffer: Buffer, offset: number, input: number): void; + /** Write a big-endian signed 64-bit int. */ + export function writeInt64BE(buffer: Buffer, offset: number, input: string): void; + /** Write a little-endian signed 64-bit int. */ + export function writeInt64LE(buffer: Buffer, offset: number, input: number): void; + /** Write a little-endian signed 64-bit int. */ + export function writeInt64LE(buffer: Buffer, offset: number, input: string): void; + + /** + * Write the JS Object. This function "attaches" object to buffer to prevent + * it from being garbage collected. + */ + export function writeObject(buffer: Buffer, offset: number, object: Object): void; + + /** + * Write the memory address of pointer to buffer at the specified offset. This + * function "attaches" object to buffer to prevent it from being garbage collected. + */ + export function writePointer(buffer: Buffer, offset: number, + pointer: Buffer): void; + + /** Write a little-endian unsigned 64-bit int. */ + export function writeUInt64BE(buffer: Buffer, offset: number, input: number): void; + /** Write a little-endian unsigned 64-bit int. */ + export function writeUInt64BE(buffer: Buffer, offset: number, input: string): void; + + /** + * Attach object to buffer such. + * It prevents object from being garbage collected until buffer does. + */ + export function _attach(buffer: Buffer, object: Object): void; + + /** Same as ref.reinterpret, except that this version does not attach buffer. */ + export function _reinterpret(buffer: Buffer, size: number, + offset?: number): Buffer; + /** Same as ref.reinterpretUntilZeros, except that this version does not attach buffer. */ + export function _reinterpretUntilZeros(buffer: Buffer, size: number, + offset?: number): Buffer; + /** Same as ref.writePointer, except that this version does not attach pointer. */ + export function _writePointer(buffer: Buffer, offset: number, + pointer: Buffer): void; + /** Same as ref.writeObject, except that this version does not attach object. */ + export function _writeObject(buffer: Buffer, offset: number, object: Object): void; + + /** Default types. */ + export var types: { + void: Type; int64: Type; ushort: Type; + int: Type; uint64: Type; float: Type; + uint: Type; long: Type; double: Type; + int8: Type; ulong: Type; Object: Type; + uint8: Type; longlong: Type; CString: Type; + int16: Type; ulonglong: Type; bool: Type; + uint16: Type; char: Type; byte: Type; + int32: Type; uchar: Type; size_t: Type; + uint32: Type; short: Type; + }; +} From 3d64ea7395351f031436b52adb5cbc3906c8da4e Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Mon, 16 Jun 2014 01:59:21 +0200 Subject: [PATCH 83/84] added missing urls to some authors fixed node urls --- angularjs/angular-route.d.ts | 2 +- angularjs/angular-scenario.d.ts | 2 +- cordova/cordova.d.ts | 2 +- dcjs/dc.d.ts | 5 +++-- domready/domready.d.ts | 2 +- ftdomdelegate/ftdomdelegate.d.ts | 4 ++-- jquery.menuaim/jquery.menuaim.d.ts | 2 +- jquery/jquery.d.ts | 2 +- linq/linq.d.ts | 2 +- node/node-0.8.8.d.ts | 2 +- node/node.d.ts | 2 +- q/Q.d.ts | 2 +- 12 files changed, 15 insertions(+), 14 deletions(-) diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts index d4e35b7e2..ba6d0aac9 100644 --- a/angularjs/angular-route.d.ts +++ b/angularjs/angular-route.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular JS 1.2 (ngRoute module) // Project: http://angularjs.org -// Definitions by: Jonathan Park +// Definitions by: Jonathan Park // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/angularjs/angular-scenario.d.ts b/angularjs/angular-scenario.d.ts index ec3efd9f9..ee71ffbea 100644 --- a/angularjs/angular-scenario.d.ts +++ b/angularjs/angular-scenario.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular Scenario Testing // Project: http://angularjs.org -// Definitions by: RomanoLindano +// Definitions by: RomanoLindano // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/cordova/cordova.d.ts b/cordova/cordova.d.ts index 01e18299d..9377912b0 100644 --- a/cordova/cordova.d.ts +++ b/cordova/cordova.d.ts @@ -1,6 +1,6 @@ // Type definitions for Apache Cordova // Project: http://cordova.apache.org -// Definitions by: Microsoft Open Technologies, Inc. +// Definitions by: Microsoft Open Technologies Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped // // Copyright (c) Microsoft Open Technologies, Inc. diff --git a/dcjs/dc.d.ts b/dcjs/dc.d.ts index 0391d2502..2b06c34dd 100644 --- a/dcjs/dc.d.ts +++ b/dcjs/dc.d.ts @@ -1,7 +1,8 @@ // Type definitions for DCJS // Project: https://github.com/dc-js -// Definitions by: hans windhoff +// Definitions by: hans windhoff // Definitions: https://github.com/borisyankov/DefinitelyTyped + // this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files /// @@ -195,4 +196,4 @@ export interface ILegendwidget { export function rowChart(cssSel: string): IRowchart; -} \ No newline at end of file +} diff --git a/domready/domready.d.ts b/domready/domready.d.ts index 14ba14011..7dc9c7749 100644 --- a/domready/domready.d.ts +++ b/domready/domready.d.ts @@ -1,6 +1,6 @@ // Type definitions for domready // Project: https://github.com/ded/domready -// Definitions by: Christian Holm Nielsen +// Definitions by: Christian Holm Nielsen // Definitions: https://github.com/borisyankov/DefinitelyTyped declare function domready(callback: () => any) : void; diff --git a/ftdomdelegate/ftdomdelegate.d.ts b/ftdomdelegate/ftdomdelegate.d.ts index 04766bd26..905bef706 100644 --- a/ftdomdelegate/ftdomdelegate.d.ts +++ b/ftdomdelegate/ftdomdelegate.d.ts @@ -1,6 +1,6 @@ // Type definitions for ftdomdelegate // Project: https://github.com/ftlabs/ftdomdelegate -// Definitions by: Christian Holm Nielsen +// Definitions by: Christian Holm Nielsen // Definitions: https://github.com/borisyankov/DefinitelyTyped declare class Delegate @@ -19,4 +19,4 @@ declare class Delegate root(element? : Element) : void; destroy() : void; -} \ No newline at end of file +} diff --git a/jquery.menuaim/jquery.menuaim.d.ts b/jquery.menuaim/jquery.menuaim.d.ts index 54215620a..86000419f 100644 --- a/jquery.menuaim/jquery.menuaim.d.ts +++ b/jquery.menuaim/jquery.menuaim.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery-menu-aim // Project: https://github.com/kamens/jQuery-menu-aim -// Definitions by: Robert Fonseca-Ensor +// Definitions by: Robert Fonseca-Ensor // Definitions: https://github.com/borisyankov/DefinitelyTyped /// diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 6fff3fab6..6b4ebb68a 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery 1.10.x / 2.0.x // Project: http://jquery.com/ -// Definitions by: Boris Yankov , Christian Hoffmeister , Steve Fenton, Diullei Gomes , Tass Iliopoulos , Jason Swearingen, Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly +// Definitions by: Boris Yankov , Christian Hoffmeister , Steve Fenton , Diullei Gomes , Tass Iliopoulos , Jason Swearingen , Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly // Definitions: https://github.com/borisyankov/DefinitelyTyped /* ***************************************************************************** diff --git a/linq/linq.d.ts b/linq/linq.d.ts index 960b20a90..d155ba806 100644 --- a/linq/linq.d.ts +++ b/linq/linq.d.ts @@ -1,6 +1,6 @@ // Type definitions for linq.js 2.2 // Project: http://linqjs.codeplex.com/ -// Definitions by: Marcin Najder +// Definitions by: Marcin Najder // Definitions: https://github.com/borisyankov/DefinitelyTyped // todo: jQuery plugin, RxJS Binding diff --git a/node/node-0.8.8.d.ts b/node/node-0.8.8.d.ts index 01c477ee4..f236faa89 100644 --- a/node/node-0.8.8.d.ts +++ b/node/node-0.8.8.d.ts @@ -1,6 +1,6 @@ // Type definitions for Node.js v0.8.8 // Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped +// Definitions by: Microsoft TypeScript // Definitions: https://github.com/borisyankov/DefinitelyTyped /************************************************ diff --git a/node/node.d.ts b/node/node.d.ts index a852838ba..4eb3e5eae 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -1,6 +1,6 @@ // Type definitions for Node.js v0.10.1 // Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript +// Definitions by: Microsoft TypeScript , DefinitelyTyped // Definitions: https://github.com/borisyankov/DefinitelyTyped /************************************************ diff --git a/q/Q.d.ts b/q/Q.d.ts index af3e8bea0..1d76edd1d 100644 --- a/q/Q.d.ts +++ b/q/Q.d.ts @@ -1,6 +1,6 @@ // Type definitions for Q // Project: https://github.com/kriskowal/q -// Definitions by: Barrie Nemetchek, Andrew Gaspar, John Reilly +// Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly // Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 7d85fd5e1c7c76872d06b4ee2f3c944fc2e337fb Mon Sep 17 00:00:00 2001 From: Junle Date: Thu, 19 Jun 2014 14:04:13 +0800 Subject: [PATCH 84/84] Write my name on CONTRIBUTORS.md :) --- CONTRIBUTORS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4c2fbc8e1..04a81d6ca 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -155,9 +155,11 @@ All definitions files include a header with the author and editors, so at some p * [jQuery.joyride](http://zurb.com/playground/jquery-joyride-feature-tour-plugin) (by [Vincent Bortone](https://github.com/vbortone)) * [jQuery.jSignature](https://github.com/willowsystems/jSignature) (by [Patrick Magee](https://github.com/pjmagee)) * [jQuery.noty](http://needim.github.io/noty/) (by [Aaron King](https://github.com/kingdango/)) -* [jQuery.pickadate](https://github.com/amsul/pickadate.js) (by [Theodore Brown](https://github.com/theodorejb)) * [jQuery.payment](http://needim.github.io/noty/) (by [Eric J. Smith](https://github.com/ejsmith/)) +* [jQuery.pickadate](https://github.com/amsul/pickadate.js) (by [Theodore Brown](https://github.com/theodorejb)) +* [jQuery.pjax](https://github.com/defunkt/jquery-pjax) (by [Junle Li](https://github.com/lijunle)) * [jQuery.pnotify](http://sciactive.github.io/pnotify/) (by [David Sichau](https://github.com/DavidSichau/)) +* [jQuery.postMessage](http://benalman.com/projects/jquery-postmessage-plugin/) (by [Junle Li](https://github.com/lijunle)) * [jQuery.scrollTo](https://github.com/flesler/jquery.scrollTo) (by [Neil Stalker](https://github.com/nestalk/)) * [jQuery.simplePagination](https://github.com/flaviusmatis/simplePagination.js) (by [Natan Vivo](https://github.com/nvivo/)) * [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) (by [Blake Niemyjski](https://github.com/niemyjski))