diff --git a/.gitattributes b/.gitattributes index 412eeda78d..dfe0770424 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,22 +1,2 @@ # Auto detect text files and perform LF normalization * text=auto - -# Custom for Visual Studio -*.cs diff=csharp -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.travis.yml b/.travis.yml index c8c468a417..07914721a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - 6.9.2 + - node sudo: false diff --git a/3d-bin-packing/3d-bin-packing-tests.ts b/3d-bin-packing/3d-bin-packing-tests.ts index 319624d597..8e394e46bb 100644 --- a/3d-bin-packing/3d-bin-packing-tests.ts +++ b/3d-bin-packing/3d-bin-packing-tests.ts @@ -1,5 +1,5 @@ import packer = require("3d-bin-packing"); -import samchon = require("samchon-framework"); +import samchon = require("samchon"); function main(): void { diff --git a/3d-bin-packing/index.d.ts b/3d-bin-packing/index.d.ts index 14228f3141..8165ea513e 100644 --- a/3d-bin-packing/index.d.ts +++ b/3d-bin-packing/index.d.ts @@ -1,20 +1,22 @@ -// Type definitions for 3d-bin-packing +// Type definitions for 3d-bin-packing v1.1.2 // Project: https://github.com/betterwaysystems/packer // Definitions by: Jeongho Nam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 -/// -/// -/// -/// -/// +/// declare module "3d-bin-packing" { - export = bws.packer; + export = bws.packer; +} + +/// +/// +declare namespace bws.packer { + export import library = samchon.library; + export import protocol = samchon.protocol; + function _Test(): void; } -declare var ReactDataGrid: typeof AdazzleReactDataGrid.ReactDataGrid; declare namespace boxologic { /** *

An abstract instance of boxologic.

@@ -62,122 +64,6 @@ declare namespace boxologic { constructor(width: number, height: number, length: number); } } -declare namespace bws.packer { - /** - * @brief Packer, a solver of 3d bin packing with multiple wrappers. - * - * @details - *

Packer is a facade class supporting packing operations in user side. You can solve a packing problem - * by constructing Packer class with {@link WrapperArray wrappers} and {@link InstanceArray instances} to - * pack and executing {@link optimize Packer.optimize()} method.

- * - *

In background side, deducting packing solution, those algorithms are used.

- * - * - * @author Jeongho Nam - */ - class Packer extends samchon.protocol.Entity { - /** - * Candidate wrappers who can contain instances. - */ - protected wrapperArray: WrapperArray; - /** - * Instances trying to pack into the wrapper. - */ - protected instanceArray: InstanceArray; - /** - * Default Constructor. - */ - constructor(); - /** - * Construct from members. - * - * @param wrapperArray Candidate wrappers who can contain instances. - * @param instanceArray Instances to be packed into some wrappers. - */ - constructor(wrapperArray: WrapperArray, instanceArray: InstanceArray); - /** - * @inheritdoc - */ - construct(xml: samchon.library.XML): void; - /** - * Get wrapperArray. - */ - getWrapperArray(): WrapperArray; - /** - * Get instanceArray. - */ - getInstanceArray(): InstanceArray; - /** - *

Deduct - * - */ - optimize(): WrapperArray; - /** - * @brief Initialize sequence list (gene_array). - * - * @details - *

Deducts initial sequence list by such assumption:

- * - *
    - *
  • Cost of larger wrapper is less than smaller one, within framework of price per volume unit.
  • - *
      - *
    • Wrapper Larger: (price: $1,000, volume: 100cm^3 -> price per volume unit: $10 / cm^3)
    • - *
    • Wrapper Smaller: (price: $700, volume: 50cm^3 -> price per volume unit: $14 / cm^3)
    • - *
    • Larger's cost is less than Smaller, within framework of price per volume unit
    • - *
    - *
- * - *

Method {@link initGenes initGenes()} constructs {@link WrapperGroup WrapperGroups} corresponding - * with the {@link wrapperArray} and allocates {@link instanceArray instances} to a {@link WrapperGroup}, - * has the smallest cost between containbles.

- * - *

After executing packing solution by {@link WrapperGroup.optimize WrapperGroup.optimize()}, trying to - * {@link repack re-pack} each {@link WrapperGroup} to another type of {@link Wrapper}, deducts the best - * solution between them. It's the initial sequence list of genetic algorithm.

- * - * @return Initial sequence list. - */ - protected initGenes(): GAWrapperArray; - /** - * Try to repack each wrappers to another type. - * - * @param $wrappers Wrappers to repack. - * @return Re-packed wrappers. - */ - protected repack($wrappers: WrapperArray): WrapperArray; - /** - * @inheritdoc - */ - TAG(): string; - /** - * @inheritdoc - */ - toXML(): samchon.library.XML; - } -} -declare namespace flex { - class TabNavigator extends React.Component { - render(): JSX.Element; - private handle_change(index, event); - } - class NavigatorContent extends React.Component { - render(): JSX.Element; - } - interface TabNavigatorProps extends React.Props { - selectedIndex?: number; - style?: React.CSSProperties; - } - interface NavigatorContentProps extends React.Props { - label: string; - } -} declare namespace boxologic { /** * A box, trying to pack into a {@link Pallet}. @@ -589,7 +475,7 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - class PackerForm extends samchon.protocol.Entity { + class PackerForm extends protocol.Entity { /** * Form of Instances to pack. */ @@ -609,12 +495,12 @@ declare namespace bws.packer { * @param wrapperArray Type of Wrappers to be used. */ constructor(instanceFormArray: InstanceFormArray, wrapperArray: WrapperArray); - construct(xml: samchon.library.XML): void; + construct(xml: library.XML): void; optimize(): WrapperArray; getInstanceFormArray(): InstanceFormArray; getWrapperArray(): WrapperArray; TAG(): string; - toXML(): samchon.library.XML; + toXML(): library.XML; toPacker(): Packer; } /** @@ -622,12 +508,12 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - class InstanceFormArray extends samchon.protocol.EntityArrayCollection { + class InstanceFormArray extends protocol.EntityArrayCollection { /** * Default Constructor. */ constructor(); - createChild(xml: samchon.library.XML): InstanceForm; + createChild(xml: library.XML): InstanceForm; TAG(): string; CHILD_TAG(): string; /** @@ -645,7 +531,7 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - class InstanceForm extends samchon.protocol.Entity { + class InstanceForm extends protocol.Entity { /** * A duplicated Instance. */ @@ -661,7 +547,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - construct(xml: samchon.library.XML): void; + construct(xml: library.XML): void; private createInstance(xml); key(): any; getInstance(): Instance; @@ -679,7 +565,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - toXML(): samchon.library.XML; + toXML(): library.XML; /** *

Repeated {@link instance} to {@link InstanceArray}. * @@ -694,7 +580,7 @@ declare namespace bws.packer { } } declare namespace bws.packer { - class WrapperArray extends samchon.protocol.EntityArrayCollection { + class WrapperArray extends protocol.EntityArrayCollection { /** * Default Constructor. */ @@ -702,7 +588,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - createChild(xml: samchon.library.XML): Wrapper; + createChild(xml: library.XML): Wrapper; /** * Get (calculate) price. */ @@ -756,7 +642,7 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - interface Instance extends samchon.protocol.IEntity { + interface Instance extends protocol.IEntity { /** * Get name. */ @@ -813,7 +699,7 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - class InstanceArray extends samchon.protocol.EntityArray { + class InstanceArray extends protocol.EntityArray { /** * Default Constructor. */ @@ -821,7 +707,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - createChild(xml: samchon.library.XML): Instance; + createChild(xml: library.XML): Instance; /** * @inheritdoc */ @@ -832,13 +718,113 @@ declare namespace bws.packer { CHILD_TAG(): string; } } +declare namespace bws.packer { + /** + * @brief Packer, a solver of 3d bin packing with multiple wrappers. + * + * @details + *

Packer is a facade class supporting packing operations in user side. You can solve a packing problem + * by constructing Packer class with {@link WrapperArray wrappers} and {@link InstanceArray instances} to + * pack and executing {@link optimize Packer.optimize()} method.

+ * + *

In background side, deducting packing solution, those algorithms are used.

+ * + * + * @author Jeongho Nam + */ + class Packer extends protocol.Entity { + /** + * Candidate wrappers who can contain instances. + */ + protected wrapperArray: WrapperArray; + /** + * Instances trying to pack into the wrapper. + */ + protected instanceArray: InstanceArray; + /** + * Default Constructor. + */ + constructor(); + /** + * Construct from members. + * + * @param wrapperArray Candidate wrappers who can contain instances. + * @param instanceArray Instances to be packed into some wrappers. + */ + constructor(wrapperArray: WrapperArray, instanceArray: InstanceArray); + /** + * @inheritdoc + */ + construct(xml: library.XML): void; + /** + * Get wrapperArray. + */ + getWrapperArray(): WrapperArray; + /** + * Get instanceArray. + */ + getInstanceArray(): InstanceArray; + /** + *

Deduct + * + */ + optimize(): WrapperArray; + /** + * @brief Initialize sequence list (gene_array). + * + * @details + *

Deducts initial sequence list by such assumption:

+ * + *
    + *
  • Cost of larger wrapper is less than smaller one, within framework of price per volume unit.
  • + *
      + *
    • Wrapper Larger: (price: $1,000, volume: 100cm^3 -> price per volume unit: $10 / cm^3)
    • + *
    • Wrapper Smaller: (price: $700, volume: 50cm^3 -> price per volume unit: $14 / cm^3)
    • + *
    • Larger's cost is less than Smaller, within framework of price per volume unit
    • + *
    + *
+ * + *

Method {@link initGenes initGenes()} constructs {@link WrapperGroup WrapperGroups} corresponding + * with the {@link wrapperArray} and allocates {@link instanceArray instances} to a {@link WrapperGroup}, + * has the smallest cost between containbles.

+ * + *

After executing packing solution by {@link WrapperGroup.optimize WrapperGroup.optimize()}, trying to + * {@link repack re-pack} each {@link WrapperGroup} to another type of {@link Wrapper}, deducts the best + * solution between them. It's the initial sequence list of genetic algorithm.

+ * + * @return Initial sequence list. + */ + protected initGenes(): GAWrapperArray; + /** + * Try to repack each wrappers to another type. + * + * @param $wrappers Wrappers to repack. + * @return Re-packed wrappers. + */ + protected repack($wrappers: WrapperArray): WrapperArray; + /** + * @inheritdoc + */ + TAG(): string; + /** + * @inheritdoc + */ + toXML(): library.XML; + } +} declare namespace bws.packer { /** * A product. * * @author Jeongho Nam */ - class Product extends samchon.protocol.Entity implements Instance { + class Product extends protocol.Entity implements Instance { /** *

Name, key of the Product.

* @@ -921,7 +907,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - toXML(): samchon.library.XML; + toXML(): library.XML; } } declare namespace bws.packer { @@ -937,7 +923,7 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - class Wrap extends samchon.protocol.Entity { + class Wrap extends protocol.Entity { /** * A wrapper wrapping the {@link instance}. */ @@ -962,10 +948,6 @@ declare namespace bws.packer { * Placement orientation of wrapped {@link instance}. */ protected orientation: number; - /** - * - */ - protected color: number; /** * Construct from a Wrapper. * @@ -996,7 +978,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - construct(xml: samchon.library.XML): void; + construct(xml: library.XML): void; /** * Factory method of wrapped Instance. * @@ -1058,11 +1040,11 @@ declare namespace bws.packer { /** * Get width. */ - getWidth(): number; + getLayoutWidth(): number; /** * Get height. */ - getHeight(): number; + getLayoutHeight(): number; /** * Get length. */ @@ -1071,9 +1053,9 @@ declare namespace bws.packer { * Get volume. */ getVolume(): number; - $instanceName: string; - $layoutScale: string; - $position: string; + readonly $instanceName: string; + readonly $layoutScale: string; + readonly $position: string; /** * @inheritdoc */ @@ -1081,19 +1063,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - toXML(): samchon.library.XML; - /** - * Thickness of boundary lines of a shape represents the {@link instance}. - */ - private static BOUNDARY_THICKNESS; - /** - * - * - * @param geometry - * - * @return A shape and its boundary lines as 3D-objects. - */ - toDisplayObjects(geometry: THREE.Geometry): std.Vector; + toXML(): library.XML; } } declare namespace bws.packer { @@ -1102,7 +1072,7 @@ declare namespace bws.packer { * * @author Jeongho Nam */ - class Wrapper extends samchon.protocol.EntityDeque implements Instance { + class Wrapper extends protocol.EntityDeque implements Instance { /** *

Name, key of the Wrapper.

* @@ -1151,11 +1121,10 @@ declare namespace bws.packer { * @param thickness A thickness causes shrinkness on containable volume. */ constructor(name: string, price: number, width: number, height: number, length: number, thickness: number); - construct(xml: samchon.library.XML): void; /** * @inheritdoc */ - createChild(xml: samchon.library.XML): Wrap; + createChild(xml: library.XML): Wrap; /** * Key of a Wrapper is its name. */ @@ -1232,7 +1201,7 @@ declare namespace bws.packer { * @return utilization ratio. */ getUtilization(): number; - equal_to(obj: Wrapper): boolean; + equals(obj: Wrapper): boolean; /** *

Wrapper is enough greater?

* @@ -1272,8 +1241,8 @@ declare namespace bws.packer { $height: string; $length: string; $thickness: string; - $scale: string; - $spaceUtilization: string; + readonly $scale: string; + readonly $spaceUtilization: string; /** * @inheritdoc */ @@ -1289,25 +1258,7 @@ declare namespace bws.packer { /** * @inheritdoc */ - toXML(): samchon.library.XML; - private static scene; - private static renderer; - private static camera; - private static trackball; - private static mouse; - private static BOUNDARY_THICKNESS; - /** - *

Convert to a canvas containing 3D elements.

- * - * @param endIndex - * - * @return A 3D-canvans printing the Wrapper and its children {@link Wrap wrapped} - * {@link Instance instances} with those boundary lines. - */ - toCanvas(endIndex?: number): HTMLCanvasElement; - private static handleMouseMove(event); - private static animate(); - private static render(); + toXML(): library.XML; } } declare namespace bws.packer { @@ -1430,72 +1381,3 @@ declare namespace bws.packer { TAG(): string; } } -declare namespace bws.packer { - abstract class Editor extends React.Component<{ - dataProvider: samchon.protocol.EntityArrayCollection; - }, {}> { - private columns; - private selected_index; - /** - * Default Constructor. - */ - constructor(); - protected abstract createColumns(): AdazzleReactDataGrid.Column[]; - private get_row(index); - private insert_instance(event); - private erase_instances(event); - private handle_data_change(event); - private handle_row_change(event); - private handle_select(event); - render(): JSX.Element; - } -} -declare namespace bws.packer { - interface ItemEditorProps extends React.Props { - application: PackerApplication; - instances: InstanceFormArray; - wrappers: WrapperArray; - } - class ItemEditor extends React.Component { - private clear(event); - private open(event); - private save(event); - private pack(event); - render(): JSX.Element; - } - class InstanceEditor extends Editor { - protected createColumns(): AdazzleReactDataGrid.Column[]; - } - class WrapperEditor extends Editor { - protected createColumns(): AdazzleReactDataGrid.Column[]; - } -} -declare namespace bws.packer { - class PackerApplication extends React.Component<{}, {}> { - private instances; - private wrappers; - private result; - /** - * Default Constructor. - */ - constructor(); - pack(): void; - drawWrapper(wrapper: Wrapper, index?: number): void; - render(): JSX.Element; - static main(): void; - } -} -declare namespace bws.packer { - class ResultViewer extends React.Component { - drawWrapper(wrapper: Wrapper, index?: number): void; - private clear(event); - private open(event); - private save(event); - refresh(): void; - render(): JSX.Element; - } - interface WrapperViewerProps extends React.Props { - application: PackerApplication; - wrappers: WrapperArray; - } -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 3b48e78746..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please see the [contribution guide](http://definitelytyped.org/guides/contributing.html) at [definitelytyped.org](http://definitelytyped.org/guides/contributing.html) for information on how to contribute to DefinitelyTyped. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md deleted file mode 100644 index 6e2c883f3a..0000000000 --- a/CONTRIBUTORS.md +++ /dev/null @@ -1,1893 +0,0 @@ -# Contributors - -This document generated by [dt-contributors-generator](https://github.com/vvakame/dt-contributors-generator). -(but run scripts are manual operation. please wait :P) -* [:link:](abs/abs.d.ts) [abs](https://github.com/IonicaBizau/node-abs) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](absolute/absolute.d.ts) [absolute](https://github.com/bahamas10/node-absolute) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](acc-wizard/acc-wizard.d.ts) [acc-wizard](https://github.com/sathomas/acc-wizard) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](accounting/accounting.d.ts) [accounting.js](http://josscrowcroft.github.io/accounting.js) by [Sergey Gerasimov](https://github.com/gerich-home) -* [:link:](ace/ace.d.ts) [Ace Ajax.org Cloud9 Editor](http://ace.ajax.org) by [Diullei Gomes](https://github.com/Diullei) -* [:link:](acorn/acorn.d.ts) [Acorn](https://github.com/marijnh/acorn) by [RReverser](https://github.com/RReverser) -* [:link:](rails-actioncable/rails-actioncable.d.ts) [ActionCable](https://github.com/rails/rails/tree/master/actioncable) by [Vincent Zhu](https://github.com/zhu1230) -* [:link:](cordova-plugin-ms-adal/cordova-plugin-ms-adal.d.ts) [Active Directory Authentication Library plugin for Apache Cordova](https://github.com/AzureAD/azure-activedirectory-library-for-cordova) by [Kai Walter](https://github.com/KaiWalter) -* [:link:](adal-angular/adal-angular.d.ts) [ADAL.JS](https://github.com/AzureAD/azure-activedirectory-library-for-js) by [mmaitre314](https://github.com/mmaitre314) -* [:link:](adal-angular/adal.d.ts) [ADAL.JS](https://github.com/AzureAD/azure-activedirectory-library-for-js) by [mmaitre314](https://github.com/mmaitre314) -* [:link:](add2home/add2home.d.ts) [add2home](http://cubiq.org/add-to-home-screen) by [James Wilkins](http://www.codeplex.com/site/users/view/jamesnw) -* [:link:](adm-zip/adm-zip.d.ts) [adm-zip](https://github.com/cthackers/adm-zip) by [John Vilk](https://github.com/jvilk), [Abner Oliveira](https://github.com/abner) -* [:link:](ag-grid/ag-grid.d.ts) [ag-grid](http://www.ag-grid.com) by [Niall Crosby](https://github.com/ceolter) -* [:link:](agenda/agenda.d.ts) [Agenda](https://github.com/rschmukler/agenda) by [Meir Gottlieb](https://github.com/meirgottlieb) -* [:link:](alertify/alertify.d.ts) [alertify](http://fabien-d.github.io/alertify.js) by [John Jeffery](http://github.com/jjeffery) -* [:link:](alt/alt.d.ts) [Alt](https://github.com/goatslacker/alt) by [Michael Shearer](https://github.com/Shearerbeard) -* [:link:](amazon-product-api/amazon-product-api.d.ts) [amazon-product-api](https://github.com/t3chnoboy/amazon-product-api) by [Matti Lehtinen](https://github.com/MattiLehtinen) -* [:link:](amcharts/AmCharts.d.ts) [amCharts](http://www.amcharts.com) by [aleksey-bykov](https://github.com/aleksey-bykov) -* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks) -* [:link:](amplify-deferred/amplify-deferred.d.ts) [AmplifyJs 1.1.0 using JQuery Deferred](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks), [Laurentiu Stamate](https://github.com/laurentiustamate94) -* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim) -* [:link:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies), [Ab Reitsma](https://github.com/abreits) -* [:link:](angular-dialog-service/angular-dialog-service.d.ts) [Angular Dialog Service](https://github.com/m-e-conroy/angular-dialog-service) by [William Comartin](https://github.com/wcomartin) -* [:link:](ng-file-upload/ng-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly) -* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly) -* [:link:](angular-growl-v2/angular-growl-v2.d.ts) [Angular Growl 2 v.0.7.5](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05) -* [:link:](angularjs/angular.d.ts) [Angular JS](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar) -* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya), [Raphael Schweizer](https://github.com/rasch), [Cody Schaaf](https://github.com/codyschaaf) -* [:link:](angularjs/angular-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Anthony Ciccarello](http://github.com/aciccarello) -* [:link:](angularjs/angular-mocks.d.ts) [Angular JS (ngMock, ngMockE2E module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Tony Curtis](http://github.com/daltin) -* [:link:](angularjs/angular-resource.d.ts) [Angular JS (ngResource module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Michael Jess](http://github.com/miffels) -* [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140) -* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar) -* [:link:](angular-ui-router/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib) -* [:link:](angular-ui-scroll/angular-ui-scroll.d.ts) [Angular JS (ui.scroll module)](https://github.com/angular-ui/ui-scroll) by [Mark Nadig](https://github.com/marknadig) -* [:link:](angularjs/angular-component-router.d.ts) [Angular JS 1.5 component router](http://angularjs.org) by [David Reher](http://github.com/davidreher) -* [:link:](angular-meteor/angular-meteor.d.ts) [Angular JS Meteor (angular.meteor module)](https://github.com/Urigo/angular-meteor) by [Peter Grman](https://github.com/pgrm) -* [:link:](angular-locker/angular-locker.d.ts) [Angular Locker](https://github.com/tymondesigns/angular-locker) by [Niko Kovačič](https://github.com/nkovacic) -* [:link:](angular-media-queries/match-media.d.ts) [Angular matchMedia (angular.matchMedia module)](https://github.com/jacopotarantino/angular-match-media) by [Joao Monteiro](https://github.com/jpmnteiro) -* [:link:](angular-material/angular-material.d.ts) [Angular Material (angular.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham) -* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong) -* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano) -* [:link:](angular-toastr/angular-toastr.d.ts) [Angular Toastr](https://github.com/Foxandxss/angular-toastr) by [Niko Kovačič](https://github.com/nkovacic) -* [:link:](angular-toasty/angular-toasty.d.ts) [Angular Toasty](https://github.com/invertase/angular-toasty) by [Dominik Muench](https://github.com/muenchdo) -* [:link:](angular-touchspin/angular-touchspin.d.ts) [Angular Touchspin](https://github.com/nkovacic/angular-touchspin) by [Niko Kovačič](https://github.com/nkovacic) -* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib) -* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted) -* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic), [Ronald Wildenberg](https://github.com/rwwilden) -* [:link:](angular-bootstrap-calendar/angular-bootstrap-calendar.d.ts) [angular-bootstrap-calendar](https://github.com/mattlewis92/angular-bootstrap-calendar) by [Egor Komarov](https://github.com/Odrin) -* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga) -* [:link:](angular-breadcrumb/angular-breadcrumb.d.ts) [angular-breadcrumb](https://github.com/ncuillery/angular-breadcrumb) by [Marc Talary](https://github.com/marctalary) -* [:link:](angular-cookie/angular-cookie.d.ts) [angular-cookie](https://github.com/ivpusic/angular-cookie) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](angular-environment/angular-environment.d.ts) [angular-environment](https://github.com/juanpablob/angular-environment) by [Matt Wheatley](https://github.com/terrawheat) -* [:link:](angular-formly/angular-formly.d.ts) [angular-formly](https://github.com/formly-js/angular-formly) by [Scott Hatcher](https://github.com/scatcher) -* [:link:](angular-gettext/angular-gettext.d.ts) [angular-gettext](https://angular-gettext.rocketeer.be) by [Ákos Lukács](https://github.com/AkosLukacs) -* [:link:](angular-google-analytics/angular-google-analytics.d.ts) [angular-google-analytics](https://github.com/revolunet/angular-google-analytics) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](angular-google-analytics/angular-google-analytics-service.d.ts) [angular-google-analytics](https://github.com/revolunet/angular-google-analytics) by [Matt Wheatley](https://github.com/terrawheat) -* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27), [Stefan Steinhart](https://github.com/reppners) -* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame) -* [:link:](angular-httpi/angular-httpi.d.ts) [angular-httpi](https://github.com/bennadel/httpi) by [Andrew Camilleri](https://github.com/Kukks) -* [:link:](angular-jwt/angular-jwt.d.ts) [angular-jwt](https://github.com/auth0/angular-jwt) by [Reto Rezzonico](https://github.com/rerezz) -* [:link:](angular-load/angular-load.d.ts) [angular-load](https://github.com/urish/angular-load) by [david-gang](https://github.com/david-gang) -* [:link:](angular-loading-bar/angular-loading-bar.d.ts) [angular-loading-bar](https://github.com/chieffancypants/angular-loading-bar) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](angular-local-storage/angular-local-storage.d.ts) [angular-local-storage](https://github.com/grevory/angular-local-storage) by [Ken Fukuyama](https://github.com/kenfdev) -* [:link:](angular-localForage/angular-localForage.d.ts) [angular-localForage](https://github.com/ocombe/angular-localForage) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](angular-modal/angular-modal.d.ts) [angular-modal](https://github.com/btford/angular-modal) by [Paul Lessing](https://github.com/paullessing) -* [:link:](angular-notifications/angular-notifications.d.ts) [angular-notifications](https://github.com/DerekRies/angular-notifications) by [Tomasz Ducin](https://github.com/ducin/DefinitelyTyped) -* [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped) -* [:link:](angular-permission/angular-permission.d.ts) [angular-permission](https://github.com/Narzerus/angular-permission) by [Voislav Mishevski](https://github.com/vmishevski) -* [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann) -* [:link:](angular-signalr-hub/angular-signalr-hub.d.ts) [angular-signalr-hub](https://github.com/JustMaier/angular-signalr-hub) by [Adam Santaniello](https://github.com/AdamSantaniello) -* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal) -* [:link:](angular-storage/angular-storage.d.ts) [angular-storage](https://github.com/auth0/angular-storage) by [Matthew DeKrey](https://github.com/mdekrey) -* [:link:](angular-strap/angular-strap.d.ts) [angular-strap v2.2.x](http://mgcrea.github.io/angular-strap) by [Sam Herrmann](https://github.com/samherrmann) -* [:link:](angular-ui-tree/angular-ui-tree.d.ts) [angular-ui-tree](https://github.com/angular-ui-tree/angular-ui-tree) by [Calvin Fernandez](https://github.com/CalvinFernandez) -* [:link:](angular.throttle/angular.throttle.d.ts) [angular.throttle](https://github.com/BaggersIO/angular.throttle) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](angular-ui-sortable/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi) -* [:link:](angular-agility/angular-agility.d.ts) [AngularAgility](https://github.com/AngularAgility/AngularAgility) by [Roland Zwaga](https://github.com/rolandzwaga) -* [:link:](angularfire/angularfire.d.ts) [AngularFire](http://angularfire.com) by [Dénes Harmath](http://github.com/thSoft) -* [:link:](rx-angular/rx.angular.d.ts) [angularjs extensions to rxjs](http://reactivex.io) by [Mick Delaney](https://github.com/mickdelaney) -* [:link:](angular-fullscreen/angular-fullscreen.d.ts) [AngularJS HTML5 Fullscreen](https://github.com/fabiobiondi/angular-fullscreen) by [Julien Paroche](https://github.com/julienpa) -* [:link:](angularjs-toaster/angularjs-toaster.d.ts) [angularjs-toaster](https://github.com/jirikavi/AngularJS-Toaster) by [Ben Tesser](https://github.com/btesser) -* [:link:](angularLocalStorage/angularLocalStorage.d.ts) [AngularLocalStorage](https://github.com/agrublev/angularLocalStorage) by [Horiuchi_H](https://github.com/horiuchi) -* [:link:](angulartics/angulartics.d.ts) [Angulartics](http://luisfarzati.github.io/angulartics) by [Steven Fan](https://github.com/stevenfan) -* [:link:](animation-frame/animation-frame.d.ts) [animation-frame](https://github.com/kof/animation-frame) by [Qinfeng Chen](https://github.com/qinfchen) -* [:link:](ansi-styles/ansi-styles.d.ts) [ansi-styles](https://github.com/sindresorhus/ansi-styles) by [bryn austin bellomy](https://github.com/brynbellomy) -* [:link:](ansicolors/ansicolors.d.ts) [ansicolors](https://github.com/thlorenz/ansicolors) by [rogierschouten](https://github.com/rogierschouten) -* [:link:](antd/antd.d.ts) [Antd](http://ant.design) by [bang88](https://github.com/bang88), [Bruce Mitchener](https://github.com/waywardmonkeys) -* [:link:](any-db/any-db.d.ts) [any-db](https://github.com/grncdr/node-any-db) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](anydb-sql/anydb-sql.d.ts) [anydb-sql](https://github.com/doxout/anydb-sql) by [Gorgi Kosev](https://github.com/spion) -* [:link:](anydb-sql-migrations/anydb-sql-migrations.d.ts) [anydb-sql-migrations](https://github.com/spion/anydb-sql-migrations) by [Gorgi Kosev](https://github.com/spion) -* [:link:](cordova-plugin-background-mode/cordova-plugin-background-mode.d.ts) [Apache Background Mode plugin](https://github.com/katzer/cordova-plugin-background-mode) by [Paul Thiel](https://github.com/Lordnoname) -* [:link:](cordova/cordova.d.ts) [Apache Cordova](http://cordova.apache.org) by [Microsoft Open Technologies Inc.](http://msopentech.com) -* [:link:](cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts) [Apache Cordova Email Composer plugin](https://github.com/katzer/cordova-plugin-email-composer) by [Dave Taylor](http://davetayls.me) -* [:link:](api-error-handler/api-error-handler.d.ts) [api-error-handler](https://github.com/expressjs/api-error-handler) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago) -* [:link:](appletvjs/appletvjs.d.ts) [AppleTVJS](https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSFrameworkReference/index.html) by [Adam Valverde](https://github.com/brainded) -* [:link:](applicationinsights/applicationinsights.d.ts) [Application Insights](https://github.com/Microsoft/ApplicationInsights-node.js) by [Scott Southwood](https://github.com/scsouthw) -* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16) -* [:link:](arcgis-js-api/arcgis-js-api.d.ts) [ArcGIS API for JavaScript](http://js.arcgis.com) by [Esri](http://www.esri.com) -* [:link:](archiver/archiver.d.ts) [archiver](https://github.com/archiverjs/node-archiver) by [Esri](https://github.com/archiverjs/node-archiver) -* [:link:](archy/archy.d.ts) [archy](https://github.com/substack/node-archy) by [vvakame](https://github.com/vvakame) -* [:link:](argparse/argparse.d.ts) [argparse](https://github.com/nodeca/argparse) by [Andrew Schurman](http://github.com/arcticwaters) -* [:link:](asciify/asciify.d.ts) [asciify](https://www.npmjs.org/package/asciify) by [Alan Norbauer](http://alan.norbauer.com) -* [:link:](aspnet-identity-pw/aspnet-identity-pw.d.ts) [aspnet-identity-pw](https://github.com/Syncbak-Git/aspnet-identity-pw) by [jt000](https://github.com/jt000) -* [:link:](assert/assert.d.ts) [assert and power-assert](https://github.com/Jxck/assert) by [vvakame](https://github.com/vvakame) -* [:link:](assertion-error/assertion-error.d.ts) [assertion-error](https://github.com/chaijs/assertion-error) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](assertsharp/assertsharp.d.ts) [assertsharp](https://www.npmjs.com/package/assertsharp) by [Bruno Leonardo Michels](https://github.com/brunolm) -* [:link:](async/async.d.ts) [Async](https://github.com/caolan/async) by [Boris Yankov](https://github.com/borisyankov), [Arseniy Maximov](https://github.com/kern0), [Joe Herman](https://github.com/Penryn) -* [:link:](async-lock/async-lock.d.ts) [async-lock](https://github.com/rain1017/async-lock) by [Elisée MAURER](https://github.com/elisee) -* [:link:](async-writer/async-writer.d.ts) [async-writer](https://github.com/marko-js/async-writer) by [Yuce Tekol](http://yuce.me) -* [:link:](asyncblock/asyncblock.d.ts) [asyncblock](https://github.com/scriby/asyncblock) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](atmosphere/atmosphere.d.ts) [Atmosphere](https://github.com/Atmosphere/atmosphere-javascript) by [Kai Toedter](https://github.com/toedter) -* [:link:](atom/atom.d.ts) [Atom](https://atom.io) by [vvakame](https://github.com/vvakame) -* [:link:](atom/api-docs.d.ts) [Atom API docs](https://github.com/atom/atom/blob/master/build/tasks/docs-task.coffee) by [vvakame](https://github.com/vvakame) -* [:link:](atom-keymap/atom-keymap.d.ts) [atom-keymap](https://github.com/atom/atom-keymap) by [Vadim Macagon](https://github.com/enlight) -* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](auth0-angular/auth0-angular.d.ts) [auth0-angular](https://github.com/auth0/auth0-angular) by [Matt Emory](https://github.com/homesar) -* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei) -* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei) -* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei) -* [:link:](auto-launch/auto-launch.d.ts) [auto-launch](https://github.com/Teamwork/node-auto-launch) by [rhysd](https://github.com/rhysd) -* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com) -* [:link:](autolinker/autolinker.d.ts) [autolinker](https://github.com/gregjacobs/Autolinker.js) by [Leon Yu](https://github.com/leonyu) -* [:link:](autoprefixer-core/autoprefixer-core.d.ts) [Autoprefixer Core](https://github.com/postcss/autoprefixer-core) by [Asana](https://asana.com) -* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41) -* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing) -* [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](azure-mobile-apps/azure-mobile-apps.d.ts) [azure-mobile-apps](https://github.com/Azure/azure-mobile-apps-node) by [Microsoft Azure](https://github.com/Azure) -* [:link:](azure-sb/azure-sb.d.ts) [azure-sb](https://github.com/Azure/azure-sdk-for-node/tree/master/lib/services/serviceBus) by [Microsoft Azure](https://github.com/Azure) -* [:link:](babylonjs/babylon.d.ts) [BabylonJS](http://www.babylonjs.com) by [David Catuhe](https://github.com/deltakosh) -* [:link:](babyparse/babyparse.d.ts) [babyparse](https://github.com/Rich-Harris/BabyParse) by [Charles Parker](https://github.com/cdiddy77) -* [:link:](backbone/backbone-global.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo) -* [:link:](backbone/backbone.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo) -* [:link:](backbone-associations/backbone-associations.d.ts) [Backbone-associations](https://github.com/dhruvaray/backbone-associations) by [Craig Brett](https://github.com/craigbrett17) -* [:link:](backbone-relational/backbone-relational.d.ts) [Backbone-relational](http://backbonerelational.org) by [Eirik Hoem](https://github.com/eirikhm) -* [:link:](backbone.layoutmanager/backbone.layoutmanager.d.ts) [Backbone.LayoutManager](http://layoutmanager.org) by [He Jiang](https://github.com/hejiang2000) -* [:link:](backbone.localstorage/backbone.localstorage.d.ts) [backbone.localStorage](https://github.com/jeromegn/Backbone.localStorage) by [Louis Grignon](https://github.com/lgrignon) -* [:link:](backbone.paginator/backbone.paginator.d.ts) [backbone.paginator](https://github.com/backbone-paginator/backbone.paginator) by [Nyamazing](https://github.com/Nyamazing) -* [:link:](backbone.radio/backbone.radio.d.ts) [Backbone.Radio](https://github.com/marionettejs/backbone.radio) by [Peter Palotas](https://github.com/alphaleonis) -* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan) -* [:link:](baconjs/baconjs.d.ts) [Bacon.js](https://baconjs.github.io) by [Alexander Matsievsky](https://github.com/alexander-matsievsky) -* [:link:](barcode/barcode.d.ts) [barcode](https://github.com/samt/barcode) by [Pascal Vomhoff](https://github.com/pvomhoff) -* [:link:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC) -* [:link:](base-x/base-x.d.ts) [base-x](https://github.com/cryptocoinjs/base-x) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](basic-auth/basic-auth.d.ts) [basic-auth](https://github.com/jshttp/basic-auth) by [Clément Bourgeois](https://github.com/moonpyk) -* [:link:](batch-stream/batch-stream.d.ts) [batch-stream](https://github.com/segmentio/batch-stream) by [Nicholas Penree](http://github.com/drudge) -* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal) -* [:link:](bcrypt-nodejs/bcrypt-nodejs.d.ts) [bcrypt-nodejs](https://github.com/shaneGirish/bcrypt-nodejs) by [David Broder-Rodgers](https://github.com/DavidBR-SW) -* [:link:](bcryptjs/bcryptjs.d.ts) [bcryptjs](https://github.com/dcodeIO/bcrypt.js) by [Joshua Filby](https://github.com/Joshua-F) -* [:link:](benchmark/benchmark.d.ts) [Benchmark](http://benchmarkjs.com) by [Asana](https://asana.com) -* [:link:](better-curry/better-curry.d.ts) [better-curry](https://github.com/pocesar/js-bettercurry) by [Paulo Cesar](https://github.com/pocesar) -* [:link:](bezier-easing/bezier-easing.d.ts) [bezier-easing](https://github.com/gre/bezier-easing) by [brian ridley](https://github.com/ptlis) -* [:link:](bgiframe/typescript.bgiframe.d.ts) [bgiframe](https://github.com/sumegizoltan/BgiFrame) by [Zoltan Sumegi](https://github.com/sumegizoltan) -* [:link:](big.js/big.js.d.ts) [big.js](https://github.com/MikeMcl/big.js) by [Steve Ognibene](https://github.com/nycdotnet) -* [:link:](bigint/bigint.d.ts) [BigInt](https://github.com/Evgenus/BigInt) by [Eugene Chernyshov](https://github.com/Evgenus) -* [:link:](big-integer/big-integer.d.ts) [BigInteger.js](https://github.com/peterolson/BigInteger.js) by [Ingo Bürk](https://github.com/Airblader), [Roel van Uden](https://github.com/Deathspike) -* [:link:](bignum/bignum.d.ts) [BigNum](https://github.com/justmoon/node-BigNum) by [Pat Smuk](https://github.com/Patman64) -* [:link:](bigscreen/bigscreen.d.ts) [BigScreen](http://brad.is/coding/BigScreen) by [Douglas Eichelberger](https://github.com/dduugg) -* [:link:](bip21/bip21.d.ts) [bip21](https://github.com/bitcoinjs/bip21) by [Stefan Huber](https://github.com/stefanhuber) -* [:link:](bitwise-xor/bitwise-xor.d.ts) [bitwise-xor](https://github.com/czzarr/node-bitwise-xor) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](blazy/blazy.d.ts) [bLazy](https://github.com/dinbror/blazy) by [Julien Paroche](https://github.com/julienpa) -* [:link:](blissfuljs/blissfuljs.d.ts) [bliss](http://blissfuljs.com) by [François Skorzec](https://github.com/fskorzec) -* [:link:](blob-stream/blob-stream.d.ts) [blob-stream](https://github.com/devongovett/blob-stream) by [Eric Hillah](https://github.com/erichillah) -* [:link:](blue-tape/blue-tape.d.ts) [blue-tape](https://github.com/spion/blue-tape) by [Haoqun Jiang](https://github.com/sodatea) -* [:link:](bluebird/bluebird.d.ts) [bluebird](https://github.com/petkaantonov/bluebird) by [Bart van der Schoor](https://github.com/Bartvds), [falsandtru](https://github.com/falsandtru) -* [:link:](bluebird-retry/bluebird-retry.d.ts) [bluebird-retry](https://github.com/jut-io/bluebird-retry) by [Pascal Vomhoff](https://github.com/pvomhoff) -* [:link:](blueimp-md5/blueimp-md5.d.ts) [blueimp-md5](https://github.com/blueimp/JavaScript-MD5) by [Ray Martone](https://github.com/rmartone) -* [:link:](body-parser/body-parser.d.ts) [body-parser](http://expressjs.com) by [Santi Albo](https://github.com/santialbo), [VILIC VANE](https://vilic.info), [Jonathan Häberle](https://github.com/dreampulse) -* [:link:](bookshelf/bookshelf.d.ts) [bookshelfjs](http://bookshelfjs.org) by [Andrew Schurman](http://github.com/arcticwaters) -* [:link:](boolify-string/boolify-string.d.ts) [boolify-string](https://github.com/sanemat/node-boolify-string) by [Tobias Henöckl](http://www.sisyphus.de) -* [:link:](boom/boom.d.ts) [boom](http://github.com/hapijs/boom) by [Igor Rogatty](http://github.com/rogatty) -* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken), [Anup Kattel](https://github.com/kanup), [Dominik Schroeter](https://github.com/icereed), [Troy McKinnon](https://github.com/trodi) -* [:link:](bootstrap/bootstrap.d.ts) [Bootstrap](http://twitter.github.com/bootstrap) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts) [Bootstrap 3 Datepicker](http://eonasdan.github.io/bootstrap-datetimepicker) by [Katona Péter](https://github.com/katonap) -* [:link:](bootstrap-switch/bootstrap-switch.d.ts) [Bootstrap Switch](http://www.bootstrap-switch.org) by [John M. Baughman](https://github.com/johnmbaughman) -* [:link:](bootstrap-touchspin/bootstrap-touchspin.d.ts) [Bootstrap TouchSpin](http://www.virtuosoft.eu/code/bootstrap-touchspin) by [Albin Sunnanbo](https://github.com/albinsunnanbo) -* [:link:](eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker.d.ts) [Bootstrap v3 Datepicker](http://eonasdan.github.io/bootstrap-datetimepicker) by [Markus Peloso](https://github.com/ToastHawaii) -* [:link:](bootstrap-maxlength/bootstrap-maxlength.d.ts) [bootstrap-maxlength](https://github.com/mimo84/bootstrap-maxlength) by [Dan Manastireanu](https://github.com/danmana) -* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](http://bootstrap-notify.remabledesigns.com) by [Blake Niemyjski](https://github.com/niemyjski), [Robert McIntosh](https://github.com/mouse0270), [Robert Voica](https://github.com/robert-voica) -* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith) -* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker) -* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin) -* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker) -* [:link:](bounce/bounce.d.ts) [Bounce.js](http://github.com/tictail/bounce.js) by [Cherry](http://github.com/cherrry) -* [:link:](bowser/bowser.d.ts) [Bowser 1.x](https://github.com/ded/bowser) by [Paulo Cesar](https://github.com/pocesar) -* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze) -* [:link:](brorand/brorand.d.ts) [Brorand](https://github.com/indutny/brorand) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby) -* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com), [Joe Skeen](http://github.com/joeskeen) -* [:link:](browserify/browserify.d.ts) [Browserify](http://browserify.org) by [Andrew Gaspar](https://github.com/AndrewGaspar), [John Vilk](https://github.com/jvilk) -* [:link:](bs58/bs58.d.ts) [bs58](https://github.com/cryptocoinjs/bs58) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](bson/bson.d.ts) [bson](https://github.com/mongodb/js-bson) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](bucks/bucks.d.ts) [bucks.js](https://github.com/CyberAgent/bucks.js) by [Shunsuke Ohtani](https://github.com/zaneli) -* [:link:](buffer-compare/buffer-compare.d.ts) [buffer-compare](https://github.com/soldair/node-buffer-compare) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](buffer-equal/buffer-equal.d.ts) [buffer-equal](https://github.com/substack/node-buffer-equal) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](bl/bl.d.ts) [BufferList](https://github.com/rvagg/bl) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](buffers/buffers.d.ts) [buffers](https://github.com/substack/node-buffers) by [Robert Hencke](https://github.com/rhencke) -* [:link:](bufferstream/bufferstream.d.ts) [bufferstream](https://github.com/dodo/node-bufferstream) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](bugsnag/bugsnag.d.ts) [Bugsnag](https://github.com/bugsnag/bugsnag-js) by [Delisa Mason](https://github.com/kattrali) -* [:link:](bull/bull.d.ts) [bull](https://github.com/OptimalBits/bull) by [Bruno Grieder](https://github.com/bgrieder) -* [:link:](bunyan-prettystream/bunyan-prettystream.d.ts) [bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream) by [Jason Swearingen](https://github.com/jasonswearingen), [Vadim Macagon](https://github.com/enlight) -* [:link:](business-rules-engine/business-rules-engine.d.ts) [business-rules-engine](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec) -* [:link:](dw-bxslider-4/dw-bxslider-4.d.ts) [bxSlider](https://github.com/stevenwanderski/bxslider-4) by [Piotr Sałkowski](https://github.com/namerci) -* [:link:](byline/byline.d.ts) [byline](https://github.com/jahewson/node-byline) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](bytebuffer/bytebuffer.d.ts) [bytebuffer.js](https://github.com/dcodeIO/bytebuffer.js) by [Denis Cappellin](http://github.com/cappellin) -* [:link:](bytes/bytes.d.ts) [bytes](https://github.com/visionmedia/bytes.js) by [Zhiyuan Wang](https://github.com/danny8002) -* [:link:](c3/c3.d.ts) [C3js](http://c3js.org) by [Marc Climent](https://github.com/mcliment) -* [:link:](cal-heatmap/cal-heatmap.d.ts) [cal-heatmap](https://github.com/wa0x6e/cal-heatmap) by [Chris Baker](https://github.com/RetroChrisB) -* [:link:](callsite/callsite.d.ts) [callsite](https://github.com/tj/callsite) by [newclear](https://github.com/newclear) -* [:link:](calq/calq.d.ts) [calq](https://calq.io/docs/client/javascript/reference) by [Eirik Hoem](https://github.com/eirikhm) -* [:link:](camel-case/camel-case.d.ts) [camel-case](https://github.com/blakeembrey/camel-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](camelcase/camelcase.d.ts) [camelcase](https://github.com/sindresorhus/camelcase) by [Sam Verschueren](https://github.com/samverschueren) -* [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com) -* [:link:](camo/camo.d.ts) [camo](https://github.com/scottwrobinson/camo) by [Lucas Matías Ciruzzi](https://github.com/lucasmciruzzi) -* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5) -* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao) -* [:link:](chai/chai.d.ts) [chai](http://chaijs.com) by [Jed Mao](https://github.com/jedmao), [Bart van der Schoor](https://github.com/Bartvds), [Andrew Brown](https://github.com/AGBrown), [Olivier Chevet](https://github.com/olivr70), [Matt Wistrand](https://github.com/mwistrand) -* [:link:](chai-as-promised/chai-as-promised.d.ts) [chai-as-promised](https://github.com/domenic/chai-as-promised) by [jt000](https://github.com/jt000), [Yuki Kokubun](https://github.com/Kuniwak) -* [:link:](chai-datetime/chai-datetime.d.ts) [chai-datetime](https://github.com/gaslight/chai-datetime.git) by [Cliff Burger](https://github.com/cliffburger) -* [:link:](chai-fuzzy/chai-fuzzy.d.ts) [chai-fuzzy](http://chaijs.com/plugins/chai-fuzzy) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](chai-http/chai-http.d.ts) [chai-http](https://github.com/chaijs/chai-http) by [Wim Looman](https://github.com/Nemo157) -* [:link:](chai-jquery/chai-jquery.d.ts) [chai-jquery](https://github.com/chaijs/chai-jquery) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid) -* [:link:](chai-string/chai-string.d.ts) [chai-string](https://github.com/onechiporenko/chai-string) by [Nick Malaguti](https://github.com/nmalaguti) -* [:link:](chai-subset/chai-subset.d.ts) [chai-subset](https://github.com/e-conomic/chai-subset) by [Sam Noedel](https://github.com/delta62), [Andrew Brown](https://github.com/AGBrown) -* [:link:](chai-things/chai-things.d.ts) [chai-things](https://github.com/chaijs/chai-things) by [David Broder-Rodgers](https://github.com/DavidBR-SW) -* [:link:](chalk/chalk.d.ts) [chalk](https://github.com/sindresorhus/chalk) by [Diullei Gomes](https://github.com/Diullei), [Bart van der Schoor](https://github.com/Bartvds), [Nico Jansen](https://github.com/nicojs) -* [:link:](chance/chance.d.ts) [Chance](http://chancejs.com) by [Chris Bowdon](https://github.com/cbowdon) -* [:link:](change-case/change-case.d.ts) [change-case](https://github.com/blakeembrey/change-case) by [Asana](https://asana.com) -* [:link:](chartjs/chart.d.ts) [Chart.js](https://github.com/nnnick/Chart.js) by [Steve Fenton](https://github.com/Steve-Fenton) -* [:link:](chartist/chartist.d.ts) [Chartist](https://github.com/gionkunz/chartist-js) by [Matt Gibbs](https://github.com/mtgibbs) -* [:link:](checksum/checksum.d.ts) [checksum](https://github.com/dshaw/checksum) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](cheerio/cheerio.d.ts) [Cheerio](https://github.com/cheeriojs/cheerio) by [Bret Little](https://github.com/blittle), [VILIC VANE](http://vilic.info), [Wayne Maurer](https://github.com/wmaurer) -* [:link:](chocolatechipjs/chocolatechipjs.d.ts) [chocolatechip](https://github.com/chocolatechipui/ChocolateChipJS) by [Robert Biggs](http://chocolatechip-ui.com) -* [:link:](chokidar/chokidar.d.ts) [chokidar](https://github.com/paulmillr/chokidar) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](chosen/chosen.jquery.d.ts) [Chosen.JQuery](http://harvesthq.github.com/chosen) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](chroma-js/chroma-js.d.ts) [Chroma.js](https://github.com/gka/chroma.js) by [Sebastian Brückner](https://github.com/invliD) -* [:link:](chrome/chrome-cast.d.ts) [Chrome Cast application development](https://developers.google.com/cast) by [Thomas Stig Jacobsen](https://github.com/eXeDK) -* [:link:](chrome/chrome.d.ts) [Chrome extension development](http://developer.chrome.com/extensions) by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10), [couven92](https://github.com/couven92), [RReverser](https://github.com/rreverser) -* [:link:](chrome/chrome-app.d.ts) [Chrome packaged application development](http://developer.chrome.com/apps) by [Adam Lay](https://github.com/AdamLay), [MIZUNE Pine](https://github.com/pine613), [MIZUSHIMA Junki](https://github.com/mzsm), [Ingvar Stepanyan](https://github.com/RReverser) -* [:link:](chui/chui.d.ts) [chui](https://github.com/chocolatechipui/chocolatechip-ui) by [Robert Biggs](http://chocolatechip-ui.com) -* [:link:](circular-json/circular-json.d.ts) [circular-json](https://github.com/WebReflection/circular-json) by [Jonathan Pevarnek](https://github.com/jpevarnek) -* [:link:](ckeditor/ckeditor.d.ts) [CKEditor](http://ckeditor.com) by [Ondrej Sevcik](https://github.com/ondrejsevcik) -* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch), [Adi Dahiya](https://github.com/adidahiya), [Jason Killian](https://github.com/JKillian) -* [:link:](cldr.js/cldr.js-event.d.ts) [Cldr.js](https://github.com/rxaviers/cldrjs) by [Raman But-Husaim](https://github.com/RamanBut-Husaim) -* [:link:](cldr.js/cldr.js-supplemental.d.ts) [Cldr.js](https://github.com/rxaviers/cldrjs) by [Raman But-Husaim](https://github.com/RamanBut-Husaim) -* [:link:](cldr.js/cldr.js.d.ts) [Cldr.js](https://github.com/rxaviers/cldrjs) by [Raman But-Husaim](https://github.com/RamanBut-Husaim), [Grégoire Castre](https://github.com/gcastre) -* [:link:](clean-css/clean-css.d.ts) [clean-css](https://github.com/jakubpawlowicz/clean-css) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](cli/cli.d.ts) [cli](https://www.npmjs.com/package/cli) by [Klaus Reimer](https://github.com/kayahr) -* [:link:](cli-color/cli-color.d.ts) [cli-color](https://github.com/medikoo/cli-color) by [Joel Spadin](https://github.com/ChaosinaCan) -* [:link:](clipboard/clipboard.d.ts) [clipboard.js](https://github.com/zenorocha/clipboard.js) by [Andrei Kurosh](https://github.com/impworks) -* [:link:](clone/clone.d.ts) [clone](https://github.com/pvorb/node-clone) by [Kieran Simpson](https://github.com/kierans/DefinitelyTyped) -* [:link:](closure-compiler/closure-compiler.d.ts) [closure-compiler](https://github.com/tim-smart/node-closure) by [Martin Probst](https://github.com/mprobst) -* [:link:](codemirror/codemirror-showhint.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt), [basarat](https://github.com/basarat) -* [:link:](codemirror/codemirror-matchbrackets.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Sixin Li](https://github.com/sixinli) -* [:link:](codemirror/codemirror-runmode.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Joseph Vaughan](https://github.com/Joev-) -* [:link:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt) -* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik) -* [:link:](coffeeify/coffeeify.d.ts) [coffeeify](https://github.com/jnordberg/coffeeify) by [Qubo](https://github.com/tkQubo) -* [:link:](colorbrewer/colorbrewer.d.ts) [colorbrewer](https://github.com/jeanlauliac/colorbrewer) by [Matt Traynham](https://github.com/mtraynham) -* [:link:](colors/colors.d.ts) [Colors.js 0.6.0-1](https://github.com/Marak/colors.js) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](cometd/cometd.d.ts) [CometD](http://cometd.org) by [Derek Cicerone](https://github.com/derekcicerone) -* [:link:](commander/commander.d.ts) [commanderjs](https://github.com/visionmedia/commander.js) by [Marcelo Dezem](http://github.com/mdezem), [vvakame](http://github.com/vvakame) -* [:link:](commonmark/commonmark.d.ts) [commonmark.js](https://github.com/jgm/commonmark.js) by [Nico Jansen](https://github.com/nicojs) -* [:link:](compare-version/compare-version.d.ts) [compare-version](https://www.npmjs.com/package/compare-version) by [Jonathan Pevarnek](https://github.com/jpevarnek) -* [:link:](complex/complex.d.ts) [Complex](https://github.com/arian/Complex) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](debounce/debounce.d.ts) [compose-function](https://github.com/component/debounce) by [Denis Sokolov](https://github.com/denis-sokolov) -* [:link:](compose-function/compose-function.d.ts) [compose-function](https://github.com/stoeffel/compose-function) by [Denis Sokolov](https://github.com/denis-sokolov) -* [:link:](compression/compression.d.ts) [compression](https://github.com/expressjs/compression) by [Santi Albo](https://github.com/santialbo) -* [:link:](confidence/confidence.d.ts) [Confidence](https://github.com/hapijs/confidence.git) by [Jean-Philippe Pellerin](https://github.com/jppellerin) -* [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](connect/connect.d.ts) [connect](https://github.com/senchalabs/connect) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann) -* [:link:](connect-livereload/connect-livereload.d.ts) [connect-livereload](https://github.com/intesso/connect-livereload) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](connect-modrewrite/connect-modrewrite.d.ts) [connect-modrewrite](https://github.com/tinganho/connect-modrewrite) by [Tingan Ho](https://github.com/tinganho) -* [:link:](connect-mongo/connect-mongo.d.ts) [connect-mongo](https://github.com/kcbanner/connect-mongo) by [Mizuki Yamamoto](https://github.com/Syati) -* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann) -* [:link:](connect-timeout/connect-timeout.d.ts) [connect-timeout](https://github.com/expressjs/timeout) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](console-stamp/console-stamp.d.ts) [console-stamp](https://github.com/starak/node-console-stamp) by [Eric Byers](https://github.com/ericbyers) -* [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Theo Sherry](https://github.com/theosherry) -* [:link:](constant-case/constant-case.d.ts) [constant-case](https://github.com/blakeembrey/constant-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](consul/consul.d.ts) [Consul](https://github.com/silas/node-consul) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](content-type/content-type.d.ts) [content-type](https://github.com/deoxxa/content-type) by [Pine Mizune](https://github.com/pine613) -* [:link:](contentful-resolve-response/contentful-resolve-response.d.ts) [contentful-resolve-response](https://github.com/contentful/contentful-resolve-response) by [Anton Karsten](https://github.com/antonkarsten) -* [:link:](contextjs/contextjs.d.ts) [contextjs](https://github.com/jakiestfu/Context.js) by [Kern Handa](https://github.com/kernhanda) -* [:link:](convert-source-map/convert-source-map.d.ts) [convert-source-map](https://github.com/thlorenz/convert-source-map) by [Andrew Gaspar](https://github.com/AndrewGaspar) -* [:link:](cookie/cookie.d.ts) [cookie](https://github.com/jshttp/cookie) by [Pine Mizune](https://github.com/pine613) -* [:link:](cookies/cookies.d.ts) [cookie-parser](https://github.com/pillarjs/cookies) by [Wang Zishi](https://github.com/WangZishi) -* [:link:](cookie-parser/cookie-parser.d.ts) [cookie-parser](https://github.com/expressjs/cookie-parser) by [Santi Albo](https://github.com/santialbo) -* [:link:](cookie-session/cookie-session.d.ts) [cookie-session](https://github.com/expressjs/cookie-session) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](cookiejs/cookiejs.d.ts) [cookie.js](https://github.com/js-coder/cookie.js) by [Boltmade](https://github.com/Boltmade) -* [:link:](copy-paste/copy-paste.d.ts) [copy-paste](https://github.com/xavi-/node-copy-paste) by [Tobias Kahlert](https://github.com/SrTobi) -* [:link:](cordova-ionic/plugins/keyboard.d.ts) [Cordova Keyboard plugin](https://github.com/driftyco/ionic-plugins-keyboard) by [Hendrik Maus](https://github.com/hendrikmaus) -* [:link:](cordova-plugin-app-version/cordova-plugin-app-version.d.ts) [cordova-plugin-app-version](https://github.com/whiteoctober/cordova-plugin-app-version) by [Markus Wagner](https://github.com/Ritzlgrmft) -* [:link:](cordova-plugin-ibeacon/cordova-plugin-ibeacon.d.ts) [cordova-plugin-ibeacon](https://github.com/petermetz/cordova-plugin-ibeacon) by [Markus Wagner](https://github.com/Ritzlgrmft) -* [:link:](cordova-plugin-mapsforge/cordova-plugin-mapsforge.d.ts) [cordova-plugin-mapsforge](https://github.com/afsuarez/mapsforge-cordova-plugin) by [rafw87](https://github.com/rafw87) -* [:link:](cordova-plugin-ouralabs/cordova-plugin-ouralabs.d.ts) [cordova-plugin-ouralabs](https://github.com/Justin-Credible/cordova-plugin-ouralabs) by [Justin Unterreiner](https://github.com/Justin-Credible) -* [:link:](cordova-plugin-qrscanner/cordova-plugin-qrscanner.d.ts) [cordova-plugin-qrscanner](https://github.com/bitpay/cordova-plugin-qrscanner) by [Jason Dreyzehner](https://github.com/bitjson) -* [:link:](cordova-plugin-spinner/cordova-plugin-spinner.d.ts) [cordova-plugin-spinner](https://github.com/Justin-Credible/cordova-plugin-spinner) by [Justin Unterreiner](https://github.com/Justin-Credible) -* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus) -* [:link:](core-decorators/core-decorators.d.ts) [core-decorators.js](https://github.com/jayphelps/core-decorators.js) by [Qubo](https://github.com/tkqubo) -* [:link:](core-js/core-js.d.ts) [core-js](https://github.com/zloirock/core-js) by [Ron Buckton](http://github.com/rbuckton) -* [:link:](cors/cors.d.ts) [cors](https://github.com/troygoode/node-cors) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin) -* [:link:](couchbase/couchbase.d.ts) [Couchbase Node.js SDK](https://github.com/couchbase/couchnode) by [Marwan Aouida](https://github.com/maouida) -* [:link:](cradle/cradle.d.ts) [cradle](https://github.com/flatiron/cradle) by [Panu Horsmalahti](https://github.com/panuhorsmalahti) -* [:link:](create-error/create-error.d.ts) [create-error.js](https://github.com/tgriesser/create-error) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk) -* [:link:](credential/credential.d.ts) [credential](https://github.com/ericelliott/credential) by [Phú](https://github.com/phuvo) -* [:link:](cron/cron.d.ts) [cron](https://www.npmjs.com/package/cron) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](cropperjs/cropperjs.d.ts) [cropperjs](https://github.com/fengyuanchen/cropperjs) by [Stepan Mikhaylyuk](https://github.com/stepancar) -* [:link:](cross-storage/cross-storage.d.ts) [cross-storage](https://github.com/zendesk/cross-storage) by [Daniel Chao](http://dchao.co) -* [:link:](crossfilter/crossfilter.d.ts) [CrossFilter](https://github.com/square/crossfilter) by [Schmulik Raskin](https://github.com/schmuli) -* [:link:](crossroads/crossroads.d.ts) [Crossroads.js](http://millermedeiros.github.io/crossroads.js) by [Diullei Gomes](https://github.com/diullei) -* [:link:](crypto-js/crypto-js.d.ts) [crypto-js](https://github.com/evanvosberg/crypto-js) by [Michael Zabka](https://github.com/misak113) -* [:link:](cryptojs/cryptojs.d.ts) [CryptoJS](https://code.google.com/p/crypto-js) by [Gia Bảo @ Sân Đình](https://github.com/giabao) -* [:link:](cson/cson.d.ts) [CSON](https://github.com/bevry/cson) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](css/css.d.ts) [css](https://github.com/reworkcss/css) by [Ilya Verbitskiy](https://github.com/ilich) -* [:link:](googlemaps.infobubble/google.maps.infobubble.d.ts) [CSS3 InfoBubble with tabs for Google Maps API V3](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src) by [Johan Nilsson](https://github.com/Dashue) -* [:link:](csurf/csurf.d.ts) [csurf](https://www.npmjs.org/package/csurf) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](csv-stringify/csv-stringify.d.ts) [csv-stringify](https://github.com/wdavidw/node-csv-stringify) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](cucumber/cucumber.d.ts) [cucumber-js](https://github.com/cucumber/cucumber-js) by [Abraão Alves](https://github.com/abraaoalves) -* [:link:](cuid/cuid.d.ts) [cuid](https://github.com/ericelliott/cuid) by [Dave Keen](http://www.keendevelopment.ch) -* [:link:](custom-error-generator/custom-error-generator.d.ts) [custom-error-generator](https://github.com/jproulx/node-custom-error) by [Thierry Miceli](https://github.com/thmiceli) -* [:link:](md5/md5.d.ts) [CybozuLabs.MD5](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) by [MIZUNE Pine](https://github.com/pine613) -* [:link:](d3-dsv/d3-dsv.d.ts) [d3-dsv](https://www.npmjs.com/package/d3-dsv) by [Jason Swearingen](https://jasonswearingen.github.io) -* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov) -* [:link:](d3.cloud.layout/d3.cloud.layout.d.ts) [d3JS cloud layout plugin by Jason Davies](https://github.com/jasondavies/d3-cloud) by [hans windhoff](https://github.com/hansrwindhoff) -* [:link:](dagre/dagre.d.ts) [dagre](https://github.com/cpettitt/dagre) by [Qinfeng Chen](https://github.com/qinfchen) -* [:link:](dagre-d3/dagre-d3.d.ts) [dagre-d3.core.js](https://github.com/cpettitt/dagre-d3) by [Mark Wong Siang Kai](https://github.com/markwongsk) -* [:link:](dat-gui/dat-gui.d.ts) [dat.GUI](https://github.com/dataarts/dat.gui) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](data-driven/data-driven.d.ts) [data-driven.js](https://github.com/fluentsoftware/data-driven) by [Adam Babcock](https://github.com/mrhen) -* [:link:](DataStream.js/DataStream.js.d.ts) [DataStream.js](https://github.com/kig/DataStream.js) by [Tat](https://github.com/tatchx) -* [:link:](date.format.js/date.format.d.ts) [Date Format](http://blog.stevenlevithan.com/archives/date-time-format) by [Rob Stutton](https://github.com/balrob) -* [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery) -* [:link:](dcjs/dc.d.ts) [DCJS](https://github.com/dc-js/dc.js) by [hans windhoff](https://github.com/hansrwindhoff), [matt traynham](https://github.com/mtraynham) -* [:link:](debug/debug.d.ts) [debug](https://github.com/visionmedia/debug) by [Seon-Wook Park](https://github.com/swook), [Gal Talmor](https://github.com/galtalmor) -* [:link:](decamelize/decamelize.d.ts) [decamelize](https://github.com/sindresorhus/decamelize) by [Sam Verschueren](https://github.com/samverschueren) -* [:link:](decimal.js/decimal.js.d.ts) [decimal.js](http://mikemcl.github.io/decimal.js) by [Joseph Rossi](http://github.com/musicist288) -* [:link:](decorum/decorum.d.ts) [Decorum JS](https://github.com/dflor003/decorum) by [Danil Flores](https://github.com/dflor003) -* [:link:](deep-diff/deep-diff.d.ts) [deep-diff](https://github.com/flitbit/diff) by [ZauberNerd](https://github.com/ZauberNerd) -* [:link:](deep-equal/deep-equal.d.ts) [deep-equal](https://github.com/substack/node-deep-equal) by [remojansen](https://github.com/remojansen) -* [:link:](deep-freeze/deep-freeze.d.ts) [deep-freeze](https://github.com/substack/deep-freeze) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](del/del.d.ts) [del](https://github.com/sindresorhus/del) by [Asana](https://asana.com), [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](denodeify/denodeify.d.ts) [denodeify](https://github.com/matthew-andrews/denodeify) by [joaomoreno](https://github.com/joaomoreno) -* [:link:](depd/depd.d.ts) [depd](https://github.com/dougwilson/nodejs-depd) by [Zhiyuan Wang](https://github.com/danny8002) -* [:link:](deployJava/deployJava.d.ts) [deployJava.js](https://www.java.com/js/deployJava.txt) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](detect-indent/detect-indent.d.ts) [detect-indent](https://github.com/sindresorhus/detect-indent) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](devexpress-web/devexpress-web.d.ts) [DevExpress ASP.NET web controls (Classic and MVC)](https://www.devexpress.com/Products/NET/Controls/ASP/MVC) by [Sheron Benedict](https://github.com/INullable) -* [:link:](devextreme/devextreme.d.ts) [DevExtreme](http://js.devexpress.com) by [DevExpress Inc.](http://devexpress.com) -* [:link:](dexie/dexie.d.ts) [Dexie](https://github.com/dfahlander/Dexie.js) by [David Fahlander](http://github.com/dfahlander) -* [:link:](dhtmlxgantt/dhtmlxgantt.d.ts) [dhtmlxGantt](http://dhtmlx.com/docs/products/dhtmlxGantt) by [Maksim Kozhukh](http://github.com/mkozhukh) -* [:link:](dhtmlxscheduler/dhtmlxscheduler.d.ts) [dhtmlxScheduler](http://dhtmlx.com/docs/products/dhtmlxScheduler) by [Maksim Kozhukh](http://github.com/mkozhukh) -* [:link:](di-lite/di-lite.d.ts) [di-lite](https://github.com/NickQiZhu/di.js) by [Timothy Morris](https://github.com/dcrusader) -* [:link:](diff/diff.d.ts) [diff](https://github.com/kpdecker/jsdiff) by [vvakame](https://github.com/vvakame) -* [:link:](diff-match-patch/diff-match-patch.d.ts) [diff-match-patch](https://www.npmjs.com/package/diff-match-patch) by [Asana](https://asana.com) -* [:link:](docCookies/docCookies.d.ts) [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) by [Jon Egerton](https://github.com/jonegerton) -* [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com) -* [:link:](docopt/docopt.d.ts) [Docopt](http://docopt.org) by [Giovanni Bassi](https://github.com/giggio) -* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams), [Brett Gutstein](https://github.com/brettferdosi) -* [:link:](documentdb-server/documentdb-server.d.ts) [DocumentDB server side JavaScript SDK](http://dl.windowsazure.com/documentDB/jsserverdocs) by [François Nguyen](https://github.com/lith-light-g) -* [:link:](dojo/dojo.d.ts) [Dojo](http://dojotoolkit.org) by [Michael Van Sickle](https://github.com/vansimke) -* [:link:](dompurify/dompurify.d.ts) [DOM Purify](https://github.com/cure53/DOMPurify) by [Dave Taylor](http://davetayls.me), [Samira Bazuzi](https://github.com/bazuzi) -* [:link:](dom4/dom4.d.ts) [dom4](https://github.com/WebReflection/dom4) by [Adi Dahiya](https://github.com/adidahiya), [Gilad Gray](https://github.com/giladgray) -* [:link:](domo/domo.d.ts) [Domo](http://domo-js.com) by [Steve Fenton](https://github.com/Steve-Fenton) -* [:link:](domready/domready.d.ts) [domready](https://github.com/ded/domready) by [Christian Holm Nielsen](https://github.com/dotnetnerd) -* [:link:](requirejs-domready/domready.d.ts) [domReady](https://github.com/requirejs/domReady) by [Nobuhiro Nakamura](https://github.com/lefb766) -* [:link:](donna/donna.d.ts) [donna](https://github.com/atom/donna) by [vvakame](https://github.com/vvakame) -* [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter) -* [:link:](dot-case/dot-case.d.ts) [dot-case](https://github.com/blakeembrey/dot-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](dot-prop/dot-prop.d.ts) [dot-prop](https://github.com/sindresorhus/dot-prop) by [Sam Verschueren](https://github.com/samverschueren) -* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros) -* [:link:](dotenv/dotenv.d.ts) [dotenv](https://github.com/motdotla/dotenv) by [Jussi Kinnula](https://github.com/jussikinnula) -* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm) -* [:link:](draft-js/draft-js.d.ts) [draft-js](https://github.com/facebook/draft-js) by [Pavel Evsegneev](https://github.com/Ahineya) -* [:link:](dragula/dragula.d.ts) [dragula](http://bevacqua.github.io/dragula) by [Paul Welter](https://github.com/pwelter34) -* [:link:](hystrixjs/hystrixjs.d.ts) [dragula](https://bitbucket.org/igor_sechyn/hystrixjs) by [Igor Sechyn](https://github.com/igorsechyn) -* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya) -* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments) -* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com), [Vasya Aksyonov](https://github.com/outring), [Simon Huber](https://github.com/renuo) -* [:link:](dsv/dsv.d.ts) [dsv](https://www.npmjs.com/package/dsv) by [Jason Swearingen](https://jasonswearingen.github.io) -* [:link:](dts-bundle/dts-bundle.d.ts) [dts-bundle](https://github.com/TypeStrong/dts-bundle) by [Asana](https://asana.com) -* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire) -* [:link:](dymo-label-framework/dymo-label-framework.d.ts) [DYMO Label Framework](http://www.labelwriter.com/software/dls/sdk/docs/DYMOLabelFrameworkJavaScriptHelp/index.html) by [Thijs Kuipers](https://github.com/thijskuipers) -* [:link:](easeljs/easeljs.d.ts) [EaselJS](http://www.createjs.com/#!/EaselJS) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist) -* [:link:](easy-api-request/easy-api-request.d.ts) [easy-api-request](https://github.com/DeadAlready/easy-api-request) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Niklas Mollenhauer](https://github.com/nikeee) -* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easy-xapi/easy-xapi.d.ts) [easy-xapi](https://github.com/DeadAlready/easy-xapi) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easy-xapi-utils/easy-xapi-utils.d.ts) [easy-xapi-utils](https://github.com/DeadAlready/easy-xapi-utils) by [Karl Düüna](https://github.com/DeadAlready) -* [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin) -* [:link:](egg.js/egg.js.d.ts) [Egg.js](https://github.com/mikeflynn/egg.js) by [Markus Peloso](https://github.com/ToastHawaii) -* [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000) -* [:link:](ejs/ejs.d.ts) [ejs.js](http://ejs.co) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped) -* [:link:](ejson/ejson.d.ts) [ejson](https://www.npmjs.com/package/ejson) by [Shantanu Bhadoria](https://github.com/shantanubhadoria) -* [:link:](elasticsearch/elasticsearch.d.ts) [elasticsearch](https://www.elastic.co) by [Casper Skydt](https://github.com/CasperSkydt/DefinitelyTyped), [Blake Smith](https://github.com/bfsmith/DefinitelyTyped) -* [:link:](jquery.elang/jquery.elang.d.ts) [eLang](https://github.com/sumegizoltan/ELang) by [Zoltan Sumegi](https://github.com/sumegizoltan) -* [:link:](github-electron/github-electron.d.ts) [Electron](http://electron.atom.io) by [jedmao](https://github.com/jedmao), [rhysd](https://rhysd.github.io), [Milan Burda](https://github.com/miniak) -* [:link:](electron-builder/electron-builder.d.ts) [electron-builder](https://github.com/loopline-systems/electron-builder) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](electron-json-storage/electron-json-storage.d.ts) [electron-json-storage](https://github.com/jviotti/electron-json-storage) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](electron-packager/electron-packager.d.ts) [electron-packager](https://github.com/maxogden/electron-packager) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](github-electron/electron-prebuilt.d.ts) [electron-prebuilt](https://github.com/mafintosh/electron-prebuilt) by [rhysd](https://github.com/rhysd) -* [:link:](electron-window-state/electron-window-state.d.ts) [electron-window-state](https://github.com/mawie81/electron-window-state) by [rhysd](https://github.com/rhysd) -* [:link:](element-resize-event/element-resize-event.d.ts) [element-resize-event](https://github.com/KyleAMathews/element-resize-event) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](elm/elm.d.ts) [Elm](http://elm-lang.org) by [Dénes Harmath](https://github.com/thSoft) -* [:link:](email-addresses/email-addresses.d.ts) [email-addresses](https://github.com/jackbowman/email-addresses) by [John Grimsey](https://github.com/johngrimsey) -* [:link:](email-validator/email-validator.d.ts) [email-validator](https://github.com/Sembiance/email-validator) by [Paul Lessing](https://github.com/paullessing) -* [:link:](ember/ember.d.ts) [Ember.js](http://emberjs.com) by [Jed Mao](https://github.com/jedmao) -* [:link:](emissary/emissary.d.ts) [emissary](https://github.com/atom/emissary) by [vvakame](https://github.com/vvakame) -* [:link:](empower/empower.d.ts) [empower](https://github.com/twada/empower) by [vvakame](https://github.com/vvakame) -* [:link:](emscripten/emscripten.d.ts) [Emscripten](http://kripken.github.io/emscripten-site/index.html) by [Kensuke Matsuzaki](https://github.com/zakki) -* [:link:](encoding-japanese/encoding-japanese.d.ts) [encoding-japanese](https://github.com/polygonplanet/encoding.js) by [rhysd](https://rhysd.github.io) -* [:link:](envify/envify.d.ts) [envify](https://github.com/hughsk/envify) by [Qubo](https://github.com/tkQubo) -* [:link:](enzyme/enzyme.d.ts) [Enzyme](https://github.com/airbnb/enzyme) by [Marian Palkus](https://github.com/MarianPalkus), [Cap3](http://www.cap3.de) -* [:link:](epiceditor/epiceditor.d.ts) [EpicEditor](http://epiceditor.com) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](eq.js/eq.js.d.ts) [eq.js](https://github.com/Snugug/eq.js) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo) -* [:link:](error-stack-parser/error-stack-parser.d.ts) [ErrorStackParser](https://github.com/stacktracejs/error-stack-parser) by [Eric Wendelin](https://www.eriwen.com) -* [:link:](es6-collections/es6-collections.d.ts) [es6-collections](https://github.com/WebReflection/es6-collections) by [Ron Buckton](http://github.com/rbuckton) -* [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame) -* [:link:](es6-shim/es6-shim.d.ts) [es6-shim](https://github.com/paulmillr/es6-shim) by [Ron Buckton](http://github.com/rbuckton) -* [:link:](escape-html/escape-html.d.ts) [escape-html](https://github.com/component/escape-html) by [Elisée MAURER](https://github.com/elisee) -* [:link:](escape-latex/escape-latex.d.ts) [escape-latex](https://github.com/dangmai/escape-latex) by [Oliver Schneider](https://github.com/olsio) -* [:link:](escape-string-regexp/escape-string-regexp.d.ts) [escape-string-regexp](https://github.com/sindresorhus/escape-string-regexp) by [kruncher](https://github.com/kruncher) -* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis), [RReverser](https://github.com/RReverser) -* [:link:](estree/flow.d.ts) [ESTree AST extensions for Facebook Flow](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser) -* [:link:](estree/estree.d.ts) [ESTree AST specification](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser) -* [:link:](evaporate/evaporate.d.ts) [EvaporateJS](https://github.com/TTLabs/EvaporateJS) by [Andrew Kuklewicz](https://github.com/kookster), [Chris Rhoden](https://github.com/chrisrhoden) -* [:link:](event-kit/event-kit.d.ts) [event-kit](https://github.com/atom/event-kit) by [Vadim Macagon](https://github.com/enlight) -* [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](event-stream/event-stream.d.ts) [event-stream](https://github.com/dominictarr/event-stream) by [David Gardiner](https://github.com/flcdrg) -* [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto) -* [:link:](eventemitter3/eventemitter3.d.ts) [EventEmitter3](https://github.com/primus/eventemitter3) by [Yuichi Murata](https://github.com/mrk21), [Leon Yu](https://github.com/leonyu) -* [:link:](evernote/evernote.d.ts) [evernote v](https://www.npmjs.com/package/evernote) by [Zachary Collins](https://github.com/corps) -* [:link:](exit/exit.d.ts) [exit](https://github.com/cowboy/node-exit) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](expect/expect.d.ts) [Expect](https://github.com/mjackson/expect) by [Justin Reidy](https://github.com/jmreidy) -* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/Automattic/expect.js) by [Teppei Sato](https://github.com/teppeis) -* [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame) -* [:link:](express-serve-static-core/express-serve-static-core.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](express-brute/express-brute.d.ts) [express-brute](https://github.com/AdamPflug/express-brute) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](express-brute-memcached/express-brute-memcached.d.ts) [express-brute-memcached](https://github.com/AdamPflug/express-brute-memcached) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](express-brute-mongo/express-brute-mongo.d.ts) [express-brute-mongo](https://github.com/auth0/express-brute-mongo) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](express-debug/express-debug.d.ts) [express-debug](https://github.com/devoidfury/express-debug) by [Federico Bond](https://github.com/federicobond) -* [:link:](express-graphql/express-graphql.d.ts) [express-graphql](https://www.npmjs.org/package/express-graphql) by [Isman Usoh](https://github.com/isman-usoh), [Nitin Tutlani](https://github.com/nitintutlani) -* [:link:](express-handlebars/express-handlebars.d.ts) [express-handlebars](https://github.com/ericf/express-handlebars) by [Sam Saint-Pettersen](https://github.com/stpettersens), [Igor Dultsev](https://github.com/yhaskell) -* [:link:](express-jwt/express-jwt.d.ts) [express-jwt](https://www.npmjs.org/package/express-jwt) by [Wonshik Kim](https://github.com/wokim) -* [:link:](express-less/express-less.d.ts) [express-less](https://www.npmjs.com/package/express-less) by [xyb](https://github.com/xieyubo) -* [:link:](express-minify/express-minify.d.ts) [express-minify](https://github.com/SummerWish/express-minify) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule) -* [:link:](express-openapi/express-openapi.d.ts) [express-openapi 0.11.x](https://github.com/kogosoftwarellc/express-openapi) by [TANAKA Koichi](https://github.com/mugeso) -* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000) -* [:link:](express-route-fs/express-route-fs.d.ts) [express-route-fs](https://github.com/kripod/express-route-fs) by [Kristóf Poduszló](https://github.com/kripod) -* [:link:](express-session/express-session.d.ts) [express-session](https://www.npmjs.org/package/express-session) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](express-unless/express-unless.d.ts) [express-unless](https://www.npmjs.org/package/express-unless) by [Wonshik Kim](https://github.com/wokim) -* [:link:](express-useragent/express-useragent.d.ts) [express-useragent](https://www.npmjs.org/package/express-useragent) by [Isman Usoh](https://github.com/isman-usoh) -* [:link:](express-validator/express-validator.d.ts) [express-validator](https://github.com/ctavan/express-validator) by [Nathan Ridley](https://github.com/axefrog), [Jonathan Häberle](http://dreampulse.de) -* [:link:](extend/extend.d.ts) [extend](https://www.npmjs.com/package/extend) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](wiiu/wiiu.d.ts) [Extended Functionality of Wii U Internet Browser](https://www.nintendo.co.jp/wiiu/hardware/internetbrowser/extended_functionality.html) by [MIZUSHIMA Junki](https://github.com/mzsm) -* [:link:](extended-listbox/extended-listbox.d.ts) [extended-listbox 1.1.x](https://github.com/code-chris/extended-listbox) by [Christian Kotzbauer](https://github.com/code-chris) -* [:link:](extjs/ExtJS.d.ts) [ExtJS](http://www.sencha.com/products/extjs) by [Brian Kotek](https://github.com/brian428) -* [:link:](eyes/eyes.d.ts) [eyes](https://github.com/cloudhead/eyes.js) by [bryn austin bellomy](https://github.com/brynbellomy) -* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic), [Joseph Livecchi](https://github.com/joewashear007), [Michael Randolph](https://github.com/mrand01) -* [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl) -* [:link:](fbemitter/fbemitter.d.ts) [Facebook's EventEmitter](https://github.com/facebook/emitter) by [kmxz](https://github.com/kmxz) -* [:link:](faker/faker.d.ts) [faker](http://marak.com/faker.js) by [Bas Pennings](https://github.com/basp), [Yuki Kokubun](https://github.com/Kuniwak) -* [:link:](falcor/falcor-browser.d.ts) [falcor](http://netflix.github.io/falcor) by [Quramy](https://github.com/Quramy) -* [:link:](falcor/falcor.d.ts) [falcor](http://netflix.github.io/falcor) by [Quramy](https://github.com/Quramy) -* [:link:](falcor-express/falcor-express.d.ts) [falcor-express](https://github.com/Netflix/falcor-express) by [Quramy](https://github.com/Quramy) -* [:link:](falcor-http-datasource/falcor-http-datasource.d.ts) [falcor-http-datasource](https://github.com/Netflix/falcor-http-datasource) by [Quramy](https://github.com/Quramy) -* [:link:](falcor-json-graph/falcor-json-graph.d.ts) [falcor-json-graph](https://github.com/Netflix/falcor-json-graph) by [Quramy](https://github.com/Quramy) -* [:link:](falcor-router/falcor-router.d.ts) [falcor-router](https://github.com/Netflix/falcor-router) by [Quramy](https://github.com/Quramy) -* [:link:](famous/famous.d.ts) [Famous Engine](http://famous.org) by [Boris Vasilenko](https://github.com/borisvasilenko) -* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](farbtastic/farbtastic.d.ts) [Farbtastic: jQuery Color Wheel](http://mattfarina.github.io/farbtastic) by [Matt Brooks](https://github.com/EnableSoftware) -* [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](fastclick/fastclick.d.ts) [FastClick](https://github.com/ftlabs/fastclick) by [Shinnosuke Watanabe](https://github.com/shinnn) -* [:link:](favico.js/favico.js.d.ts) [favico.js](http://lab.ejci.net/favico.js) by [Yu Matsushita](https://github.com/drowse314-dev-ymat) -* [:link:](featherlight/featherlight.d.ts) [Featherlight](https://noelboss.github.io/featherlight) by [Kaur Kuut](https://github.com/xStrom) -* [:link:](whatwg-fetch/whatwg-fetch.d.ts) [fetch API](https://github.com/github/fetch) by [Ryan Graham](https://github.com/ryan-codingintrigue) -* [:link:](fhir/fhir.d.ts) [FHIR DSTU2](http://www.hl7.org/fhir/2015Sep/index.html) by [Artifact Health](http://www.artifacthealth.com) -* [:link:](fibers/fibers.d.ts) [fibers](https://github.com/laverdet/node-fibers) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](field/field.d.ts) [field](https://www.npmjs.com/package/field) by [Leo Liang](https://github.com/aleung/DefinitelyTyped) -* [:link:](filewriter/filewriter.d.ts) [File API: Writer](http://www.w3.org/TR/file-writer-api) by [Kon](http://phyzkit.net) -* [:link:](filesystem/filesystem.d.ts) [File System API](http://www.w3.org/TR/file-system-api) by [Kon](http://phyzkit.net) -* [:link:](file-url/file-url.d.ts) [file-url](https://github.com/sindresorhus/file-url) by [MEDIA CHECK s.r.o.](http://www.mediacheck.cz) -* [:link:](FileSaver/FileSaver.d.ts) [FileSaver.js](https://github.com/eligrey/FileSaver.js) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](filesize/filesize.d.ts) [filesize](https://github.com/avoidwork/filesize.js) by [Giedrius Grabauskas](https://github.com/GiedriusGrabauskas) -* [:link:](finalhandler/finalhandler.d.ts) [finalhandler](https://github.com/pillarjs/finalhandler) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](Finch/Finch.d.ts) [Finch](https://github.com/stoodder/finchjs) by [David Sichau](https://github.com/DavidSichau) -* [:link:](findup-sync/findup-sync.d.ts) [findup-sync](https://github.com/cowboy/node-findup-sync) by [Bart van der Schoor](https://github.com/Bartvds), [Nathan Brown](https://github.com/ngbrown) -* [:link:](fingerprintjs/fingerprint.d.ts) [fingerprintjs](https://github.com/Valve/fingerprintjs) by [Shunsuke Ohtani](https://github.com/zaneli) -* [:link:](state-machine/state-machine.d.ts) [Finite State Machine](https://github.com/jakesgordon/javascript-state-machine) by [Boris Yankov](https://github.com/borisyankov), [Maarten Docter](https://github.com/mdocter), [William Sears](https://github.com/MrBigDog2U) -* [:link:](firebase/firebase.d.ts) [Firebase API](https://www.firebase.com/docs/javascript/firebase) by [Vincent Botone](https://github.com/vbortone), [Shin1 Kashimura](https://github.com/in-async), [Sebastien Dubois](https://github.com/dsebastien), [Szymon Stasik](https://github.com/ciekawy) -* [:link:](firebase-client/firebase-client.d.ts) [Firebase Client](https://www.github.com/jpstevens/firebase-client) by [Andrew Breen](https://github.com/fpsscarecrow) -* [:link:](firebase/firebase-simplelogin.d.ts) [Firebase Simple Login](https://www.firebase.com/docs/security/simple-login-overview.html) by [Wilker Lucio](http://github.com/wilkerlucio) -* [:link:](firebase-token-generator/firebase-token-generator.d.ts) [firebase-token-generator](https://github.com/firebase/firebase-token-generator-node) by [Hans Van den Keybus](https://github.com/dotdotcommadot) -* [:link:](first-mate/first-mate.d.ts) [first-mate](https://github.com/atom/first-mate) by [Vadim Macagon](https://github.com/enlight) -* [:link:](fixed-data-table/fixed-data-table.d.ts) [fixed-data-table](https://github.com/facebook/fixed-data-table) by [Petar Paar](https://github.com/pepaar), [Stephen Jelfs](https://github.com/stephenjelfs) -* [:link:](flake-idgen/flake-idgen.d.ts) [flakge-idgen](https://github.com/T-PWK/flake-idgen) by [Yuce Tekol](http://yuce.me) -* [:link:](flat/flat.d.ts) [flat](https://github.com/hughsk/flat) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](flexSlider/flexSlider.d.ts) [FlexSlider 2 jquery plugin](https://github.com/woothemes/FlexSlider) by [Diullei Gomes](https://github.com/diullei) -* [:link:](flickity/flickity.d.ts) [Flickity](http://flickity.metafizzy.co) by [Chris McGrath](https://www.github.com/clmcgrath) -* [:link:](flight/flight.d.ts) [Flight](http://flightjs.github.com/flight) by [Jonathan Hedrén](https://github.com/jonathanhedren) -* [:link:](flightplan/flightplan.d.ts) [flightplan](https://github.com/pstadler/flightplan) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](flipsnap/flipsnap.d.ts) [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) -* [:link:](flot/jquery.flot.d.ts) [Flot](http://www.flotcharts.org) by [Matt Burland](https://github.com/burlandm) -* [:link:](flowjs/flowjs.d.ts) [flowjs](https://github.com/flowjs/flow.js) by [Ryan McNamara](https://github.com/ryan10132) -* [:link:](flux/flux.d.ts) [Flux](http://facebook.github.io/flux) by [Steve Baker](https://github.com/stkb), [Giedrius Grabauskas](https://github.com/QuatroDevOfficial) -* [:link:](flux-standard-action/flux-standard-action.d.ts) [flux-standard-action](https://github.com/acdlite/flux-standard-action) by [Qubo](https://github.com/tkqubo) -* [:link:](fluxxor/fluxxor.d.ts) [Fluxxor](https://github.com/BinaryMuse/fluxxor) by [Yuichi Murata](https://github.com/mrk21) -* [:link:](fontoxml/fontoxml.d.ts) [FontoXML](http://www.fontoxml.com) by [Roland Zwaga](https://github.com/rolandzwaga) -* [:link:](ion.rangeSlider/ion.rangeSlider.d.ts) [for Ion.RangeSlider](https://github.com/IonDen/ion.rangeSlider) by [Sixin Li](https://github.com/sixinli) -* [:link:](jee-jsf/jsf.d.ts) [for the JSF 2.0 Ajax request API](https://docs.oracle.com/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/js-api/symbols/jsf.ajax.html) by [Lars Michaelis and Stephan Zerhusen](https://github.com/ButterFaces/ButterFaces) -* [:link:](forge-di/forge-di.d.ts) [forge-di](https://github.com/nkohari/forge) by [Adam Carr](https://github.com/adamcarr) -* [:link:](form-data/form-data.d.ts) [form-data](https://github.com/felixge/node-form-data) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](format-unicorn/format-unicorn.d.ts) [format-unicorn](https://github.com/tallesl/format-unicorn) by [kruncher](https://github.com/kruncher) -* [:link:](format-unicorn/format-unicorn-safe.d.ts) [format-unicorn](https://github.com/tallesl/format-unicorn) by [kruncher](https://github.com/kruncher) -* [:link:](formidable/formidable.d.ts) [Formidable](https://github.com/felixge/node-formidable) by [Wim Looman](https://github.com/Nemo157) -* [:link:](foundation/foundation.d.ts) [Foundation](http://foundation.zurb.com) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](foundation-sites/foundation-sites.d.ts) [Foundation Sites](http://foundation.zurb.com) by [Sam Vloeberghs](https://github.com/samvloeberghs) -* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros) -* [:link:](freedom/freedom-core-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek) -* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek) -* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek) -* [:link:](freeport/freeport.d.ts) [freeport](https://github.com/daaku/nodejs-freeport) by [Arne Schubert](https://github.com/atd-schubert) -* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](fromjs/fromjs.d.ts) [fromjs](https://github.com/suckgamony/fromjs) by [Glenn Dierckx](https://github.com/glenndierckx) -* [:link:](fromnow/fromnow.d.ts) [fromnow](https://github.com/lukeed/fromNow) by [Martin Bukovics](https://github.com/marinewater) -* [:link:](fs-ext/fs-ext.d.ts) [fs-ext](https://github.com/baudehlo/node-fs-ext) by [Oguzhan Ergin](https://github.com/OguzhanE) -* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41) -* [:link:](fs-extra-promise/fs-extra-promise.d.ts) [fs-extra-promise](https://github.com/overlookmotel/fs-extra-promise) by [midknight41](https://github.com/midknight41), [Jason Swearingen](https://github.com/jasonswearingen) -* [:link:](fs-finder/fs-finder.d.ts) [fs-finder](https://github.com/sakren/node-fs-finder) by [Michael Zabka](https://github.com/misak113) -* [:link:](fs-mock/fs-mock.d.ts) [fs-mock](https://github.com/sakren/node-fs-mock) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](ftdomdelegate/ftdomdelegate.d.ts) [ftdomdelegate](https://github.com/ftlabs/ftdomdelegate) by [Christian Holm Nielsen](https://github.com/dotnetnerd) -* [:link:](ftp/ftp.d.ts) [ftp](https://github.com/mscdex/node-ftp) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](ftpd/ftpd.d.ts) [ftpd](https://github.com/sstur/nodeftpd) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk), [Marcelo Camargo](https://github.com/hasellcamargo) -* [:link:](fullname/fullname.d.ts) [fullname](https://www.npmjs.com/package/fullname) by [Klaus Reimer](https://github.com/kayahr) -* [:link:](fuse/fuse.d.ts) [Fuse.js](https://github.com/krisk/Fuse) by [Greg Smith](https://github.com/smrq) -* [:link:](jquery-galleria/jquery-galleria.d.ts) [galleria.js](https://github.com/aino/galleria) by [Robert Imig](https://github.com/rimig) -* [:link:](gamepad/gamepad.d.ts) [Gamepad API](http://www.w3.org/TR/gamepad) by [Kon](http://phyzkit.net) -* [:link:](gamequery/gamequery.d.ts) [gameQuery](http://gamequeryjs.com) by [David Laubreiter](https://github.com/Laubi) -* [:link:](gandi-livedns/gandi-livedns.d.ts) [Gandi LiveDNS](http://doc.livedns.gandi.net) by [Xavier Stouder](https://github.com/xstoudi) -* [:link:](gently/gently.d.ts) [gently](https://www.npmjs.org/package/gently) by [bonnici](https://github.com/bonnici) -* [:link:](geoip-lite/geoip-lite.d.ts) [GeoIP-lite](https://github.com/bluesmoon/node-geoip) by [Yuce Tekol](http://yuce.me) -* [:link:](geojson/geojson.d.ts) [GeoJSON Format Specification](http://geojson.org) by [Jacob Bruun](https://github.com/cobster) -* [:link:](geometry-dom/geometry-dom.d.ts) [Geometry Format Specification](http://www.w3.org/TR/geometry-1) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](giraffe/giraffe.d.ts) [Giraffe](https://github.com/barc/backbone.giraffe) by [Matt McCray](https://github.com/darthapo) -* [:link:](git-config/git-config.d.ts) [git-config](https://github.com/eugeneware/git-config) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](gl-matrix/gl-matrix.d.ts) [gl-matrix](https://github.com/toji/gl-matrix) by [Tat](https://github.com/tatchx) -* [:link:](gldatepicker/gldatepicker.d.ts) [glDatePicker](http://glad.github.com/glDatePicker) by [Dániel Tar](https://github.com/qcz) -* [:link:](glidejs/glidejs.d.ts) [Glide.js](http://glide.jedrzejchalubek.com) by [Milan Jaros](https://github.com/milanjaros) -* [:link:](glob/glob.d.ts) [Glob](https://github.com/isaacs/node-glob) by [vvakame](https://github.com/vvakame) -* [:link:](glob-expand/glob-expand.d.ts) [glob-expand](https://github.com/anodynos/node-glob-expand) by [vvakame](https://github.com/vvakame) -* [:link:](glob-stream/glob-stream.d.ts) [glob-stream](http://github.com/wearefractal/glob-stream) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](globalize/globalize.d.ts) [Globalize](https://github.com/jquery/globalize) by [Aram Taieb](https://github.com/afromogli) -* [:link:](gm/gm.d.ts) [gm](https://github.com/aheckmann/gm) by [Joel Spadin](https://github.com/ChaosinaCan) -* [:link:](goJS/goJS.d.ts) [GoJS](http://gojs.net) by [Northwoods Software](https://github.com/NorthwoodsSoftware) -* [:link:](google.analytics/ga.d.ts) [Google Analytics (Classic and Universal)](https://developers.google.com/analytics/devguides/collection/gajs) by [Ronnie Haakon Hegelund](http://ronniehegelund.blogspot.dk), [Pat Kujawa](http://patkujawa.com) -* [:link:](gapi/gapi.d.ts) [Google API Client](https://code.google.com/p/google-api-javascript-client) by [Frank M](https://github.com/sgtfrankieboy) -* [:link:](google-apps-script/google-apps-script.content.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.maps.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.mail.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.lock.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.language.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.contacts.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.charts.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.calendar.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.cache.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.base.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.script.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.jdbc.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.gmail.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.forms.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.html.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.xml-service.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.utilities.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.url-fetch.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.ui.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.types.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.spreadsheet.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.sites.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.properties.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.document.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.optimization.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.groups.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google-apps-script/google-apps-script.drive.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) -* [:link:](google.feeds/google.feed.api.d.ts) [Google Feed Apis](https://developers.google.com/feed) by [RodneyJT](https://github.com/RodneyJT) -* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](googlemaps/google.maps.d.ts) [Google Maps JavaScript API](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk), [Chris Wrench](https://github.com/cgwrench) -* [:link:](gapi.pagespeedonline/gapi.pagespeedonline.d.ts) [Google Page Speed Online Api](https://developers.google.com/speed/pagespeed) by [Frank M](https://github.com/sgtfrankieboy) -* [:link:](google.picker/google.picker.d.ts) [Google Picker API](https://developers.google.com/picker) by [grapswiz](https://github.com/grapswiz) -* [:link:](google-drive-realtime-api/google-drive-realtime-api.d.ts) [Google Realtime API](https://developers.google.com/google-apps/realtime) by [Dustin Wehr](http://cs.toronto.edu/~wehr) -* [:link:](recaptcha/recaptcha.d.ts) [Google Recaptcha](https://www.google.com/recaptcha) by [Brent Jenkins](https://github.com/brentj73) -* [:link:](grecaptcha/grecaptcha.d.ts) [Google Recaptcha v2](https://www.google.com/recaptcha) by [Kristof Mattei](http://kristofmattei.be) -* [:link:](gapi.auth2/gapi.auth2.d.ts) [Google Sign-In API](https://developers.google.com/identity/sign-in/web) by [Derek Lawless](https://github.com/flawless2011) -* [:link:](gapi.translate/gapi.translate.d.ts) [Google Translate API](https://developers.google.com/translate) by [Frank M](https://github.com/sgtfrankieboy) -* [:link:](gapi.urlshortener/gapi.urlshortener.d.ts) [Google Url Shortener API](https://developers.google.com/url-shortener) by [Frank M](https://github.com/sgtfrankieboy) -* [:link:](google.visualization/google.visualization.d.ts) [Google Visualisation Apis](https://developers.google.com/chart) by [Dan Ludwig](https://github.com/danludwig) -* [:link:](google-closure-compiler/google-closure-compiler.d.ts) [google-closure-compiler](https://github.com/chadkillingsworth/closure-compiler-npm) by [Evan Martin](http://neugierig.org) -* [:link:](google-maps/google-maps.d.ts) [google-maps](https://www.npmjs.com/package/google-maps) by [Deividas Bakanas](https://github.com/DeividasBakanas), [Giedrius Grabauskas](https://github.com/GiedriusGrabauskas) -* [:link:](gae.channel.api/gae.channel.api.d.ts) [GoogleAppEngine's Channel API](https://developers.google.com/appengine/docs/java/channel/javascript) by [vvakame](https://github.com/vvakame) -* [:link:](graceful-fs/graceful-fs.d.ts) [graceful-fs](https://github.com/cowboy/graceful-fs) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](graham_scan/graham_scan.d.ts) [graham_scan](https://github.com/brian3kb/graham_scan_js) by [Harm Berntsen](https://github.com/hberntsen) -* [:link:](graphene-pk11/graphene-pk11.d.ts) [graphene-pk11](https://github.com/PeculiarVentures/graphene) by [Stepan Miroshin](https://github.com/microshine) -* [:link:](graphviz/graphviz.d.ts) [Graphviz](https://github.com/glejeune/node-graphviz) by [Matt Frantz](https://github.com/mhfrantz) -* [:link:](gravatar/gravatar.d.ts) [gravatar](https://github.com/emerleite/node-gravatar) by [Denis Sokolov](https://github.com/denis-sokolov) -* [:link:](qrcode-generator/qrcode-generator.d.ts) [grcode-generator](https://github.com/kazuhikoarase/qrcode-generator) by [Stefan Huber](https://github.com/stefanhuber) -* [:link:](greasemonkey/greasemonkey.d.ts) [Greasemonkey](http://www.greasespot.net) by [Kota Saito](https://github.com/kotas) -* [:link:](greensock/greensock.d.ts) [GreenSock Animation Platform](http://www.greensock.com/get-started-js) by [Robert S](https://github.com/codebelt) -* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm) -* [:link:](gridstack/gridstack.d.ts) [Gridstack](http://troolee.github.io/gridstack.js) by [Pascal Senn](https://github.com/PascalSenn) -* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat) -* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io) -* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io) -* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io) -* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com) -* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com) -* [:link:](gulp-babel/gulp-babel.d.ts) [gulp-babel](https://github.com/babel/gulp-babel) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](gulp-cached/gulp-cached.d.ts) [gulp-cached](https://github.com/wearefractal/gulp-cached) by [Thomas Corbière](https://github.com/tomc974) -* [:link:](gulp-changed/gulp-changed.d.ts) [gulp-changed](https://github.com/sindresorhus/gulp-changed) by [Thomas Corbière](https://github.com/tomc974) -* [:link:](gulp-cheerio/gulp-cheerio.d.ts) [gulp-cheerio](https://github.com/KenPowers/gulp-cheerio) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-coffeeify/gulp-coffeeify.d.ts) [gulp-coffeeify](https://github.com/nariyu/gulp-coffeeify) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-coffeelint/gulp-coffeelint.d.ts) [gulp-coffeelint](https://github.com/janraasch/gulp-coffeelint) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-debug/gulp-debug.d.ts) [gulp-debug](https://github.com/sindresorhus/gulp-debug) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-dtsm/gulp-dtsm.d.ts) [gulp-dtsm](https://github.com/9joneg/gulp-dtsm) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](gulp-espower/gulp-espower.d.ts) [gulp-espower](https://github.com/power-assert-js/gulp-espower) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-filter/gulp-filter.d.ts) [gulp-filter](https://github.com/sindresorhus/gulp-filter) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-flatten/gulp-flatten.d.ts) [gulp-flatten](https://github.com/armed/gulp-flatten) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](gulp-gh-pages/gulp-gh-pages.d.ts) [gulp-gh-pages](https://github.com/rowoot/gulp-gh-pages) by [Asana](https://asana.com) -* [:link:](gulp-gzip/gulp-gzip.d.ts) [gulp-gzip](https://github.com/jstuckey/gulp-gzip) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-help/gulp-help.d.ts) [gulp-help](https://github.com/chmontgomery/gulp-help) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-html-replace/gulp-html-replace.d.ts) [gulp-html-replace](https://www.npmjs.com/package/gulp-html-replace) by [Peter Juras](https://github.com/peterjuras) -* [:link:](gulp-htmlmin/gulp-htmlmin.d.ts) [gulp-htmlmin](https://github.com/jonschlinkert/gulp-htmlmin) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com), [Joe Skeen](http://github.com/joeskeen) -* [:link:](gulp-inject/gulp-inject.d.ts) [gulp-inject](https://github.com/klei/gulp-inject) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](gulp-install/gulp-install.d.ts) [gulp-install](https://www.npmjs.com/package/gulp-install) by [Peter Juras](https://github.com/peterjuras) -* [:link:](gulp-istanbul/gulp-istanbul.d.ts) [gulp-istanbul](https://github.com/SBoudrias/gulp-istanbul) by [Asana](https://asana.com) -* [:link:](gulp-jade/gulp-jade.d.ts) [gulp-jade](https://github.com/phated/gulp-jade) by [berwyn](https://github.com/berwyn) -* [:link:](gulp-jasmine-browser/gulp-jasmine-browser.d.ts) [gulp-jasmine-browser](https://github.com/jasmine/gulp-jasmine-browser) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-json-editor/gulp-json-editor.d.ts) [gulp-json-editor](https://www.npmjs.com/package/gulp-json-editor) by [Peter Juras](https://github.com/peterjuras) -* [:link:](gulp-jspm/gulp-jspm.d.ts) [gulp-jspm](https://www.npmjs.com/package/gulp-jspm) by [Peter Juras](https://github.com/peterjuras) -* [:link:](gulp-less/gulp-less.d.ts) [gulp-less](https://github.com/plus3network/gulp-less) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](gulp-load-plugins/gulp-load-plugins.d.ts) [gulp-load-plugins](https://github.com/jackfranklin/gulp-load-plugins) by [Joe Skeen](http://github.com/joeskeen) -* [:link:](gulp-minify-css/gulp-minify-css.d.ts) [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](gulp-minify-html/gulp-minify-html.d.ts) [gulp-minify-html](https://github.com/murphydanger/gulp-minify-html) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-mocha/gulp-mocha.d.ts) [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) by [Asana](https://asana.com) -* [:link:](gulp-newer/gulp-newer.d.ts) [gulp-newer](https://github.com/tschaub/gulp-newer) by [Thomas Corbière](https://github.com/tomc974) -* [:link:](gulp-ng-annotate/gulp-ng-annotate.d.ts) [gulp-ng-annotate](https://github.com/Kagami/gulp-ng-annotate) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-nodemon/gulp-nodemon.d.ts) [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) by [Qubo](https://github.com/tkQubo) -* [:link:](gulp-plumber/gulp-plumber.d.ts) [gulp-plumber](https://github.com/floatdrop/gulp-plumber) by [Joe Skeen](http://github.com/joeskeen) -* [:link:](gulp-protractor/gulp-protractor.d.ts) [gulp-protractor](https://github.com/mllrsohn/gulp-protractor) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-remember/gulp-remember.d.ts) [gulp-remember](https://github.com/ahaurw01/gulp-remember) by [Thomas Corbière](https://github.com/tomc974) -* [:link:](gulp-rename/gulp-rename.d.ts) [gulp-rename](https://github.com/hparra/gulp-rename) by [Asana](https://asana.com) -* [:link:](gulp-replace/gulp-replace.d.ts) [gulp-replace](https://github.com/lazd/gulp-replace) by [Asana](https://asana.com) -* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-rev](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-rev-replace/gulp-rev-replace.d.ts) [gulp-rev-replace](https://github.com/jamesknelson/gulp-rev-replace) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-ruby-sass/gulp-ruby-sass.d.ts) [gulp-ruby-sass](https://github.com/sindresorhus/gulp-ruby-sass) by [Agnislav Onufrijchuk](https://github.com/agnislav) -* [:link:](gulp-sass/gulp-sass.d.ts) [gulp-sass](https://github.com/dlmanning/gulp-sass) by [Asana](https://asana.com) -* [:link:](gulp-shell/gulp-shell.d.ts) [gulp-shell](https://github.com/sun-zheng-an/gulp-shell) by [Qubo](https://github.com/tkqubo) -* [:link:](gulp-size/gulp-size.d.ts) [gulp-size](https://github.com/sindresorhus/gulp-size) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-sort/gulp-sort.d.ts) [gulp-sort](https://github.com/pgilad/gulp-sort) by [Joe Skeen](http://github.com/joeskeen) -* [:link:](gulp-sourcemaps/gulp-sourcemaps.d.ts) [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) by [Asana](https://asana.com) -* [:link:](gulp-strip-debug/gulp-strip-debug.d.ts) [gulp-strip-debug](https://www.npmjs.com/package/gulp-strip-debug) by [Peter Juras](https://github.com/peterjuras) -* [:link:](gulp-svg-sprite/gulp-svg-sprite.d.ts) [gulp-svg-sprite](https://github.com/jkphl/gulp-svg-sprite) by [Qubo](https://github.com/tkqubo) -* [:link:](gulp-task-listing/gulp-task-listing.d.ts) [gulp-task-listing](https://github.com/OverZealous/gulp-task-listing) by [Joe Skeen](http://github.com/joeskeen) -* [:link:](gulp-tsd/gulp-tsd.d.ts) [gulp-tsd](https://github.com/moznion/gulp-tsd) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](gulp-tslint/gulp-tslint.d.ts) [gulp-tslint](https://github.com/panuhorsmalahti/gulp-tslint) by [Asana](https://asana.com) -* [:link:](gulp-typedoc/gulp-typedoc.d.ts) [gulp-typedoc](https://github.com/rogierschouten/gulp-typedoc) by [Asana](https://asana.com) -* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com), [Thomas Corbière](https://github.com/tomc974) -* [:link:](gulp-uglify/gulp-uglify.d.ts) [gulp-uglify](https://github.com/terinjokes/gulp-uglify) by [Christopher Haws](https://github.com/ChristopherHaws) -* [:link:](gulp-useref/gulp-useref.d.ts) [gulp-useref](https://github.com/jonkemp/gulp-useref) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](gulp-util/gulp-util.d.ts) [gulp-util v3.0.x](https://github.com/gulpjs/gulp-util) by [jedmao](https://github.com/jedmao) -* [:link:](gulp-watch/gulp-watch.d.ts) [gulp-watch](https://github.com/floatdrop/gulp-watch) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](hammerjs/hammerjs.d.ts) [Hammer.js](http://hammerjs.github.io) by [Philip Bulley](https://github.com/milkisevil), [Han Lin Yap](https://github.com/codler) -* [:link:](handlebars/handlebars.d.ts) [Handlebars](http://handlebarsjs.com) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](handsontable/handsontable.d.ts) [Handsontable](https://handsontable.com) by [Handsoncode sp. z o.o.](http://handsoncode.net) -* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen) -* [:link:](harmony-proxy/harmony-proxy.d.ts) [harmony-proxy](https://www.npmjs.com/package/harmony-proxy) by [Remo Jansen](https://github.com/remojansen) -* [:link:](hasher/hasher.d.ts) [Hasher.js](https://github.com/millermedeiros/hasher) by [flyfishMT](https://github.com/flyfishMT) -* [:link:](hashids/hashids.d.ts) [Hashids.js 1.x](https://github.com/ivanakimov/hashids.node.js) by [Paulo Cesar](https://github.com/pocesar) -* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl), [Vasya Aksyonov](https://github.com/outring) -* [:link:](he/he.d.ts) [he](https://github.com/mathiasbynens/he) by [Simon Edwards](https://github.com/sedwards2009) -* [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo) -* [:link:](heap/heap.d.ts) [heap](https://github.com/qiao/heap.js) by [Ryan McNamara](https://github.com/ryan10132) -* [:link:](heatmap.js/heatmap.d.ts) [heatmap.js](https://github.com/pa7/heatmap.js) by [Yang Guan](https://github.com/lookuptable) -* [:link:](hellojs/hellojs.d.ts) [hello.js](http://adodson.com/hello.js) by [Pavel Zika](https://github.com/PavelPZ) -* [:link:](helmet/helmet.d.ts) [helmet](https://github.com/helmetjs/helmet) by [Cyril Schumacher](https://github.com/cyrilschumacher), [Evan Hahn](https://github.com/EvanHahn) -* [:link:](highcharts/highcharts.d.ts) [Highcharts](http://www.highcharts.com) by [Damiano Gambarotto](http://github.com/damianog), [Dan Lewi Harkestad](http://github.com/baltie) -* [:link:](highcharts-ng/highcharts-ng.d.ts) [highcharts-ng](https://github.com/pablojim/highcharts-ng) by [Scott Hatcher](https://github.com/scatcher) -* [:link:](highland/highland.d.ts) [Highland](http://highlandjs.org) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](highlightjs/highlightjs.d.ts) [highlight.js](https://github.com/isagalaev/highlight.js) by [Niklas Mollenhauer](https://github.com/nikeee), [Jeremy Hull](https://github.com/sourrust) -* [:link:](highcharts/highstock.d.ts) [Highstock](http://www.highcharts.com) by [David Deutsch](http://github.com/DavidKDeutsch) -* [:link:](react-router/history.d.ts) [history](https://github.com/rackt/history) by [Sergey Buturlakin](https://github.com/sergey-buturlakin), [Nathan Brown](https://github.com/ngbrown) -* [:link:](history/history.d.ts) [History.js](https://github.com/browserstate/history.js) by [Boris Yankov](https://github.com/borisyankov), [Gidon Junge](https://github.com/gjunge) -* [:link:](hopscotch/hopscotch.d.ts) [Hopscotch](http://linkedin.github.io/hopscotch) by [Tim Perry](https://github.com/pimterry) -* [:link:](howlerjs/howler.d.ts) [howler.js](https://github.com/goldfire/howler.js) by [Pedro Casaubon](https://github.com/xperiments) -* [:link:](touch-events/touch-events.d.ts) [HTML Touch Events](http://www.w3.org/TR/touch-events) by [Kevin Barabash](https://github.com/kevinb7) -* [:link:](html-entities/html-entities.d.ts) [html-entities](https://www.npmjs.com/package/html-entities) by [Xavier Stouder](https://github.com/xstoudi) -* [:link:](html-to-text/html-to-text.d.ts) [html-to-text](https://github.com/werk85/node-html-to-text) by [Eryk Warren](https://github.com/erykwarren) -* [:link:](html2canvas/html2canvas.d.ts) [html2canvas.js](https://github.com/niklasvh/html2canvas) by [Richard Hepburn](https://github.com/rwhepburn) -* [:link:](html-minifier/html-minifier.d.ts) [HTMLMinifier](https://github.com/kangax/html-minifier) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](htmlparser2/htmlparser2.d.ts) [htmlparser2 v3.7.x](https://github.com/fb55/htmlparser2) by [James Roland Cabresos](https://github.com/staticfunction) -* [:link:](htmltojsx/htmltojsx.d.ts) [htmltojsx](https://www.npmjs.com/package/htmltojsx) by [Basarat Ali Syed](https://github.com/basarat) -* [:link:](http-errors/http-errors.d.ts) [http-errors](https://github.com/jshttp/http-errors) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113) -* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613) -* [:link:](httperr/httperr.d.ts) [httperr](https://github.com/pluma/httperr) by [Troy Gerwien](https://github.com/yortus) -* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac) -* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w) -* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Michael Ledin](https://github.com/mxl) -* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](i18next-browser-languagedetector/i18next-browser-languagedetector.d.ts) [i18next-browser-languagedetector](http://i18next.com) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](i18next-express-middleware/i18next-express-middleware.d.ts) [i18next-express-middleware](http://i18next.com) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](i18next-node-fs-backend/i18next-node-fs-backend.d.ts) [i18next-node-fs-backend](https://github.com/i18next/i18next-node-fs-backend) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](i18next-sprintf-postprocessor/i18next-sprintf-postprocessor.d.ts) [i18next-sprintf-postProcessor](https://github.com/i18next/i18next-sprintf-postProcessor) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](ibm-mobilefirst/ibm-mobilefirst.d.ts) [IBM MobileFirst Platform Foundation](http://www.ibm.com/software/products/en/mobilefirstfoundation) by [Guillermo Ignacio Enriquez Gutierrez](https://github.com/nacho4d) -* [:link:](icepick/icepick.d.ts) [icepick](https://github.com/aearly/icepick) by [Nathan Brown](https://github.com/ngbrown) -* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz) -* [:link:](iconv/iconv.d.ts) [iconv](https://github.com/bnoordhuis/node-iconv) by [delphinus](https://github.com/delphinus35) -* [:link:](image-size/image-size.d.ts) [image-size](https://github.com/image-size/image-size) by [Elisée MAURER](https://github.com/elisee) -* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](imagemagick-native/imagemagick-native.d.ts) [imagemagick-native](https://www.npmjs.org/package/imagemagick-native) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](imagesloaded/imagesloaded.d.ts) [imagesLoaded](https://github.com/desandro/imagesloaded) by [Chris Charabaruk](http://github.com/coldacid) -* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider) -* [:link:](imgur-rest-api/imgur-rest-api.d.ts) [Imgur REST API v3](https://api.imgur.com) by [Luke William Westby](http://github.com/lukewestby) -* [:link:](immutability-helper/immutability-helper.d.ts) [immutability-helper](https://github.com/kolodny/immutability-helper) by [Sean Kelley](https://github.com/seansfkelley) -* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](incremental-dom/incremental-dom.d.ts) [Incremetal DOM](https://github.com/google/incremental-dom) by [Basarat Ali Syed](https://github.com/basarat), [Markus Lanthaler](https://github.com/lanthaler) -* [:link:](inflected/inflected.d.ts) [inflected](https://github.com/martinandert/inflected) by [Daniel Schmidt](https://github.com/dsci) -* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano) -* [:link:](inherits/inherits.d.ts) [inherits](https://github.com/isaacs/inherits) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski) -* [:link:](iniparser/iniparser.d.ts) [iniparser](https://github.com/shockie/node-iniparser) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](inline-css/inline-css.d.ts) [inline-css](https://github.com/jonkemp/inline-css) by [Philip Spain](https://github.com/philipisapain) -* [:link:](inquirer/inquirer.d.ts) [Inquirer.js](https://github.com/SBoudrias/Inquirer.js) by [Qubo](https://github.com/tkQubo) -* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame) -* [:link:](cordova-plugin-insomnia/cordova-plugin-insomnia.d.ts) [Insomnia-PhoneGap-Plugin](https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin) by [Markus Wagner](https://github.com/Ritzlgrmft) -* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya), [Tom Hasner](https://github.com/thasner) -* [:link:](intercomjs/intercom.d.ts) [intercom.js](https://github.com/diy/intercom.js) by [spencerwi](http://github.com/spencerwi) -* [:link:](intro.js/intro.js.d.ts) [intro.js](https://github.com/usablica/intro.js) by [Maxime Fabre](https://github.com/anahkiasen) -* [:link:](invariant/invariant.d.ts) [invariant](https://github.com/zertosh/invariant) by [MichaelBennett](https://github.com/bennett000) -* [:link:](inversify/inversify.d.ts) [inversify](https://github.com/inversify/InversifyJS) by [inversify](https://github.com/inversify) -* [:link:](ionic/ionic.d.ts) [Ionic](http://ionicframework.com) by [Spencer Williams](https://github.com/spencerwi) -* [:link:](cordova-ionic/cordova-ionic.d.ts) [Ionic Cordova plugins](https://github.com/driftyco) by [Hendrik Maus](https://github.com/hendrikmaus) -* [:link:](ioredis/ioredis.d.ts) [ioredis](https://github.com/luin/ioredis) by [York Yao](https://github.com/plantain-00) -* [:link:](irc/irc.d.ts) [irc](https://github.com/martynsmith/node-irc) by [phillips1012](https://github.com/phillips1012) -* [:link:](is-lower-case/is-lower-case.d.ts) [is-lower-case](https://github.com/blakeembrey/is-lower-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](is-my-json-valid/is-my-json-valid.d.ts) [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid) by [kruncher](https://github.com/kruncher) -* [:link:](is-upper-case/is-upper-case.d.ts) [is-upper-case](https://github.com/blakeembrey/is-upper-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](is-url/is-url.d.ts) [is-url](https://github.com/segmentio/is-url) by [Ryota Murohoshi](https://github.com/RyotaMurohoshi) -* [:link:](is_js/is_js.d.ts) [is.js](http://arasatasaygin.github.io/is.js) by [Rodrigo Cabral](https://github.com/cabralRodrigo) -* [:link:](iscroll/iscroll.d.ts) [iScroll](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](iscroll/iscroll-5.d.ts) [iScroll 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](iscroll/iscroll-lite.d.ts) [iScroll Lite](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](iscroll/iscroll-5-lite.d.ts) [iScroll Lite 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](iso8601-localizer/iso8601-localizer.d.ts) [ISO8601-Localizer](https://github.com/avielfedida/ISO8601-Localizer) by [Aviel Fedida](https://github.com/avielfedida) -* [:link:](isomorphic-fetch/isomorphic-fetch.d.ts) [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) by [Todd Lucas](https://github.com/toddlucas) -* [:link:](istanbul/istanbul.d.ts) [Istanbul](https://github.com/gotwarlost/istanbul) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](ix.js/ix.d.ts) [IxJS 1.0.6 / ix.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](ix.js/l2o.d.ts) [IxJS 1.0.6 / l2o.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](jade/jade.d.ts) [jade](https://github.com/jadejs/jade) by [Panu Horsmalahti](https://github.com/panuhorsmalahti) -* [:link:](jake/jake.d.ts) [jake](https://github.com/mde/jake) by [Kon](http://phyzkit.net) -* [:link:](jasmine/jasmine.d.ts) [Jasmine](http://jasmine.github.io) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb), [David Pärsson](https://github.com/davidparsson) -* [:link:](jasmine-data_driven_tests/jasmine-data_driven_tests.d.ts) [Jasmine Data Driven Tests](https://github.com/gburghardt/jasmine-data_driven_tests) by [Anthony MacKinnon](https://github.com/AnthonyMacKinnon) -* [:link:](jasmine-ajax/jasmine-ajax.d.ts) [jasmine-ajax](https://github.com/jasmine/jasmine-ajax) by [Louis Grignon](https://github.com/lgrignon) -* [:link:](jasmine-es6-promise-matchers/jasmine-es6-promise-matchers.d.ts) [jasmine-es6-promise-matchers](https://github.com/bvaughn/jasmine-es6-promise-matchers) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](jasmine-expect/jasmine-expect.d.ts) [jasmine-expect](https://github.com/JamieMason/Jasmine-Matchers) by [UserPixel](https://github.com/UserPixel) -* [:link:](jasmine-fixture/jasmine-fixture.d.ts) [Jasmine-fixture](https://github.com/searls/jasmine-fixture) by [Craig Brett](https://github.com/craigbrett17) -* [:link:](jasmine-jquery/jasmine-jquery.d.ts) [Jasmine-JQuery](https://github.com/velesin/jasmine-jquery) by [Gregor Stamac](https://github.com/gstamac) -* [:link:](jasmine-matchers/jasmine-matchers.d.ts) [jasmine-matchers](https://github.com/uxebu/jasmine-matchers) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](jasmine-node/jasmine-node.d.ts) [jasmine-node](https://github.com/mhevery/jasmine-node) by [Sven Reglitzki](https://github.com/svi3c) -* [:link:](jasmine-promise-matchers/jasmine-promise-matchers.d.ts) [jasmine-promise-matchers](https://github.com/bvaughn/jasmine-promise-matchers) by [Matthew Hill](https://github.com/matthewjh) -* [:link:](java/java.d.ts) [java](https://github.com/joeferner/node-java) by [Jim Lloyd](https://github.com/jimlloyd) -* [:link:](java-applet/java-applet.d.ts) [Java Applet](https://www.java.com) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](hooker/hooker.d.ts) [JavaScript Hooker](https://github.com/cowboy/javascript-hooker) by [Michael Zabka](https://github.com/misak113) -* [:link:](oauth.js/oauth.js.d.ts) [JavaScript software for implementing an OAuth consumer](https://code.google.com/p/oauth) by [NOBUOKA Yu](https://github.com/nobuoka) -* [:link:](javascript-astar/javascript-astar.d.ts) [javascript-astar](https://github.com/bgrins/javascript-astar) by [brian ridley](https://github.com/ptlis) -* [:link:](javascript-bignum/javascript-bignum.d.ts) [javascript-bignum](https://github.com/jtobey/javascript-bignum) by [Nathan Shively-Sanders](https://github.com/sandersn) -* [:link:](jbinary/jbinary.d.ts) [jBinary](https://github.com/jDataView/jBinary) by [Tim Bureck](https://github.com/tbureck) -* [:link:](meteor-jboulhous-dev/meteor-jboulhous-dev.d.ts) [jboulhous:dev](https://github.com/jboulhous/dev) by [Robbie Van Gorkom](https://github.com/vangorra) -* [:link:](jdataview/jdataview.d.ts) [jDataView](https://github.com/jDataView/jDataView) by [Ingvar Stepanyan](https://github.com/RReverser) -* [:link:](jest/jest.d.ts) [Jest](http://facebook.github.io/jest) by [Asana](https://asana.com) -* [:link:](jfp/jfp.d.ts) [JFP](http://cmstead.github.io/JFP) by [Chris Stead](http://www.chrisstead.com) -* [:link:](jjv/jjv.d.ts) [JJV](https://github.com/acornejo/jjv) by [Wim Looman](https://github.com/Nemo157) -* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157) -* [:link:](joData/joData.d.ts) [joData](https://github.com/mccow002/joData) by [Chris Wrench](https://github.com/cgwrench) -* [:link:](johnny-five/johnny-five.d.ts) [johnny-five](https://github.com/rwaldron/johnny-five) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds), [Laurence Dougal Myers](https://github.com/laurence-myers), [Christopher Glantschnig](https://github.com/cglantschnig), [David Broder-Rodgers](https://github.com/DavidBR-SW) -* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout) -* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz) -* [:link:](jquery/jquery.d.ts) [jQuery 1.10.x / 2.0.x](http://jquery.com) by [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Jason Swearingen](https://github.com/jasons-novaleaf), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [James Harrison Fisher](https://github.com/jameshfisher), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Poul Sorensen](https://github.com/s093294), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink) -* [:link:](jquery.blockUI/jquery.blockUI.d.ts) [jQuery BlockUI Plugin](http://malsup.com/jquery/block) by [Jeffrey Lee](http://blog.darkthread.net) -* [:link:](jquery.cleditor/jquery.cleditor.d.ts) [jQuery CLEditor Plugin](http://premiumsoftware.net/CLEditor) by [Jeffery Grajkowski](https://github.com/pushplay) -* [:link:](jquery.colorpicker/jquery.colorpicker.d.ts) [jQuery Colorpicker Plugin](https://github.com/vanderlee/colorpicker) by [Jeffery Grajkowski](https://github.com/pushplay) -* [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo) -* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode), [Ben Lorantfy](https://github.com/BenLorantfy) -* [:link:](jquery-cropbox/jquery-cropbox.d.ts) [jQuery cropbox](https://github.com/acornejo/jquery-cropbox) by [Per Kastman](https://github.com/PerKastman) -* [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny) -* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix) -* [:link:](datatables-buttons/datatables-buttons.d.ts) [JQuery DataTables Buttons extension](http://datatables.net/extensions/buttons) by [Sam Germano](https://github.com/SammyG4Free) -* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon) -* [:link:](jquery.joyride/jquery.joyride.d.ts) [jQuery JoyRide Plugin](https://github.com/zurb/joyride) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](jqgrid/jqgrid.d.ts) [jQuery jqgrid Plugin](https://github.com/tonytomov/jqGrid) by [Lokesh Peta](https://github.com/lokeshpeta) -* [:link:](jquery-knob/jquery-knob.d.ts) [jQuery Knob](http://anthonyterrien.com/knob) by [Iain Buchanan](https://github.com/iain8) -* [:link:](jquery.mmenu/jquery.mmenu.d.ts) [jQuery mmenu](http://mmenu.frebsite.nl) by [John Gouigouix](https://github.com/orchestra-ts/DefinitelyTyped) -* [:link:](jquerymobile/jquerymobile.d.ts) [jQuery Mobile](http://jquerymobile.com) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](jquery-mockjax/jquery-mockjax.d.ts) [jQuery Mockjax](https://github.com/jakerella/jquery-mockjax) by [Laszlo Jakab](https://github.com/laszlojakab), [Vladimir Đokić](https://github.com/vladeck) -* [:link:](jquery.notifyBar/jquery.notifyBar.d.ts) [jQuery Notify Bar](http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar) by [Shunsuke Ohtani](https://github.com/zaneli) -* [:link:](jquery.base64/jquery.base64.d.ts) [jQuery Plugin - base64 codec](https://github.com/yatt/jquery.base64) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki) -* [:link:](jquery.postMessage/jquery.postMessage.d.ts) [jQuery postMessage](http://benalman.com/projects/jquery-postmessage-plugin) by [Junle Li](https://github.com/lijunle) -* [:link:](jquery.prettyphoto/jquery.prettyphoto.d.ts) [jQuery prettyPhoto](https://github.com/scaron/prettyphoto) by [pgaske](https://github.com/pgaske) -* [:link:](jquery.rowGrid/jquery.rowGrid.d.ts) [jQuery rowGrid.js plugin (v1.0.2)](https://github.com/brunjo/rowGrid.js) by [Vinayak Garg](https://github.com/vinayak-garg) -* [:link:](royalslider/royalslider.d.ts) [jQuery royal-slider](http://dimsemenov.com/plugins/royal-slider/documentation) by [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](jquery.simplePagination/jquery.simplePagination.d.ts) [jQuery simplePagination.js](https://github.com/flaviusmatis/simplePagination.js) by [Natan Vivo](https://github.com/nvivo) -* [:link:](jquery-sortable/jquery-sortable.d.ts) [jQuery Sortable](http://johnny.github.io/jquery-sortable) by [Nathan Pitman](https://github.com/Seltzer) -* [:link:](succinct/succinct.d.ts) [jQuery Succinct](http://mikeking.io/succinct) by [Matt Brooks](https://github.com/EnableSoftware) -* [:link:](jquery.tagsmanager/jquery.tagsmanager.d.ts) [jQuery Tags Manager](http://welldonethings.com/tags/manager) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](jquery.tinycarousel/jquery.tinycarousel.d.ts) [jQuery tinycarousel](http://baijs.nl/tinycarousel) by [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](jquery.tinyscrollbar/jquery.tinyscrollbar.d.ts) [jQuery tinyscrollbar](http://baijs.nl/tinyscrollbar) by [Christiaan Rakowski](https://github.com/csrakowski) -* [:link:](jquery.tooltipster/jquery.tooltipster.d.ts) [jQuery Tooltipster](https://github.com/iamceege/tooltipster) by [Patrick Magee](https://github.com/pjmagee) -* [:link:](jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts) [jQuery UI DateTimePicker](http://trentrichardson.com/examples/timepicker) by [dougajmcdonald](https://github.com/dougajmcdonald) -* [:link:](jquery.ui.layout/jquery.ui.layout.d.ts) [jQuery UI Layout Plug-in](http://layout.jquery-dev.net) by [Steve Fenton](https://github.com/Steve-Fenton), [Douglas Armstrong](https://github.com/drarmstr) -* [:link:](jquery.timepicker/jquery.timepicker.d.ts) [jQuery UI Timepicker](http://fgelinas.com/code/timepicker) by [Anwar Javed](https://github.com/anwarjaved) -* [:link:](jquery-ajax-chain/jquery-ajax-chain.d.ts) [jquery-ajax-chain v](https://github.com/humana-fragilitas/jQuery-Ajax-Chain) by [Andrea Blasio](https://github.com/humana-fragilitas) -* [:link:](bootpag/bootpag.d.ts) [jQuery-Bootpag](http://botmonster.com/jquery-bootpag) by [MAF.DAP / Romain Deneau](https://github.com/rdeneau) -* [:link:](jquery-easy-loading/jquery-easy-loading.d.ts) [jquery-easy-loading](http://carlosbonetti.github.io/jquery-loading) by [delphinus](https://github.com/delphinus35) -* [:link:](jquery-fullscreen/jquery-fullscreen.d.ts) [jquery-fullscreen](https://github.com/kayahr/jquery-fullscreen-plugin) by [Bruno Grieder](https://github.com/bgrieder) -* [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca) -* [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com) -* [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle) -* [:link:](jquery-timeentry/jquery-timeentry.d.ts) [jQuery-timeentry.js](https://github.com/kbwood/timeentry) by [Mark Nadig](https://github.com/marknadig) -* [:link:](jquery-urlparam/jquery-urlparam.d.ts) [jquery-urlparam](https://gist.github.com/stpettersens/e1f4478f299b6f4905c1) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](jquery.address/jquery.address.d.ts) [jQuery.Address](https://github.com/asual/jquery-address) by [Martin Duparc](https://github.com/martinduparc), [Tim Klingeleers](https://github.com/mardaneus86) -* [:link:](jquery.ajaxfile/jquery.ajaxFile.d.ts) [jquery.ajaxfile](https://github.com/fpellet/jquery.ajaxFile) by [Florent PELLET](https://github.com/fpellet) -* [:link:](jquery.are-you-sure/jquery.are-you-sure.d.ts) [jquery.are-you-sure.js](https://github.com/codedance/jquery.AreYouSure) by [Jon Egerton](https://github.com/jonegerton) -* [:link:](jquery.autosize/jquery.autosize.d.ts) [jquery.autosize](http://www.jacklmoore.com/autosize) by [Aaron T. King](https://github.com/kingdango) -* [:link:](jquery.bbq/jquery.bbq.d.ts) [jquery.bbq](http://benalman.com/projects/jquery-bbq-plugin) by [Adam R. Smith](https://github.com/sunetos) -* [:link:](jquery.clientSideLogging/jquery.clientSideLogging.d.ts) [jquery.clientSideLogging](https://github.com/remybach/jQuery.clientSideLogging) by [Diullei Gomes](https://github.com/diullei) -* [:link:](jquery.color/jquery.color.d.ts) [jquery.color.js](https://github.com/jquery/jquery-color) by [Derek Cicerone](https://github.com/derekcicerone) -* [:link:](jquery.colorbox/jquery.colorbox.d.ts) [jQuery.Colorbox](http://www.jacklmoore.com/colorbox) by [Gidon Junge](https://github.com/gjunge) -* [:link:](jquery.customSelect/jquery.customSelect.d.ts) [jquery.customSelect.js](http://adam.co/lab/jquery/customselect/) by [adamcoulombe](https://github.com/adamcoulombe) -* [:link:](jquery.cycle/jquery.cycle.d.ts) [jQuery.cycle.js](http://jquery.malsup.com/cycle) by [François Guillot](http://fguillot.developpez.com) -* [:link:](jquery.dropotron/jquery.dropotron.d.ts) [jquery.dropotron](https://github.com/n33/jquery.dropotron) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](dynatable/dynatable.d.ts) [jquery.dynatable](http://www.dynatable.com) by [François Massart](https://github.com/francoismassart) -* [:link:](jquery.dynatree/jquery.dynatree.d.ts) [jquery.dynatree](http://code.google.com/p/dynatree) by [François de Campredon](https://github.com/fdecampredon) -* [:link:](jquery.fancytree/jquery.fancytree.d.ts) [jquery.fancytree](https://github.com/mar10/fancytree) by [Peter Palotas](https://github.com/alphaleonis) -* [:link:](jquery.finger/jquery.finger.d.ts) [jquery.finger.js](http://ngryman.sh/jquery.finger) by [Max Ackley](https://github.com/maxackley) -* [:link:](jquery.form/jquery.form.d.ts) [jQuery.form.js 3.26.0](http://malsup.com/jquery/form) by [François Guillot](http://fguillot.developpez.com) -* [:link:](jquery.fullscreen/jquery.fullscreen.d.ts) [jquery.fullscreen](https://github.com/private-face/jquery.fullscreen) by [Piraveen Kamalathas](https://github.com/piraveen) -* [:link:](jquery.gridster/gridster.d.ts) [jQuery.gridster](https://github.com/jbaldwin/gridster) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](jquery.highlight-bartaz/jquery.highlight-bartaz.d.ts) [jquery.highlight.js](https://github.com/bartaz/sandbox.js/blob/master/jquery.highlight.js) by [Stefan Profanter](https://github.com/Pro) -* [:link:](jquery.jnotify/jquery.jnotify.d.ts) [jQuery.jNotify](http://jnotify.codeplex.com) by [James Curran](https://github.com/jamescurran) -* [:link:](jquery.jsignature/jquery.jsignature.d.ts) [jQuery.jsignature v2](https://github.com/willowsystems/jSignature) by [Patrick Magee](https://github.com/pjmagee) -* [:link:](jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts) [jquery.jsonrpc](https://github.com/Textalk/jquery.jsonrpcclient.js) by [Maksim Karelov](https://github.com/Ty3uK) -* [:link:](jquery.noty/jquery.noty.d.ts) [jQuery.noty](http://needim.github.io/noty) by [Aaron King](https://github.com/kingdango) -* [:link:](jquery.payment/jquery.payment.d.ts) [jQuery.payment](https://github.com/stripe/jquery.payment) by [Eric J. Smith](https://github.com/ejsmith), [John Rutherford](https://github.com/johnrutherford) -* [:link:](jquery.pjax.falsandtru/jquery.pjax.d.ts) [jquery.pjax.ts by falsandtru](https://github.com/falsandtru/jquery.pjax.js) by [新ゝ月 NewNotMoon](http://new.not-moon.net) -* [:link:](jquery.placeholder/jquery.placeholder.d.ts) [jquery.placeholder.js](https://github.com/mathiasbynens/jquery-placeholder) by [Peter Gill](https://github.com/majorsilence), [Neil Culver](https://github.com/EnableSoftware) -* [:link:](jquery.pnotify/jquery.pnotify.d.ts) [jquery.pnotify 2.x](https://github.com/sciactive/pnotify) by [David Sichau](https://github.com/DavidSichau) -* [:link:](jquery.qrcode/jquery.qrcode.d.ts) [jQuery.qrcode](https://github.com/lrsjng/jquery-qrcode) by [Dan Manastireanu](https://github.com/danmana) -* [:link:](raty/raty.d.ts) [jQuery.raty](https://github.com/wbotelhos/raty) by [Matt Wheatley](http://github.com/terrawheat) -* [:link:](jquery.scrollTo/jquery.scrollTo.d.ts) [jQuery.scrollTo.js](https://github.com/flesler/jquery.scrollTo) by [Neil Stalker](https://github.com/nestalk) -* [:link:](form-serializer/form-serializer.d.ts) [jquery.serialize-object](https://github.com/macek/jquery-serialize-object) by [Florian Wagner](https://github.com/flqw) -* [:link:](jquery.simulate/jquery.simulate.d.ts) [jquery.simulate.js](https://github.com/jquery/jquery-simulate) by [Derek Cicerone](https://github.com/derekcicerone) -* [:link:](jquery.slimScroll/jquery.slimScroll.d.ts) [jQuery.slimScroll](https://github.com/rochal/jQuery-slimScroll) by [Chintan Shah](https://github.com/Promact) -* [:link:](jquery.soap/jquery.soap.d.ts) [jQuery.SOAP](https://github.com/doedje/jquery.soap) by [Roland Greim](https://github.com/tigerxy) -* [:link:](jquery.sortElements/jquery.sortElement.d.ts) [jQuery.sortElements](http://james.padolsey.com/javascript/sorting-elements-with-jquery) by [Tim Bureck](https://github.com/tbureck) -* [:link:](jquery.superLink/jquery.superLink.d.ts) [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) by [Blake Niemyjski](https://github.com/niemyjski) -* [:link:](jquery.tile/jquery.tile.d.ts) [jquery.tile.js](https://github.com/urin/jquery.tile.js) by [Shunsuke Ohtani](https://github.com/zaneli) -* [:link:](jquery.timeago/jquery.timeago.d.ts) [jQuery.timeago.js](http://timeago.yarp.com) by [François Guillot](http://fguillot.developpez.com) -* [:link:](jquery.tipsy/jquery.tipsy.d.ts) [jQuery.tipsy](http://onehackoranother.com/projects/jquery/tipsy) by [Brian Dukes](https://github.com/bdukes) -* [:link:](jquery.transit/jquery.transit.d.ts) [jQuery.transit.js](http://ricostacruz.com/jquery.transit) by [MrBigDog2U](https://github.com/MrBigDog2U) -* [:link:](jquery.validation/jquery.validation.d.ts) [jquery.validation](http://jqueryvalidation.org) by [François de Campredon](https://github.com/fdecampredon), [John Reilly](https://github.com/johnnyreilly) -* [:link:](jquery.timer/jquery.timer.d.ts) [jQueryTimer](https://github.com/jchavannes/jquery-timer) by [Joshua Strobl](https://github.com/JoshStrobl) -* [:link:](jquery.total-storage/jquery.total-storage.d.ts) [jQueryTotalStorage](https://github.com/Upstatement/jquery-total-storage) by [Jeremy Brooks](https://github.com/JeremyCBrooks) -* [:link:](jqueryui/jqueryui.d.ts) [jQueryUI](http://jqueryui.com) by [Boris Yankov](https://github.com/borisyankov), [John Reilly](https://github.com/johnnyreilly) -* [:link:](js-beautify/js-beautify.d.ts) [js_beautify](https://github.com/beautify-web/js-beautify) by [Josh Goldberg](https://github.com/JoshuaKGoldberg) -* [:link:](js-clipper/js-clipper.d.ts) [js-clipper](https://github.com/mathisonian/JsClipper) by [Hou Chunlei](https://github.com/omni360) -* [:link:](js-combinatorics/js-combinatorics.d.ts) [js-combinatorics](https://github.com/dankogai/js-combinatorics) by [Vasya Aksyonov](https://github.com/outring) -* [:link:](js-combinatorics/js-combinatorics-global.d.ts) [js-combinatorics (global)](https://github.com/dankogai/js-combinatorics) by [Vasya Aksyonov](https://github.com/outring) -* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb) -* [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid) -* [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](js-md5/md5.d.ts) [js-md5](https://github.com/emn178/js-md5) by [Roland Greim](https://github.com/tigerxy) -* [:link:](js-schema/js-schema.d.ts) [js-schema](https://github.com/molnarg/js-schema) by [Marcin Porebski](https://github.com/marcinporebski) -* [:link:](js-signals/js-signals.d.ts) [JS-Signals](http://millermedeiros.github.io/js-signals) by [Diullei Gomes](https://github.com/diullei) -* [:link:](js-yaml/js-yaml.d.ts) [js-yaml](https://github.com/nodeca/js-yaml) by [Bart van der Schoor](https://github.com/Bartvds), [Sebastian Clausen](https://github.com/sclausen) -* [:link:](blocks/blocks.d.ts) [jsblocks](http://jsblocks.com) by [Krzysztof Śmigiel](https://github.com/ksmigiel) -* [:link:](jsbn/jsbn.d.ts) [jsbn](http://www-cs-students.stanford.edu/%7Etjw/jsbn) by [Eugene Chernyshov](https://github.com/Evgenus) -* [:link:](jscrollpane/jscrollpane.d.ts) [jScrollPane](http://jscrollpane.kelvinluck.com) by [Dániel Tar](https://github.com/qcz) -* [:link:](js-data/js-data.d.ts) [JSData](https://github.com/js-data/js-data) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](js-data-http/js-data-http.d.ts) [JSData Http Adapter](https://github.com/js-data/js-data-http) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](js-data-angular/js-data-angular.d.ts) [JSDataAngular](https://github.com/js-data/js-data-angular) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](jsdeferred/jsdeferred.d.ts) [JSDeferred](https://github.com/cho45/jsdeferred) by [Daisuke Mino](https://github.com/minodisk) -* [:link:](jsdom/jsdom.d.ts) [jsdom](https://github.com/tmpvar/jsdom) by [Asana](https://asana.com) -* [:link:](jsen/jsen.d.ts) [jsen (JSON Sentinel)](https://github.com/bugventure/jsen) by [Vladimir Đokić](https://github.com/vladeck) -* [:link:](jsend/jsend.d.ts) [jsend](https://github.com/Prestaul/jsend) by [Federico Caselli](https://github.com/CaselIT) -* [:link:](jsesc/jsesc.d.ts) [jsesc](https://github.com/mathiasbynens/jsesc) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](jsfl/jsfl.d.ts) [JSFL](https://adobe.com) by [soywiz](https://github.com/soywiz) -* [:link:](jshamcrest/jshamcrest.d.ts) [JsHamcrest](https://github.com/danielfm/jshamcrest) by [David Harkness](https://github.com/dharkness) -* [:link:](hashset/hashset.d.ts) [jshashset](http://www.timdown.co.uk/jshashtable/jshashset.html) by [Sergey Gerasimov](https://github.com/gerich-home) -* [:link:](hashtable/hashtable.d.ts) [jshashtable](http://www.timdown.co.uk/jshashtable) by [Sergey Gerasimov](https://github.com/gerich-home) -* [:link:](jsmockito/jsmockito.d.ts) [JsMockito](http://github.com/chrisleishman/jsmockito) by [Karl Bennett](https://github.com/shiver-me-timbers) -* [:link:](jsnlog/jsnlog.d.ts) [JSNLog](https://github.com/mperdeck/jsnlog.js) by [Mattijs Perdeck](https://github.com/mperdeck) -* [:link:](jsnox/jsnox.d.ts) [JSnoX](https://github.com/af/jsnox) by [Steve Baker](https://github.com/stkb) -* [:link:](json-patch/json-patch.d.ts) [json-patch](https://github.com/bruth/jsonpatch-js) by [vvakame](https://github.com/vvakame) -* [:link:](json-pointer/json-pointer.d.ts) [json-pointer 1.0 l](https://www.npmjs.org/package/json-pointer) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](json-socket/json-socket.d.ts) [json-socket](https://github.com/sebastianseilund/node-json-socket) by [Sven Reglitzki](https://github.com/svi3c) -* [:link:](json-stable-stringify/json-stable-stringify.d.ts) [json-stable-stringify](https://github.com/substack/json-stable-stringify) by [Matt Frantz](https://github.com/mhfrantz) -* [:link:](json5/json5.d.ts) [JSON5](http://json5.org) by [Jason Swearingen](https://jasonswearingen.github.io) -* [:link:](jsoneditoronline/jsoneditoronline.d.ts) [JSONEditorOnline](https://github.com/josdejong/jsoneditoronline) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](jsonpath/jsonpath.d.ts) [jsonpath](https://www.npmjs.org/package/jsonpath) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](JSONStream/JSONStream.d.ts) [JSONStream](http://github.com/dominictarr/JSONStream) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](jsonwebtoken/jsonwebtoken.d.ts) [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) by [Maxime LUCE](https://github.com/SomaticIT), [Daniel Heim](https://github.com/danielheim) -* [:link:](jspdf/jspdf.d.ts) [jsPDF](https://github.com/MrRio/jsPDF) by [Amber Schühmacher](https://github.com/amberjs) -* [:link:](jsplumb/jquery.jsPlumb.d.ts) [jsPlumb 1.3.16 jQuery adapter](http://jsplumb.org) by [Steve Shearn](https://github.com/shearnie) -* [:link:](jsrender/jsrender.d.ts) [JsRender](http://www.jsviews.com/#jsrender) by [Kensuke Matsuzaki](https://github.com/zakki) -* [:link:](jss/jss.d.ts) [jss](https://github.com/Box9/jss) by [Valentin Robert](https://github.com/Ptival) -* [:link:](jssha/jssha.d.ts) [jsSHA](https://github.com/Caligatio/jsSHA) by [David Li](https://github.com/randombk), [Tobias Kahlert](https://github.com/SrTobi) -* [:link:](jstorage/jstorage.d.ts) [jStorage](http://www.jstorage.info) by [Danil Flores](https://github.com/dflor003) -* [:link:](jstree/jstree.d.ts) [jsTree](http://www.jstree.com) by [Adam Pluciński](https://github.com/adaskothebeast) -* [:link:](jsts/jsts.d.ts) [jsts](https://github.com/bjornharrtell/jsts) by [Stephane Alie](https://github.com/StephaneAlie) -* [:link:](jsuri/jsuri.d.ts) [jsUri](https://github.com/derek-watson/jsUri) by [Chris Charabaruk](http://github.com/coldacid), [Florian Wagner](http://github.com/flqw) -* [:link:](jsurl/jsurl.d.ts) [jsurl](https://github.com/Mikhus/jsurl) by [Alexey Gorshkov](https://github.com/agorshkov23) -* [:link:](jsx-chai/jsx-chai.d.ts) [jsx-chai](https://github.com/bkonkle/jsx-chai) by [Philipp Holzer](https://github.com/nupplaphil) -* [:link:](jszip/jszip.d.ts) [JSZip](http://stuk.github.com/jszip) by [mzeiher](https://github.com/mzeiher) -* [:link:](jug/jug.d.ts) [jug](https://github.com/kaiquewdev/Graph) by [yevt](https://github.com/yevt) -* [:link:](jwplayer/jwplayer.d.ts) [JW Player](http://developer.longtailvideo.com/trac) by [Martin Duparc](https://github.com/martinduparc) -* [:link:](jwt-decode/jwt-decode.d.ts) [jwt-decode](https://github.com/auth0/jwt-decode) by [Giedrius Grabauskas](https://github.com/QuatroDevOfficial) -* [:link:](jwt-simple/jwt-simple.d.ts) [jwt-simple](https://github.com/hokaccha/node-jwt-simple) by [Ken Fukuyama](https://github.com/kenfdev) -* [:link:](kafka-node/kafka-node.d.ts) [kafka-node](https://github.com/SOHU-Co/kafka-node) by [Daniel Imrie-Situnayake](https://github.com/dansitu) -* [:link:](karma/karma.d.ts) [karma](https://github.com/karma-runner/karma) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](karma-coverage/karma-coverage.d.ts) [karma-coverage](https://github.com/karma-runner/karma-coverage) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](karma-jasmine/karma-jasmine.d.ts) [karma-jasmine plugin](https://github.com/karma-runner/karma-jasmine) by [Michel Salib](https://github.com/michelsalib) -* [:link:](katex/katex.d.ts) [KaTeX v.0.5.0](http://khan.github.io/KaTeX) by [Michael Randolph](https://github.com/mrand01) -* [:link:](kefir/kefir.d.ts) [Kefir](http://rpominov.github.io/kefir) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](kendo-ui/kendo-ui.d.ts) [Kendo UI Professional](http://www.telerik.com/kendo-ui) by [Telerik](https://github.com/telerik) -* [:link:](keyboardjs/keyboardjs.d.ts) [KeyboardJS](https://github.com/RobertWHurst/KeyboardJS) by [Vincent Bortone](https://github.com/vbortone), [David Asmuth](https://github.com/piranha771) -* [:link:](keymaster/keymaster.d.ts) [keymaster](https://github.com/madrobby/keymaster) by [Martin W. Kirst](https://github.com/nitram509) -* [:link:](keypress/keypress.d.ts) [Keypress](https://github.com/dmauro/Keypress) by [Roger Chen](https://github.com/rcchen) -* [:link:](keytar/keytar.d.ts) [keytar](http://atom.github.io/node-keytar) by [Milan Burda](https://github.com/miniak) -* [:link:](kii-cloud-sdk/kii-cloud-sdk.d.ts) [Kii Cloud SDK](http://en.kii.com) by [Kii Consortium](http://jp.kii.com/consortium) -* [:link:](kineticjs/kineticjs.d.ts) [KineticJS](http://kineticjs.com) by [Basarat Ali Syed](http://www.github.com/basarat), [Ralph de Ruijter](http://www.superdopey.nl/techblog) -* [:link:](knex/knex.d.ts) [Knex.js](https://github.com/tgriesser/knex) by [Qubo](https://github.com/tkQubo) -* [:link:](knockback/knockback.d.ts) [Knockback.js](http://kmalakoff.github.io/knockback) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](knockout/knockout.d.ts) [Knockout](http://knockoutjs.com) by [Boris Yankov](https://github.com/borisyankov), [Igor Oleinikov](https://github.com/Igorbek), [Clément Bourgeois](https://github.com/moonpyk) -* [:link:](knockout.deferred.updates/knockout.deferred.updates.d.ts) [Knockout Deferred Updates](https://github.com/mbest/knockout-deferred-updates) by [Sebastián Galiano](https://github.com/sgaliano) -* [:link:](knockout/tests/jasmine.extensions.d.ts) [Knockout specs](http://knockoutjs.com) by [Boris Yankov](https://github.com/borisyankov), [Igor Oleinikov](https://github.com/Igorbek), [Clément Bourgeois](https://github.com/moonpyk) -* [:link:](knockout.validation/knockout.validation.d.ts) [Knockout Validation](https://github.com/ericmbarnard/Knockout-Validation) by [Dan Ludwig](https://github.com/danludwig) -* [:link:](knockout.viewmodel/knockout.viewmodel.d.ts) [Knockout Viewmodel](http://coderenaissance.github.com/knockout.viewmodel) by [Oisin Grehan](https://github.com/oising) -* [:link:](knockout.amd.helpers/knockout-amd-helpers.d.ts) [knockout-amd-helpers](https://github.com/rniemeyer/knockout-amd-helpers) by [David Sichau](https://github.com/DavidSichau) -* [:link:](knockout.editables/ko.editables.d.ts) [knockout-editables](http://romanych.github.com/ko.editables) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](knockout.es5/knockout.es5.d.ts) [Knockout-ES5](https://github.com/SteveSanderson/knockout-es5) by [Sebastián Galiano](https://github.com/sgaliano) -* [:link:](knockout-paging/knockout-paging.d.ts) [knockout-paging](https://github.com/ErikSchierboom/knockout-paging) by [Erik Schierboom](https://github.com/ErikSchierboom) -* [:link:](knockout.postbox/knockout-postbox.d.ts) [knockout-postbox](https://github.com/rniemeyer/knockout-postbox) by [Judah Gabriel Himango](https://debuggerdotbreak.wordpress.com) -* [:link:](knockout-pre-rendered/knockout-pre-rendered.d.ts) [knockout-pre-rendered](https://github.com/ErikSchierboom/knockout-pre-rendered) by [Erik Schierboom](https://github.com/ErikSchierboom) -* [:link:](knockout.projections/knockout.projections.d.ts) [knockout-projections](https://github.com/stevesanderson/knockout-projections) by [John Reilly](https://github.com/johnnyreilly) -* [:link:](knockout-secure-binding/knockout-secure-binding.d.ts) [knockout-secure-binding](https://github.com/brianmhunt/knockout-secure-binding) by [Pine Mizune](https://github.com/pine613) -* [:link:](knockout-transformations/knockout-transformations.d.ts) [knockout-transformations](https://github.com/One-com/knockout-transformations) by [John Reilly](https://github.com/johnnyreilly), [Wim Looman](https://github.com/Nemo157) -* [:link:](knockout.mapper/knockout.mapper.d.ts) [Knockout.Mapper](https://github.com/LucasLorentz/knockout.mapper) by [Brandon Meyer](https://github.com/BMeyerKC) -* [:link:](knockout.mapping/knockout.mapping.d.ts) [Knockout.Mapping](https://github.com/SteveSanderson/knockout.mapping) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](knockout.punches/knockout.punches.d.ts) [knockout.punches](https://github.com/mbest/knockout.punches) by [Stephen Lautier](https://github.com/johnnyreilly) -* [:link:](knockout.rx/knockout.rx.d.ts) [knockout.rx](https://github.com/Igorbek/knockout.rx) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](knockstrap/knockstrap.d.ts) [Knockstrap](http://faulknercs.github.io/Knockstrap) by [Adam Pluciński](https://github.com/adaskothebeast) -* [:link:](knockout.kogrid/ko-grid.d.ts) [ko-grid](http://knockout-contrib.github.io/KoGrid) by [huer12](https://github.com/huer12) -* [:link:](ko.plus/ko.plus.d.ts) [ko.plus](https://github.com/stevegreatrex/ko.plus) by [Howard Richards](https://github.com/conficient) -* [:link:](koa-compose/koa-compose.d.ts) [koa](https://github.com/koajs/compose) by [jKey Lu](https://github.com/jkeylu) -* [:link:](koa/koa.d.ts) [Koa 2.x](http://koajs.com) by [DavidCai1993](https://github.com/DavidCai1993) -* [:link:](koa-bodyparser/koa-bodyparser.d.ts) [koa-bodyparser v3.x](https://github.com/koajs/bodyparser) by [Jerry Chin](https://github.com/hellopao) -* [:link:](koa-favicon/koa-favicon.d.ts) [koa-favicon v2.x](https://github.com/koajs/favicon) by [Jerry Chin](https://github.com/hellopao) -* [:link:](koa-json/koa-json.d.ts) [koa-json v2.x](https://github.com/koajs/json) by [Alex Friedman](https://github.com/brooklyndev) -* [:link:](koa-router/koa-router.d.ts) [koa-router v7.x](https://github.com/alexmingoia/koa-router) by [Jerry Chin](https://github.com/hellopao) -* [:link:](koa-static/koa-static.d.ts) [koa-static v2.x](https://github.com/koajs/static) by [Jerry Chin](https://github.com/hellopao) -* [:link:](kolite/kolite.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](kolite/knockout.activity.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](kolite/knockout.command.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](kolite/knockout.dirtyFlag.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](konami.js/konami.d.ts) [Konami-js](https://github.com/snaptortoise/konami-js) by [Matthieu Mourisson](https://github.com/mareek) -* [:link:](kue/kue.d.ts) [kue 0.9.x](https://github.com/Automattic/kue) by [Nicholas Penree](http://github.com/drudge) -* [:link:](kuromoji/kuromoji.d.ts) [kuromoji.js](https://github.com/takuyaa/kuromoji.js) by [MIZUSHIMA Junki](https://github.com/mzsm) -* [:link:](ladda/ladda.d.ts) [Ladda](https://github.com/hakimel/Ladda) by [Danil Flores](https://github.com/dflor003), [Michael Lee](https://github.com/leemicw) -* [:link:](lls/lls.d.ts) [LargeLocalStorage](https://github.com/tantaman/LargeLocalStorage) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](later/later.d.ts) [LaterJS](http://bunkat.github.io/later) by [Jason D Dryhurst-Smith](http://jasonds.co.uk) -* [:link:](latinize/latinize.d.ts) [latinize](https://github.com/dundalek/latinize) by [Giedrius Grabauskas](https://github.com/GiedriusGrabauskas) -* [:link:](lazy.js/lazy.js.d.ts) [Lazy.js](https://github.com/dtao/lazy.js) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](lazypipe/lazypipe.d.ts) [lazypipe](https://github.com/OverZealous/lazypipe) by [Thomas Corbière](https://github.com/tomc974) -* [:link:](leaflet-curve/leaflet-curve.d.ts) [leaflet-curve](https://github.com/onikiienko/Leaflet.curve) by [Onikiienko](https://github.com/onikiienko) -* [:link:](leaflet-draw/leaflet-draw.d.ts) [leaflet-draw](https://github.com/Leaflet/Leaflet.draw) by [Matt Guest](https://github.com/matt-guest) -* [:link:](leaflet.awesome-markers/leaflet.awesome-markers.d.ts) [Leaflet.awesome-markers plugin](https://github.com/lvoogdt/Leaflet.awesome-markers) by [Egor Komarov](https://github.com/Odrin) -* [:link:](leaflet-editable/leaflet-editable.d.ts) [Leaflet.Editable](https://github.com/yohanboniface/Leaflet.Editable) by [Dominic Alie](https://github.com/dalie) -* [:link:](leaflet.fullscreen/leaflet.fullscreen.d.ts) [Leaflet.fullscreen](https://github.com/brunob/leaflet.fullscreen) by [William Comartin](https://github.com/wcomartin) -* [:link:](leaflet/leaflet.d.ts) [Leaflet.js](https://github.com/Leaflet/Leaflet) by [Vladimir Zotov](https://github.com/rgripper) -* [:link:](leaflet-label/leaflet-label.d.ts) [Leaflet.label](https://github.com/Leaflet/Leaflet.label) by [Wim Looman](https://github.com/Nemo157) -* [:link:](leaflet-markercluster/leaflet-markercluster.d.ts) [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) by [Robert Imig](https://github.com/rimig) -* [:link:](jquery.leanModal/jquery.leanModal.d.ts) [leanModal.js](http://leanmodal.finelysliced.com.au) by [FinelySliced](https://github.com/FinelySliced) -* [:link:](leapmotionTS/LeapMotionTS.d.ts) [Leap Motion TS](https://github.com/logotype/LeapMotionTS) by [Victor Norgren](https://github.com/logotype) -* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [Tom Hasner](https://github.com/thasner) -* [:link:](less-middleware/less-middleware.d.ts) [less-middleware](https://github.com/emberfeather/less.js-middleware) by [Federico Bond](https://github.com/federicobond) -* [:link:](lestate/lestate.d.ts) [LeState](https://github.com/LeTools/LeState) by [Hadrian Oliveira](https://github.com/thelambdaparty) -* [:link:](level-sublevel/level-sublevel.d.ts) [level-sublevel](https://github.com/dominictarr/level-sublevel) by [Bas Pennings](https://github.com/basp) -* [:link:](levelup/levelup.d.ts) [LevelUp](https://github.com/rvagg/node-levelup) by [Bret Little](https://github.com/blittle) -* [:link:](libxmljs/libxmljs.d.ts) [Libxmljs](https://github.com/polotek/libxmljs) by [François de Campredon](https://github.com/fdecampredon) -* [:link:](lwip/lwip.d.ts) [Light-weight image processor](https://github.com/EyalAr/lwip) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](lime-js/lime-js.d.ts) [lime-js](https://github.com/takenet/lime-js) by [Arthur Xavier](https://github.com/arthur-xavier) -* [:link:](line-reader/line-reader.d.ts) [line-reader](https://github.com/nickewing/line-reader) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](dustjs-linkedin/dustjs-linkedin.d.ts) [linkedin dustjs](https://github.com/linkedin/dustjs) by [Marcelo Dezem](http://github.com/mdezem) -* [:link:](linq/linq.jquery.d.ts) [linq.jquery (from linq.js)](http://linqjs.codeplex.com) by [neuecc](http://www.codeplex.com/site/users/view/neuecc) -* [:link:](linq/linq.d.ts) [linq.js](http://linqjs.codeplex.com) by [Marcin Najder](https://github.com/marcinnajder), [Sebastiaan Dammann](https://github.com/Sebazzz) -* [:link:](linqsharp/linqsharp.d.ts) [linqsharp](https://www.npmjs.com/package/linqsharp) by [Bruno Leonardo Michels](https://github.com/brunolm) -* [:link:](jquery.livestampjs/jquery.livestampjs.d.ts) [Livestamp.js](http://mattbradley.github.com/livestampjs) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](lobibox/lobibox.d.ts) [lobibox](https://github.com/arboshiki/lobibox) by [Sabeeh Ul Hussnain](https://github.com/itboy87) -* [:link:](lockfile/lockfile.d.ts) [lockfile](https://github.com/isaacs/lockfile) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](lodash-decorators/lodash-decorators.d.ts) [lodash-decorators](https://github.com/steelsojka/lodash-decorators) by [Qubo](https://github.com/tkqubo) -* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft) -* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83) -* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle) -* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone) -* [:link:](loglevel/loglevel.d.ts) [loglevel](https://github.com/pimterry/loglevel) by [Stefan Profanter](https://github.com/Pro), [Florian Wagner](https://github.com/flqw), [Gabor Szmetanko](https://github.com/szmeti) -* [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](lokijs/lokijs.d.ts) [lokijs](https://github.com/techfort/LokiJS) by [TeamworkGuy2](https://github.com/TeamworkGuy2) -* [:link:](lolex/lolex.d.ts) [lolex](https://github.com/sinonjs/lolex) by [Wim Looman](https://github.com/Nemo157) -* [:link:](long/long.d.ts) [long.js](https://github.com/dcodeIO/long.js) by [Peter Kooijmans](https://github.com/peterkooijmans) -* [:link:](lory.js/lory.js.d.ts) [lory](https://github.com/meandmax/lory) by [kubosho](https://github.com/kubosho) -* [:link:](lovefield/lovefield.d.ts) [Lovefield](http://google.github.io/lovefield) by [freshp86](https://github.com/freshp86) -* [:link:](lower-case/lower-case.d.ts) [lower-case](https://github.com/blakeembrey/lower-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](lower-case-first/lower-case-first.d.ts) [lower-case-first](https://github.com/blakeembrey/lower-case-first) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz) -* [:link:](luaparse/luaparse.d.ts) [luaparse](https://github.com/oxyc/luaparse) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](lunr/lunr.d.ts) [lunr.js](https://github.com/olivernn/lunr.js) by [Sebastian Lenz](https://github.com/sebastian-lenz) -* [:link:](lz-string/lz-string.d.ts) [lz-string](https://github.com/pieroxy/lz-string) by [Roman Nikitin](https://github.com/M0ns1gn0r) -* [:link:](magic-number/magic-number.d.ts) [magic-number](https://github.com/stpettersens/node-magic-number) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](magicsuggest/magicsuggest.d.ts) [MagicSuggest](http://nicolasbize.com/magicsuggest) by [Leonardo Chaia](http://github.com/leonardochaia) -* [:link:](mailcheck/mailcheck.d.ts) [Mailcheck](https://github.com/mailcheck/mailcheck) by [Paulo Cesar](http://github.com/pocesar) -* [:link:](maildev/maildev.d.ts) [maildev](https://github.com/djfarrelly/maildev) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](mailparser/mailparser.d.ts) [mailparser](https://www.npmjs.com/package/mailparser) by [Peter Snider](https://github.com/psnider) -* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](maker.js/makerjs.d.ts) [Maker.js](https://github.com/Microsoft/maker.js) by [Dan Marshall](https://github.com/danmarshall) -* [:link:](mandrill-api/mandrill-api.d.ts) [Mandrill API 1.x](http://mandrill.com) by [Paulo Cesar](https://github.com/pocesar) -* [:link:](mapbox/mapbox.d.ts) [Mapbox](https://www.mapbox.com/mapbox.js) by [Maxime Fabre](https://github.com/anahkiasen) -* [:link:](mapsjs/mapsjs.d.ts) [Mapsjs](https://github.com/mapsjs) by [Matthew James Davis](https://github.com/davismj) -* [:link:](maquette/maquette.d.ts) [maquette](http://maquettejs.org) by [Johan Gorter](https://github.com/johan-gorter) -* [:link:](mariasql/mariasql.d.ts) [mariasql](https://github.com/mscdex/node-mariasql) by [MichaelBennett](https://github.com/bennett000) -* [:link:](marionette/marionette.d.ts) [Marionette](https://github.com/marionettejs) by [Zeeshan Hamid](https://github.com/zhamid), [Natan Vivo](https://github.com/nvivo), [Sven Tschui](https://github.com/sventschui) -* [:link:](ngwysiwyg/ngwysiwyg.d.ts) [Marked](https://github.com/psergus/ngWYSIWYG) by [Patrick Mac Kay](https://github.com/patrick-mackay) -* [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr) -* [:link:](markerclustererplus/markerclustererplus.d.ts) [MarkerClustererPlus for Google Maps V3](http://github.com/mahnunchik/markerclustererplus) by [Mathias Rodriguez](http://github.com/enanox) -* [:link:](markitup/markitup.d.ts) [markitup 1.x](https://github.com/markitup/1.x) by [drillbits](https://github.com/drillbits) -* [:link:](maskedinput/maskedinput.d.ts) [Masked Input plugin for jQuery](http://digitalbush.com/projects/masked-input-plugin) by [Lokesh Peta](https://github.com/lokeshpeta) -* [:link:](material-ui/material-ui.d.ts) [material-ui](https://github.com/callemall/material-ui) by [Nathan Brown](https://github.com/ngbrown), [Oliver Herrmann](https://github.com/herrmanno) -* [:link:](materialize-css/materialize-css.d.ts) [materialize-css](http://materializecss.com) by [Erik Lieben](https://github.com/eriklieben), [Leon Yu](https://github.com/leonyu) -* [:link:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga) -* [:link:](mathjs/mathjs.d.ts) [mathjs](http://mathjs.org) by [Ilya Shestakov](https://github.com/siavol) -* [:link:](matter-js/matter-js.d.ts) [Matter.js -](https://github.com/liabru/matter-js) by [Ivane Gegia](https://twitter.com/ivanegegia), [David Asmuth](https://github.com/piranha771) -* [:link:](mCustomScrollbar/mCustomScrollbar.d.ts) [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) by [Sarah Williams](https://github.com/flurg) -* [:link:](memory-cache/memory-cache.d.ts) [memory-cache](http://github.com/ptarjan/node-cache) by [Jeff Goddard](https://github.com/jedigo) -* [:link:](mendixmodelsdk/mendixmodelsdk.d.ts) [mendixmodelsdk](http://www.mendix.com) by [Mendix](https://github.com/mendix) -* [:link:](merge-descriptors/merge-descriptors.d.ts) [merge-descriptors](https://github.com/component/merge-descriptors) by [Zhiyuan Wang](https://github.com/danny8002) -* [:link:](merge-stream/merge-stream.d.ts) [merge-stream](https://github.com/grncdr/merge-stream) by [Keita Kagurazaka](https://github.com/k-kagurazaka), [Tom X. Tobin](http://tomxtobin.com) -* [:link:](merge2/merge2.d.ts) [merge2](https://github.com/teambition/merge2) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](meshblu/meshblu.d.ts) [meshblu.js](https://github.com/octoblu/meshblu-npm) by [Felipe Nipo](https://github.com/fnipo) -* [:link:](mess/mess.d.ts) [mess](https://github.com/bobrik/node-mess) by [Wim Looman](https://github.com/Nemo157) -* [:link:](messenger/messenger.d.ts) [Messenger.js](https://github.com/HubSpot/messenger) by [Derek Cicerone](https://github.com/derekcicerone) -* [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave) -* [:link:](meteor-roles/meteor-roles.d.ts) [Meteor Roles](https://github.com/alanning/meteor-roles) by [Robbie Van Gorkom](https://github.com/vangorra) -* [:link:](meteor-publish-composite/meteor-publish-composite.d.ts) [meteor-publish-composite](https://github.com/englue/meteor-publish-composite) by [Robert Van Gorkom](https://github.com/vangorra) -* [:link:](node-mysql-wrapper/my-meteor.d.ts) [meteorjs for node-mysql-wrapper which helps in development](https://github.com/nodets/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras) -* [:link:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo) -* [:link:](metismenu/metismenu.d.ts) [metisMenu](http://github.com/onokumus/metisMenu) by [onokums](https://github.com/onokumus) -* [:link:](microgears/microgears.d.ts) [microgears](http://github.com/marcusdb/microgears) by [Marcus David Bronstein](https://github.com/marcusdb) -* [:link:](micromatch/micromatch.d.ts) [micromatch](https://github.com/jonschlinkert/micromatch) by [glen-84](https://github.com/glen-84) -* [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee) -* [:link:](xrm/xrm.d.ts) [Microsoft Dynamics xRM API](http://www.microsoft.com/en-us/download/details.aspx?id=44567) by [David Berry](https://github.com/6ix4our), [Matt Ngan](https://github.com/mattngan), [Markus Mauch](https://github.com/markusmauch) -* [:link:](xrm/xrm-6.d.ts) [Microsoft Dynamics xRM API v6](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our) -* [:link:](jquery-validation-unobtrusive/jquery-validation-unobtrusive.d.ts) [Microsoft jQuery Unobtrusive Validation](http://aspnetwebstack.codeplex.com) by [Matt Brooks](https://github.com/EnableSoftware) -* [:link:](microsoft-live-connect/microsoft-live-connect.d.ts) [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) by [John Vilk](https://github.com/jvilk) -* [:link:](xrm/parature.d.ts) [Microsoft Parature extentions to Xrm.Page - available for CRM Online Only](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our) -* [:link:](azure-mobile-services-client/AzureMobileServicesClient.d.ts) [Microsoft Windows AzureMobile Service](http://www.windowsazure.com/en-us/develop/mobile) by [Morosinotto Daniele](https://github.com/dmorosinotto) -* [:link:](bingmaps/Microsoft.Maps.d.ts) [Microsoft.Maps](http://msdn.microsoft.com/en-us/library/gg427611.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](bingmaps/Microsoft.Maps.AdvancedShapes.d.ts) [Microsoft.Maps.AdvancedShapes](http://msdn.microsoft.com/en-us/library/hh921952.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](bingmaps/Microsoft.Maps.Directions.d.ts) [Microsoft.Maps.Directions](http://msdn.microsoft.com/en-us/library/hh312813.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](bingmaps/Microsoft.Maps.Search.d.ts) [Microsoft.Maps.Search](http://msdn.microsoft.com/en-us/library/hh868061.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts) [Microsoft.Maps.Themes](http://msdn.microsoft.com/en-us/library/hh868061.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](bingmaps/Microsoft.Maps.Traffic.d.ts) [Microsoft.Maps.Traffic](http://msdn.microsoft.com/en-us/library/hh312840.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](bingmaps/Microsoft.Maps.VenueMaps.d.ts) [Microsoft.Maps.VenueMaps](http://msdn.microsoft.com/en-us/library/hh312797.aspx) by [Eric Todd](https://github.com/ericrtodd) -* [:link:](milkcocoa/milkcocoa.d.ts) [Milkcocoa](https://mlkcca.com) by [odangosan](https://github.com/odangosan) -* [:link:](milliseconds/milliseconds.d.ts) [milliseconds](http://npmjs.com/milliseconds) by [Elmar Burke](github.com/elmarburke) -* [:link:](mime/mime.d.ts) [mime](https://github.com/broofa/node-mime) by [Jeff Goddard](https://github.com/jedigo) -* [:link:](minilog/minilog.d.ts) [minilog v2](https://github.com/mixu/minilog) by [Guido](http://guido.io) -* [:link:](minimatch/minimatch.d.ts) [Minimatch](https://github.com/isaacs/minimatch) by [vvakame](https://github.com/vvakame) -* [:link:](minimist/minimist.d.ts) [minimist](https://github.com/substack/minimist) by [Bart van der Schoor](https://github.com/Bartvds), [Necroskillz](https://github.com/Necroskillz) -* [:link:](mithril/mithril.d.ts) [Mithril](http://lhorie.github.io/mithril) by [Leo Horie](https://github.com/lhorie), [Chris Bowdon](https://github.com/cbowdon) -* [:link:](mixpanel/mixpanel.d.ts) [Mixpanel](https://mixpanel.com) by [Knut Eirik Leira Hjelle](https://github.com/hjellek) -* [:link:](mixto/mixto.d.ts) [mixto](https://github.com/atom/mixto) by [vvakame](https://github.com/vvakame) -* [:link:](mkdirp/mkdirp.d.ts) [mkdirp](http://github.com/substack/node-mkdirp) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](mkpath/mkpath.d.ts) [mkpath](https://www.npmjs.com/package/mkpath) by [Jared Klopper](https://github.com/optical) -* [:link:](mmmagic/mmmagic.d.ts) [mmmagic](https://github.com/mscdex/mmmagic) by [Andrei Sebastian Cîmpean](http://andreime.com) -* [:link:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter) -* [:link:](mobservable/mobservable.d.ts) [mobservable](https://mweststrate.github.io/mobservable) by [Michel Weststrate](https://github.com/mweststrate) -* [:link:](mobservable-react/mobservable-react.d.ts) [mobservable](https://github.com/mweststrate/mobservable-react) by [Michel Weststrate](https://github.com/mweststrate) -* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame) -* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight) -* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom) -* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157), [Qubo](https://github.com/tkqubo) -* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000) -* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb), [Leon Yu](https://github.com/leonyu) -* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib) -* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware), [Gal Talmor](https://github.com/galtalmor) -* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware) -* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert) -* [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native/tree/2.1) by [Federico Caselli](https://github.com/CaselIT) -* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [simonxca](https://github.com/simonxca), [horiuchi](https://github.com/horiuchi) -* [:link:](mongoose-auto-increment/mongoose-auto-increment.d.ts) [mongoose-auto-increment](https://github.com/codetunnel/mongoose-auto-increment) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](mongoose-deep-populate/mongoose-deep-populate.d.ts) [mongoose-deep-populate](https://github.com/buunguyen/mongoose-deep-populate) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000) -* [:link:](mongoose-promise/mongoose-promise.d.ts) [mongoose-promise](http://mongoosejs.com/docs/api.html#promise-js) by [simonxca](https://github.com/simonxca) -* [:link:](morgan/morgan.d.ts) [morgan](https://github.com/expressjs/morgan) by [James Roland Cabresos](https://github.com/staticfunction) -* [:link:](mousetrap/mousetrap-global-bind.d.ts) [Mousetrap 1.4.6's global-bind extension](http://craig.is/killing/mice#extensions.global) by [Andrew Bradley](https://github.com/cspotcode) -* [:link:](mousetrap/mousetrap.d.ts) [Mousetrap 1.5.x](http://craig.is/killing/mice) by [Dániel Tar](https://github.com/qcz) -* [:link:](moviedb/moviedb.d.ts) [MovieDB](https://github.com/danzajdband/moviedb) by [Basarat Ali Syed](https://github.com/basarat) -* [:link:](firefox/firefox.d.ts) [Mozilla Web API](https://developer.mozilla.org/en-US/docs/Web/API) by [vvakame](https://github.com/vvakame) -* [:link:](localForage/localForage.d.ts) [Mozilla's localForage](https://github.com/mozilla/localforage) by [yuichi david pichsenmeister](https://github.com/3x14159265) -* [:link:](mpromise/mpromise.d.ts) [mpromise](https://github.com/aheckmann/mpromise) by [Seulgi Kim](https://github.com/sgkim126) -* [:link:](mqtt/mqtt.d.ts) [MQTT](https://github.com/mqttjs/MQTT.js) by [Pekka Leppänen](https://github.com/PekkaPLeppanen) -* [:link:](ms/ms.d.ts) [ms](https://github.com/guille/ms.js) by [Zhiyuan Wang](https://github.com/danny8002) -* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki) -* [:link:](msnodesql/msnodesql.d.ts) [msnodesql](https://github.com/WindowsAzure/node-sqlserver) by [Boris Yankov](https://github.com/borisyankov), [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](msportalfx-test/msportalfx-test.d.ts) [msportalfx-test](https://msazure.visualstudio.com/DefaultCollection/AzureUX/_git/portalfx-msportalfx-test) by [Julio Casal](https://github.com/julioct) -* [:link:](mssql/mssql.d.ts) [mssql](https://www.npmjs.com/package/mssql) by [COLSA Corporation](http://www.colsa.com), [Ben Farr](https://github.com/jaminfarr), [Vitor Buzinaro](https://github.com/buzinas) -* [:link:](mu2/mu2.d.ts) [mu2](http://github.com/raycmorgan/mu) by [Jeff Goddard](https://github.com/jedigo) -* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000), [vilicvane](https://vilic.github.io), [David Broder-Rodgers](https://github.com/DavidBR-SW) -* [:link:](multiplexjs/multiplexjs.d.ts) [Multiplex.js](http://github.com/multiplex/multiplex.js) by [Kamyar Nazeri](http://github.com/KamyarNazeri) -* [:link:](mustache/mustache.d.ts) [Mustache](https://github.com/janl/mustache.js) by [Mark Ashley Bell](https://github.com/markashleybell) -* [:link:](mz/mz.d.ts) [mz](https://github.com/normalize/mz) by [Thomas Hickman](https://github.com/ThomasHickman) -* [:link:](nanoajax/nanoajax.d.ts) [nanoajax](https://github.com/yanatan16/nanoajax) by [Nathan Cahill](https://github.com/nathancahill) -* [:link:](natural/natural.d.ts) [Natural](https://github.com/NaturalNode/natural) by [Dylan R. E. Moonfire](https://github.com/dmoonfire) -* [:link:](natural-sort/natural-sort.d.ts) [NaturalSort](https://github.com/studio-b12/natural-sort) by [Antonio Morales](https://github.com/a-morales) -* [:link:](navigation/navigation.d.ts) [Navigation](http://grahammendick.github.io/navigation) by [Graham Mendick](https://github.com/grahammendick) -* [:link:](nconf/nconf.d.ts) [nconf](https://github.com/flatiron/nconf) by [Jeff Goddard](https://github.com/jedigo), [Jean-Martin Thibault](https://github.com/jmthibault) -* [:link:](ncp/ncp.d.ts) [ncp](https://github.com/AvianFlu/ncp) by [Bart van der Schoor](https://github.com/bartvds) -* [:link:](nedb/nedb.d.ts) [NeDB](https://github.com/louischatriot/nedb) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](needle/needle.d.ts) [needle](https://github.com/tomas/needle) by [San Chen](https://github.com/bigsan) -* [:link:](netmask/netmask.d.ts) [Netmask](https://github.com/rs/node-netmask) by [Matt Frantz](https://github.com/mhfrantz) -* [:link:](nexpect/nexpect.d.ts) [nexpect](https://github.com/nodejitsu/nexpect) by [vvakame](http://github.com/vvakame) -* [:link:](ng-command/ng-command.d.ts) [ng-command](https://github.com/stephenlautier/ng-command) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](ng-facebook/ng-facebook.d.ts) [ng-facebook](https://github.com/GoDisco/ngFacebook) by [Crevil](https://github.com/Crevil) -* [:link:](ng-flow/ng-flow.d.ts) [ng-flow](https://github.com/flowjs/ng-flow) by [Ryan McNamara](https://github.com/ryan10132) -* [:link:](ng-grid/ng-grid.d.ts) [ng-grid](http://angular-ui.github.io/ng-grid) by [Ken Smith](https://github.com/smithkl42), [Roland Zwaga](https://github.com/rolandzwaga), [Kent Cooper](https://github.com/kentcooper) -* [:link:](angular-idle/angular-idle.d.ts) [ng-idle](http://hackedbychinese.github.io/ng-idle) by [mthamil](https://github.com/mthamil) -* [:link:](ng-notify/ng-notify.d.ts) [ng-notify](https://github.com/matowens/ng-notify) by [Nick Zamosenchuk](https://github.com/nzamosenchuk) -* [:link:](ng-table/ng-table.d.ts) [ng-table](https://github.com/esvit/ng-table) by [Christian Crowhurst](https://github.com/christianacca) -* [:link:](ngbootbox/ngbootbox.d.ts) [ngbootbox](https://github.com/eriktufvesson/ngBootbox) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](ng-cordova/actionSheet.d.ts) [ngCordova Action Sheet plugin](https://github.com/driftyco/ng-cordova) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing) -* [:link:](ng-cordova/appAvailability.d.ts) [ngCordova AppAvailability plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/badge.d.ts) [ngCordova badge plugin](https://github.com/driftyco/ng-cordova) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing) -* [:link:](ng-cordova/datepicker.d.ts) [ngCordova datepicker plugin](https://github.com/VitaliiBlagodir/cordova-plugin-datepicker) by [Jacques Kang](https://www.linkedin.com/in/jacqueskang) -* [:link:](ng-cordova/app-version.d.ts) [ngCordova datepicker plugin](https://github.com/driftyco/ng-cordova) by [Jacques Kang](https://www.linkedin.com/in/jacqueskang) -* [:link:](ng-cordova/deviceMotion.d.ts) [ngCordova device motion plugin](https://github.com/driftyco/ng-cordova) by [Michel Vidailhet](https://github.com/mvidailhet), [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/deviceOrientation.d.ts) [ngCordova device orientation plugin](https://github.com/driftyco/ng-cordova) by [Michel Vidailhet](https://github.com/mvidailhet), [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/device.d.ts) [ngCordova device plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/dialogs.d.ts) [ngCordova dialogs plugin](https://github.com/driftyco/ng-cordova) by [Michel Vidailhet](https://github.com/mvidailhet), [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/emailComposer.d.ts) [ngCordova emailComposer plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/file.d.ts) [ngCordova file plugin](https://github.com/driftyco/ng-cordova) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing) -* [:link:](ng-cordova/fileTransfer.d.ts) [ngCordova file-transfer plugin](https://github.com/driftyco/ng-cordova) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing) -* [:link:](ng-cordova/geolocation.d.ts) [ngCordova geolocation plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/network.d.ts) [ngCordova network plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/tsd.d.ts) [ngCordova plugins](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/toast.d.ts) [ngCordova toast plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) -* [:link:](ng-cordova/camera.d.ts) [ngCordova.plugins.camera](https://github.com/driftyco/ng-cordova) by [Jacques Kang](https://www.linkedin.com/in/jacqueskang) -* [:link:](ng-dialog/ng-dialog.d.ts) [ngDialog](https://github.com/likeastore/ngDialog) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](ngkookies/ngkookies.d.ts) [ngKookes](https://github.com/voronianski/ngKookies) by [Martin McWhorter](https://github.com/martinmcwhorter) -* [:link:](ngprogress/ngprogress.d.ts) [ngProgress](http://victorbjelkholm.github.io/ngProgress) by [Martin McWhorter](https://github.com/martinmcwhorter) -* [:link:](ngprogress-lite/ngprogress-lite.d.ts) [ngprogress-lite](https://github.com/voronianski/ngprogress-lite) by [Luke Forder](https://github.com/LukeForder) -* [:link:](ng-stomp/ng-stomp.d.ts) [ngStomp](https://github.com/beevelop/ng-stomp) by [Lukasz Potapczuk](https://github.com/lpotapczuk) -* [:link:](ngstorage/ngstorage.d.ts) [ngstorage](https://github.com/gsklee/ngStorage) by [Jakub Pistek](https://github.com/kubiq) -* [:link:](nightmare/nightmare.d.ts) [Nightmare](https://github.com/segmentio/nightmare) by [horiuchi](https://github.com/horiuchi) -* [:link:](noble/noble.d.ts) [noble](https://github.com/sandeepmistry/noble) by [Seon-Wook Park](https://github.com/swook), [Hans Bakker](https://github.com/wind-rider), [Shantanu Bhadoria](https://github.com/shantanubhadoria) -* [:link:](nock/nock.d.ts) [nock](https://github.com/pgte/nock) by [bonnici](https://github.com/bonnici) -* [:link:](node-imap/imap.d.ts) [node imap](https://github.com/mscdex/node-imap) by [Steve Fenton](https://github.com/Steve-Fenton) -* [:link:](oauth2-server/oauth2-server.d.ts) [Node OAuth2 Server](https://github.com/thomseddon/node-oauth2-server) by [Robbie Van Gorkom](https://github.com/vangorra) -* [:link:](node-sass/node-sass.d.ts) [Node Sass](https://github.com/sass/node-sass) by [Asana](https://asana.com) -* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo) -* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](apn/apn.d.ts) [node-apn](https://github.com/argon/node-apn) by [Zenorbi](https://github.com/zenorbi) -* [:link:](node-array-ext/node-array-ext.d.ts) [node-array-ext](https://github.com/Beng89/node-array-ext) by [Ben Goltz](https://github.com/Beng89) -* [:link:](asana/asana.d.ts) [node-asana](https://github.com/Asana/node-asana) by [Qubo](https://github.com/tkqubo) -* [:link:](bunyan/bunyan.d.ts) [node-bunyan](https://github.com/trentm/node-bunyan) by [Alex Mikhalev](https://github.com/amikhalev) -* [:link:](bunyan-logentries/bunyan-logentries.d.ts) [node-bunyan-logentries](https://github.com/nemtsov/node-bunyan-logentries) by [Aymeric Beaumet](http://aymericbeaumet.me) -* [:link:](node-cache/node-cache.d.ts) [node-cache](https://github.com/tcs-de/nodecache) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz) -* [:link:](config/config.d.ts) [node-config](https://github.com/lorenwest/node-config) by [Roman Korneev](https://github.com/RWander) -* [:link:](node-config-manager/node-config-manager.d.ts) [node-config-manager](https://www.npmjs.com/package/node-config-manager) by [TANAKA Koichi](https://gitnub.com/mugeso) -* [:link:](convict/convict.d.ts) [node-convict](https://github.com/mozilla/node-convict) by [Wim Looman](https://github.com/Nemo157) -* [:link:](node-dir/node-dir.d.ts) [node-dir](https://github.com/fshost/node-dir) by [Panu Horsmalahti](https://github.com/panuhorsmalahti) -* [:link:](email-templates/email-templates.d.ts) [node-email-templates](https://github.com/niftylettuce/node-email-templates) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](node-ffi/node-ffi.d.ts) [node-ffi](https://github.com/rbranson/node-ffi) by [Paul Loyd](https://github.com/loyd) -* [:link:](node-fibers/node-fibers.d.ts) [node-fibers](https://github.com/laverdet/node-fibers) by [Cary Haynie](https://github.com/caryhaynie) -* [:link:](node-form/node-form.d.ts) [node-form](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec) -* [:link:](node-gcm/node-gcm.d.ts) [node-gcm](https://www.npmjs.org/package/node-gcm) by [Hiroki Horiuchi](https://github.com/horiuchi) -* [:link:](node-getopt/node-getopt.d.ts) [node-getopt](https://github.com/jiangmiao/node-getopt) by [Karl.M.Cauchy](https://github.com/kcauchy) -* [:link:](node-git/node-git.d.ts) [node-git](https://github.com/christkv/node-git) by [vvakame](https://github.com/vvakame) -* [:link:](node-int64/node-int64.d.ts) [node-int64](https://github.com/broofa/node-int64) by [Benno Dreissig](https://github.com/x3cion) -* [:link:](ip/ip.d.ts) [node-ip](https://github.com/indutny/node-ip) by [Peter Harris](https://github.com/codeanimal) -* [:link:](node-jsfl-runner/node-jsfl-runner.d.ts) [node-jsfl-runner](https://www.npmjs.com/package/node-jsfl-runner) by [Michael Randolph](https://github.com/mrand01) -* [:link:](multiparty/multiparty.d.ts) [node-multiparty](https://github.com/andrewrk/node-multiparty) by [Ken Fukuyama](https://github.com/kenfdev) -* [:link:](mysql/mysql.d.ts) [node-mysql](https://github.com/felixge/node-mysql) by [William Johnston](https://github.com/wjohnsto) -* [:link:](node-mysql-wrapper/node-mysql-wrapper.d.ts) [node-mysql-wrapper](https://github.com/nodets/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras) -* [:link:](node-notifier/node-notifier.d.ts) [node-notifier](https://github.com/mikaelbr/node-notifier) by [Qubo](https://github.com/tkQubo) -* [:link:](node-persist/node-persist.d.ts) [node-persist](https://github.com/simonlast/node-persist) by [Spencer Williams](http://spencerwi.com) -* [:link:](node-polyglot/node-polyglot.d.ts) [node-polyglot](https://github.com/airbnb/polyglot.js) by [Tim Jackson-Kiely](https://github.com/timjk) -* [:link:](progress/progress.d.ts) [node-progress](https://github.com/tj/node-progress) by [Sebastian Lenz](https://github.com/sebastian-lenz) -* [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer) -* [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal) -* [:link:](rsync/rsync.d.ts) [node-rsync](https://github.com/mattijs/node-rsync) by [Philipp Stucki](https://github.com/philippstucki) -* [:link:](node-sass-middleware/node-sass-middleware.d.ts) [node-sass-middleware](https://github.com/sass/node-sass-middleware) by [Pascal Garber](http://www.jumplink.eu) -* [:link:](node-schedule/node-schedule.d.ts) [node-schedule](https://github.com/tejasmanohar/node-schedule) by [Cyril Schumacher](https://github.com/cyrilschumacher) -* [:link:](node-slack/node-slack.d.ts) [node-slack](https://github.com/xoxco/node-slack) by [Qubo](https://github.com/tkQubo) -* [:link:](node-snap7/node-snap7.d.ts) [node-snap7](https://github.com/mathiask88/node-snap7) by [Heilingbrunner](https://github.com/heilingbrunner) -* [:link:](srp/srp.d.ts) [node-srp](https://github.com/mozilla/node-srp) by [Pat Smuk](https://github.com/Patman64) -* [:link:](stack-trace/stack-trace.d.ts) [node-stack-trace](https://github.com/felixge/node-stack-trace) by [Exceptionless](https://github.com/exceptionless) -* [:link:](node-uuid/node-uuid-global.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) -* [:link:](node-uuid/node-uuid-cjs.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) -* [:link:](node-uuid/node-uuid-base.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) -* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) -* [:link:](node-validator/node-validator.d.ts) [node-validator](https://www.npmjs.com/package/node-validator) by [Ken Gorab](https://github.com/kengorab) -* [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments) -* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm), [Christopher Currens](https://github.com/ccurrens) -* [:link:](_debugger/_debugger.d.ts) [Node.js debugger API](http://nodejs.org) by [Basarat Ali Syed](https://github.com/basarat) -* [:link:](http-status-codes/http-status-codes.d.ts) [Node.JS package http-status-codes](https://github.com/prettymuchbryce/node-http-status) by [Josh McCullough](https://github.com/JoshMcCullough) -* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle) -* [:link:](node/node.d.ts) [Node.js v4.x](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) -* [:link:](each/each.d.ts) [NodeEach](http://www.adaltas.com/projects/node-each) by [Michael Zabka](https://github.com/misak113) -* [:link:](yandex-money-sdk/yandex-money-sdk.d.ts) [NodeJS Yandex.Money API SDK](https://github.com/yandex-money/yandex-money-sdk-nodejs) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](nodemailer/nodemailer.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [nodemailer-direct-transport](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts) [nodemailer-pickup-transport](https://www.npmjs.com/package/nodemailer-pickup-transport) by [Peter Snider](https://github.com/psnider) -* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [nodemailer-smtp-pool](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts) [nodemailer-smtp-transport](https://github.com/andris9/nodemailer-smtp-transport) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo) -* [:link:](noisejs/noisejs.d.ts) [noisejs](https://github.com/xixixao/noisejs) by [Atsushi Izumihara](https://github.com/izmhr) -* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral) -* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc) -* [:link:](notie/notie.d.ts) [notie.js](https://github.com/jaredreich/notie.js) by [Mateus Demboski](https://github.com/mateusdemboski) -* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar) -* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker) -* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg) -* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj) -* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42) -* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com) -* [:link:](numbro/numbro.d.ts) [Numbro.js](https://github.com/foretagsplatsen/numbro) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](nunjucks/nunjucks.d.ts) [nunjucks](http://mozilla.github.io/nunjucks) by [Ruben Slabbert](https://github.com/RubenSlabbert) -* [:link:](nvd3/nvd3.d.ts) [nvd3](https://github.com/novus/nvd3) by [Peter Mitchell](https://github.com/PjMitchell) -* [:link:](obelisk.js/obelisk.js.d.ts) [obelisk.js](https://github.com/nosir/obelisk.js) by [Brian Drupieski](https://github.com/bdrupieski) -* [:link:](object-assign/object-assign.d.ts) [object-assign](https://github.com/sindresorhus/object-assign) by [Christopher Brown](https://github.com/chbrown) -* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113) -* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar) -* [:link:](oblo-util/oblo-util.d.ts) [oblo-util](https://github.com/Oblosys/oblo-util) by [Martijn Schrage](https://github.com/Oblosys) -* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical) -* [:link:](observe-js/observe-js.d.ts) [observe-js](https://github.com/Polymer/observe-js) by [Oliver Herrmann](https://github.com/herrmanno) -* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga) -* [:link:](angular-odata-resources/angular-odata-resources.d.ts) [OData Angular Resources](https://github.com/devnixs/ODataAngularResources) by [Raphael ATALLAH](http://raphael.atallah.me) -* [:link:](office-js/office-js.d.ts) [Office.js](http://dev.office.com) by [OfficeDev](https://github.com/OfficeDev) -* [:link:](offline-js/offline-js.d.ts) [Offline](https://github.com/HubSpot/offline) by [Chris Wrench](https://github.com/cgwrench) -* [:link:](oidc-token-manager/oidc-token-manager.d.ts) [oidc-token-manager](https://github.com/IdentityModel/oidc-token-manager) by [Sławomir Rosiek](https://github.com/rosieks) -* [:link:](on-finished/on-finished.d.ts) [on-finished](https://github.com/jshttp/on-finished) by [Honza Dvorsky](http://github.com/czechboy0) -* [:link:](once/once.d.ts) [once](https://github.com/isaacs/once) by [Denis Sokolov](https://github.com/denis-sokolov) -* [:link:](onoff/onoff.d.ts) [onoff](https://github.com/fivdi/onoff) by [Marcel Ernst](https://github.com/marcel-ernst) -* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox) -* [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](deep-extend/deep-extend.d.ts) [open](https://github.com/unclechu/node-deep-extend) by [rhysd](https://github.com/rhysd) -* [:link:](OpenJsCad/openjscad.d.ts) [OpenJsCad.js](https://github.com/joostn/OpenJsCad) by [Dan Marshall](https://github.com/danmarshall) -* [:link:](openlayers/openlayers.d.ts) [OpenLayers](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd) -* [:link:](openpgp/openpgp.d.ts) [openpgpjs](http://openpgpjs.org) by [Guillaume Lacasa](https://blog.lacasa.fr) -* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn), [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](optimist/optimist.d.ts) [optimist](https://github.com/substack/node-optimist) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Christopher Brown](https://github.com/chbrown) -* [:link:](ora/ora.d.ts) [ora](https://github.com/sindresorhus/ora) by [Basarat Ali Syed](https://github.com/basarat) -* [:link:](oracledb/oracledb.d.ts) [oracledb](https://github.com/oracle/node-oracledb) by [Richard Natal](https://github.com/Bigous) -* [:link:](orchestrator/orchestrator.d.ts) [Orchestrator](https://github.com/orchestrator/orchestrator) by [Qubo](https://github.com/tkQubo) -* [:link:](os-locale/os-locale.d.ts) [os-locale](https://github.com/sindresorhus/os-locale) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](osmtogeojson/osmtogeojson.d.ts) [osmtogeojson](https://github.com/tyrasd/osmtogeojson.git) by [Qubo](https://github.com/tkqubo) -* [:link:](owlcarousel/owlcarousel.d.ts) [OwlCarousel v.1.3.3](https://github.com/OwlFonk/OwlCarousel) by [Damian Piątkowski](https://github.com/dpiatkowski) -* [:link:](p2/p2.d.ts) [p2.js](https://github.com/schteppe/p2.js) by [Clark Stevenson](https://github.com/clark-stevenson) -* [:link:](HubSpot-pace/HubSpot-pace.d.ts) [pace](https://github.com/HubSpot/pace) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](packery/packery.d.ts) [Packery](http://packery.metafizzy.co) by [Piraveen Kamalathas from Kilix](https://github.com/piraveen) -* [:link:](page/page.d.ts) [page](http://visionmedia.github.io/page.js) by [Alan Norbauer](http://alan.norbauer.com) -* [:link:](pako/pako.d.ts) [pako](https://github.com/nodeca/pako) by [Denis Cappellin](http://github.com/cappellin) -* [:link:](papaparse/papaparse.d.ts) [PapaParse](https://github.com/mholt/PapaParse) by [Pedro Flemming](https://github.com/torpedro) -* [:link:](parallel/parallel.d.ts) [parallel.js](http://adambom.github.io/parallel.js) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](param-case/param-case.d.ts) [param-case](https://github.com/blakeembrey/param-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](parse/parse.d.ts) [Parse](https://parse.com) by [Ullisen Media Group](http://ullisenmedia.com) -* [:link:](parse-glob/parse-glob.d.ts) [parse-glob](https://github.com/jonschlinkert/parse-glob) by [glen-84](https://github.com/glen-84) -* [:link:](parse-torrent/parse-torrent.d.ts) [parse-torrent](https://github.com/feross/parse-torrent) by [Bazyli Brzóska](https://invent.life) -* [:link:](parse5/parse5.d.ts) [parse5](https://github.com/inikulin/parse5) by [Nico Jansen](https://github.com/nicojs) -* [:link:](parsimmon/parsimmon.d.ts) [Parsimmon](https://github.com/jneen/parsimmon) by [Bart van der Schoor](https://github.com/Bartvds), [Mizunashi Mana](https://github.com/mizunashi-mana) -* [:link:](pascal-case/pascal-case.d.ts) [pascal-case](https://github.com/blakeembrey/pascal-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi) -* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm) -* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction) -* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction) -* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction) -* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone) -* [:link:](passport-http-bearer/passport-http-bearer.d.ts) [passport-http-bearer](https://github.com/jaredhanson/passport-http-bearer) by [Isman Usoh](https://github.com/isman-usoh) -* [:link:](passport-jwt/passport-jwt.d.ts) [passport-jwt](https://github.com/themikenicholson/passport-jwt) by [TANAKA Koichi](https://github.com/mugeso) -* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](password-hash/password-hash.d.ts) [password-hash 1.2.x](https://github.com/davidwood/node-password-hash) by [TANAKA Koichi](https://github.com/mugeso) -* [:link:](path-case/path-case.d.ts) [path-case](https://github.com/blakeembrey/path-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](path-exists/path-exists.d.ts) [path-exists](https://github.com/sindresorhus/path-exists) by [Shogo Iwano](https://github.com/shiwano) -* [:link:](path-parse/path-parse.d.ts) [path-parse](https://github.com/jbgutierrez/path-parse) by [Dan Chao](http://dchao.co) -* [:link:](path-to-regexp/path-to-regexp.d.ts) [path-to-regexp](https://github.com/pillarjs/path-to-regexp) by [xica](https://github.com/xica) -* [:link:](pathjs/pathjs.d.ts) [Pathjs](https://github.com/mtrpcic/pathjs) by [Lokesh Peta](https://github.com/lokeshpeta) -* [:link:](pathwatcher/pathwatcher.d.ts) [pathwatcher](https://github.com/atom/node-pathwatcher) by [vvakame](https://github.com/vvakame) -* [:link:](PayPal-Cordova-Plugin/PayPal-Cordova-Plugin.d.ts) [PayPal-Cordova-Plugin](https://github.com/paypal/PayPal-Cordova-Plugin) by [Justin Unterreiner](https://github.com/Justin-Credible) -* [:link:](pdf/pdf.d.ts) [PDF.js](https://github.com/mozilla/pdf.js) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](pdfkit/pdfkit.d.ts) [Pdfkit](http://pdfkit.org) by [Eric Hillah](https://github.com/erichillah) -* [:link:](pebblekitjs/pebblekitjs.d.ts) [PebbleKit JS](https://developer.pebble.com/docs/js/Pebble) by [Makoto Kawasaki](https://github.com/makotokw) -* [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](pegjs/pegjs.d.ts) [PEG.js](http://pegjs.org) by [vvakame](https://github.com/vvakame), [Tobias Kahlert](https://github.com/SrTobi) -* [:link:](persona/persona.d.ts) [Persona](http://www.mozilla.org/en-US/persona) by [James Frasca](https://github.com/Nycto) -* [:link:](pg/pg.d.ts) [pg](https://github.com/brianc/node-postgres) by [Phips Peter](http://pspeter3.com) -* [:link:](pg-promise/pg-promise.d.ts) [pg-promise](https://github.com/vitaly-t/pg-promise) by [vvakame](https://github.com/vvakame) -* [:link:](pgwmodal/pgwmodal.d.ts) [PgwModal](http://pgwjs.com/pgwmodal) by [Pine Mizune](https://github.com/pine613) -* [:link:](phantomcss/phantomcss.d.ts) [PhantomCSS](https://github.com/Huddle/PhantomCSS) by [Amaury Bauzac](https://github.com/abauzac) -* [:link:](phantom/phantom.d.ts) [PhantomJS bridge for NodeJS](https://github.com/sgentle/phantomjs-node) by [horiuchi](https://github.com/horiuchi), [Random](https://github.com/llRandom) -* [:link:](phantomjs/phantomjs.d.ts) [PhantomJS v1.9.0 API](https://github.com/ariya/phantomjs/wiki/API-Reference) by [Jed Hunsaker](https://github.com/jedhunsaker), [Mike Keesey](https://github.com/keesey) -* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink) -* [:link:](phonegap-nfc/phonegap-nfc.d.ts) [Phonegap NFC Plugin](https://github.com/chariotsolutions/phonegap-nfc) by [Michael Desigaud](https://github.com/michaeldesigaud) -* [:link:](phonegap-facebook-plugin/phonegap-facebook-plugin.d.ts) [phonegap-facebook-plugin](https://github.com/Wizcorp/phonegap-facebook-plugin) by [Justin Unterreiner](https://github.com/Justin-Credible) -* [:link:](phonegap-plugin-push/phonegap-plugin-push.d.ts) [phonegap-plugin-push](https://github.com/phonegap/phonegap-plugin-push) by [Frederico Galvão](https://github.com/fredgalvao) -* [:link:](urbanairship-cordova/urbanairship-cordova.d.ts) [phonegap-ua-push](https://github.com/urbanairship/phonegap-ua-push) by [Justin Unterreiner](https://github.com/Justin-Credible) -* [:link:](photonui/photonui.d.ts) [PhotonUI](https://github.com/wanadev/PhotonUI) by [Florent Poujol](https://github.com/florentpoujol) -* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar) -* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](pi-spi/pi-spi.d.ts) [pi-spi](https://github.com/natevw/pi-spi) by [Marcel Ernst](https://github.com/marcel-ernst) -* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Theodore Brown](https://github.com/theodorejb) -* [:link:](pify/pify.d.ts) [pify](https://github.com/sindresorhus/pify) by [Sam Verschueren](https://github.com/samverschueren) -* [:link:](pikaday/pikaday.d.ts) [pikaday](https://github.com/dbushell/Pikaday) by [Rudolph Gottesheim](http://midnight-design.at) -* [:link:](pinkyswear/pinkyswear.d.ts) [PinkySwear](https://github.com/timjansen/PinkySwear.js) by [Chance Snow](https://github.com/chances) -* [:link:](pinterest-sdk/pinterest-sdk.d.ts) [pinterest-sdk](https://assets.pinterest.com/sdk/sdk.js) by [Adam Burmister](https://github.com/adamburmister) -* [:link:](piwik-tracker/piwik-tracker.d.ts) [PiwikTracker](https://www.npmjs.com/package/piwik-tracker) by [Guilherme Bernal](https://github.com/lbguilherme) -* [:link:](pixi-spine/pixi-spine.d.ts) [pixi-spine](https://github.com/pixijs/pixi-spine) by [martijncroezen](https://github.com/pixijs/pixi-typescript) -* [:link:](pixi.js/pixi.js.d.ts) [Pixi.js 3.0.9 dev](https://github.com/GoodBoyDigital/pixi.js) by [clark-stevenson](https://github.com/pixijs/pixi-typescript) -* [:link:](platform/platform.d.ts) [Platform](https://github.com/bestiejs/platform.js) by [Jake Hickman](https://github.com/JakeH) -* [:link:](playerframework/playerFramework.d.ts) [Player Framework (MMPPF)](https://playerframework.codeplex.com) by [Ricardo Sabino](https://github.com/ricardosabino) -* [:link:](pleasejs/please.d.ts) [PleaseJS](http://www.checkman.io/please) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](plottable/plottable.d.ts) [Plottable](http://plottablejs.org) by [Plottable Team](https://github.com/palantir/plottable) -* [:link:](pluralize/pluralize.d.ts) [pluralize](https://www.npmjs.com/package/pluralize) by [Syu Kato](https://github.com/ukyo) -* [:link:](png-async/png-async.d.ts) [png-async](https://github.com/kanreisa/node-png-async) by [Yuki KAN](https://github.com/kanreisa) -* [:link:](pngjs2/pngjs2.d.ts) [pngjs2](https://www.npmjs.com/package/pngjs2) by [Elisée Maurer](https://sparklinlabs.com) -* [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee) -* [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr) -* [:link:](polyline/polyline.d.ts) [Polyline](https://github.com/mapbox/polyline) by [Arseniy Maximov](https://github.com/Kern0) -* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/Polymer/polymer) by [Louis Grignon](https://github.com/lgrignon), [Suguru Inatomi](https://github.com/laco0416) -* [:link:](polymer-ts/polymer-ts.d.ts) [PolymerTS](https://github.com/nippur72/PolymerTS) by [Louis Grignon](https://github.com/lgrignon) -* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz) -* [:link:](postal/postal.d.ts) [Postal](https://github.com/postaljs/postal.js) by [Lokesh Peta](https://github.com/lokeshpeta), [Paul Jolly](https://github.com/myitcv) -* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U) -* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame) -* [:link:](power-assert-formatter/power-assert-formatter.d.ts) [power-assert-formatter](https://github.com/twada/power-assert-formatter) by [vvakame](https://github.com/vvakame) -* [:link:](precise/precise.d.ts) [precise](https://www.npmjs.org/package/precise) by [Peter Harris](https://github.com/codeanimal) -* [:link:](precond/precond.d.ts) [precond](https://github.com/MathieuTurcotte/node-precond) by [Oliver Schneider](https://github.com/olsio) -* [:link:](preloadjs/preloadjs.d.ts) [PreloadJS](http://www.createjs.com/#!/PreloadJS) by [Pedro Ferreira](https://bitbucket.org/drk4) -* [:link:](prelude-ls/prelude-ls.d.ts) [prelude.ls](http://www.preludels.com) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](prettyjson/prettyjson.d.ts) [prettyjson](https://github.com/rafeca/prettyjson) by [Wael BEN ZID EL GUEBSI](https://github.com/benzid-wael) -* [:link:](meteor-prime8consulting-oauth2/meteor-prime8consulting-oauth2.d.ts) [prime8consulting:meteor-oauth2](https://github.com/prime-8-consulting/meteor-oauth2) by [Robbie Van Gorkom](https://github.com/vangorra) -* [:link:](prismjs/prism.d.ts) [prism](http://prismjs.com) by [Erik Lieben](https://github.com/eriklieben) -* [:link:](progressjs/progress.d.ts) [ProgressJs](http://usablica.github.io/progress.js) by [Shunsuke Ohtani](https://github.com/zaneli) -* [:link:](project-oxford/project-oxford.d.ts) [project-oxford](https://github.com/felixrieseberg/project-oxford) by [Scott Southwood](https://github.com/scsouthw) -* [:link:](promise/promise.d.ts) [promise](https://www.promisejs.org) by [Manuel Rueda](https://github.com/ManRueda) -* [:link:](promise-pg/promise-pg.d.ts) [promise-pg](https://bitbucket.org/lplabs/promise-pg) by [Chris Charabaruk](http://github.com/coldacid) -* [:link:](promise-pool/promise-pool.d.ts) [promise-pool](https://github.com/vilic/promise-pool) by [VILIC VANE](https://github.com/vilic) -* [:link:](promises-a-plus/promises-a-plus.d.ts) [promises-a-plus](http://promisesaplus.com) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](promisify-supertest/promisify-supertest.d.ts) [promisify-supertest](https://www.npmjs.com/package/promisify-supertest) by [Leo Liang](https://github.com/aleung) -* [:link:](protobufjs/protobufjs.d.ts) [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js) by [Panu Horsmalahti](https://github.com/panuhorsmalahti) -* [:link:](protractor-helpers/protractor-helpers.d.ts) [protractor-helpers](https://github.com/wix/protractor-helpers) by [John Cant](https://github.com/johncant) -* [:link:](protractor-http-mock/protractor-http-mock.d.ts) [protractor-http-mock](https://github.com/atecarlos/protractor-http-mock) by [Crevil](https://github.com/Crevil) -* [:link:](proxyquire/proxyquire.d.ts) [Proxyquire](https://github.com/thlorenz/proxyquire) by [jt000](https://github.com/jt000) -* [:link:](pty.js/pty.js.d.ts) [pty.js 0.2.7-1](https://github.com/chjj/pty.js) by [Vadim Macagon](https://github.com/enlight) -* [:link:](pubsubjs/pubsub.d.ts) [PubSubJS](https://github.com/mroderick/PubSubJS) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](pure-render-decorator/pure-render-decorator.d.ts) [pure-render-decorator](https://github.com/felixgirault/pure-render-decorator) by [Sean Kelley](https://github.com/seansfkelley) -* [:link:](purl/purl.d.ts) [Purl](https://github.com/allmarkedup/purl) by [Daniel Ferreira Monteiro Alves](https://github.com/danfma) -* [:link:](pusher-js/pusher-js.d.ts) [pusher-js](https://github.com/pusher/pusher-js) by [Qubo](https://github.com/tkqubo) -* [:link:](q/Q.d.ts) [Q](https://github.com/kriskowal/q) by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly) -* [:link:](q-io/Q-io.d.ts) [Q-io](https://github.com/kriskowal/q-io) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](q-retry/q-retry.d.ts) [q-retry](https://github.com/vilic/q-retry) by [VILIC VANE](https://github.com/vilic) -* [:link:](qajax/qajax.d.ts) [Qajax](https://github.com/gre/qajax) by [Boltmade](https://github.com/Boltmade) -* [:link:](qs/qs.d.ts) [qs](https://github.com/hapijs/qs) by [Roman Korneev](https://github.com/RWander) -* [:link:](qtip2/qtip2.d.ts) [qtip2](http://qtip2.com) by [Nathan Pitman](https://github.com/Seltzer) -* [:link:](query-string/query-string.d.ts) [query-string](https://github.com/sindresorhus/query-string) by [Sam Verschueren](https://github.com/SamVerschueren) -* [:link:](quill/quill.d.ts) [Quill](http://quilljs.com) by [Sumit](https://github.com/sumitkm) -* [:link:](quixote/quixote.d.ts) [quixote](http://quixote-css.com) by [Aleksandr Filatov](https://github.com/greybax) -* [:link:](qunit/qunit.d.ts) [QUnit](http://qunitjs.com) by [Diullei Gomes](https://github.com/diullei) -* [:link:](qwest/qwest.d.ts) [qwest](https://github.com/pyrsmk/qwest) by [Lindsay Evans](https://github.com/lindsayevans) -* [:link:](rabbit.js/rabbit.js.d.ts) [rabbit.js](https://github.com/squaremo/rabbit.js) by [Wonshik Kim](https://github.com/wokim) -* [:link:](ractive/ractive.d.ts) [Ractive](http://ractivejs.org) by [Han Lin Yap](http://yap.nu) -* [:link:](radium/radium.d.ts) [radium](https://github.com/formidablelabs/radium) by [Alex Gorbatchev](https://github.com/alexgorbatchev), [Philipp Holzer](https://github.com/nupplaphil) -* [:link:](random-js/random-js.d.ts) [random-js](https://github.com/ckknight/random-js) by [Gustavo Di Pietro](https://github.com/pistacchio) -* [:link:](random-string/random-string.d.ts) [random-string](https://github.com/valiton/node-random-string) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](rangy/rangy.d.ts) [Rangy](https://github.com/timdown/rangy) by [Rudolph Gottesheim](http://www.midnight-design.at) -* [:link:](raphael/raphael.d.ts) [Raphael](http://raphaeljs.com) by [CheCoxshall](https://github.com/CheCoxshall) -* [:link:](rappid/rappid.d.ts) [Rappid](http://jointjs.com/about-rappid) by [Ewout Van Gossum](https://github.com/DenEwout) -* [:link:](ratelimiter/ratelimiter.d.ts) [ratelimiter](https://github.com/tj/node-ratelimiter) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](ravenjs/ravenjs.d.ts) [Raven.js](https://github.com/getsentry/raven-js) by [Santi Albo](https://github.com/santialbo), [Benjamin Pannell](http://github.com/spartan563) -* [:link:](raygun4js/raygun4js.d.ts) [raygun4js](https://github.com/MindscapeHQ/raygun4js) by [Brian Surowiec](https://github.com/xt0rted) -* [:link:](rcloader/rcloader.d.ts) [rcloader](https://github.com/spalger/rcloader) by [Panu Horsmalahti](https://github.com/panuhorsmalahti) -* [:link:](react/react.d.ts) [React](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-global.d.ts) [React (namespace)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-create-fragment.d.ts) [React (react-addons-create-fragment)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-css-transition-group.d.ts) [React (react-addons-css-transition-group)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-shallow-compare.d.ts) [React (react-addons-css-transition-group)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-linked-state-mixin.d.ts) [React (react-addons-linked-state-mixin)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-perf.d.ts) [React (react-addons-perf)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-pure-render-mixin.d.ts) [React (react-addons-pure-render-mixin)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-test-utils.d.ts) [React (react-addons-test-utils)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-transition-group.d.ts) [React (react-addons-transition-group)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-addons-update.d.ts) [React (react-addons-update)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react/react-dom.d.ts) [React (react-dom)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) -* [:link:](react-dnd/react-dnd.d.ts) [React DnD](https://github.com/gaearon/react-dnd) by [Asana](https://asana.com) -* [:link:](react-notification-system/react-notification-system.d.ts) [React Notification System](https://www.npmjs.com/package/react-notification-system) by [Giedrius Grabauskas](https://github.com/GiedriusGrabauskas), [Deividas Bakanas](https://github.com/DeividasBakanas) -* [:link:](rc-select/rc-select.d.ts) [React Select](https://github.com/react-component/select) by [Denis Tirilis](https://github.com/DenisTirilis) -* [:link:](react-bootstrap/react-bootstrap.d.ts) [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) by [Walker Burgin](https://github.com/walkerburgin), [Vincent Siao](https://github.com/vsiao) -* [:link:](react-bootstrap-table/react-bootstrap-table.d.ts) [react-bootstrap-table](https://github.com/AllenFang/react-bootstrap-table) by [Frank Laub](https://github.com/flaub) -* [:link:](react-cropper/react-cropper.d.ts) [react-cropper](https://github.com/roadmanfong/react-cropper) by [Stepan Mikhaylyuk](https://github.com/stepancar) -* [:link:](react-datagrid/react-datagrid.d.ts) [react-datagrid](https://github.com/zippyui/react-datagrid.git) by [Stephen Jelfs](https://github.com/stephenjelfs) -* [:link:](react-day-picker/react-day-picker.d.ts) [react-day-picker](https://github.com/gpbl/react-day-picker) by [Giampaolo Bellavite](https://github.com/gpbl), [Jason Killian](https://github.com/jkillian) -* [:link:](react-dropzone/react-dropzone.d.ts) [react-dropzone](https://github.com/paramaggarwal/react-dropzone) by [Mathieu Larouche Dube](https://github.com/matdube) -* [:link:](react-fa/react-fa.d.ts) [react-fa](https://github.com/andreypopp/react-fa) by [Frank Laub](https://github.com/flaub) -* [:link:](react-helmet/react-helmet.d.ts) [react-helmet](https://github.com/nfl/react-helmet) by [Evan Bremer](https://github.com/evanbb) -* [:link:](react-holder/react-holder.d.ts) [react-holder](https://github.com/Moeriki/react-holder) by [Isman Usoh](https://github.com/isman-usoh) -* [:link:](react-infinite/react-infinite.d.ts) [react-infinite](https://github.com/seatgeek/react-infinite) by [rhysd](https://github.com/rhysd) -* [:link:](react-input-calendar/react-input-calendar.d.ts) [react-input-calendar](https://github.com/Rudeg/react-input-calendar) by [Stepan Mikhaylyuk](https://github.com/stepancar) -* [:link:](react-intl/react-intl.d.ts) [react-intl](http://formatjs.io/react) by [Bruno Grieder](https://github.com/bgrieder), [Christian Droulers](https://github.com/cdroulers) -* [:link:](react-mixin/react-mixin.d.ts) [react-mixin](https://github.com/brigand/react-mixin) by [Qubo](https://github.com/tkqubo) -* [:link:](react-motion/react-motion.d.ts) [react-motion](https://github.com/chenglou/react-motion) by [Stepan Mikhaylyuk](https://github.com/stepancar) -* [:link:](react-native/react-native.d.ts) [react-native](https://github.com/facebook/react-native) by [Bruno Grieder](https://github.com/bgrieder) -* [:link:](react-props-decorators/react-props-decorators.d.ts) [react-props-decorators](https://github.com/popkirby/react-props-decorators) by [Qubo](https://github.com/tkqubo) -* [:link:](react-redux/react-redux.d.ts) [react-redux](https://github.com/rackt/react-redux) by [Qubo](https://github.com/tkqubo), [Sean Kelley](https://github.com/seansfkelley) -* [:link:](react-router/react-router.d.ts) [react-router](https://github.com/rackt/react-router) by [Sergey Buturlakin](https://github.com/sergey-buturlakin), [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17), [Nathan Brown](https://github.com/ngbrown) -* [:link:](react-router-bootstrap/react-router-bootstrap.d.ts) [react-router-bootstrap](https://github.com/react-bootstrap/react-router-bootstrap) by [Vincent Lesierse](https://github.com/vlesierse) -* [:link:](react-router-redux/react-router-redux.d.ts) [react-router-redux](https://github.com/rackt/react-router-redux) by [Isman Usoh](http://github.com/isman-usoh), [Noah Shipley](https://github.com/noah79), [Dimitri Rosenberg](https://github.com/rosendi) -* [:link:](redux-immutable-state-invariant/redux-immutable-state-invariant.d.ts) [react-router-redux](https://github.com/leoasis/redux-immutable-state-invariant) by [Remo H. Jansen](https://github.com/remojansen) -* [:link:](react-select/react-select.d.ts) [react-select](https://github.com/JedWatson/react-select) by [ESQUIBET Hugo](https://github.com/Hesquibet), [Gilad Gray](https://github.com/giladgray) -* [:link:](react-spinkit/react-spinkit.d.ts) [react-spinkit](https://github.com/KyleAMathews/react-spinkit) by [Qubo](https://github.com/tkqubo) -* [:link:](react-swf/react-swf.d.ts) [react-swf](https://github.com/syranide/react-swf) by [Stepan Mikhaylyuk](https://github.com/stepancar) -* [:link:](react-swipeable-views/react-swipeable-views.d.ts) [react-swipeable-views](https://github.com/oliviertassinari/react-swipeable-views) by [Michael Ledin](https://github.com/mxl) -* [:link:](react-tabs/react-tabs.d.ts) [react-tabs](https://github.com/reactjs/react-tabs) by [Yuu Igarashi](https://github.com/yu-i9) -* [:link:](react-tagcloud/react-tagcloud.d.ts) [react-tagcloud](https://github.com/madox2/react-tagcloud) by [wassname](https://github.com/wassname) -* [:link:](react-tap-event-plugin/react-tap-event-plugin.d.ts) [react-tap-event-plugin](https://github.com/zilverline/react-tap-event-plugin) by [Michael Ledin](https://github.com/mxl) -* [:link:](react-widgets/react-widgets.d.ts) [react-widgets](https://github.com/jquense/react-widgets) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](read/read.d.ts) [read](https://github.com/isaacs/read) by [Tim JK](https://github.com/timjk) -* [:link:](readdir-stream/readdir-stream.d.ts) [readdir-stream](https://github.com/logicalparadox/readdir-stream) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](rebass/rebass.d.ts) [Rebass](https://github.com/jxnblk/rebass) by [rhysd](https://rhysd.github.io) -* [:link:](recursive-readdir/recursive-readdir.d.ts) [recursive-readdir](https://github.com/jergason/recursive-readdir) by [Elisée Maurer](https://github.com/elisee) -* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal), [TANAKA Koichi](https://github.com/MugeSo) -* [:link:](redlock/redlock.d.ts) [Redlock](https://github.com/mike-marcacci/node-redlock) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](redux/redux.d.ts) [Redux](https://github.com/rackt/redux) by [William Buchwalter](https://github.com/wbuchwalter), [Vincent Prouillet](https://github.com/Keats) -* [:link:](redux-action-utils/redux-action-utils.d.ts) [redux-action-utils](https://github.com/insin/redux-action-utils) by [Qubo](https://github.com/tkqubo) -* [:link:](redux-actions/redux-actions.d.ts) [redux-actions](https://github.com/acdlite/redux-actions) by [Jack Hsu](https://github.com/jaysoo) -* [:link:](redux-debounced/redux-debounced.d.ts) [redux-debounced](https://github.com/ryanseddon/redux-debounced) by [Sean Kelley](https://github.com/seansfkelley) -* [:link:](redux-devtools/redux-devtools.d.ts) [redux-devtools](https://github.com/gaearon/redux-devtools) by [Petryshyn Sergii](https://github.com/mc-petry) -* [:link:](redux-devtools-dock-monitor/redux-devtools-dock-monitor.d.ts) [redux-devtools-dock-monitor](https://github.com/gaearon/redux-devtools-dock-monitor) by [Petryshyn Sergii](https://github.com/mc-petry) -* [:link:](redux-devtools-log-monitor/redux-devtools-log-monitor.d.ts) [redux-devtools-log-monitor](https://github.com/gaearon/redux-devtools-log-monitor) by [Petryshyn Sergii](https://github.com/mc-petry) -* [:link:](redux-form/redux-form.d.ts) [redux-form](https://github.com/erikras/redux-form) by [Daniel Lytkin](https://github.com/aikoven) -* [:link:](react-scroll/react-scroll.d.ts) [redux-immutable](https://github.com/fisshy/react-scroll) by [Pedro Pereira](https://github.com/oizie) -* [:link:](redux-immutable/redux-immutable.d.ts) [redux-immutable](https://github.com/gajus/redux-immutable) by [Pedro Pereira](https://github.com/oizie) -* [:link:](redux-logger/redux-logger.d.ts) [redux-logger](https://github.com/fcomb/redux-logger) by [Alexander Rusakov](https://github.com/arusakov) -* [:link:](redux-promise/redux-promise.d.ts) [redux-promise](https://github.com/acdlite/redux-promise) by [Rogelio Morrell Caballero](https://github.com/molekilla) -* [:link:](redux-router/redux-router.d.ts) [redux-router](https://github.com/rackt/redux-router) by [Stepan Mikhaylyuk](http://github.com/stepancar) -* [:link:](redux-saga/redux-saga.d.ts) [redux-saga](https://github.com/yelouafi/redux-saga) by [Daniel Lytkin](https://github.com/aikoven), [Dimitri Rosenberg](https://github.com/rosendi) -* [:link:](redux-thunk/redux-thunk.d.ts) [redux-thunk](https://github.com/gaearon/redux-thunk) by [Qubo](https://github.com/tkqubo) -* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd) -* [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd) -* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd) -* [:link:](ref-union/ref-union.d.ts) [ref-union](https://github.com/TooTallNate/ref-union) by [Paul Loyd](https://github.com/loyd) -* [:link:](reflux/reflux.d.ts) [RefluxJS](https://github.com/reflux/refluxjs) by [Maurice de Beijer](https://github.com/mauricedb) -* [:link:](relateurl/relateurl.d.ts) [relateurl](https://github.com/stevenvachon/relateurl) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](replace-ext/replace-ext.d.ts) [replace-ext](https://github.com/wearefractal/replace-ext) by [Deividas Bakanas](https://github.com/DeividasBakanas) -* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds), [Joe Skeen](http://github.com/joeskeen), [Christopher Currens](https://github.com/ccurrens) -* [:link:](request-ip/request-ip.d.ts) [request-ip](https://github.com/pbojinov/request-ip) by [Adam Babcock](https://github.com/mrhen) -* [:link:](request-promise/request-promise.d.ts) [request-promise](https://www.npmjs.com/package/request-promise) by [Christopher Glantschnig](https://github.com/cglantschnig), [Joe Skeen](http://github.com/joeskeen) -* [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](reselect/reselect.d.ts) [reselect](https://github.com/rackt/reselect) by [Ian Ker-Seymer](https://github.com/ianks) -* [:link:](resemblejs/resemblejs.d.ts) [Resemble.js](http://huddle.github.io/Resemble.js) by [Tim Perry](https://github.com/pimterry) -* [:link:](resolve-from/resolve-from.d.ts) [resolve-from](https://github.com/sindresorhus/resolve-from) by [unional](https://github.com/unional) -* [:link:](response-time/response-time.d.ts) [response-time](https://github.com/expressjs/response-time) by [Uros Smolnik](https://github.com/urossmolnik) -* [:link:](rest-io/rest-io.d.ts) [rest-io](https://github.com/EnoF/rest-io) by [Andy Tang](https://github.com/EnoF), [Stefan Schacherl](https://github.com/TheBay0r) -* [:link:](rest/rest.d.ts) [rest.js](https://github.com/cujojs/rest) by [Wim Looman](https://github.com/Nemo157) -* [:link:](restangular/restangular.d.ts) [Restangular](https://github.com/mgonto/restangular) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](restful.js/restful.js.d.ts) [restful.js](https://github.com/marmelab/restful.js) by [Qubo](https://github.com/tkqubo) -* [:link:](rethinkdb/rethinkdb.d.ts) [Rethinkdb](http://rethinkdb.com) by [Sean Hess](https://seanhess.github.io) -* [:link:](reveal/reveal.d.ts) [Reveal](https://github.com/hakimel/reveal.js) by [grapswiz](https://github.com/grapswiz) -* [:link:](rewire/rewire.d.ts) [rewire](https://github.com/jhnns/rewire) by [Borislav Zhivkov](https://github.com/borislavjivkov) -* [:link:](rickshaw/rickshaw.d.ts) [Rickshaw](http://code.shutterstock.com/rickshaw) by [Blake Niemyjski](https://github.com/niemyjski) -* [:link:](rimraf/rimraf.d.ts) [rimraf](https://github.com/isaacs/rimraf) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](riot-api-nodejs/riot-api-nodejs.d.ts) [Riot Games API](https://developer.riotgames.com) by [Luca Laissue](https://github.com/zafixlrp) -* [:link:](riot-games-api/riot-games-api.d.ts) [Riot Games API](https://developer.riotgames.com) by [Xavier Stouder](https://github.com/xstoudi) -* [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame) -* [:link:](riotcontrol/riotcontrol.d.ts) [RiotControl](https://github.com/jimsparkman/RiotControl) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev) -* [:link:](rosie/rosie.d.ts) [rosie](https://github.com/rosiejs/rosie) by [Abner Oliveira](https://github.com/abner) -* [:link:](roslib/roslib.d.ts) [roslib.js](http://wiki.ros.org/roslibjs) by [Stefan Profanter](https://github.com/Pro) -* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch) -* [:link:](router5/router5.d.ts) [router5](https://github.com/router5/router5) by [Matthew Dahl](https://github.com/sandersky) -* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson) -* [:link:](rsmq/rsmq.d.ts) [rsmq](http://smrchy.github.io/rsmq) by [Qubo](https://github.com/MugeSo) -* [:link:](rsmq-worker/rsmq-worker.d.ts) [rsmq-worker](http://smrchy.github.io/rsmq/rsmq-worker) by [TANAKA Koichi](https://github.com/MugeSo) -* [:link:](rss/rss.d.ts) [rss](https://github.com/dylang/node-rss) by [Second Datke](https://github.com/secondwtq) -* [:link:](rtree/rtree.d.ts) [rtree](https://github.com/leaflet-extras/RTree) by [Omede Firouz](https://github.com/oefirouz) -* [:link:](run-sequence/run-sequence.d.ts) [run-sequence](https://github.com/OverZealous/run-sequence) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](rx/rx.d.ts) [RxJS](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx-dom/rx-dom.d.ts) [RxJS](https://github.com/Reactive-Extensions/RxJS-DOM) by [oliver Weichhold](https://github.com/oliverw) -* [:link:](rx/rx.aggregates.d.ts) [RxJS-Aggregates](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.all.d.ts) [RxJS-All](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.async.d.ts) [RxJS-Async](http://rx.codeplex.com) by [zoetrope](https://github.com/zoetrope), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.backpressure.d.ts) [RxJS-BackPressure](http://rx.codeplex.com) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.binding.d.ts) [RxJS-Binding](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.coincidence.d.ts) [RxJS-Coincidence](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.experimental.d.ts) [RxJS-Experimental](https://github.com/Reactive-Extensions/RxJS) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.joinpatterns.d.ts) [RxJS-Join](http://rx.codeplex.com) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx-jquery/rx.jquery.d.ts) [RxJS-jQuery](https://github.com/Reactive-Extensions/RxJS-jQuery) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.lite.d.ts) [RxJS-Lite](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.testing.d.ts) [RxJS-Testing](https://github.com/Reactive-Extensions/RxJS) by [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.time.d.ts) [RxJS-Time](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](rx/rx.virtualtime.d.ts) [RxJS-VirtualTime](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek) -* [:link:](s3-uploader/s3-uploader.d.ts) [s3-uploader](https://www.npmjs.com/package/s3-uploader) by [COLSA Corporation](http://www.colsa.com) -* [:link:](s3rver/s3rver.d.ts) [S3rver](https://github.com/jamhall/s3rver) by [David Broder-Rodgers](https://github.com/DavidBR-SW) -* [:link:](safari-extension/safari-extension.d.ts) [Safari extension development](https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009977-CH1-SW1) by [Luuk](https://github.com/luukd) -* [:link:](safari-extension/safari-extension-content.d.ts) [Safari extension development (content-scripts)](https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/InjectingScripts/InjectingScripts.html#//apple_ref/doc/uid/TP40009977-CH6-SW1) by [Luuk](https://github.com/luukd) -* [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising) -* [:link:](sandboxed-module/sandboxed-module.d.ts) [sandboxed-module](https://github.com/felixge/node-sandboxed-module) by [Sven Reglitzki](https://github.com/svi3c) -* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157) -* [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](sanitizer/sanitizer.d.ts) [Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) by [Dave Taylor](http://davetayls.me) -* [:link:](sat/sat.d.ts) [sat.js](https://github.com/jriecken/sat-js) by [Hou Chunlei](https://github.com/omni360) -* [:link:](satnav/satnav.d.ts) [satnav](https://github.com/f5io/satnav-js) by [Christian Holm Diget](https://github.com/DotNetNerd) -* [:link:](sax/sax.d.ts) [sax js](https://github.com/isaacs/sax-js) by [Asana](https://asana.com) -* [:link:](scalike/scalike.d.ts) [scalike API](https://github.com/ryoppy/scalike-typescript) by [ryoppy](https://github.com/ryoppy) -* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy) -* [:link:](scrolltofixed/scrolltofixed.d.ts) [ScrollToFixed](https://github.com/bigspotteddog/ScrollToFixed) by [Ben Dixon](https://github.com/bmdixon) -* [:link:](scrypt-async/scrypt-async.d.ts) [scrypt-async](https://github.com/dchest/scrypt-async-js) by [Kaur Kuut](https://github.com/xStrom) -* [:link:](microsoft-sdk-soap/microsoft-sdk-soap.d.ts) [Sdk.Soap.js](https://code.msdn.microsoft.com/SdkSoapjs-9b51b99a) by [Markus Mauch](https://github.com/markusmauch) -* [:link:](seedrandom/seedrandom.d.ts) [seedrandom](https://github.com/davidbau/seedrandom) by [Kern Handa](https://github.com/kernhanda) -* [:link:](segment-analytics/segment-analytics.d.ts) [Segment's analytics.js](https://segment.com/docs/libraries/analytics.js) by [Andrew Fong](https://github.com/fongandrew) -* [:link:](analytics-node/analytics-node.d.ts) [Segment's analytics.js for Node.js](https://segment.com/docs/libraries/node) by [Andrew Fong](https://github.com/fongandrew) -* [:link:](select2/select2.d.ts) [Select2](http://ivaynberg.github.com/select2) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](selectize/selectize.d.ts) [Selectize](https://github.com/brianreavis/selectize.js) by [Adi Dahiya](https://github.com/adidahiya) -* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak) -* [:link:](semaphore/semaphore.d.ts) [semaphore](https://github.com/abrkn/semaphore.js) by [Matt Frantz](https://github.com/mhfrantz) -* [:link:](semver/semver.d.ts) [semver](https://github.com/npm/node-semver) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](sendgrid/sendgrid.d.ts) [sendgrid](https://github.com/sendgrid/sendgrid-nodejs) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](sentence-case/sentence-case.d.ts) [sentence-case](https://github.com/blakeembrey/sentence-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](sequelize/sequelize.d.ts) [Sequelize](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal), [Ivan Drinchev](https://github.com/drinchev) -* [:link:](sequelize-fixtures/sequelize-fixtures.d.ts) [Sequelize-Fixtures](https://github.com/domasx2/sequelize-fixtures) by [Christian Schwarz](https://github.com/cschwarz) -* [:link:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery) -* [:link:](serve-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik) -* [:link:](serve-index/serve-index.d.ts) [serve-index](https://github.com/expressjs/serve-index) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik) -* [:link:](ss-utils/ss-utils.d.ts) [ServiceStack Utils](https://servicestack.net) by [Demis Bellot](https://github.com/mythz) -* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](sharepoint/SharePoint.d.ts) [SharePoint 2010 and 2013](https://github.com/gandjustas/sptypescript) by [Stanislav Vyshchepan](http://blog.gandjustas.ru), [Andrey Markeev](http://markeev.com) -* [:link:](shelljs/shelljs.d.ts) [ShellJS](http://shelljs.org) by [Niklas Mollenhauer](https://github.com/nikeee) -* [:link:](shortid/shortid.d.ts) [shortid](https://github.com/dylang/shortid) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](should-promised/should-promised.d.ts) [should-promised](https://github.com/shouldjs/promised) by [Yaroslav Admin](https://github.com/devoto13) -* [:link:](should/should.d.ts) [should.js](https://github.com/shouldjs/should.js) by [Alex Varju](https://github.com/varju), [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](showdown/showdown.d.ts) [Showdown](https://github.com/coreyti/showdown) by [cbowdon](https://github.com/cbowdon) -* [:link:](shuffle-array/shuffle-array.d.ts) [shuffle-array](https://github.com/pazguille/shuffle-array) by [rhysd](https://rhysd.github.io) -* [:link:](siesta/siesta.d.ts) [Siesta](http://www.bryntum.com/products/siesta) by [bquarmby](https://github.com/bquarmby) -* [:link:](sigmajs/sigmajs.d.ts) [sigma.js](https://github.com/jacomyal/sigma.js) by [Qinfeng Chen](https://github.com/qinfchen) -* [:link:](signalr/signalr.d.ts) [SignalR](http://www.asp.net/signalr) by [Boris Yankov](https://github.com/borisyankov), [T. Michael Keesey](https://github.com/keesey), [Giedrius Grabauskas](https://github.com/GiedriusGrabauskas) -* [:link:](signature_pad/signature_pad.d.ts) [signature_pad](https://github.com/szimek/signature_pad) by [Abubaker Bashir](https://github.com/AbubakerB) -* [:link:](simple-cw-node/simple-cw-node.d.ts) [simple-cw-node](https://github.com/astronaughts/simple-cw-node) by [vvakame](https://github.com/vvakame) -* [:link:](simple-mock/simple-mock.d.ts) [simple-mock](https://github.com/jupiter/simple-mock) by [Leon Yu](https://github.com/leonyu) -* [:link:](simplebar/simplebar.d.ts) [simplebar.js](https://github.com/Grsmto/simplebar) by [Gregor Woiwode](https://github.com/gregonnet) -* [:link:](jquery.simplemodal/jquery.simplemodal.d.ts) [SimpleModal](http://www.ericmmartin.com/projects/simplemodal) by [Friedrich von Never](https://github.com/ForNeVeR) -* [:link:](simplestorage.js/simplestorage.js.d.ts) [simpleStorage](https://github.com/andris9/simpleStorage) by [Áxel Costas Pena](https://github.com/axelcostaspena) -* [:link:](sinon/sinon.d.ts) [Sinon](http://sinonjs.org) by [William Sears](https://github.com/mrbigdog2u) -* [:link:](sinon-chai/sinon-chai.d.ts) [sinon-chai](https://github.com/domenic/sinon-chai) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [Jed Mao](https://github.com/jedmao) -* [:link:](sinon-chrome/sinon-chrome.d.ts) [Sinon-Chrome](https://github.com/vitalets/sinon-chrome) by [Tim Perry](https://github.com/pimterry) -* [:link:](sinon-stub-promise/sinon-stub-promise.d.ts) [sinon-stub-promise](https://github.com/substantial/sinon-stub-promise) by [Thiago Temple](https://github.com/vintem) -* [:link:](sipml/sipml.d.ts) [SIPml5](http://sipml5.org) by [A. Groenenboom](https://github.com/chookies) -* [:link:](sjcl/sjcl.d.ts) [sjcl](http://crypto.stanford.edu/sjcl) by [Eugene Chernyshov](https://github.com/Evgenus) -* [:link:](ski/ski.d.ts) [ski](https://github.com/jden/ski) by [Aya Morisawa](https://github.com/AyaMorisawa) -* [:link:](skyway/skyway.d.ts) [SkyWay](http://nttcom.github.io/skyway) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](slate-irc/slate-irc.d.ts) [slate-irc](https://github.com/slate/slate-irc) by [Elisée MAURER](https://github.com/elisee) -* [:link:](slickgrid/SlickGrid.d.ts) [SlickGrid](https://github.com/mleibman/SlickGrid) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](slickgrid/slick.autotooltips.d.ts) [SlickGrid AutoToolTips Plugin](https://github.com/mleibman/SlickGrid) by [Ryo Iwamoto](https://github.com/ryiwamoto) -* [:link:](slickgrid/slick.headerbuttons.d.ts) [SlickGrid HeaderButtons Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone) -* [:link:](slickgrid/slick.rowselectionmodel.d.ts) [SlickGrid RowSelectionModel Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone) -* [:link:](slideout/slideout.d.ts) [Slideout](https://github.com/mango/slideout) by [Markus Peloso](https://github.com/ToastHawaii) -* [:link:](smoothie/smoothie.d.ts) [Smoothie Charts](https://github.com/joewalnes/smoothie) by [Drew Noakes](https://drewnoakes.com), [Mike H. Hawley](https://github.com/mikehhawley) -* [:link:](smtpapi/smtpapi.d.ts) [smtpapi-nodejs](https://github.com/sendgrid/smtpapi-nodejs) by [Antonio Morales](https://github.com/a-morales) -* [:link:](snake-case/snake-case.d.ts) [snake-case](https://github.com/blakeembrey/snake-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk), [Mattanja Kern](https://github.com/mattanja) -* [:link:](soap/soap.d.ts) [soap](https://www.npmjs.com/package/soap) by [Nicole Wang](https://github.com/nicoleWjie) -* [:link:](cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing.d.ts) [SocialSharing-PhoneGap-Plugin](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin) by [Markus Wagner](https://github.com/Ritzlgrmft) -* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages), [Florent Poujol](https://github.com/florentpoujol) -* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages), [Florent Poujol](https://github.com/florentpoujol) -* [:link:](socket.io-redis/socket.io-redis.d.ts) [socket.io-redis](https://github.com/socketio/socket.io-redis) by [Philipp Holzer](https://github.com/nupplaphil) -* [:link:](socket.io.users/socket.io.users.d.ts) [socket.io.users](https://github.com/nodets/socket.io.users) by [Makis Maropoulos](https://github.com/kataras) -* [:link:](socketty/socketty.d.ts) [Socketty](https://www.npmjs.com/package/socketty) by [Nax](https://github.com/Nax) -* [:link:](sockjs/sockjs.d.ts) [SockJS 0.3.x](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev) -* [:link:](sockjs-client/sockjs-client.d.ts) [sockjs-client](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev), [Alexander Rusakov](https://github.com/arusakov) -* [:link:](sockjs-node/sockjs-node.d.ts) [sockjs-node 0.3.x](https://github.com/sockjs/sockjs-node) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing) -* [:link:](sortablejs/sortablejs.d.ts) [Sortable.js](https://github.com/RubaXa/Sortable) by [Maw-Fox](http://github.com/Maw-Fox) -* [:link:](soundjs/soundjs.d.ts) [SoundJS](http://www.createjs.com/#!/SoundJS) by [Pedro Ferreira](https://bitbucket.org/drk4) -* [:link:](source-map/source-map.d.ts) [source-map](https://github.com/mozilla/source-map) by [Morten Houston Ludvigsen](https://github.com/MortenHoustonLudvigsen) -* [:link:](source-map-support/source-map-support.d.ts) [source-map-support](https://github.com/evanw/source-map-support) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](space-pen/space-pen.d.ts) [SpacePen](https://github.com/atom/space-pen) by [vvakame](https://github.com/vvakame) -* [:link:](speakeasy/speakeasy.d.ts) [speakeasy](https://github.com/markbao/speakeasy) by [Lucas Woo](https://github.com/legendecas) -* [:link:](spectrum/spectrum.d.ts) [spectrum](https://github.com/bgrins/spectrum) by [Mordechai Zuber](https://github.com/M-Zuber) -* [:link:](spin/spin.d.ts) [Spin.js](http://fgnass.github.com/spin.js) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb) -* [:link:](split/split.d.ts) [split](https://github.com/dominictarr/split) by [Marcin Porębski](https://github.com/marcinporebski) -* [:link:](spotify-web-api-js/spotify-web-api-js.d.ts) [spotify-web-api-js](https://github.com/JMPerez/spotify-web-api-js) by [Niels Kristian Hansen Skovmand](https://github.com/skovmand) -* [:link:](sprintf-js/sprintf-js.d.ts) [sprintf-js](https://www.npmjs.com/package/sprintf-js) by [Jason Swearingen](https://jasonswearingen.github.io) -* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](sql.js/sql.js.d.ts) [sql.js](https://github.com/kripken/sql.js) by [George Wu](https://github.com/Hozuki) -* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti) -* [:link:](squirejs/squirejs.d.ts) [Squire](https://github.com/iammerrick/Squire.js) by [Bradley Ayers](https://github.com/bradleyayers) -* [:link:](ssh2/ssh2.d.ts) [ssh2](https://github.com/mscdex/ssh2) by [Qubo](https://github.com/tkQubo) -* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](stacktrace-js/stacktrace-js.d.ts) [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) by [Exceptionless](https://github.com/exceptionless) -* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/stampit-org/stampit) by [Vasyl Boroviak](https://github.com/koresar) -* [:link:](stamplay-js-sdk/stamplay-js-sdk.d.ts) [stamplay-js-sdk](https://github.com/Stamplay/stamplay-js-sdk) by [Riderman de Sousa Barbosa](https://github.com/ridermansb) -* [:link:](static-eval/static-eval.d.ts) [static-eval](https://github.com/substack/static-eval) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped) -* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai) -* [:link:](statsd-client/statsd-client.d.ts) [statsd-client](https://github.com/msiebuhr/node-statsd-client) by [Peter Kooijmans](https://github.com/peterkooijmans) -* [:link:](status-bar/status-bar.d.ts) [status-bar](https://github.com/atom/status-bar) by [vvakame](https://github.com/vvakame) -* [:link:](statuses/statuses.d.ts) [statuses](https://github.com/jshttp/statuses) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](steam/steam.d.ts) [steam](https://github.com/seishun/node-steam) by [Andrey Kurdyumov](https://github.com/kant2002) -* [:link:](slick-carousel/slick-carousel.d.ts) [stick](http://kenwheeler.github.io/slick) by [John Gouigouix](https://github.com/orchestra-ts/DefinitelyTyped) -* [:link:](storejs/storejs.d.ts) [store.js](https://github.com/marcuswestin/store.js) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](stream-meter/stream-meter.d.ts) [stream-meter](https://github.com/brycebaril/node-stream-meter) by [TANAKA Koichi](https://github.com/mugeso) -* [:link:](stream-series/stream-series.d.ts) [stream-series](https://github.com/rschmukler/stream-series) by [Keita Kagurazaka](https://github.com/k-kagurazaka) -* [:link:](stream-to-array/stream-to-array.d.ts) [stream-to-array](https://github.com/stream-utils/stream-to-array) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](streamjs/streamjs.d.ts) [streamjs](http://winterbe.github.io/streamjs) by [Bence Eros](https://github.com/erosb) -* [:link:](string_score/string_score.d.ts) [string_score](https://github.com/joshaven/string_score) by [Marcin Porębski](https://github.com/marcinporebski) -* [:link:](string/string.d.ts) [string.js](http://stringjs.com) by [Bas Pennings](https://github.com/basp) -* [:link:](strip-json-comments/strip-json-comments.d.ts) [strip-json-comments](https://github.com/sindresorhus/strip-json-comments) by [Dylan R. E. Moonfire](https://github.com/dmoonfire) -* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com), [Eric J. Smith](https://github.com/ejsmith), [Amrit Kahlon](https://github.com/amritk) -* [:link:](stripe-checkout/stripe-checkout.d.ts) [Stripe Checkout](https://stripe.com/checkout) by [Chris Wrench](https://github.com/cgwrench) -* [:link:](stripe/stripe-node.d.ts) [stripe-node](https://github.com/stripe/stripe-node) by [William Johnston](https://github.com/wjohnsto), [Peter Harris](https://github.com/codeanimal) -* [:link:](strophe/strophe.d.ts) [Strophe.js](http://strophe.im/strophejs) by [David Deutsch](https://github.com/DavidKDeutsch) -* [:link:](stylus/stylus.d.ts) [stylus](https://github.com/LearnBoost/stylus) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](sugar/sugar.d.ts) [Sugar](http://sugarjs.com) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](superagent/superagent.d.ts) [SuperAgent](https://github.com/visionmedia/superagent) by [Alex Varju](https://github.com/varju) -* [:link:](supertest/supertest.d.ts) [SuperTest](https://github.com/visionmedia/supertest) by [Alex Varju](https://github.com/varju) -* [:link:](supertest-as-promised/supertest-as-promised.d.ts) [SuperTest as Promised](https://github.com/WhoopInc/supertest-as-promised) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](svg-injector/svg-injector.d.ts) [SVG Injector](https://github.com/iconic/SVGInjector) by [Patrick Westerhoff](https://github.com/poke) -* [:link:](svg-pan-zoom/svg-pan-zoom-2.3.9.d.ts) [svg-pan-zoom](https://github.com/ariutta/svg-pan-zoom) by [Chintan Shah](https://github.com/Promact) -* [:link:](svg-pan-zoom/svg-pan-zoom.d.ts) [svg-pan-zoom](https://github.com/ariutta/svg-pan-zoom) by [César Vidril](https://github.com/Yimiprod) -* [:link:](svg-sprite/svg-sprite.d.ts) [svg-sprite](https://github.com/jkphl/svg-sprite) by [Qubo](https://github.com/tkqubo) -* [:link:](svgjs/svgjs.d.ts) [svg.js](http://www.svgjs.com) by [Sean Hess](https://seanhess.github.io) -* [:link:](svg2png/svg2png.d.ts) [svg2png node package](https://github.com/domenic/svg2png) by [hans windhoff](https://github.com/hansrwindhoff) -* [:link:](svgjs.draggable/svgjs.draggable.d.ts) [svgjs.draggable](http://www.svgjs.com) by [Luigi Trabacchin](https://github.com/LiFeleSs) -* [:link:](swag/swag.d.ts) [swag](https://github.com/elving/swag) by [Shogo Iwano](https://github.com/shiwano) -* [:link:](swaggerize-express/swaggerize-express.d.ts) [swaggerize-express 4.x](https://github.com/krakenjs/swaggerize-express) by [TANAKA Koichi](https://github.com/mugeso) -* [:link:](swap-case/swap-case.d.ts) [swap-case](https://github.com/blakeembrey/swap-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](sweetalert/sweetalert.d.ts) [SweetAlert](https://github.com/t4t5/sweetalert) by [Markus Peloso](https://github.com/ToastHawaii) -* [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou) -* [:link:](swiftclick/swiftclick.d.ts) [SwiftClick](https://github.com/munkychop/swiftclick) by [Laurence C](https://github.com/Laurence-C) -* [:link:](swig/swig.d.ts) [swig](http://github.com/paularmstrong/swig) by [Peter Harris](https://github.com/CodeAnimal), [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](swig-email-templates/swig-email-templates.d.ts) [swig-email-templates](https://github.com/andrewrk/swig-email-templates) by [Adam Babcock](https://github.com/mrhen) -* [:link:](swipe/swipe.d.ts) [Swipe](https://github.com/thebird/Swipe) by [Andrey Kurdyumov](https://github.com/kant2002) -* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano), [Luca Trazzi](https://github.com/lucax88x) -* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder), [Clayton Lautier](https://github.com/claylaut) -* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo) -* [:link:](systemjs/systemjs.d.ts) [System.js](https://github.com/systemjs/systemjs) by [Ludovic HENIN](https://github.com/ludohenin), [Nathan Walker](https://github.com/NathanWalker) -* [:link:](tabris/tabris.d.ts) [Tabris.js](http://tabrisjs.com) by [Tabris.js team](http://github.com/eclipsesource/tabris) -* [:link:](tabtab/tabtab.d.ts) [tabtab](https://github.com/mklabs/node-tabtab) by [Vojtěch Habarta](https://github.com/vojtechhabarta) -* [:link:](tape/tape.d.ts) [tape](https://github.com/substack/tape) by [Bart van der Schoor](https://github.com/Bartvds), [Haoqun Jiang](https://github.com/sodatea) -* [:link:](tar/tar.d.ts) [tar](https://github.com/npm/node-tar) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](tcomb/tcomb.d.ts) [tcomb](http://gcanti.github.io/tcomb/guide/index.html) by [Hans Windhoff](https://github.com/hansrwindhoff) -* [:link:](tea-merge/tea-merge.d.ts) [tea-merge](https://github.com/qualiancy/tea-merge) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin) -* [:link:](tedious/tedious.d.ts) [tedious](https://pekim.github.io/tedious) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](tedious-connection-pool/tedious-connection-pool.d.ts) [tedious-connection-pool](https://github.com/pekim/tedious-connection-pool) by [Cyprien Autexier](https://github.com/sandorfr) -* [:link:](teechart/teechart.d.ts) [TeeChart](http://www.steema.com) by [Steema Software](https://steema.com) -* [:link:](temp/temp.d.ts) [temp](https://www.npmjs.com/package/temp) by [Daniel Rosenwasser](https://github.com/DanielRosenwasser) -* [:link:](temp-fs/temp-fs.d.ts) [temp-fs](https://github.com/jakwings/node-temp-fs) by [MEDIA CHECK s.r.o.](http://www.mediacheck.cz) -* [:link:](tether/tether.d.ts) [Tether](http://github.hubspot.com/tether) by [Adi Dahiya](https://github.com/adidahiya) -* [:link:](tether-shepherd/tether-shepherd.d.ts) [Tether-Shepherd](http://github.hubspot.com/shepherd) by [Matt Gibbs](https://github.com/mtgibbs) -* [:link:](text-buffer/text-buffer.d.ts) [text-buffer](https://github.com/atom/text-buffer) by [vvakame](https://github.com/vvakame) -* [:link:](text-encoding/text-encoding.d.ts) [text-encoding](https://github.com/inexorabletash/text-encoding) by [MIZUNE Pine](https://github.com/pine613) -* [:link:](facebook-js-sdk/facebook-js-sdk.d.ts) [the Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Amrit Kahlon](https://github.com/amritk) -* [:link:](facebook-pixel/facebook-pixel.d.ts) [the Facebook Pixel Tag API](https://developers.facebook.com/docs/ads-for-websites/tag-api) by [Noctis Hsu](https://github.com/noctishsu) -* [:link:](spotify-api/spotify-api.d.ts) [The Spotify Web API](https://developer.spotify.com/web-api) by [Niels Kristian Hansen Skovmand](https://github.com/skovmand) -* [:link:](threejs/three-FirstPersonControls.d.ts) [three.js](http://mrdoob.github.com/three.js) by [Poul Kjeldager Sørensen](https://github.com/s093294) -* [:link:](threejs/three-canvasrenderer.d.ts) [three.js (CanvasRenderer.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-copyshader.d.ts) [three.js (CopyShader.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/shaders/CopyShader.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-css3drenderer.d.ts) [three.js (CSS3DRenderer.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CSS3DRenderer.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/detector.d.ts) [three.js (Detector.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-editorcontrols.d.ts) [three.js (EditorControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/EditorControls.js) by [Qinsi ZHU](https://github.com/qszhusightp) -* [:link:](threejs/three-effectcomposer.d.ts) [three.js (EffectComposer.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/EffectComposer.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-maskpass.d.ts) [three.js (MaskPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/MaskPass.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-orbitcontrols.d.ts) [three.js (OrbitControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/OrbitControls.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-orthographictrackballcontrols.d.ts) [three.js (OrthographicTrackballControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/OrthographicTrackballControls.js) by [Stefan Profanter](https://github.com/pro) -* [:link:](threejs/three-projector.d.ts) [three.js (Projector.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/Projector.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-renderpass.d.ts) [three.js (RenderPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/RenderPass.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-shaderpass.d.ts) [three.js (ShaderPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/ShaderPass.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-trackballcontrols.d.ts) [three.js (TrackballControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](threejs/three-transformcontrols.d.ts) [three.js (TransformControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TransformControls.js) by [Stefan Profanter](https://github.com/Pro) -* [:link:](threejs/three-vrcontrols.d.ts) [three.js (VRControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/VRControls.js) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](threejs/three-vreffect.d.ts) [three.js (VREffect.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/effects/VREffect.js) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](threejs/three.d.ts) [three.js r75](http://mrdoob.github.com/three.js) by [Kon](http://phyzkit.net), [Satoru Kimura](https://github.com/gyohk), [Florent Poujol](https://github.com/florentpoujol), [SereznoKot](https://github.com/SereznoKot) -* [:link:](thrift/thrift.d.ts) [thrift](https://www.npmjs.com/package/thrift) by [Zachary Collins](https://github.com/corps) -* [:link:](through/through.d.ts) [through](https://github.com/dominictarr/through) by [Andrew Gaspar](https://github.com/AndrewGaspar) -* [:link:](through2/through2.d.ts) [through2 v](https://github.com/rvagg/through2) by [Bart van der Schoor](https://github.com/Bartvds), [jedmao](https://github.com/jedmao), [Georgios Valotasios](https://github.com/valotas) -* [:link:](timelinejs/timelinejs.d.ts) [timelinejs](https://github.com/NUKnightLab/TimelineJS) by [Roland Zwaga](https://github.com/rolandzwaga) -* [:link:](timezone-js/timezone-js.d.ts) [timezone-js](https://github.com/mde/timezone-js) by [bonnici](https://github.com/bonnici) -* [:link:](timezonecomplete/timezonecomplete.d.ts) [timezonecomplete](https://github.com/SpiritIT/timezonecomplete) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds), [Peter Snider](https://github.com/psnider) -* [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber) -* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins) -* [:link:](title-case/title-case.d.ts) [title-case](https://github.com/blakeembrey/title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical) -* [:link:](to-title-case-gouch/to-title-case-gouch.d.ts) [to-title-case](https://github.com/gouch/to-title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](tooltipster/tooltipster.d.ts) [tooltipster](https://github.com/iamceege/tooltipster) by [Stephen Lautier](https://github.com/stephenlautier) -* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428) -* [:link:](traceback/traceback.d.ts) [Traceback](http://github.com/iriscouch/traceback) by [Michael Zabka](https://github.com/misak113) -* [:link:](tracking/tracking.d.ts) [Tracking.js](https://github.com/eduardolundgren/tracking.js) by [Tim Perry](https://github.com/pimterry) -* [:link:](traverse/traverse.d.ts) [traverse](https://github.com/substack/js-traverse) by [newclear](https://github.com/newclear) -* [:link:](traverson/traverson.d.ts) [Traverson](https://github.com/basti1302/traverson) by [Marcin Porębski](https://github.com/marcinporebski) -* [:link:](trunk8/trunk8.d.ts) [trunk8](https://github.com/rviscomi/trunk8) by [Blake Niemyjski](https://github.com/niemyjski) -* [:link:](tsmonad/tsmonad.d.ts) [TsMonad](https://github.com/cbowdon/TsMonad) by [Chris Bowdon](https://github.com/cbowdon) -* [:link:](tspromise/tspromise.d.ts) [tspromise](https://github.com/soywiz/tspromise) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](turf/turf.d.ts) [Turf](http://turfjs.org) by [Guillaume Croteau](https://github.com/gcroteau) -* [:link:](tween.js/tween.js.d.ts) [tween.js r12](https://github.com/sole/tween.js) by [sunetos](https://github.com/sunetos), [jzarnikov](https://github.com/jzarnikov) -* [:link:](tweenjs/tweenjs.d.ts) [TweenJS](http://www.createjs.com/#!/TweenJS) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist) -* [:link:](twig/twig.d.ts) [twig](https://github.com/justjohn/twig.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](twitter/twitter.d.ts) [Twitter for Websites](https://dev.twitter.com/web) by [Chitoku](https://github.com/chitoku-k) -* [:link:](jquery.bootstrap.wizard/jquery.bootstrap.wizard.d.ts) [twitter-bootstrap-wizard](https://github.com/VinceG/twitter-bootstrap-wizard) by [Blake Niemyjski](https://github.com/niemyjski) -* [:link:](twitter-text/twitter-text.d.ts) [twitter-text](https://github.com/twitter/twitter-text) by [rhysd](https://rhysd.github.io) -* [:link:](twix/twix.d.ts) [twix.js](https://github.com/icambron/twix.js) by [j3ko](https://github.com/j3ko) -* [:link:](type-check/type-check.d.ts) [type-check](https://github.com/gkz/type-check) by [Hans Windhoff](https://github.com/hansrwindhoff) -* [:link:](type-detect/type-detect.d.ts) [type-detect](https://github.com/chaijs/type-detect) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](type-name/type-name.d.ts) [type-name](https://github.com/twada/type-name) by [OKUNOKENTARO](https://github.com/armorik83) -* [:link:](typeahead/typeahead.d.ts) [typeahead.js](http://twitter.github.io/typeahead.js) by [Ivaylo Gochkov](https://github.com/igochkov), [Gidon Junge](https://github.com/gjunge) -* [:link:](webfontloader/webfontloader.d.ts) [typekit-webfontloader](https://github.com/typekit/webfontloader) by [doskallemaskin](https://github.com/doskallemaskin) -* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org) -* [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org) -* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy) -* [:link:](meteor-persistent-session/meteor-persistent-session.d.ts) [u2622:persistent-session](https://github.com/okgrow/meteor-persistent-session) by [Robbie Van Gorkom](https://github.com/vangorra) -* [:link:](ua-parser-js/ua-parser-js.d.ts) [ua-parser-js](https://github.com/faisalman/ua-parser-js) by [Viktor Miroshnikov](https://github.com/superduper), [Lucas Woo](https://github.com/legendecas) -* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](https://github.com/jmvrbanac) -* [:link:](uglify-js/uglify-js.d.ts) [UglifyJS 2](https://github.com/mishoo/UglifyJS2) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser), [Joe Skeen](http://github.com/joeskeen) -* [:link:](ui-router-extras/ui-router-extras.d.ts) [UI-Router Extras (ct.ui.router.extras module)](https://github.com/christopherthielen/ui-router-extras) by [Michael Putters](https://github.com/mputters), [Marcel van de Kamp](https://github.com/marcel-k) -* [:link:](ui-select/ui-select.d.ts) [ui-select](https://github.com/angular-ui/ui-select) by [Niko Kovačič](https://github.com/nkovacic) -* [:link:](uikit/uikit.d.ts) [uikit](http://getuikit.org) by [Giovanni Silva](https://github.com/giovannicandido) -* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland) -* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland) -* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland) -* [:link:](umzug/umzug.d.ts) [Umzug](https://github.com/sequelize/umzug) by [Ivan Drinchev](https://github.com/drinchev) -* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin), [Christopher Currens](https://github.com/ccurrens) -* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau) -* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine) -* [:link:](undertaker/undertaker.d.ts) [undertaker](https://github.com/phated/undertaker) by [Qubo](https://github.com/tkqubo) -* [:link:](jquery.uniform/jquery.uniform.d.ts) [Uniform.js](https://github.com/pixelmatrix/uniform) by [flyfishMT](https://github.com/flyfishMT) -* [:link:](uniq/uniq.d.ts) [uniq](https://www.npmjs.com/package/uniq) by [Hans Windhoff](https://github.com/hansrwindhoff) -* [:link:](unique-random/unique-random.d.ts) [unique-random](https://github.com/sindresorhus/unique-random) by [Yuki Kokubun](https://github.com/Kuniwak) -* [:link:](winrt/winrt-uwp.d.ts) [Universal Windows Platform](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [Kagami Sascha Rosylight](https://github.com/saschanaz), [Taylor Starfield](https://github.com/taylor224) -* [:link:](universal-analytics/universal-analytics.d.ts) [universal-analytics](https://github.com/peaksandpies/universal-analytics) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](unorm/unorm.d.ts) [unorm](https://github.com/walling/unorm) by [Christopher Brown](https://github.com/chbrown) -* [:link:](update-notifier/update-notifier.d.ts) [update-notifier](https://github.com/yeoman/update-notifier) by [vvakame](https://github.com/vvakame) -* [:link:](upper-case/upper-case.d.ts) [upper-case](https://github.com/blakeembrey/upper-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](upper-case-first/upper-case-first.d.ts) [upper-case-first](https://github.com/blakeembrey/upper-case-first) by [Sam Saint-Pettersen](https://github.com/stpettersens) -* [:link:](uri-templates/uri-templates.d.ts) [uri-templates](https://github.com/geraintluff/uri-templates) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](urijs/URIjs.d.ts) [URI.js](https://github.com/medialize/URI.js) by [RodneyJT](https://github.com/RodneyJT), [Brian Surowiec](https://github.com/xt0rted) -* [:link:](js-url/js-url.d.ts) [url](https://github.com/websanova/js-url) by [MIZUNE Pine](https://github.com/pine613) -* [:link:](url-template/url-template.d.ts) [url-template](https://github.com/bramstein/url-template) by [Marcin Porębski](https://github.com/marcinporebski) -* [:link:](urlrouter/urlrouter.d.ts) [urlrouter](https://github.com/fengmk2/urlrouter) by [soywiz](https://github.com/soywiz) -* [:link:](urlsafe-base64/urlsafe-base64.d.ts) [urlsafe-base64](https://github.com/RGBboy/urlsafe-base64) by [Tanguy Krotoff](https://github.com/tkrotoff) -* [:link:](usage/usage.d.ts) [usage](https://github.com/arunoda/node-usage) by [Pascal Vomhoff](https://github.com/pvomhoff) -* [:link:](username/username.d.ts) [username](https://www.npmjs.com/package/username) by [Klaus Reimer](https://github.com/kayahr) -* [:link:](utils-merge/utils-merge.d.ts) [utils-merge](https://github.com/jaredhanson/utils-merge) by [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](uuid-1345/uuid-1345.d.ts) [uuid-1345](https://github.com/scravy/uuid-1345) by [TANAKA Koichi](https://github.com/mugeso) -* [:link:](uuid/UUID.d.ts) [UUID.js](https://github.com/LiosK/UUID.js) by [Jason Jarrett](https://github.com/staxmanade) -* [:link:](valerie/valerie.d.ts) [valerie](https://github.com/davewatts/valerie) by [Howard Richards](https://github.com/conficient) -* [:link:](validator/validator.d.ts) [validator.js](https://github.com/chriso/validator.js) by [tgfjt](https://github.com/tgfjt), [Ilya Mochalov](https://github.com/chrootsu) -* [:link:](vec3/vec3.d.ts) [Vec3 Librairy](https://www.npmjs.com/package/vec3) by [Xavier Stouder](https://github.com/xstoudi) -* [:link:](vega/vega.d.ts) [Vega](http://trifacta.github.io/vega) by [Tom Crockett](http://github.com/pelotom) -* [:link:](velocity-animate/velocity-animate.d.ts) [Velocity](http://velocityjs.org) by [Greg Smith](https://github.com/smrq) -* [:link:](verror/verror.d.ts) [verror](https://github.com/davepacheco/node-verror) by [Sven Reglitzki](https://github.com/svi3c) -* [:link:](vex-js/vex-js.d.ts) [Vex](https://github.com/HubSpot/vex) by [Greg Cohan](https://github.com/gdcohan) -* [:link:](vexflow/vexflow.d.ts) [VexFlow](http://vexflow.com) by [Roman Quiring](https://github.com/rquiring) -* [:link:](victor/victor.d.ts) [Victor.js](http://victorjs.org) by [Ivane Gegia](https://twitter.com/ivanegegia) -* [:link:](videojs/videojs.d.ts) [Video.js](https://github.com/zencoder/video-js) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](vimeo/froogaloop.d.ts) [Vimeo](http://developer.vimeo.com/player/js-api) by [Daz Wilkin](https://github.com/DazWilkin) -* [:link:](vinyl/vinyl.d.ts) [vinyl](https://github.com/wearefractal/vinyl) by [vvakame](https://github.com/vvakame), [jedmao](https://github.com/jedmao) -* [:link:](vinyl-buffer/vinyl-buffer.d.ts) [vinyl-buffer](https://github.com/hughsk/vinyl-buffer) by [Qubo](https://github.com/tkQubo) -* [:link:](vinyl-fs/vinyl-fs.d.ts) [vinyl-fs](https://github.com/wearefractal/vinyl-fs) by [vvakame](https://github.com/vvakame) -* [:link:](vinyl-paths/vinyl-paths.d.ts) [vinyl-paths](https://github.com/sindresorhus/vinyl-paths) by [Qubo](https://github.com/tkQubo) -* [:link:](vinyl-source-stream/vinyl-source-stream.d.ts) [vinyl-source-stream](https://github.com/hughsk/vinyl-source-stream) by [Asana](https://asana.com) -* [:link:](virtual-dom/virtual-dom.d.ts) [virtual-dom](https://github.com/Matt-Esch/virtual-dom) by [Christopher Brown](https://github.com/chbrown) -* [:link:](vortex-web-client/vortex-web-client.d.ts) [Vortex Web 1.2.0p1](http://www.prismtech.com/vortex/vortex-web) by [Stefan Profanter](https://github.com/Pro) -* [:link:](voximplant-websdk/voximplant-websdk.d.ts) [VoxImplant Web SDK 3.0.x](http://voximplant.com) by [Alexey Aylarov](https://github.com/aylarov) -* [:link:](vso-node-api/vso-node-api.d.ts) [vso-node-api](https://github.com/Microsoft/vso-node-api) by [Teddy Ward](https://github.com/teddyward) -* [:link:](vue-resource/vue-resource.d.ts) [vue-resoure](https://github.com/vuejs/vue-resource) by [kaorun343](https://github.com/kaorun343) -* [:link:](vue-router/vue-router.d.ts) [vue-router](https://github.com/vuejs/vue-router) by [kaorun343](https://github.com/kaorun343) -* [:link:](vue/vue.d.ts) [vuejs](https://github.com/vuejs/vue) by [odangosan](https://github.com/odangosan), [kaorun343](https://github.com/kaorun343) -* [:link:](w2ui/w2ui.d.ts) [w2ui](http://w2ui.com) by [Valentin Robert](https://github.com/Ptival) -* [:link:](wake_on_lan/wake_on_lan.d.ts) [wake_on_lan](https://github.com/agnat/node_wake_on_lan) by [Tobias Kahlert](https://github.com/SrTobi) -* [:link:](wampy/wampy.d.ts) [wampy.js](https://github.com/KSDaemon/wampy.js) by [Konstantin Burkalev](https://github.com/KSDaemon) -* [:link:](watch/watch.d.ts) [watch](https://github.com/mikeal/watch) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](jquery.watermark/jquery.watermark.d.ts) [Watermark plugin for jQuery](http://jquery-watermark.googlecode.com) by [Anwar Javed](https://github.com/anwarjaved) -* [:link:](webaudioapi/waa.d.ts) [Web Audio API](http://www.w3.org/TR/webaudio) by [Baruch Berger](https://github.com/bbss), [Kon](http://phyzkit.net), [kubosho](https://github.com/kubosho) -* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz) -* [:link:](webcl/webcl.d.ts) [WebCL](https://www.khronos.org/registry/webcl/specs/1.0.0) by [Ralph Brown](https://github.com/NCARalph) -* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen), [Tim Dwyer](https://github.com/tgdwyer), [Noah Chen](https://github.com/nchen63) -* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya) -* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas) -* [:link:](webdriverio/webdriverio.d.ts) [webdriverio](http://www.webdriver.io) by [Nick Malaguti](https://github.com/nmalaguti) -* [:link:](webgl-ext/webgl-ext.d.ts) [WebGL Extensions](http://webgl.org) by [Arthur Langereis](https://github.com/zenmumbler) -* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh) -* [:link:](webpack/webpack.d.ts) [webpack](https://github.com/webpack/webpack) by [Qubo](https://github.com/tkqubo) -* [:link:](webpack/webpack-env.d.ts) [webpack (module API)](https://github.com/webpack/webpack) by [use-strict](https://github.com/use-strict) -* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42) -* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd) -* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2) -* [:link:](webtorrent/webtorrent.d.ts) [WebTorrent](https://webtorrent.io) by [Bazyli Brzóska](https://invent.life) -* [:link:](webvr-api/webvr-api.d.ts) [WebVR API](http://mozvr.github.io/webvr-spec/webvr.html) by [Toshiya Nakakura](https://github.com/nakakura) -* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157) -* [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame) -* [:link:](jquery.window/jquery.window.d.ts) [Window plugin for jQuery](http://fstoke.me/jquery/window) by [Ryan Graham](https://github.com/ryan-codingintrigue) -* [:link:](windows-1251/windows-1251.d.ts) [windows-1251](https://github.com/mathiasbynens/windows-1251) by [RomanGolovanov](https://github.com/RomanGolovanov) -* [:link:](windows-service/windows-service.d.ts) [windows-service](https://bitbucket.org/stephenwvickers/node-windows-service) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](winjs/winjs.d.ts) [WinJS](http://try.buildwinjs.com) by [TypeScript samples](https://www.typescriptlang.org), [Adam Hewitt](https://github.com/adamhewitt627), [Craig Treasure](https://github.com/craigktreasure), [Jeff Fisher](https://github.com/xirzec) -* [:link:](winreg/winreg.d.ts) [Winreg](https://github.com/fresc81/node-winreg) by [RX14](https://github.com/RX14) -* [:link:](winrt/winrt.d.ts) [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [TypeScript samples](https://www.typescriptlang.org) -* [:link:](winston/winston.d.ts) [winston](https://github.com/flatiron/winston) by [bonnici](https://github.com/bonnici), [Peter Harris](https://github.com/codeanimal) -* [:link:](wiredep/wiredep.d.ts) [Wiredep v3.0.x](https://github.com/taptapship/wiredep) by [Abraão Alves](http://abraaoalves.github.io) -* [:link:](wolfy87-eventemitter/wolfy87-eventemitter.d.ts) [wolfy87-eventemitter](https://github.com/Wolfy87/EventEmitter) by [ryiwamoto](https://github.com/ryiwamoto) -* [:link:](wordcloud/wordcloud.d.ts) [wordcloud](https://github.com/timdream/wordcloud2.js) by [Joe Skeen](http://github.com/joeskeen) -* [:link:](wreck/wreck.d.ts) [wreck](https://github.com/hapijs/wreck) by [Marcin Porębski](http://github.com/marcinporebski) -* [:link:](wrench/wrench.d.ts) [wrench](https://github.com/ryanmcgrath/wrench-js) by [Carlos Ballesteros Velasco](https://github.com/soywiz) -* [:link:](ws/ws.d.ts) [ws](https://github.com/einaros/ws) by [Paul Loyd](https://github.com/loyd) -* [:link:](wu/wu.d.ts) [wu.js](https://fitzgen.github.io/wu.js) by [phiresky](https://github.com/phiresky) -* [:link:](x-editable/x-editable.d.ts) [X-Editable](http://vitalets.github.io/x-editable/index.html) by [Chris Kirby](https://github.com/sirkirby) -* [:link:](x2js/xml2json.d.ts) [x2js](https://code.google.com/p/x2js) by [Horiuchi_H](https://github.com/horiuchi) -* [:link:](xdate/xdate.d.ts) [XDate](http://arshaw.com/xdate) by [yamada28go](https://github.com/yamada28go) -* [:link:](xdomain/xdomain.d.ts) [xdomain](http://jpillora.com/xdomain) by [Dan Chao](http://dchao.co) -* [:link:](jsfl/xJSFL.d.ts) [xJSFL](http://www.xjsfl.com) by [soywiz](https://github.com/soywiz) -* [:link:](xlsx/xlsx.d.ts) [xlsx](https://github.com/SheetJS/js-xlsx) by [themauveavenger](https://github.com/themauveavenger) -* [:link:](xml-parser/xml-parser.d.ts) [xml-parser](https://github.com/segmentio/xml-parser) by [Matt Frantz](https://github.com/mhfrantz) -* [:link:](xmlbuilder/xmlbuilder.d.ts) [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js) by [Wallymathieu](http://github.com/wallymathieu) -* [:link:](xmldom/xmldom.d.ts) [xmldom](https://github.com/jindw/xmldom.git) by [Qubo](https://github.com/tkqubo) -* [:link:](xmltojson/xmltojson.d.ts) [xmltojson](https://github.com/metatribal/xmlToJSON) by [Travis Crowe](https://github.com/traviscrowe) -* [:link:](xpath/xpath.d.ts) [xpath](https://github.com/goto100/xpath) by [Andrew Bradley](https://github.com/cspotcode) -* [:link:](xregexp/xregexp.d.ts) [XRegExp](http://xregexp.com) by [Bart van der Schoor](https://github.com/Bartvds), [Johannes Fahrenkrug](https://github.com/jfahrenkrug) -* [:link:](xsockets/XSockets.d.ts) [XSockets.NET](http://xsockets.net) by [Jeffery Grajkowski](https://github.com/pushplay) -* [:link:](xss-filters/xss-filters.d.ts) [Yahoo XSS Filters](https://github.com/yahoo/xss-filters) by [Dave Taylor](http://davetayls.me) -* [:link:](yamljs/yamljs.d.ts) [yamljs](https://github.com/jeremyfa/yaml.js) by [Tim Jonischkat](http://www.tim-jonischkat.de) -* [:link:](yargs/yargs.d.ts) [yargs](https://github.com/chevex/yargs) by [Martin Poelstra](https://github.com/poelstra) -* [:link:](ydn-db/ydn-db.d.ts) [YDN-DB version 1](http://dev.yathit.com/ydn-db/index.html) by [Kyaw Tun](https://github.com/yathit), [Gabriel Monteagudo](https://github.com/gabrielmaldi) -* [:link:](yeoman-generator/yeoman-generator.d.ts) [yeoman-generator](https://github.com/yeoman/generator) by [Kentaro Okuno](http://github.com/armorik83) -* [:link:](yfiles/yfiles.d.ts) [yFiles for HTML](http://www.yworks.com/products/yfiles-for-html) by [yWorks GmbH](http://www.yworks.com) -* [:link:](yosay/yosay.d.ts) [yosay](https://github.com/yeoman/yosay) by [Kentaro Okuno](http://github.com/armorik83) -* [:link:](youtube/youtube.d.ts) [YouTube](https://developers.google.com/youtube) by [Daz Wilkin](https://github.com/DazWilkin), [Ian Obermiller](http://ianobermiller.com) -* [:link:](gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts) [YouTube Analytics API](https://developers.google.com/youtube/analytics) by [Frank M](https://github.com/sgtfrankieboy) -* [:link:](gapi.youtube/gapi.youtube.d.ts) [YouTube Data API v3](https://developers.google.com/youtube/v3) by [Frank M](https://github.com/sgtfrankieboy) -* [:link:](yui/yui.d.ts) [yui](https://github.com/yui/yui3) by [Gia Bảo @ Sân Đình](https://github.com/giabao) -* [:link:](z-schema/z-schema.d.ts) [z-schema](https://github.com/zaggino/z-schema) by [Adam Meadows](https://github.com/job13er) -* [:link:](zepto/zepto.d.ts) [Zepto](http://zeptojs.com) by [Josh Baldwin](https://github.com/jbaldwin) -* [:link:](zeroclipboard/zeroclipboard.d.ts) [ZeroClipboard v2.x.x](https://github.com/zeroclipboard/zeroclipboard) by [Eric J. Smith](https://github.com/ejsmith), [Blake Niemyjski](https://github.com/niemyjski), [György Balássy](https://github.com/balassy), [Leon Yu](https://github.com/leonyu) -* [:link:](node_zeromq/zmq.d.ts) [ZeroMQ Node](https://github.com/JustinTulloss/zeromq.node) by [Dave McKeown](http://github.com/davemckeown) -* [:link:](zip.js/zip.js.d.ts) [zip.js 2.x](https://github.com/gildas-lormeau/zip.js) by [Louis Grignon](https://github.com/lgrignon) -* [:link:](zone.js/zone.js.d.ts) [Zone.js](https://github.com/angular/zone.js) by [angular team](https://github.com/angular) -* [:link:](scroller/easyscroller.d.ts) [Zynga EasyScroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](scroller/scroller.d.ts) [Zynga Scroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov) -* [:link:](zynga-scroller/zynga-scroller.d.ts) [Zynga Scroller](http://zynga.github.com/scroller) by [Marcelo Haskell Camargo](https://github.com/haskellcamargo) -* [:link:](viewporter/viewporter.d.ts) [Zynga Viewporter](https://github.com/zynga/viewporter) by [Boris Yankov](https://github.com/borisyankov) - diff --git a/ably/index.d.ts b/ably/index.d.ts index a6ea5785ac..b8d1eb9bfe 100644 --- a/ably/index.d.ts +++ b/ably/index.d.ts @@ -444,7 +444,7 @@ declare namespace ablyLib { } } -export declare class Rest { +export class Rest { constructor(options: ablyLib.ClientOptions | string); static Crypto: ablyLib.Crypto; static Message: ablyLib.MessageStatic; @@ -456,7 +456,7 @@ export declare class Rest { time: (paramsOrCallback?: ablyLib.timeCallback | any, callback?: ablyLib.timeCallback) => void; } -export declare class Realtime { +export class Realtime { constructor(options: ablyLib.ClientOptions | string); static Crypto: ablyLib.Crypto; static Message: ablyLib.MessageStatic; diff --git a/accepts/index.d.ts b/accepts/index.d.ts index a12dcaf5c9..1fef801986 100644 --- a/accepts/index.d.ts +++ b/accepts/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace accepts { - export interface Headers { + interface Headers { [key: string]: string | string[]; } - export interface Accepts { + interface Accepts { /** * Return the first accepted charset. If nothing in `charsets` is accepted, then `false` is returned. */ diff --git a/acorn/acorn-tests.ts b/acorn/acorn-tests.ts index fb79d23718..72ca71d2f6 100644 --- a/acorn/acorn-tests.ts +++ b/acorn/acorn-tests.ts @@ -1,5 +1,3 @@ -/// - import acorn = require('acorn'); import * as ESTree from 'estree'; @@ -67,3 +65,6 @@ acorn.getLineInfo('string', 56); acorn.plugins['test'] = function (p: acorn.Parser, config: any) { } + +acorn.tokenizer('console.log("hello world)', {locations: true}).getToken(); +acorn.tokenizer('console.log("hello world)', {locations: true})[Symbol.iterator]().next(); diff --git a/acorn/index.d.ts b/acorn/index.d.ts index 1944abc257..441deb29c3 100644 --- a/acorn/index.d.ts +++ b/acorn/index.d.ts @@ -238,9 +238,12 @@ declare namespace acorn { function parseExpressionAt(input: string, pos?: number, options?: Options): ESTree.Expression; - // todo: here the tokenizer function returns a Parser instance, that is targeting the detail of - // Parser prototype. Someone need this please reade README.md first. - // function tokenizer(options: Options, input: string): Parser; + interface ITokenizer { + getToken() : Token, + [Symbol.iterator](): Iterator + } + + function tokenizer(input: string, options: Options): ITokenizer; let parse_dammit: IParse | undefined; let LooseParser: ILooseParserClass | undefined; diff --git a/amplify/amplify-tests.ts b/amplify/amplify-tests.ts index edf2988122..8cce567960 100644 --- a/amplify/amplify-tests.ts +++ b/amplify/amplify-tests.ts @@ -1,6 +1,3 @@ - -/// - import amplify = require("amplify"); // Copied examples directly from AmplifyJs site @@ -260,4 +257,3 @@ amplify.request({ error: (data, status) => { } }); - diff --git a/amplify/index.d.ts b/amplify/index.d.ts index 1e62e57a01..5cb03e5b1d 100644 --- a/amplify/index.d.ts +++ b/amplify/index.d.ts @@ -34,7 +34,6 @@ declare namespace amplify { } interface Request { - /*** * Request a resource. * resourceId: Identifier string for the resource. @@ -118,7 +117,6 @@ declare namespace amplify { } interface Store extends StorageTypeStore { - /*** * IE 8+, Firefox 3.5+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+ */ @@ -143,12 +141,9 @@ declare namespace amplify { * An in-memory store is provided as a fallback if none of the other storage types are available. */ memory: StorageTypeStore; - - } interface Static { - subscribe: Subscribe; /*** diff --git a/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts b/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts index 4ff5b4cf19..1efc5d0391 100644 --- a/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts +++ b/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts @@ -1,6 +1,3 @@ -/// -/// - var myApp = angular.module('testModule'); interface MyAppScope extends ng.IScope { diff --git a/angular-dynamic-locale/angular-dynamic-locale-tests.ts b/angular-dynamic-locale/angular-dynamic-locale-tests.ts index fd88de0d25..1e30aafd94 100644 --- a/angular-dynamic-locale/angular-dynamic-locale-tests.ts +++ b/angular-dynamic-locale/angular-dynamic-locale-tests.ts @@ -15,6 +15,9 @@ class LocaleTestController { var newLocale = "mt" tmhDynamicLocaleService.set(newLocale); + + newLocale = "en"; + tmhDynamicLocaleService.set(newLocale).then((value) => {}); } } diff --git a/angular-dynamic-locale/index.d.ts b/angular-dynamic-locale/index.d.ts index 788c3ad87b..4ee0e6eb89 100644 --- a/angular-dynamic-locale/index.d.ts +++ b/angular-dynamic-locale/index.d.ts @@ -11,7 +11,7 @@ declare module 'angular' { export namespace dynamicLocale { interface tmhDynamicLocaleService { - set(locale: string): void; + set(locale: string): angular.IPromise; get(): string; } diff --git a/angular-feature-flags/angular-feature-flags-tests.ts b/angular-feature-flags/angular-feature-flags-tests.ts index 8ca17e4962..ac956dd657 100644 --- a/angular-feature-flags/angular-feature-flags-tests.ts +++ b/angular-feature-flags/angular-feature-flags-tests.ts @@ -1,5 +1,3 @@ -/// - import * as angular from "angular"; let myApp = angular.module('myApp', ['feature-flags']); diff --git a/angular-file-saver/index.d.ts b/angular-file-saver/index.d.ts index 7e1fb90b16..2fb846eef4 100644 --- a/angular-file-saver/index.d.ts +++ b/angular-file-saver/index.d.ts @@ -3,13 +3,12 @@ // Definitions by: Donald Nairn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -declare namespace angular { +import * as angular from 'angular'; +declare module 'angular' { /** * A core Angular factory proving FileSaver functionality. */ - interface FileSaver { + export interface FileSaver { /** * Immediately starts saving a file * @param data: a Blob instance; @@ -18,4 +17,4 @@ declare namespace angular { */ saveAs(blob: Blob, fileName: string, disableBOM?: boolean): void; } -} \ No newline at end of file +} diff --git a/angular-gridster/index.d.ts b/angular-gridster/index.d.ts index fc0e990d41..272470bc6f 100644 --- a/angular-gridster/index.d.ts +++ b/angular-gridster/index.d.ts @@ -8,11 +8,8 @@ import * as angular from "angular"; export default "gridster"; declare module "angular" { - - export namespace gridster { - + namespace gridster { interface GridsterConfig { - // number of columns in the grid columns?: number; // whether to push other items out of the way @@ -83,7 +80,6 @@ declare module "angular" { // options to pass to resizable handler resizable?: { - // whether the items are resizable enabled?: boolean; @@ -103,7 +99,6 @@ declare module "angular" { // options to pass to draggable handler draggable?: { - // whether the items are resizable enabled?: boolean; @@ -128,7 +123,6 @@ declare module "angular" { } interface StandardGridsterItem { - // width of the item expressed in terms of number of columns it will occupy sizeX: number; diff --git a/angular-hotkeys/angular-hotkeys-tests.ts b/angular-hotkeys/angular-hotkeys-tests.ts index 1f87ecefdf..c0bd9b974d 100644 --- a/angular-hotkeys/angular-hotkeys-tests.ts +++ b/angular-hotkeys/angular-hotkeys-tests.ts @@ -1,5 +1,3 @@ -/// - var scope: ng.IScope; var hotkeyProvider: ng.hotkeys.HotkeysProvider; var hotkeyObj: ng.hotkeys.Hotkey; diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts index b20b2eea9d..88b177ba74 100644 --- a/angular-jwt/angular-jwt-tests.ts +++ b/angular-jwt/angular-jwt-tests.ts @@ -1,5 +1,3 @@ -/// - var app = angular.module("angular-jwt-tests", ["angular-jwt"]); var $jwtHelper: ng.jwt.IJwtHelper; diff --git a/angular-localforage/package.json b/angular-localforage/package.json new file mode 100644 index 0000000000..07bf3d2615 --- /dev/null +++ b/angular-localforage/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "localforage": "^1.5.0" + } +} \ No newline at end of file diff --git a/angular-material/index.d.ts b/angular-material/index.d.ts index 0e27fe3b60..a8196269a4 100644 --- a/angular-material/index.d.ts +++ b/angular-material/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular Material (angular.material module) 1.1 // Project: https://github.com/angular/material -// Definitions by: Blake Bigelow , Peter Hajdu , Davide Donadello +// Definitions by: Blake Bigelow , Peter Hajdu , Davide Donadello , Geert Jansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as angular from 'angular'; @@ -18,6 +18,7 @@ declare module 'angular' { controller?: string | Function; locals?: { [index: string]: any }; clickOutsideToClose?: boolean; + bindToController?: boolean; // default: false disableBackdrop?: boolean; escapeToClose?: boolean; resolve?: { [index: string]: () => angular.IPromise }; diff --git a/angular-modal/angular-modal-tests.ts b/angular-modal/angular-modal-tests.ts index 5be313840b..edb4d7e6ef 100644 --- a/angular-modal/angular-modal-tests.ts +++ b/angular-modal/angular-modal-tests.ts @@ -1,5 +1,3 @@ -/// - var btfModal: angularModal.AngularModalFactory; // Using template URL diff --git a/angular-oauth2/angular-oauth2-tests.ts b/angular-oauth2/angular-oauth2-tests.ts new file mode 100644 index 0000000000..042fe537aa --- /dev/null +++ b/angular-oauth2/angular-oauth2-tests.ts @@ -0,0 +1,10 @@ +import * as angular from 'angular'; + +angular.module('angular-oauth2-test', ['angular-oauth2']) + .config(['OAuthProvider', (OAuthProvider: angular.oauth2.OAuthProvider) => { + OAuthProvider.configure({ + baseUrl: 'https://api.website.com', + clientId: 'CLIENT_ID', + clientSecret: 'CLIENT_SECRET' // optional + }); + }]); \ No newline at end of file diff --git a/angular-oauth2/index.d.ts b/angular-oauth2/index.d.ts new file mode 100644 index 0000000000..23df762df1 --- /dev/null +++ b/angular-oauth2/index.d.ts @@ -0,0 +1,47 @@ +// Type definitions for angular-oauth2 4.1 +// Project: https://github.com/oauthjs/angular-oauth2 +// Definitions by: Antério Vieira +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as angular from 'angular'; + +declare module 'angular' { + namespace oauth2 { + interface OAuthConfig { + baseUrl: string; + clientId: string; + clientSecret?: string; + grantPath?: string; + revokePath?: string; + } + + interface OAuthProvider { + configure(params: OAuthConfig): OAuthConfig; + } + + interface Data { + username: string; + password: string; + } + + interface OAuth { + isAuthenticated(): boolean; + getAccessToken(data: Data, options?: any): angular.IPromise; + getRefreshToken(data?: Data, options?: any): angular.IPromise; + revokeToken(data?: Data, options?: any): angular.IPromise; + } + + interface OAuthTokenConfig { + name: string; + options: any; + } + + interface OAuthTokenOptions { + secure: boolean; + } + + interface OAuthTokenProvider { + configure(params: OAuthTokenConfig): OAuthTokenConfig; + } + } +} diff --git a/paymentrequest/tsconfig.json b/angular-oauth2/tsconfig.json similarity index 86% rename from paymentrequest/tsconfig.json rename to angular-oauth2/tsconfig.json index e5754a139a..e8a5250748 100644 --- a/paymentrequest/tsconfig.json +++ b/angular-oauth2/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { "module": "commonjs", + "target": "es6", "lib": [ "es6", "dom" ], - "target": "es6", "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "paymentrequest-tests.ts" + "angular-oauth2-tests.ts" ] -} \ No newline at end of file +} diff --git a/fine-uploader/tslint.json b/angular-oauth2/tslint.json similarity index 100% rename from fine-uploader/tslint.json rename to angular-oauth2/tslint.json diff --git a/angular-ui-bootstrap/index.d.ts b/angular-ui-bootstrap/index.d.ts index bc80d96b5a..1e4d15d282 100644 --- a/angular-ui-bootstrap/index.d.ts +++ b/angular-ui-bootstrap/index.d.ts @@ -15,6 +15,7 @@ export type IDropdownConfig = angular.ui.bootstrap.IDropdownConfig; export type IModalProvider = angular.ui.bootstrap.IModalProvider; export type IModalService = angular.ui.bootstrap.IModalService; export type IModalServiceInstance = angular.ui.bootstrap.IModalServiceInstance; +export type IModalInstanceService = angular.ui.bootstrap.IModalInstanceService; export type IModalScope = angular.ui.bootstrap.IModalScope; export type IModalSettings = angular.ui.bootstrap.IModalSettings; export type IModalStackService = angular.ui.bootstrap.IModalStackService; @@ -320,12 +321,12 @@ declare module 'angular' { interface IModalService { /** * @param {IModalSettings} options - * @returns {IModalServiceInstance} + * @returns {IModalInstanceService} */ - open(options: IModalSettings): IModalServiceInstance; + open(options: IModalSettings): IModalInstanceService; } - interface IModalServiceInstance { + interface IModalInstanceService { /** * A method that can be used to close a modal, passing a result. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. */ @@ -357,6 +358,11 @@ declare module 'angular' { closed: angular.IPromise; } + /** + * @deprecated use IModalInstanceService instead. + */ + interface IModalServiceInstance extends IModalInstanceService { } + interface IModalScope extends angular.IScope { /** * Dismiss the dialog without assigning a value to the promise output. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. @@ -512,17 +518,17 @@ declare module 'angular' { /** * Opens a new modal instance. */ - open(modalInstance: IModalServiceInstance, modal: any): void; + open(modalInstance: IModalInstanceService, modal: any): void; /** * Closes a modal instance with an optional result. */ - close(modalInstance: IModalServiceInstance, result?: any): void; + close(modalInstance: IModalInstanceService, result?: any): void; /** * Dismisses a modal instance with an optional reason. */ - dismiss(modalInstance: IModalServiceInstance, reason?: any): void; + dismiss(modalInstance: IModalInstanceService, reason?: any): void; /** * Dismiss all open modal instances with an optional reason that will be passed to each instance. @@ -536,7 +542,7 @@ declare module 'angular' { } interface IModalStackedMapKeyValuePair { - key: IModalServiceInstance; + key: IModalInstanceService; value: any; } diff --git a/angular/angular-tests.ts b/angular/angular-tests.ts index 4e1f33ce47..b4e394aa37 100644 --- a/angular/angular-tests.ts +++ b/angular/angular-tests.ts @@ -587,7 +587,8 @@ namespace TestPromise { function test_angular_forEach() { const values: { [key: string]: string } = { name: 'misko', gender: 'male' }; const log: string[] = []; - angular.forEach(values, (value, key) => { + angular.forEach(values, (value, key, obj) => { + obj[key] = value; this.push(key + ': ' + value); }, log); // expect(log).toEqual(['name: misko', 'gender: male']); diff --git a/angular/index.d.ts b/angular/index.d.ts index bbbbdb021a..485ad9ebb3 100644 --- a/angular/index.d.ts +++ b/angular/index.d.ts @@ -26,7 +26,6 @@ import ng = angular; // ng module (angular.js) /////////////////////////////////////////////////////////////////////////////// declare namespace angular { - type Injectable = T | Array; // not directly implemented, but ensures that constructed class implements $get @@ -97,7 +96,7 @@ declare namespace angular { * @param iterator Iterator function. * @param context Object to become context (this) for the iterator function. */ - forEach(obj: T[], iterator: (value: T, key: number) => any, context?: any): any; + forEach(obj: T[], iterator: (value: T, key: number, obj: T[]) => void, context?: any): T[]; /** * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional. * @@ -107,7 +106,7 @@ declare namespace angular { * @param iterator Iterator function. * @param context Object to become context (this) for the iterator function. */ - forEach(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any; + forEach(obj: { [index: string]: T; }, iterator: (value: T, key: string, obj: { [index: string]: T; }) => void, context?: any): { [index: string]: T; }; /** * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional. * @@ -117,7 +116,7 @@ declare namespace angular { * @param iterator Iterator function. * @param context Object to become context (this) for the iterator function. */ - forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any; + forEach(obj: any, iterator: (value: any, key: any, obj: any) => void, context?: any): any; fromJson(json: string): any; identity(arg?: T): T; @@ -344,7 +343,6 @@ declare namespace angular { * see https://docs.angularjs.org/api/ng/type/form.FormController */ interface IFormController { - /** * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272 */ @@ -532,7 +530,6 @@ declare namespace angular { * see https://docs.angularjs.org/api/ng/directive/ngRepeat */ interface IRepeatScope extends IScope { - /** * iterator offset of the repeated element (0..length-1). */ @@ -562,7 +559,6 @@ declare namespace angular { * true if the iterator position $index is odd (otherwise false). */ $odd: boolean; - } interface IAngularEvent { @@ -1332,9 +1328,19 @@ declare namespace angular { // see http://docs.angularjs.org/api/ng.$controller // see http://docs.angularjs.org/api/ng.$controllerProvider /////////////////////////////////////////////////////////////////////////// + + /** + * The minimal local definitions required by $controller(ctrl, locals) calls. + */ + interface IControllerLocals { + $scope: ng.IScope; + $element: JQuery; + } + interface IControllerService { // Although the documentation doesn't state this, locals are optional (controllerConstructor: new (...args: any[]) => T, locals?: any, later?: boolean, ident?: string): T; + (controllerConstructor: Function, locals?: IControllerLocals, later?: boolean, ident?: string): T; (controllerConstructor: Function, locals?: any, later?: boolean, ident?: string): T; (controllerName: string, locals?: any, later?: boolean, ident?: string): T; } @@ -1934,8 +1940,7 @@ declare namespace angular { /////////////////////////////////////////////////////////////////////////// // AUTO module (angular.js) /////////////////////////////////////////////////////////////////////////// - export namespace auto { - + namespace auto { /////////////////////////////////////////////////////////////////////// // InjectorService // see http://docs.angularjs.org/api/AUTO.$injector diff --git a/antd/antd-tests.tsx b/antd/antd-tests.tsx deleted file mode 100644 index 1319455e91..0000000000 --- a/antd/antd-tests.tsx +++ /dev/null @@ -1,483 +0,0 @@ -/// - -/*import { - Affix, - Button, - Alert, - Badge, - Breadcrumb, - Calendar, - Carousel, - Cascader, - Checkbox, - Collapse, - DatePicker, - Dropdown, - Icon, - Form, - Input, - InputNumber, - Row, - Col, - Menu, - message, - Modal, - notification, - Pagination, - Popconfirm, - Popover, - Progress, - QueueAnim, - Radio, - Select, - Slider, - Spin, - Steps, - Switch, - Table, - Tabs, - Tag, - TimePicker, - Timeline, - Tooltip, - Transfer, - Tree, - TreeSelect, - Upload, - - - -} from 'antd';*/ - -import * as React from 'react' -import Affix from 'antd/lib/Affix' -import Button from 'antd/lib/Button' -import Alert from 'antd/lib/Alert' -import Badge from 'antd/lib/Badge' -import Breadcrumb from 'antd/lib/Breadcrumb' -import Calendar from 'antd/lib/Calendar' -import Carousel from 'antd/lib/Carousel' -import Cascader from 'antd/lib/Cascader' -import Checkbox from 'antd/lib/Checkbox' -import Collapse from 'antd/lib/Collapse' -import DatePicker from 'antd/lib/DatePicker' -import Dropdown from 'antd/lib/Dropdown' -import Icon from 'antd/lib/Icon' -import Form from 'antd/lib/Form' -import Input from 'antd/lib/Input' -import InputNumber from 'antd/lib/InputNumber' -import Row from 'antd/lib/Row' -import Col from 'antd/lib/Col' -import Menu from 'antd/lib/Menu' -import message from 'antd/lib/message' -import Modal from 'antd/lib/Modal' -import notification from 'antd/lib/notification' -import Pagination from 'antd/lib/Pagination' -import Popconfirm from 'antd/lib/Popconfirm' -import Popover from 'antd/lib/Popover' -import Progress from 'antd/lib/Progress' -import QueueAnim from 'antd/lib/QueueAnim' -import Radio from 'antd/lib/Radio' -import Select from 'antd/lib/Select' -import Slider from 'antd/lib/Slider' -import Spin from 'antd/lib/Spin' -import Steps from 'antd/lib/Steps' -import Switch from 'antd/lib/Switch' -import Table from 'antd/lib/Table' -import Tabs from 'antd/lib/Tabs' -import Tag from 'antd/lib/Tag' -import TimePicker from 'antd/lib/TimePicker' -import Timeline from 'antd/lib/Timeline' -import Tooltip from 'antd/lib/Tooltip' -import Transfer from 'antd/lib/Transfer' -import Tree from 'antd/lib/Tree' -import TreeSelect from 'antd/lib/TreeSelect' -import Upload from 'antd/lib/Upload' - -const ButtonGroup = Button.Group; -const CheckboxGroup = Checkbox.Group; -const Panel = Collapse.Panel; -const RangePicker = DatePicker.RangePicker; -const MonthPicker = DatePicker.MonthPicker; -const DropdownButton = Dropdown.Button; -const SubMenu = Menu.SubMenu; -const MenuItemGroup = Menu.ItemGroup; -const ProgressCircle = Progress.Circle; -const ProgressLine = Progress.Line; -const RadioGroup = Radio.Group; -const Option = Select.Option; -const OptGroup = Select.OptGroup; -const Step = Steps.Step; -const FormItem = Form.Item; -const TabPane = Tabs.TabPane; -const TreeNode = Tree.TreeNode; -const TreeSelectTreeNode = TreeSelect.TreeNode; - -const onChange = () => { } - -const options = [{ - value: 'zhejiang', - label: '浙江', - children: [{ - value: 'hangzhou', - label: '杭州', - children: [{ - value: 'xihu', - label: '西湖', - }], - }], -}, { - value: 'jiangsu', - label: '江苏', - children: [{ - value: 'nanjing', - label: '南京', - children: [{ - value: 'zhonghuamen', - label: '中华门', - }], - }], - }]; - -const columns = [{ - title: '姓名', - dataIndex: 'name', - key: 'name', - render(text: any) { - return {text}; - } -}, { - title: '年龄', - dataIndex: 'age', - key: 'age', - }, { - title: '住址', - dataIndex: 'address', - key: 'address', - }, { - title: '操作', - key: 'operation', - render(text: any, record: any) { - return ( - - 操作一{record.name} - - 操作二 - - - 更多 - - - ); - } - }]; -const data = [{ - key: '1', - name: '胡彦斌', - age: 32, - address: '西湖区湖底公园1号' -}, { - key: '2', - name: '胡彦祖', - age: 42, - address: '西湖区湖底公园1号' - }, { - key: '3', - name: '李大嘴', - age: 32, - address: '西湖区湖底公园1号' - }]; - -// tests -class AccountForm extends React.Component{ - render() { - const { getFieldProps } = this.props.form; - return ( -
- - - - - - - - - - -
- ); - } -} - -var Account = Form.create()(AccountForm); - -// app -class App extends React.Component{ - render() { - message.success('success') - message.config({ top: 100 }) - message.destroy() - message.info('info', 1000) - message.error('error', 3500) - - Modal.info({ title: 'hello' }); - Modal.success({ cancelText: 'No' }) - notification.success({ - message: 'hello', - description: 'test' - }) - const props = { - name: 'file', - action: '/upload.do', - onChange(info: any) { - if (info.file.status !== 'uploading') { - console.log(info.file, info.fileList); - } - if (info.file.status === 'done') { - message.success(`${info.file.name} 上传成功。`); - } else if (info.file.status === 'error') { - message.error(`${info.file.name} 上传失败。`); - } - } - }; - return
- Affix - - - test - - - - - - - - - - - - 首页 - 应用中心 - 应用列表 - 某应用 - - - - - -

1

-

2

-

3

-

4

-
- - - - - - -

test1

-
- -

test2

-
- -

test3

-
-
- - - - Hello Dp
}> - - 触发链接 - - - dpb

} type="primary"> - 某功能按钮 -
- - - - - - - 导航一 - - - 导航 - 子菜单}> - - 选项1 - 选项2 - - - 选项3 - 选项4 - - - - - - - - - - , - - - remove - - Overlay} title="title"> - - - - - - - - - - - - - - - - - - -
demo1
-
demo2
-
demo3
-
demo4
-
- - - A - B - C - D - - - - - - - - - - - - - - - - - - - - , - - - - 选项卡一内容 - 选项卡二内容 - 选项卡三内容 - - - 标签一 - 标签二 - { } }>标签三 - 标签四(链接) - - - - - - 创建服务现场 2015-09-01 - 初步排除网络异常 2015-09-01 - 技术测试异常 2015-09-01 - 网络异常正在修复 2015-09-01 - - - - - 鼠标移上来就会出现提示 - - - - - - - - - - - - - - - sss} key="0-0-1-0" /> - - - - - - - - - - - - - - - - - - - sss} key="random3" /> - - - - - - } -} diff --git a/antd/index.d.ts b/antd/index.d.ts deleted file mode 100644 index f262eda45f..0000000000 --- a/antd/index.d.ts +++ /dev/null @@ -1,2083 +0,0 @@ -// Type definitions for Antd v0.12.10 -// Project: http://ant.design -// Definitions by: bang88 , Bruce Mitchener -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/// - -declare namespace Antd { - // Affix - interface AffixProps { - /** - * 达到指定偏移量后触发 - */ - offset?: number - } - /** - * # Affix - * 将页面元素钉在可视范围。 - * ## 何时使用 - * 当内容区域比较长,需要滚动页面时,这部分内容对应的操作或者导航需要在滚动范围内始终展现。常用于侧边菜单和按钮组合。 - * 页面可视范围过小时,慎用此功能以免遮挡页面内容。 - */ - export class Affix extends React.Component { - render(): JSX.Element - } - - - // Alert - interface AlertProps { - /** - * 必选参数,指定警告提示的样式,有四种选择`success`、`info`、`warn`、`error` - */ - type: string, - /**可选参数,默认不显示关闭按钮 */ - closable?: boolean, - /**可选参数,自定义关闭按钮 */ - closeText?: React.ReactNode, - /**必选参数,警告提示内容 */ - message: React.ReactNode, - /**可选参数,警告提示的辅助性文字介绍 */ - description?: React.ReactNode, - /**可选参数,关闭时触发的回调函数 */ - onClose?: Function, - /**可选参数,是否显示辅助图标 */ - showIcon?: boolean - } - - - /** - * # Alert - * 警告提示,展现需要关注的信息。 - - * ## 何时使用 - - * - 当某个页面需要向用户显示警告的信息时。 - * - 非浮层的静态展现形式,始终展现,不会自动消失,用户可以点击关闭。 - * */ - export class Alert extends React.Component { - render(): JSX.Element - } - - - // Badge - /** - * #Badge - * - * 图标右上角的圆形徽标数字。 - - * ## 何时使用 - - * 一般出现在通知图标或头像的右上角,用于显示需要处理的消息条数,通过醒目视觉形式吸引用户处理。 - * - */ - export class Badge extends React.Component { - render(): JSX.Element - } - interface BadgeProps { - /** 展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏*/ - count: number, - /** 展示封顶的数字值*/ - overflowCount?: number, - /** 不展示数字,只有一个小红点*/ - dot?: boolean - } - - - // Button - interface ButtonProps { - /** 设置按钮类型,可选值为 `primary` `ghost` 或者不设 */ - type?: ButtonType | string, - /** 设置按钮形状,可选值为 `circle` `circle-outline` 或者不设*/ - shape?: string, - /** 设置按钮大小,可选值为 `small` `large` 或者不设*/ - size?: string, - /** 设置 `button` 原生的 `type` 值,可选值请参考 HTML标准*/ - htmlType?: string, - /** `click` 事件的 handler*/ - onClick?: Function, - /** 设置按钮载入状态*/ - loading?: boolean, - /** 样式名*/ - className?: string, - } - - - enum ButtonType { - primary, - ghost, - dashed - } - - interface ButtonGroupProps { - /** 设置按钮大小,可选值为 `small` `large` 或者不设*/ - size?: string - - } - - /** - 可以将多个 `Button` 放入 `Button.Group` 的容器中。 - - 通过设置 `size` 为 `large` `small` 分别把按钮组合设为大、小尺寸。若不设置 `size`,则尺寸为中。*/ - class ButtonGroup extends React.Component { - render(): JSX.Element - } - - /** - * #Button - 按钮用于开始一个即时操作。 - - ## 何时使用 - - 标记了一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。*/ - export class Button extends React.Component { - static Group: typeof ButtonGroup - render(): JSX.Element - } - - - - // Breadcrumb - - interface BreadcrumbItemProps { - /** 链接,如不传则不可点击 */ - href?: string - } - export class BreadcrumbItem extends React.Component { - render(): JSX.Element - } - - interface BreadcrumbProps { - /** router 的路由栈信息 */ - routes?: Array, - /** 路由的参数*/ - params?: Object, - /** 分隔符自定义*/ - separator?: string | React.ReactNode - } - /** - * #Breadcrumb - 显示当前页面在系统层级结构中的位置,并能向上返回。 - - ## 何时使用 - - - 当系统拥有超过两级以上的层级结构时; - - 当需要告知用户“你在哪里”时; - - 当需要向上导航的功能时。*/ - export class Breadcrumb extends React.Component { - static Item: typeof BreadcrumbItem - render(): JSX.Element - } - - - // Calendar - interface CalendarProps { - /** 自定义渲染月单元格*/ - monthCellRender?: Function, - /** 自定义渲染日期单元格*/ - dateCellRender?: Function, - /** 是否全屏显示*/ - fullscreen?: boolean, - /** 国际化配置*/ - locale?: Object, - prefixCls?: string, - className?: string, - style?: Object, - /** 日期面板变化回调*/ - onPanelChange?: Function, - /** 展示日期*/ - value?: Date, - /** 默认展示日期*/ - defaultValue?: Date, - /** 初始模式,`month/year`*/ - mode?: string - } - /** - * #Calendar - 按照日历形式展示数据的容器。 - - ## 何时使用 - - 当数据是日期或按照日期划分时,例如日程、课表、价格日历等,农历等。目前支持年/月切换。 - */ - export class Calendar extends React.Component { - render(): JSX.Element - } - - - // Carousel - interface CarouselProps { - /** 动画效果函数,可取 scrollx, fade*/ - effect?: string, - /** 是否显示面板指示点*/ - dots?: boolean, - /** 垂直显示*/ - vertical?: boolean, - /** 是否自动切换*/ - autoplay?: boolean, - /** 动画效果*/ - easing?: string, - /** 切换面板的回调*/ - beforeChange?: Function, - /** 切换面板的回调*/ - afterChange?: Function - } - /** - * #Carousel - 旋转木马,一组轮播的区域。 - - ## 何时使用 - - - 当有一组平级的内容。 - - 当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。 - - 常用于一组图片或卡片轮播。 - */ - export class Carousel extends React.Component { - render(): JSX.Element - } - - - - // Cascader - interface CascaderProps { - /** 可选项数据源*/ - options: Object, - /** 默认的选中项*/ - defaultValue?: Array, - /** 指定选中项*/ - value?: Array, - /** 选择完成后的回调*/ - onChange?: Function, - /** 选择后展示的渲染函数*/ - displayRender?: Function, - /** 自定义样式*/ - style?: Object, - /** 自定义类名*/ - className?: string, - /** 自定义浮层类名*/ - popupClassName?: string, - /** 浮层预设位置:`bottomLeft` `bottomRight` `topLeft` `topRight` */ - popupPlacement?: string, - /** 输入框占位文本*/ - placeholder?: string, - /** 输入框大小,可选 `large` `default` `small` */ - size?: string, - /** 禁用*/ - disabled?: boolean, - /** 是否支持清除*/ - allowClear?: boolean - - } - /** - * #Cascader - 级联选择框。 - - - ## 何时使用 - - - 需要从一组相关联的数据集合进行选择,例如省市区,公司层级,事物分类等。 - - 从一个较大的数据集合中进行选择时,用多级分类进行分隔,方便选择。 - - 比起 Select 组件,可以在同一个浮层中完成选择,有较好的体验。*/ - export class Cascader extends React.Component { - render(): JSX.Element - } - - - - - // Checkbox - interface CheckboxProps { - /** 指定当前是否选中*/ - checked?: boolean, - /** 初始是否选中*/ - defaultChecked?: boolean, - /** 变化时回调函数*/ - onChange?: Function - } - - interface CheckboxGroupProps { - /** 默认选中的选项*/ - defaultValue?: Array, - /** 指定选中的选项*/ - value?: Array, - /** 指定可选项*/ - options?: Array, - /** 变化时回调函数*/ - onChange?: Function - } - /** Checkbox 组*/ - class CheckboxGroup extends React.Component { - render(): JSX.Element - } - /** - * #Checkbox - 多选框。 - - ## 何时使用 - - - 在一组可选项中进行多项选择时; - - 单独使用可以表示两种状态之间的切换,和 `switch` 类似。区别在于切换 `switch` 会直接触发状态改变,而 `checkbox` 一般用于状态标记,需要和提交操作配合。 - */ - export class Checkbox extends React.Component { - static Group: typeof CheckboxGroup - render(): JSX.Element - } - - - - // Collapse - - interface CollapseProps { - /** 当前激活 tab 面板的 key*/ - activeKey?: Array | string, - /** 初始化选中面板的key */ - defaultActiveKey?: Array, - /** 切换面板的回调*/ - onChange?: Function - - } - class CollapsePanel extends React.Component<{ - /** 对应 activeKey */ - key: string, - /** 面板头内容*/ - header: React.ReactNode | string - }, {}> { - render(): JSX.Element - } - /** - * #Collapse - 可以折叠/展开的内容区域。 - - ## 何时使用 - - - 对复杂区域进行分组和隐藏,保持页面的整洁。 - - `手风琴` 是一种特殊的折叠面板,只允许单个内容区域展开。*/ - export class Collapse extends React.Component { - static Panel: typeof CollapsePanel - render(): JSX.Element - } - - - - // DatePicker - interface DatePickerProps { - - value?: string | Date, - defaultValue?: string | Date, - /** 展示的日期格式,配置参考 [GregorianCalendarFormat](https://github.com/yiminghe/gregorian-calendar-format)*/ - format?: string, - /** 不可选择的日期*/ - disabledDate?: Function, - /** 时间发生变化的回调,发生在用户选择时间时*/ - onChange?: Function, - /** 禁用*/ - disabled?: boolean, - style?: Object, - /** 格外的弹出日历样式*/ - popupStyle?: Object, - /** 输入框大小,`large` 高度为 32px,`small` 为 22px,默认是 28px*/ - size?: string, - /** 国际化配置*/ - locale?: Object, - /** 增加时间选择功能*/ - showTime?: boolean, - /** 点击确定按钮的回调*/ - onOk?: Function, - /** 定义浮层的容器,默认为 body 上新建 div*/ - getCalendarContainer?: Function - - } - interface RangePickProps extends DatePickerProps { - - } - class RangePicker extends React.Component { - render(): JSX.Element - } - class MonthPicker extends React.Component { - render(): JSX.Element - } - /** - * #DatePicker - 输入或选择日期的控件。 - - ## 何时使用 - - 当用户需要输入一个日期,可以点击标准输入框,弹出日期面板进行选择。*/ - export class DatePicker extends React.Component, {}> { - static RangePicker: typeof RangePicker - static MonthPicker: typeof MonthPicker - render(): JSX.Element - } - - - - - // Dropdown - - interface DropdownProps { - /** 触发下拉的行为 ['click'] or ['hover']*/ - trigger?: Array, - /** 菜单节点*/ - overlay: React.ReactNode - - } - - class DropdownButton extends React.Component<{ - /** 按钮类型*/ - type?: string, - /** 点击左侧按钮的回调*/ - onClick?: Function, - /** 触发下拉的行为*/ - trigger?: string, - /** 菜单节点*/ - overlay: React.ReactNode - }, {}> { - render(): JSX.Element - } - /** - * #Dropdown - 向下弹出的列表。 - - ## 何时使用 - - 当页面上的操作命令过多时,用此组件可以收纳操作元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。 - */ - export class Dropdown extends React.Component { - static Button: typeof DropdownButton - render(): JSX.Element - } - - - - // Form - - interface FormItemProps { - prefixCls?: string, - /** label 标签的文本*/ - label?: React.ReactNode, - /** label 标签布局,通 `` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}`*/ - labelCol?: Object, - /** 提示信息,如不设置,则会根据校验规则自动生成 */ - help?: React.ReactNode | boolean, - /** 额外的提示信息,和 help 类似,当需要错误信息和提示文案同时出现时,可以使用这个。*/ - extra?: string, - /** 是否必填,如不设置,则会根据校验规则自动生成 */ - validateStatus?: string, - /** 配合 validateStatus 属性使用,是否展示校验状态图标 */ - hasFeedback?: boolean, - /** 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol*/ - wrapperCol?: Object, - className?: string, - required?: boolean, - id?: string - } - /** - 表单一定会包含表单域,表单域可以是输入控件,标准表单域,标签,下拉菜单,文本域等。 - - 这里我们分别封装了表单域 `` 和输入控件 ``。*/ - export class FormItem extends React.Component { - render(): JSX.Element - } - interface FormComponentProps { - form: CreateFormOptions - } - export class FormComponent extends React.Component { - render(): JSX.Element - } - - // function create - type CreateFormOptions = { - /** 获取一组输入控件的值,如不传入参数,则获取全部组件的值*/ - getFieldsValue(): (fieldNames?: Array) => any - /** 获取一个输入控件的值*/ - getFieldValue(): (fieldName: string) => any - /** 设置一组输入控件的值*/ - setFieldsValue(): (obj: Object) => void - /** 设置一组输入控件的值*/ - setFields(): (obj: Object) => void - /** 校验并获取一组输入域的值与 Error*/ - validateFields(): (fieldNames?: Array, options?: Object, callback?: (erros: any, values: any) => void) => any - /** 与 `validateFields` 相似,但校验完后,如果校验不通过的菜单域不在可见范围内,则自动滚动进可见范围 */ - validateFieldsAndScroll(): (fieldNames?: Array, options?: Object, callback?: (erros: any, values: any) => void) => any - /** 获取某个输入控件的 Error */ - getFieldError(): (name: string) => Object - /** 判断一个输入控件是否在校验状态*/ - isFieldValidating(): (name: string) => Object - /**重置一组输入控件的值与状态,如不传入参数,则重置所有组件*/ - resetFields(): (names?: Array) => void - - getFieldsValue(): (id: string, options: { - /** 子节点的值的属性,如 Checkbox 的是 'checked'*/ - valuePropName?: string, - /** 子节点的初始值,类型、可选值均由子节点决定*/ - initialValue?: any, - /** 收集子节点的值的时机*/ - trigger?: string, - /** 校验子节点值的时机*/ - validateTrigger?: string, - /** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */ - rules?: Array, - /** 必填输入控件唯一标志*/ - id?: string - }) => Array - - - } - - interface ComponentDecorator { - (component: T): T; - } - interface FormProps { - prefixCls?: string, - /** 水平排列布局*/ - horizontal?: boolean, - /** 行内排列布局*/ - inline?: boolean, - /** 经 `Form.create()` 包装过的组件会自带 `this.props.form` 属性,直接传给 Form 即可*/ - form?: Object, - /** 数据验证成功后回调事件*/ - onSubmit?: (e: React.FormEvent
) => void, - } - /** - * #Form - 具有数据收集、校验和提交功能的表单,包含复选框、单选框、输入框、下拉选择框等元素。 - - ## 表单 - - 我们为 `form` 提供了以下两种排列方式: - - - 水平排列:可以实现 `label` 标签和表单控件的水平排列; - - 行内排列:使其表现为 `inline-block` 级别的控件。 - */ - export class Form extends React.Component { - static Item: typeof FormItem - static create(options?: { - /** - * 当 `Form.Item` 子节点的值发生改变时触发,可以把对应的值转存到 Redux store - */ - onFieldsChange?: (props: Object, fields: Array) => void, - /** 把 props 转为对应的值,可用于把 Redux store 中的值读出 */ - mapPropsToFields?: (props: Object) => void - }): ComponentDecorator - render(): JSX.Element - } - - - - - - // Icon - interface IconProps { - /** 图标类型*/ - type: string - } - /** - * #Icon - 有含义的矢量图形,每一个图标打倒一个敌人。 - - ## 图标的命名规范 - - 我们为每个图标赋予了语义化的命名,命名规则如下: - - - 实心和描线图标保持同名,用 `-o` 来区分,比如 `question-circle`(实心) 和 `question-circle-o`(描线); - - - 命名顺序:`[icon名]-[形状可选]-[描线与否]-[方向可选]`。 - - ## 如何使用 - - 使用 `` 标签声明组件,指定图标对应的 type 属性,示例代码如下: - - ```html - - ``` - - 最终会渲染为: - - ```html - - ```*/ - export class Icon extends React.Component { - render(): JSX.Element - } - - - - - // Input - interface InputProps { - /** 【必须】声明 input 类型,同原生 input 标签的 type 属性*/ - type?: string, - id: string | number, - /** 控件大小,默认值为 default 。注:标准表单内的输入框大小限制为 large。 {'large','default','small'}*/ - size?: string, - /** 是否禁用状态,默认为 false*/ - disabled?: boolean, - value?: any, - /** 设置初始默认值*/ - defaultValue?: any, - className?: string, - /** 带标签的 input,设置前置标签*/ - addonBefore?: React.ReactNode, - /** 带标签的 input,设置后置标签*/ - addonAfter?: React.ReactNode, - prefixCls?: string, - placeholder?: string - } - export class Input extends React.Component { - render(): JSX.Element - } - - - - - // InputNumber - interface InputNumberProps { - /** 最小值*/ - min: number, - /** 最大值*/ - max: number, - /** 当前值*/ - value?: number, - /** 每次改变步数*/ - step?: number, - /** 初始值*/ - defaultValue?: number, - /** 变化回调*/ - onChange?: Function, - /** 禁用*/ - disabled?: boolean, - /** 输入框大小*/ - size?: string - - } - /** - * #InputNumber - 通过鼠标或键盘,输入范围内的数值。 - - ## 何时使用 - - 当需要获取标准数值时。*/ - export class InputNumber extends React.Component { - render(): JSX.Element - } - - - // Layout - // Row - interface RowProps { - type?: string, - align?: string, - justify?: string, - className?: string - } - export class Row extends React.Component { - render(): JSX.Element - } - - // Col - interface ColProps { - span?: string, - order?: string, - offset?: string, - push?: string, - pull?: string, - className?: string - } - /** - 在多数业务情况下,Ant Design需要在设计区域内解决大量信息收纳的问题,因此在12栅格系统的基础上,我们将整个设计建议区域按照24等分的原则进行划分。 - - 划分之后的信息区块我们称之为“盒子”。建议横向排列的盒子数量最多四个,最少一个。“盒子”在整个屏幕上占比见上图。设计部分基于盒子的单位定制盒子内部的排版规则,以保证视觉层面的舒适感。 - - ## 概述 - - 布局的栅格化系统,我们是基于行(row)和列(col)来定义信息区块的外部框架,以保证页面的每个区域能够稳健地排布起来。下面简单介绍一下它的工作原理: - - * 通过`row`在水平方向建立一组`column`(简写col) - * 你的内容应当放置于`col`内,并且,只有`col`可以作为`row`的直接元素 - * 栅格系统中的列是指1到24的值来表示其跨越的范围。例如,三个等宽的列可以使用`.col-8`来创建 - * 如果一个`row`中的`col`总和超过24,那么多余的`col`会作为一个整体另起一行排列 - - ## Flex 布局 - - 我们的栅格化系统支持 Flex 布局,允许子元素在父节点内的水平对齐方式 - 居左、居中、居右、等宽排列、分散排列。子元素与子元素之间,支持顶部对齐、垂直居中对齐、底部对齐的方式。同时,支持使用 order 来定义元素的排列顺序。 - - Flex 布局是基于 24 栅格来定义每一个“盒子”的宽度,但排版则不拘泥于栅格。*/ - export class Col extends React.Component { - render(): JSX.Element - } - - - - - // Menu - interface MenuItemProps { - /** - * (是否禁用) - * - * @type {boolean} - */ - disabled?: boolean, - key: string - } - export class MenuItem extends React.Component { - render(): JSX.Element - } - - interface MenuSubMenuProps { - /** - * (子菜单项值) - * - * @type {(string | React.ReactNode)} - */ - title: string | React.ReactNode, - /** - * (子菜单的菜单项) - * - * @type {(MenuItem | MenuSubMenu)} - */ - children?: JSX.Element[] - } - export class MenuSubMenu extends React.Component { - render(): JSX.Element - } - - interface MenuItemGroupProps { - /** - * (分组标题) - * - * @type {(string | React.ReactNode)} - */ - title: string | React.ReactNode, - /** - * (分组的菜单项) - * - * @type {MenuItem} - */ - children?: JSX.Element[] - } - export class MenuItemGroup extends React.Component { - render(): JSX.Element - } - - - // enum - enum MenuTheme { - light, - dark - } - enum MenuMode { - vertical, - horizontal, - inline - } - interface MenuProps { - /** 主题颜色*/ - theme?: MenuTheme | string, - /** 菜单类型 enum: `vertical` `horizontal` `inline`*/ - mode?: MenuMode | string, - /** 当前选中的菜单项 key 数组*/ - selectedKeys?: Array, - /** 初始选中的菜单项 key 数组*/ - defaultSelectedKeys?: Array, - /** 当前展开的菜单项 key 数组*/ - openKeys?: Array, - /** 初始展开的菜单项 key 数组*/ - defaultOpenKeys?: Array, - /** - * 被选中时调用 - * - * @type {(item: any, key: string, selectedKeys: Array) => void} - */ - onSelect?: (item: any, key: string, selectedKeys: Array) => void, - /** 取消选中时调用*/ - onDeselect?: (item: any, key: string, selectedKeys: Array) => void, - /** 点击 menuitem 调用此函数*/ - onClick?: (item: any, key: string) => void, - /** 根节点样式*/ - style?: Object - } - /** - # Menu - 为页面和功能提供导航的菜单列表。 - - ## 何时使用 - - 导航菜单是一个网站的灵魂,用户依赖导航在各个页面中进行跳转。一般分为顶部导航和侧边导航,顶部导航提供全局性的类目和功能,侧边导航提供多级结构来收纳和排列网站架构。 - - 更多布局和导航的范例可以参考:[常用布局](/spec/layout)。*/ - export class Menu extends React.Component { - static Item: typeof MenuItem - static SubMenu: typeof MenuSubMenu - static ItemGroup: typeof MenuItemGroup - static Divider: typeof React.Component - render(): JSX.Element - } - - - - // Message - type MessageFunc = ( - /** 提示内容*/ - content: string, - /** 自动关闭的延时*/ - duration?: number - ) => void - /** - * #Message - 全局展示操作反馈信息。 - - ## 何时使用 - - - 可提供成功、警告和错误等反馈信息。 - - 顶部居中显示并自动消失,是一种不打断用户操作的轻量级提示方式。*/ - export const message: { - - success: MessageFunc - error: MessageFunc - info: MessageFunc - loading: MessageFunc - config: (options: { - /** - * 消息距离顶部的位置 - * - * @type {number} - */ - top: number - }) => void - destroy: () => void - } - - // Modal - type ModalFunc = (options: { - visible?: boolean, - title?: React.ReactNode | string, - onOk?: Function, - onCancel?: Function, - width?: string | number, - iconClassName?: string, - okText?: string, - cancelText?: string - }) => void - - interface ModalProps { - /** 对话框是否可见*/ - visible?: boolean, - /** 确定按钮 loading*/ - confirmLoading?: boolean, - /** 标题*/ - title?: React.ReactNode | string, - /** 是否显示右上角的关闭按钮*/ - closable?: boolean, - /** 点击确定回调*/ - onOk?: Function, - /** 点击遮罩层或右上角叉或取消按钮的回调*/ - onCancel?: Function, - /** 宽度*/ - width?: string | number, - /** 底部内容*/ - footer?: React.ReactNode | string, - /** 确认按钮文字*/ - okText?: string, - /** 取消按钮文字*/ - cancelText?: string, - /** 点击蒙层是否允许关闭*/ - maskClosable?: boolean - } - - /** - # Modal - 模态对话框。 - - ## 何时使用 - - 需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 `Modal` 在当前页面正中打开一个浮层,承载相应的操作。 - - 另外当需要一个简洁的确认框询问用户时,可以使用精心封装好的 `ant.Modal.confirm()` 等方法。*/ - export class Modal extends React.Component { - static info: ModalFunc - static success: ModalFunc - static error: ModalFunc - static confirm: ModalFunc - render(): JSX.Element - } - - - - - // Notification - type NotificationFunc = ( - config: { - /** 通知提醒标题,必选 */ - message: React.ReactNode | string, - /** 通知提醒内容,必选*/ - description: React.ReactNode | string, - /** 自定义关闭按钮*/ - btn?: React.ReactNode | string, - /** 当前通知唯一标志*/ - key?: string, - /** 点击默认关闭按钮时触发的回调函数*/ - onClose?: Function, - /** 默认 4.5 秒后自动关闭,配置为 null 则不自动关闭*/ - duration?: number - }) => void - /** - * #notification - 全局展示通知提醒信息。 - - ## 何时使用 - - 在系统右上角显示通知提醒信息。经常用于以下情况: - - - 较为复杂的通知内容。 - - 带有交互的通知,给出用户下一步的行动点。 - - 系统主动推送。*/ - export const notification: { - success: NotificationFunc - error: NotificationFunc - info: NotificationFunc - warn: NotificationFunc - close: (key: string) => void - destroy: () => void - config: (options: { - /** 消息距离顶部的位置*/ - top: number - }) => void - - } - - - - - // Pagination - interface PaginationProps { - /** 当前页数*/ - current?: number, - /** 默认的当前页数*/ - defaultCurrent?: number, - /** 数据总数*/ - total: number, - /** 初始的每页条数*/ - defaultPageSize?: number, - /** 每页条数*/ - pageSize?: number, - /** 页码改变的回调,参数是改变后的页码*/ - onChange?: Function, - /** 是否可以改变 pageSize */ - showSizeChanger?: boolean, - /** 指定每页可以显示多少条*/ - pageSizeOptions?: Array - /** pageSize 变化的回调 */ - onShowSizeChange?: Function, - /** 是否可以快速跳转至某页*/ - showQuickJumper?: boolean, - /** 当为「small」时,是小尺寸分页 */ - size?: string, - /** 当添加该属性时,显示为简单分页*/ - simple?: Object, - /** 用于显示总共有多少条数据*/ - showTotal?: Function - } - /** - * #Pagination - 采用分页的形式分隔长列表,每次只加载一个页面。 - - ## 何时使用 - - - 当加载/渲染所有数据将花费很多时间时; - - 可切换页码浏览数据。*/ - export class Pagination extends React.Component { - render(): JSX.Element - } - - - - - // Popconfirm - enum Placement { - top, left, right, bottom - } - interface PopconfirmProps { - /** - * 气泡框位置,可选 `top/left/right/bottom` - * - * @type {(Placement | string)} - */ - placement?: Placement | string, - /** 确认框的描述*/ - title?: string, - /** 点击确认的回调*/ - onConfirm?: Function, - onCancel?: Function, - /** 显示隐藏的回调*/ - onVisibleChange?: (visible: boolean) => void, - /** 确认按钮文字*/ - okText?: string, - /** 取消按钮文字*/ - cancelText?: string - } - /** - * #Popconfirm - 点击元素,弹出气泡式的确认框。 - - ## 何时使用 - - 目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。 - - 和 `confirm` 弹出的全屏居中模态对话框相比,交互形式更轻量。 - */ - export class Popconfirm extends React.Component { - render(): JSX.Element - } - - - - - // Popover - enum Trigger { - hover, focus, click - } - enum PopoverPlacement { - top, - left, right, bottom, - topLeft, topRight, bottomLeft, bottomRight, - leftTop, leftBottom, rightTop, rightBottom - } - interface PopoverProps { - /** 触发行为,可选 `hover/focus/click` */ - trigger?: Trigger | string, - /** 气泡框位置,可选 `top/left/right/bottom` `topLeft/topRight/bottomLeft/bottomRight` `leftTop/leftBottom/rightTop/rightBottom`*/ - placement?: PopoverPlacement | string, - /** 卡片标题*/ - title?: React.ReactNode | string, - /** 卡片内容*/ - overlay?: React.ReactNode | string, - prefixCls?: string, - /** 用于手动控制浮层显隐*/ - visible?: boolean, - /** 显示隐藏改变的回调*/ - onVisibleChange?: Function - } - /** - * #Popover - 点击/鼠标移入元素,弹出气泡式的卡片浮层。 - - ## 何时使用 - - 当目标元素有进一步的描述和相关操作时,可以收纳到卡片中,根据用户的操作行为进行展现。 - - 和 `Tooltip` 的区别是,用户可以对浮层上的元素进行操作,因此它可以承载更复杂的内容,比如链接或按钮等。 - */ - export class Popover extends React.Component { - render(): JSX.Element - } - - - - - // Progress - enum ProgressStatus { - normal, - exception, - active - } - - interface LineProps { - /** 百分比*/ - percent: number, - /** 内容的模板函数*/ - format?: (percent: any) => void, - /** 状态,可选:normal、exception、active*/ - status?: ProgressStatus | string, - /** 进度条线的宽度,单位是px*/ - strokeWidth?: number, - /** 是否显示进度数值和状态图标*/ - showInfo?: boolean - } - export class Line extends React.Component { - render(): JSX.Element - } - - interface CircleProps { - /** 百分比*/ - percent: number, - /** 内容的模板函数*/ - format?: (percent: any) => void, - /** 状态,可选:normal、exception*/ - status?: ProgressStatus | string, - /** 进度条线的宽度,单位是进度条画布宽度的百分比*/ - strokeWidth?: number, - /** 必填,进度条画布宽度,单位px。这里没有提供height属性设置,Line型高度就是strokeWidth,Circle型高度等于width*/ - width?: number - } - export class Circle extends React.Component { - render(): JSX.Element - } - /** - * #Progress - 展示操作的当前进度。 - - ## 何时使用 - - 在操作需要较长时间才能完成时,为用户显示该操作的当前进度和状态。 - - * 当一个操作会打断当前界面,或者需要在后台运行,且耗时可能超过2秒时; - * 当需要显示一个操作完成的百分比时。*/ - export const Progress: { - Line: typeof Line, - Circle: typeof Circle - } - - - // QueueAnim - interface QueueAnimProps { - /** 动画内置参数 `left` `right` `top` `bottom` `scale` `scaleBig` `scaleX` `scaleY`*/ - type?: string | Array, - /** 配置动画参数 如 `{opacity:[1, 0],translateY:[0, -30]}` 具体参考 [velocity](http://julian.com/research/velocity) 的写法*/ - animConfig?: Object | Array, - /** 整个动画的延时,以毫秒为单位*/ - delay?: number | Array, - /** 每个动画的时间,以毫秒为单位*/ - duration?: number | Array, - /** 每个动画的间隔时间,以毫秒为单位*/ - interval?: number | Array, - /** 出场时是否倒放,从最后一个 dom 开始往上播放 */ - leaveReverse?: boolean, - /** 动画的缓动函数,[查看详细](http://julian.com/research/velocity/#easing)*/ - ease?: string | Array, - /** 进出场动画进行中的类名*/ - animatingClassName?: Array, - /** QueueAnim 替换的标签名*/ - component?: string - } - /** - * #QueueAnim - 通过简单的配置对一组元素添加串行的进场动画效果。 - - ## 何时使用 - - - 从内容A到内容B的转变过程时能有效的吸引用户注意力,突出视觉中心,提高整体视觉效果。 - - - 小的信息元素排布或块状较多的情况下,根据一定的路径层次依次进场,区分维度层级,来凸显量级,使页面转场更加流畅和舒适,提高整体视觉效果和产品的质感。 - - - 特别适合首页和需要视觉展示效果的宣传页,以及单页应用的切换页面动效。 - */ - export class QueueAnim extends React.Component { - render(): JSX.Element - } - - - - - // Radio - enum RadioGroupSize { - large, - default, - small - } - interface RadioGroupProps { - /** 选项变化时的回调函数*/ - onChange?: (e: Event) => void, - /** 用于设置当前选中的值*/ - value?: string, - /** 默认选中的值*/ - defaultValue?: string, - /** 大小,只对按钮样式生效*/ - size?: RadioGroupSize | string - } - export class RadioGroup extends React.Component { - render(): JSX.Element - } - - - interface RadioProps { - /** 指定当前是否选中*/ - checked?: boolean, - /** 初始是否选中*/ - defaultChecked?: boolean, - /** 根据 value 进行比较,判断是否选中 */ - value?: any - } - /** - * #Radio - 单选框。 - - ## 何时使用 - - - 用于在多个备选项中选中单个状态。 - - 和 Select 的区别是,Radio 所有选项默认可见,方便用户在比较中选择,因此选项不宜过多。 - */ - export class Radio extends React.Component { - static Group: typeof RadioGroup - static Button: typeof Button - render(): JSX.Element - } - - - - // Select - interface SelectOptionProps { - /** 是否禁用*/ - disabled?: boolean, - /** 如果 react 需要你设置此项,此项值与 value 的值相同,然后可以省略 value 设置*/ - key?: string, - /** 默认根据此属性值进行筛选*/ - value: string - } - export class SelectOption extends React.Component { - render(): JSX.Element - } - - interface SelectOptGroupProps { - /** 组名*/ - label: string | React.ReactNode, - key?: string - } - export class SelectOptGroup extends React.Component { - render(): JSX.Element - } - - interface SelectProps { - /** 指定当前选中的条目*/ - value?: string | Array, - /** 指定默认选中的条目*/ - defaultValue?: string | Array, - /** 支持多选*/ - multiple?: boolean, - /** 支持清除, 单选模式有效*/ - allowClear?: boolean, - /** 是否根据输入项进行筛选,可为一个函数,返回满足要求的 option 即可*/ - filterOption?: boolean | Function, - /** 可以把随意输入的条目作为 tag,输入项不需要与下拉选项匹配*/ - tags?: boolean, - /** 被选中时调用,参数为选中项的 value 值 */ - onSelect?: (value: any, option: any) => void, - /** 取消选中时调用,参数为选中项的 option value 值,仅在 multiple 或 tags 模式下生效*/ - onDeselect?: (value: any, option: any) => void, - /** 选中option,或input的value变化(combobox 模式下)时,调用此函数*/ - onChange?: (value: any, label: any) => void, - /** 文本框值变化时回调*/ - onSearch?: (value: string) => void, - /** 选择框默认文字*/ - placeholder?: string, - /** 搜索框默认文字*/ - searchPlaceholder?: string, - /** 当下拉列表为空时显示的内容*/ - notFoundContent?: string, - /** 下拉菜单和选择器同宽*/ - dropdownMatchSelectWidth?: boolean, - /** 搜索时过滤对应的 option 属性,如设置为 children 表示对内嵌内容进行搜索*/ - optionFilterProp?: string, - /** 输入框自动提示模式*/ - combobox?: SVGSymbolElement, - /** 选择框大小,可选 `large` `small` */ - size?: string, - /** 在下拉中显示搜索框*/ - showSearch?: boolean, - /** 是否禁用*/ - disabled?: boolean, - style?: Object - } - /** - * #Select - 类似 Select2 的选择器。 - - ## 何时使用 - - 弹出一个下拉菜单给用户选择操作,用于代替原生的选择器,或者需要一个更优雅的多选器时。*/ - export class Select extends React.Component { - static Option: typeof SelectOption - static OptGroup: typeof SelectOptGroup - render(): JSX.Element - } - - - - // Slider - interface SliderProps { - /** 最小值*/ - min?: number, - /** 最大值*/ - max?: number, - /** 步长,取值必须大于 0,并且可被 (max - min) 整除。当 `marks` 不为空对象时,可以设置 `step` 为 `null`,此时 Slider 的可选值仅有 marks 标出来的部分。*/ - step?: number, - /** 分段标记,key 的类型必须为 `Number` 且取值在闭区间 [min, max] 内*/ - marks?: { key: number, value: any }, - /** 设置当前取值。当 `range` 为 `false` 时,使用 `Number`,否则用 `[Number, Number]`*/ - value?: number | Array, - /** 设置当前取值。当 `range` 为 `false` 时,使用 `Number`,否则用 `[Number, Number]`*/ - defaultValue?: number | Array, - /** `marks` 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列*/ - included?: boolean, - /** 值为 `true` 时,滑块为禁用状态*/ - disabled?: boolean, - /** 当 `range` 为 `true` 时,该属性可以设置是否允许两个滑块交换位置。*/ - allowCross?: boolean, - /** 当 Slider 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入。*/ - onChange?: Function, - /** 与 `onmouseup` 触发时机一致,把当前值作为参数传入。*/ - onAfterChange?: Function, - /** Slider 会把当前值传给 `tipFormatter`,并在 Tooltip 中显示 `tipFormatter` 的返回值,若为 null,则隐藏 Tooltip。*/ - tipFormatter?: Function | any, - range?: boolean - } - /** - * #Slider - 滑动型输入器,展示当前值和可选范围。 - - ## 何时使用 - - 当用户需要在数值区间/自定义区间内进行选择时,可为连续或离散值。*/ - export class Slider extends React.Component { - render(): JSX.Element - } - - - - - // Spin - interface SpinProps { - /** spin组件中点的大小,可选值为 small default large*/ - size?: string, - /** 用于内嵌其他组件的模式,可以关闭 loading 效果*/ - spining?: boolean - } - /** - * #Spin - 用于页面和区块的加载中状态。 - - ## 何时使用 - - 页面局部处于等待异步数据或正在渲染过程时,合适的加载动效会有效缓解用户的焦虑。 - */ - export class Spin extends React.Component { - render(): JSX.Element - } - - - - - // Steps - enum StepStatus { - wait, process, finish - } - interface StepProps { - /** 可选参数,指定状态。当不配置该属性时,会使用父Steps元素的current来自动指定状态。*/ - status?: StepStatus | string, - /** 必要参数,标题。*/ - title: string | React.ReactNode, - /** 可选参数,步骤的详情描述。*/ - description?: string | React.ReactNode, - /** 可选参数,步骤的Icon。如果不指定,则使用默认的样式。*/ - icon?: string | React.ReactNode - } - export class Step extends React.Component { - render(): JSX.Element - } - - interface StepsProps { - /** 可选参数,指定当前处理正在执行状态的步骤,从0开始记数。在子Step元素中,可以通过status属性覆盖状态。*/ - current?: number, - /** 可选参数,指定大小(目前只支持普通和迷你两种大小)。 small, default */ - size?: string, - /** 可选参数,指定步骤条方向(目前支持水平和竖直两种方向,默认水平方向)。*/ - direction?: string, - /** 可选参数,指定步骤的详细描述文字的最大宽度。*/ - maxDescriptionWidth?: number - - } - /** - * #Steps - 引导用户按照流程完成任务的导航条。 - - ## 何时使用 - - 当任务复杂或者存在先后关系时,将其分解成一系列步骤,从而简化任务。*/ - export class Steps extends React.Component { - static Step: typeof Step - render(): JSX.Element - } - - - - // Switch - interface SwitchProps { - /** 指定当前是否选中*/ - checked?: boolean, - /** 初始是否选中*/ - defaultChecked?: boolean, - /** 变化时回调函数*/ - onChange?: (checked: boolean) => void, - /** 选中时的内容*/ - checkedChildren?: React.ReactNode, - /** 非选中时的内容*/ - unCheckedChildren?: React.ReactNode, - /** 开关大小*/ - size?: string - } - /** - * #Switch - 开关选择器。 - - ## 何时使用 - - - 需要表示开关状态/两种状态之间的切换时; - - 和 `checkbox `的区别是,切换 `switch` 会直接触发状态改变,而 `checkbox` 一般用于状态标记,需要和提交操作配合。 - */ - export class Switch extends React.Component { - render(): JSX.Element - } - - - - - // Table - enum RowSelectionType { - checkbox, - radio - } - type SelectedRowKeys = Array - interface RowSelection { - type?: RowSelectionType | string, - selectedRowKeys?: SelectedRowKeys, - onChange?: (selectedRowKeys: SelectedRowKeys, selectedRows: any) => void, - getCheckboxProps?: (record: any) => void, - onSelect?: (record: any, selected: any, selectedRows: any) => void, - onSelectAll?: (rselectedecord: any, selectedRows: any, changeRows: any) => void - } - interface Columns { - /** React 需要的 key,建议设置*/ - key?: string, - /** 列头显示文字*/ - title?: string | React.ReactNode, - /** 列数据在数据项中对应的 key*/ - dataIndex?: string, - /** 生成复杂数据的渲染函数,参数分别为当前列的值,当前列数据,列索引,@return里面可以设置表格[行/列合并](#demo-colspan-rowspan)*/ - render?: (text?: any, record?: any, index?: number) => React.ReactNode, - /** 表头的筛选菜单项*/ - filters?: Array, - /** 本地模式下,确定筛选的运行函数*/ - onFilter?: Function, - /** 是否多选*/ - filterMultiple?: boolean, - /** 排序函数,本地排序使用一个函数,需要服务端排序可设为 true */ - sorter?: boolean | Function, - /** 表头列合并,设置为 0 时,不渲染*/ - colSpan?: number, - /** 列宽度*/ - width?: string | number, - /** 列的 className*/ - className?: string - } - interface TableProps { - /** 列表项是否可选择*/ - rowSelection?: RowSelection, - /** 分页器*/ - pagination?: Object, - /** 正常或迷你类型 : `default` or `small` */ - size?: string, - /** 数据数组*/ - dataSource: Array, - /** 表格列的配置描述*/ - columns: Columns, - /** 表格行 key 的取值*/ - rowKey?: (record: any, index: number) => string, - /** 额外的展开行*/ - expandedRowRender?: Function, - /** 默认展开的行*/ - defaultExpandedRowKeys?: Array, - /** 分页、排序、筛选变化时触发*/ - onChange?: (pagination: Object, filters: any, sorter: any) => void, - /** 页面是否加载中*/ - loading?: boolean, - /** 默认文案设置,目前包括排序、过滤、空数据文案: `{ filterConfirm: '确定', filterReset: '重置', emptyText: '暂无数据' }` */ - locale?: Object, - /** 展示树形数据时,每层缩进的宽度,以 px 为单位*/ - indentSize?: number, - /** 处理行点击事件*/ - onRowClick?: (record: any, index: number) => void, - /** 是否固定表头*/ - useFixedHeader?: boolean, - /** 是否展示外边框和列边框*/ - bordered?: boolean, - /** 是否显示表头*/ - showHeader?: boolean, - /** 表格底部自定义渲染函数*/ - footer?: (currentPageData: Object) => void - - } - /** - * #Table - 展示行列数据。 - - ## 何时使用 - - - 当有大量结构化的数据需要展现时; - - 当需要对数据进行排序、搜索、分页、自定义操作等复杂行为时。*/ - export class Table extends React.Component { - render(): JSX.Element - } - - - - // Tabs - interface TabPaneProps { - /** 选项卡头显示文字*/ - tab: React.ReactNode | string - } - export class TabPane extends React.Component { - render(): JSX.Element - } - - enum TabsType { - line, card, 'editable-card' - } - enum TabsPosition { - top, - right, - bottom, - left - } - interface TabsProps { - /** 当前激活 tab 面板的 key */ - activeKey?: string, - /** 初始化选中面板的 key,如果没有设置 activeKey*/ - defaultActiveKey?: string, - /** 切换面板的回调*/ - onChange?: Function, - /** tab 被点击的回调 */ - onTabClick?: Function, - /** tab bar 上额外的元素 */ - tabBarExtraContent?: React.ReactNode, - /** 页签的基本样式,可选 `line`、`card` `editable-card` 类型*/ - type?: TabsType | string, - /** 页签位置,可选值有 `top` `right` `bottom` `left`*/ - tabPosition?: TabsPosition | string, - /** 新增和删除页签的回调,在 `type="editable-card"` 时有效*/ - onEdit?: (targetKey: string, action: any) => void - } - /** - * #Tabs - 选项卡切换组件。 - - ## 何时使用 - - 提供平级的区域将大块内容进行收纳和展现,保持界面整洁。 - - Ant Design 依次提供了三级选项卡,分别用于不同的场景。 - - - 卡片式的页签,提供可关闭的样式,常用于容器顶部。 - - 标准线条式页签,用于容器内部的主功能切换,这是最常用的 Tabs。 - - [RadioButton](/components/radio/#demo-radiobutton) 可作为更次级的页签来使用。*/ - export class Tabs extends React.Component { - static TabPane: typeof TabPane - render(): JSX.Element - } - - - - - // Tag - interface TagProps { - /** 标签是否可以关闭*/ - closable?: boolean, - /** 关闭时的回调*/ - onClose?: Function, - /** 动画关闭后的回调*/ - afterClose?: Function, - /** 标签的色彩*/ - color?: string - } - /** - * #Tag - 进行标记和分类的小标签。 - - ## 何时使用 - - - 用于标记事物的属性和维度。 - - 进行分类。*/ - export class Tag extends React.Component { - render(): JSX.Element - } - - - - - - - // TimePicker - interface TimePickerProps { - /** 默认时间*/ - value?: string | Date, - /** 初始默认时间*/ - defaultValue?: string | Date, - /** 展示的时间格式 : "HH:mm:ss"、"HH:mm"、"mm:ss" */ - format?: string, - /** 时间发生变化的回调*/ - onChange?: (Date: Date) => void, - /** 禁用全部操作*/ - disabled?: boolean, - /** 没有值的时候显示的内容*/ - placeholder?: string, - /** 国际化配置*/ - locale?: Object, - /** 隐藏禁止选择的选项*/ - hideDisabledOptions?: boolean, - /** 禁止选择部分小时选项*/ - disabledHours?: Function, - /** 禁止选择部分分钟选项*/ - disabledMinutes?: Function, - /** 禁止选择部分秒选项*/ - disabledSeconds?: Function - - } - /** - * #TimePicker - 输入或选择时间的控件。 - - 何时使用 - -------- - - 当用户需要输入一个时间,可以点击标准输入框,弹出时间面板进行选择。 - */ - export class TimePicker extends React.Component { - render(): JSX.Element - } - - - - - // Timeline - interface TimeLineItemProps { - /** 指定圆圈颜色。*/ - color?: string - } - export class TimeLineItem extends React.Component { - render(): JSX.Element - } - - interface TimelineProps { - /** 指定最后一个幽灵节点是否存在或内容*/ - pending?: boolean | React.ReactNode - } - /** - * #Timeline - 垂直展示的时间流信息。 - - ## 何时使用 - - - 当有一系列信息需要从上至下按时间排列时; - - 需要有一条时间轴进行视觉上的串联时;*/ - export class Timeline extends React.Component { - static Item: typeof TimeLineItem - render(): JSX.Element - } - - - - // Tooltip - - interface TooltipProps { - /** 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom`*/ - placement?: PopoverPlacement | string, - /** 提示文字*/ - title?: string | React.ReactNode - } - /** - * #Tooltip - 简单的文字提示气泡框。 - - ## 何时使用 - - 鼠标移入则显示提示,移出消失,气泡浮层不承载复杂文本和操作。 - - 可用来代替系统默认的 `title` 提示,提供一个`按钮/文字/操作`的文案解释。*/ - export class Tooltip extends React.Component { - render(): JSX.Element - } - - - - - - // Transfer - interface TransferProps { - /** 数据源*/ - dataSource: Array, - /** 每行数据渲染函数*/ - render?: (record: Object) => any, - /** 显示在右侧框数据的key集合*/ - targetKeys: Array, - /** 变化时回调函数*/ - onChange?: (targetKeys: any, direction: string, moveKeys: any) => void, - /** 两个穿梭框的自定义样式*/ - listStyle?: Object, - /** 自定义类*/ - className?: string, - /** 标题集合,顺序从左至右*/ - titles?: Array, - /** 操作文案集合,顺序从上至下*/ - operations?: Array, - /** 是否显示搜索框*/ - showSearch?: boolean, - /** 搜索框的默认值*/ - searchPlaceholder?: string, - /** 当列表为空时显示的内容*/ - notFoundContent?: React.ReactNode | string - /** 底部渲染函数*/ - footer?: (props: any) => any - } - /** - * #Transfer - 双栏穿梭选择框。 - - ## 何时使用 - - 用直观的方式在两栏中移动元素,完成选择行为。 - */ - export class Transfer extends React.Component { - render(): JSX.Element - } - - - - - - // Tree - interface TreeNodeProps { - disabled?: boolean, - disableCheckbox?: boolean, - title?: string | React.ReactNode, - key?: string, - isLeaf?: boolean - } - export class TreeNode extends React.Component { - render(): JSX.Element - } - - interface TreeProps { - showLine?: boolean, - className?: string, - /** 是否支持多选*/ - multiple?: boolean, - /** 是否支持选中*/ - checkable?: boolean, - /** 默认展开所有树节点*/ - defaultExpandAll?: boolean, - /** 默认展开指定的树节点*/ - defaultExpandedKeys?: Array, - /** (受控)展开指定的树节点*/ - expandedKeys?: Array, - /** (受控)选中复选框的树节点*/ - checkedKeys?: Array, - /** 默认选中复选框的树节点*/ - defaultCheckedKeys?: Array, - /** (受控)设置选中的树节点*/ - selectedKeys?: Array, - /** 默认选中的树节点*/ - defaultSelectedKeys?: Array, - /** 展开/收起节点时触发 */ - onExpand?: (node: any, expanded: any, expandedKeys: any) => void, - /** 点击复选框触发*/ - onCheck?: (checkedKeys: any, e: { checked: boolean, checkedNodes: any, node: any, event: Event }) => void, - /** 点击树节点触发*/ - onSelect?: (selectedKeys: any, e: { selected: boolean, selectedNodes: any, node: any, event: Event }) => void, - /** filter some treeNodes as you need. it should return true */ - filterTreeNode?: (node: any) => boolean, - /** 异步加载数据*/ - loadData?: (node: any) => void, - /** 响应右键点击*/ - onRightClick?: (options: { event: Event, node: any }) => void, - /** 设置节点可拖拽(IE>8)*/ - draggable?: boolean, - /** 开始拖拽时调用*/ - onDragStart?: (options: { event: Event, node: any }) => void, - /** dragenter 触发时调用*/ - onDragEnter?: (options: { event: Event, node: any, expandedKeys: any }) => void, - /** dragover 触发时调用 */ - onDragOver?: (options: { event: Event, node: any }) => void, - /** dragleave 触发时调用*/ - onDragLeave?: (options: { event: Event, node: any }) => void, - /** drop 触发时调用*/ - onDrop?: (options: { event: Event, node: any, dragNode: any, dragNodesKeys: any }) => void, - } - /** - * #Tree - * 文件夹、组织架构、生物分类、国家地区等等,世间万物的大多数结构都是树形结构。使用`树控件`可以完整展现其中的层级关系,并具有展开收起选择等交互功能。 - */ - export class Tree extends React.Component { - static TreeNode: typeof TreeNode - render(): JSX.Element - } - - - - - - // TreeSelect - interface TreeSelectTreeNodeProps { - disabled?: boolean, - /** 此项必须设置(其值在整个树范围内唯一)*/ - key: string, - /** 默认根据此属性值进行筛选*/ - value?: string, - /** 树节点显示的内容*/ - title?: React.ReactNode | string, - /** 是否是叶子节点*/ - isLeaf?: boolean - } - export class TreeSelectTreeNode extends React.Component { - render(): JSX.Element - } - - type TreeData = Array<{ value: any, label: string, children: TreeData }> - interface TreeSelectProps { - style?: Object, - /** 指定当前选中的条目*/ - value?: string | Array, - /** 指定默认选中的条目*/ - defaultValue?: string | Array, - /** 支持多选*/ - multiple?: boolean, - /** 可以把随意输入的条目作为 tag,输入项不需要与下拉选项匹配*/ - tags?: boolean, - /** 被选中时调用,参数为选中项的 value 值*/ - onSelect?: (value: any) => void, - /** 选中option,或input的value变化(combobox 模式下)时,调用此函数*/ - onChange?: (value: any, label: any) => void, - /** 显示清除按钮*/ - allowClear?: boolean, - /** 文本框值变化时回调*/ - onSearch?: (value: any) => void, - /** 选择框默认文字*/ - placeholder?: string, - /** 搜索框默认文字*/ - searchPlaceholder?: string, - /** 下拉菜单的样式*/ - dropdownStyle?: Object, - /** 下拉菜单和选择器同宽*/ - dropdownMatchSelectWidth?: boolean, - /** 输入框自动提示模式*/ - combobox?: boolean, - /** 选择框大小,可选 `large` `small`*/ - size?: string, - /** 在下拉中显示搜索框*/ - showSearch?: boolean, - /** 是否禁用*/ - disabled?: boolean, - /** 默认展开所有树节点*/ - treeDefaultExpandAll?: boolean, - /** 显示checkbox*/ - treeCheckable?: boolean, - /** 是否根据输入项进行筛选,返回值true*/ - filterTreeNode?: (treeNode: any) => boolean, - /** 输入项过滤对应的 treeNode 属性*/ - treeNodeFilterProp?: string, - /** 作为显示的prop设置*/ - treeNodeLabelProp?: string, - /** treeNodes数据,如果设置则不需要手动构造TreeNode节点(如果value在整个树范围内不唯一,需要设置`key`其值为整个树范围内的唯一id*/ - treeData?: TreeData, - /** 异步加载数据*/ - loadData?: (node: any) => void - } - /** - * #TreeSelect - 树型选择控件。 - - ## 何时使用 - - 类似 Select 的选择控件,可选择的数据结构是一个树形结构时,可以使用 TreeSelect,例如公司层级、学科系统、分类目录等等。 - */ - export class TreeSelect extends React.Component { - static TreeNode: typeof TreeSelectTreeNode - render(): JSX.Element - } - - - - - - - // Upload - interface UploadProps { - /** 可选参数, 上传的文件 */ - name?: string, - /** 必选参数, 上传的地址 */ - action: string, - /** 可选参数, 上传所需参数 */ - data?: Object, - /** 可选参数, 设置上传的请求头部,IE10 以上有效*/ - headers?: Object, - /** 可选参数, 是否展示 uploadList, 默认开启 */ - showUploadList?: boolean, - /** 可选参数, 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件。*/ - multiple?: boolean, - /** 可选参数, 接受上传的文件类型, 详见 input accept Attribute */ - accept?: string, - /** 可选参数, 上传文件之前的钩子,参数为上传的文件,若返回 `false` 或者 Promise 则停止上传。**注意:该方法不支持老 IE**。*/ - beforeUpload?: Function, - /** 可选参数, 上传文件改变时的状态,详见 onChange */ - onChange?: (info: Object) => void, - /** 上传列表的内建样式,支持两种基本样式 `text` or `picture` */ - listType?: string, - /** 自定义类名*/ - className?: string - - } - /** - * #Upload - 文件选择上传和拖拽上传控件。 - - ## 何时使用 - - 上传是将信息(网页、文字、图片、视频等)通过网页或者上传工具发布到远程服务器上的过程。 - - - 当需要上传一个或一些文件时。 - - 当需要展现上传的进度时。 - - 当需要使用拖拽交互时。*/ - export class Upload extends React.Component { - render(): JSX.Element - } - - - - - - -} - - -// export all antd -declare module 'antd' { - export = Antd -} -// single export point -declare module 'antd/lib/Affix' { - export default Antd.Affix -} -declare module 'antd/lib/Button' { - export default Antd.Button -} -declare module 'antd/lib/Alert' { - export default Antd.Alert -} -declare module 'antd/lib/Badge' { - export default Antd.Badge -} -declare module 'antd/lib/Breadcrumb' { - export default Antd.Breadcrumb -} -declare module 'antd/lib/Calendar' { - export default Antd.Calendar -} -declare module 'antd/lib/Carousel' { - export default Antd.Carousel -} -declare module 'antd/lib/Cascader' { - export default Antd.Cascader -} -declare module 'antd/lib/Checkbox' { - export default Antd.Checkbox -} -declare module 'antd/lib/Collapse' { - export default Antd.Collapse -} -declare module 'antd/lib/DatePicker' { - export default Antd.DatePicker -} -declare module 'antd/lib/Dropdown' { - export default Antd.Dropdown -} -declare module 'antd/lib/Icon' { - export default Antd.Icon -} -declare module 'antd/lib/Form' { - export default Antd.Form -} -declare module 'antd/lib/Input' { - export default Antd.Input -} -declare module 'antd/lib/InputNumber' { - export default Antd.InputNumber -} -declare module 'antd/lib/Row' { - export default Antd.Row -} -declare module 'antd/lib/Col' { - export default Antd.Col -} -declare module 'antd/lib/Menu' { - export default Antd.Menu -} -declare module 'antd/lib/message' { - export default Antd.message -} -declare module 'antd/lib/Modal' { - export default Antd.Modal -} -declare module 'antd/lib/notification' { - export default Antd.notification -} -declare module 'antd/lib/Pagination' { - export default Antd.Pagination -} -declare module 'antd/lib/Popconfirm' { - export default Antd.Popconfirm -} -declare module 'antd/lib/Popover' { - export default Antd.Popover -} -declare module 'antd/lib/Progress' { - export default Antd.Progress -} -declare module 'antd/lib/QueueAnim' { - export default Antd.QueueAnim -} -declare module 'antd/lib/Radio' { - export default Antd.Radio -} -declare module 'antd/lib/Select' { - export default Antd.Select -} -declare module 'antd/lib/Slider' { - export default Antd.Slider -} -declare module 'antd/lib/Spin' { - export default Antd.Spin -} -declare module 'antd/lib/Steps' { - export default Antd.Steps -} -declare module 'antd/lib/Switch' { - export default Antd.Switch -} -declare module 'antd/lib/Table' { - export default Antd.Table -} -declare module 'antd/lib/Tabs' { - export default Antd.Tabs -} -declare module 'antd/lib/Tag' { - export default Antd.Tag -} -declare module 'antd/lib/TimePicker' { - export default Antd.TimePicker -} -declare module 'antd/lib/Timeline' { - export default Antd.Timeline -} -declare module 'antd/lib/Tooltip' { - export default Antd.Tooltip -} -declare module 'antd/lib/Transfer' { - export default Antd.Transfer -} -declare module 'antd/lib/Tree' { - export default Antd.Tree -} -declare module 'antd/lib/TreeSelect' { - export default Antd.TreeSelect -} -declare module 'antd/lib/Upload' { - export default Antd.Upload -} diff --git a/applicationinsights-js/applicationinsights-js-tests.ts b/applicationinsights-js/applicationinsights-js-tests.ts index f77bab2b0a..66bc1f268d 100644 --- a/applicationinsights-js/applicationinsights-js-tests.ts +++ b/applicationinsights-js/applicationinsights-js-tests.ts @@ -1,4 +1,3 @@ - // More samples on: https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md var config: Microsoft.ApplicationInsights.IConfig = { @@ -24,28 +23,32 @@ var config: Microsoft.ApplicationInsights.IConfig = { disableCorrelationHeaders: true, disableFlushOnBeforeUnload: false, enableSessionStorageBuffer: false, - cookieDomain: "" + cookieDomain: "", + isCookieUseDisabled: true, + isRetryDisabled: true, + isPerfAnalyzerEnabled: true, + isStorageUseDisabled: true }; var appInsights: Microsoft.ApplicationInsights.IAppInsights = { - config: config, + config, context: null, queue: null, startTrackPage(name?: string) { return null; }, stopTrackPage(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, trackPageView(name?: string, url?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, duration?: number) { return null; }, - startTrackEvent(name: string) { return null }, - stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null }, - trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null }, - trackAjax(id: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, method?: string) { return null }, - trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel) { return null }, - trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; }) { return null }, - trackTrace(message: string, properties?: { [name: string]: string; }) { return null }, - flush() { return null }, - setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string) { return null }, - clearAuthenticatedUserContext() { return null }, - _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error) { return null } + startTrackEvent(name: string) { return null; }, + stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, + trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, + trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number) { return null; }, + trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel) { return null; }, + trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; }) { return null; }, + trackTrace(message: string, properties?: { [name: string]: string; }) { return null; }, + flush() { return null; }, + setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string) { return null; }, + clearAuthenticatedUserContext() { return null; }, + _onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error) { return null; } }; // trackPageView @@ -75,6 +78,9 @@ appInsights.trackException(new Error("sample error"), "handledAt", null, null); appInsights.trackTrace("message"); appInsights.trackTrace("message", null); +// trackDependency +appInsights.trackDependency("id", "POST", "http://example.com/test/abc", "/test/abc", null, true, null); + // flush appInsights.flush(); @@ -122,7 +128,8 @@ context.track(eventEnvelope); // track exception var exceptionObj = new Microsoft.ApplicationInsights.Telemetry.Exception(new Error(), "handledAt", null, null, AI.SeverityLevel.Critical); -var exceptionData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Exception.dataType, exceptionObj); +var exceptionData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( + Microsoft.ApplicationInsights.Telemetry.Exception.dataType, exceptionObj); var exceptionEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(exceptionData, Microsoft.ApplicationInsights.Telemetry.Exception.envelopeType); context.track(exceptionEnvelope); @@ -140,13 +147,15 @@ context.track(pageViewEnvelope); // track page view performance var pageViewPerfObj = new Microsoft.ApplicationInsights.Telemetry.PageViewPerformance("page name", "url", 999, null, null); -var pageViewPerfData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerfObj); +var pageViewPerfData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( + Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerfObj); var pageViewPerfEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(pageViewPerfData, Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.envelopeType); context.track(pageViewPerfEnvelope); // track remote dependency var remoteDepObj = new Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData("id", "url", "command", 1, true, 1234, "GET"); -var remoteDepData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.dataType, remoteDepObj); +var remoteDepData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( + Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.dataType, remoteDepObj); var remoteDepEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(remoteDepData, Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType); context.track(pageViewPerfEnvelope); diff --git a/applicationinsights-js/index.d.ts b/applicationinsights-js/index.d.ts index ba154e5fe6..ede1584bb5 100644 --- a/applicationinsights-js/index.d.ts +++ b/applicationinsights-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ApplicationInsights-JS v0.23.2 +// Type definitions for ApplicationInsights-JS 1.0 // Project: https://github.com/Microsoft/ApplicationInsights-JS // Definitions by: Kamil Szostak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -306,7 +306,6 @@ declare module Microsoft.Telemetry { } declare module Microsoft.ApplicationInsights.Telemetry { - class Event implements Microsoft.ApplicationInsights.ISerializable { static envelopeType: string; static dataType: string; @@ -323,7 +322,7 @@ declare module Microsoft.ApplicationInsights.Telemetry { /** * Constructs a new instance of the EventTelemetry object */ - constructor(name: string, properties?: Object, measurements?: Object); + constructor(name: string, properties?: any, measurements?: any); } class Exception implements Microsoft.ApplicationInsights.ISerializable { @@ -348,7 +347,7 @@ declare module Microsoft.ApplicationInsights.Telemetry { /** * Constructs a new isntance of the ExceptionTelemetry object */ - constructor(exception: Error, handledAt?: string, properties?: Object, measurements?: Object, severityLevel?: AI.SeverityLevel); + constructor(exception: Error, handledAt?: string, properties?: any, measurements?: any, severityLevel?: AI.SeverityLevel); /** * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception. */ @@ -369,7 +368,7 @@ declare module Microsoft.ApplicationInsights.Telemetry { /** * Constructs a new instance of the MetricTelemetry object */ - constructor(name: string, value: number, count?: number, min?: number, max?: number, properties?: Object); + constructor(name: string, value: number, count?: number, min?: number, max?: number, properties?: any); } class PageView extends AI.PageViewData implements Microsoft.ApplicationInsights.ISerializable { @@ -477,7 +476,7 @@ declare module Microsoft.ApplicationInsights.Telemetry { /** * Constructs a new instance of the MetricTelemetry object */ - constructor(message: string, properties?: Object); + constructor(message: string, properties?: any); } } @@ -567,8 +566,12 @@ declare module Microsoft.ApplicationInsights { disableCorrelationHeaders?: boolean; disableFlushOnBeforeUnload?: boolean; enableSessionStorageBuffer?: boolean; + isCookieUseDisabled?: boolean; cookieDomain?: string; + isRetryDisabled?: boolean; + isPerfAnalyzerEnabled?: boolean; url?: string; + isStorageUseDisabled?: boolean; } /** @@ -657,7 +660,7 @@ declare module Microsoft.ApplicationInsights { interface IAppInsights { config: IConfig; context: ITelemetryContext; - queue: (() => void)[]; + queue: Array<() => void>; /** * Starts timing how long the user views a page or other item. Call this when the page opens. * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes. @@ -717,16 +720,16 @@ declare module Microsoft.ApplicationInsights { [name: string]: number; }): any; /** - * Log an AJAX request - * @param id Event id - * @param absoluteUrl Full url - * @param pathName Leave this parameter blank - * @param totalTime Total time it took for AJAX request to complete - * @param success Whether AJAX request succeeded or failed - * @param resultCode Result code returned from AJAX call - * @param method HTTP verb that was used (GET, POST) - */ - trackAjax(id: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, method?: string): any; + * Log a dependency call + * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id. + * @param method represents request verb (GET, POST, etc.) + * @param absoluteUrl absolute url used to make the dependency request + * @param pathName the path part of the absolute url + * @param totalTime total request time + * @param success indicates if the request was sessessful + * @param resultCode response code returned by the dependency request + */ + trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number): any; /** * Log an exception you have caught. * @param exception An Error from a catch clause, or the string error message. @@ -755,7 +758,7 @@ declare module Microsoft.ApplicationInsights { /** * Log a diagnostic message. * @param message A message string - * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty. + * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty. */ trackTrace(message: string, properties?: { [name: string]: string; @@ -776,7 +779,7 @@ declare module Microsoft.ApplicationInsights { * Clears the authenticated user id and the account id from the user context. */ clearAuthenticatedUserContext(): any; - downloadAndSetup?(config: Microsoft.ApplicationInsights.IConfig): void; + downloadAndSetup?(config: Microsoft.ApplicationInsights.IConfig): any; /** * The custom error handler for Application Insights * @param {string} message - The error message @@ -790,7 +793,7 @@ declare module Microsoft.ApplicationInsights { } declare module 'applicationinsights-js' { - export let AppInsights: Microsoft.ApplicationInsights.IAppInsights; + const AppInsights: Microsoft.ApplicationInsights.IAppInsights; } declare var appInsights: Microsoft.ApplicationInsights.IAppInsights; \ No newline at end of file diff --git a/applicationinsights-js/tslint.json b/applicationinsights-js/tslint.json new file mode 100644 index 0000000000..119a5839d0 --- /dev/null +++ b/applicationinsights-js/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "../tslint.json", + "rules": { + "interface-name": [ false ], + "no-internal-module": false, + "no-single-declare-module": false + } +} \ No newline at end of file diff --git a/arcgis-js-api/index.d.ts b/arcgis-js-api/index.d.ts index 87df41a8d8..293c5190e9 100644 --- a/arcgis-js-api/index.d.ts +++ b/arcgis-js-api/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 4.2 +// Type definitions for ArcGIS API for JavaScript 4.3 // Project: http://js.arcgis.com // Definitions by: Esri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -32,14 +32,19 @@ declare namespace JSX { declare namespace __esri { export class Accessor { + constructor(obj?: any); + destroyed: boolean; initialized: boolean; declaredClass: string; destroy(): void; + get(propertyName: string): T; get(propertyName: string): any; set(propertyName: string, value: T): this; set(props: HashMap): this; + watch(path: string | string[], callback: WatchCallback, sync?: boolean): WatchHandle; + protected notifyChange(propertyName: string): void; protected _get(propertyName: string): any; protected _get(propertyName: string): T; @@ -69,18 +74,521 @@ declare namespace __esri { remove(): void; } + export interface EachAlwaysResult { + promise: IPromise; + value: any; + error: any; + } + export interface PausableWatchHandle { remove(): void; pause(): void; resume(): void; } + export interface FeatureEditResult { + objectId: number; + error: any; + } + export interface AttributeParamValue { attributeName: string; parameterName: string; value: string; } + export interface DataWorkspace { + id: string; + name: string; + } + + export interface GroupMembership { + id: number; + name: string; + } + + export interface HoldType { + description: string; + id: number; + name: string; + } + + export interface JobPriority { + description: string; + name: string; + value: number; + } + + export interface JobQuery { + id: number; + name: string; + } + + export interface JobStatus { + caption: string; + description: string; + id: number; + name: string; + } + + export interface JobQueryContainer { + containers: JobQueryContainer[]; + id: number; + name: string; + queries: JobQuery[]; + } + + export interface JobQueryDetails { + aliases: string[]; + fields: string[]; + id: number; + name: string; + orderBy: string; + tables: string[]; + where: string; + } + + export interface Privilege { + description: string; + id: number; + name: string; + } + + export interface UserDetails { + lastName: string; + address: string; + faxNumber: string; + firstName: string; + fullName: string; + groups: GroupMembership[]; + email: string; + phoneNumber: string; + privileges: Privilege[]; + roomNumber: string; + userName: string; + userQueries: JobQueryContainer[]; + zipCode: string; + } + + export interface VersionInfo { + access: string; + name: string; + parent: string; + } + + export interface WorkflowManagerServiceInfo { + jobPriorities: JobPriority[]; + activityTypes: ActivityType[]; + currentVersion: number; + dataWorkspaces: DataWorkspace[]; + holdTypes: HoldType[]; + configProperties: any; + jobStatuses: JobStatus[]; + jobTypes: JobType[]; + notificationTypes: NotificationType[]; + privileges: Privilege[]; + publicQueries: JobQueryContainer[]; + } + + export interface JobType { + category: string; + description: string; + id: string; + name: string; + state: string; + } + + export interface JobTypeDetails { + defaultParentVersionName: string; + autoExecuteCreatedJobs: boolean; + category: string; + defaultAssignedTo: string; + defaultAssignedType: string; + defaultDataWorkspaceId: string; + defaultDescription: string; + defaultDueDate: string; + defaultJobDuration: number; + canDataWorkspaceChange: boolean; + defaultPriority: string; + defaultStartDate: Date; + description: string; + id: string; + jobNamingScheme: string; + jobVersionNamingScheme: string; + mxdNamingScheme: string; + name: string; + state: string; + } + + export interface TableRelationship { + cardinality: string; + linkField: string; + tableAlias: string; + tableName: string; + } + + export interface JobCreationParameters { + loi: Geometry; + assignedTo: string; + autoCommitWorkflow: boolean; + autoExecute: boolean; + dataWorkspaceId: string; + description: string; + dueDate: Date; + jobTypeId: number; + assignedType: string; + name: string; + numJobs: string; + ownedBy: string; + parentJobId: number; + parentVersion: string; + priority: number; + startDate: Date; + user: string; + } + + export interface JobQueryParameters { + aliases: string; + fields: string; + orderBy: string; + tables: string; + where: string; + user: string; + } + + export interface JobUpdateParameters { + ownedBy: string; + assignedTo: string; + dataWorkspaceId: string; + description: string; + dueDate: Date; + loi: Geometry; + jobId: number; + name: string; + assignedType: string; + parentJobId: number; + parentVersion: string; + percent: number; + priority: number; + startDate: Date; + status: number; + versionName: string; + user: string; + } + + export interface AuxRecordDescription { + properties: any; + recordId: number; + tableName: string; + } + + export interface ActivityType { + desription: string; + id: number; + message: string; + name: string; + } + + export interface AuxRecordContainer { + records: AuxRecord; + relationshipType: string; + tableAlias: string; + tableName: string; + } + + export interface JobTaskJobInfo { + name: string; + assignedTo: string; + childJobIds: number[]; + createdBy: string; + createdDate: Date; + dataWorkspaceId: string; + description: string; + dueDate: Date; + endDate: Date; + id: number; + jobTypeId: number; + loi: Geometry; + assignedType: string; + ownedBy: string; + parentJobId: number; + parentVersion: string; + pendingDays: number; + percentageComplete: number; + priority: number; + stage: string; + startDate: Date; + status: number; + versionExists: boolean; + versionInfo: JobVersionInfo; + versionName: string; + } + + export interface QueryResult { + fields: QueryFieldInfo[]; + rows: string[]; + } + + export interface AuxRecord { + displayProperty: any; + id: number; + recordvalues: AuxRecordValue; + } + + export interface AuxRecordValue { + filter: string; + alias: string; + data: any; + dataType: string; + displayOrder: number; + displayType: string; + domain: string; + canUpdate: boolean; + length: number; + name: string; + required: boolean; + tableListClass: string; + tableListDisplayField: string; + tableListStoreField: string; + userVisible: boolean; + } + + export interface FieldValue { + description: string; + value: any; + } + + export interface JobVersionInfo { + dataWorkspaceId: string; + name: string; + parent: string; + created: boolean; + owner: string; + } + + export interface QueryFieldInfo { + alias: string; + length: string; + name: string; + type: string; + } + + export interface JobAttachment { + filename: string; + folder: string; + id: number; + storageType: string; + } + + export interface JobDependency { + depJobId: number; + depOnType: string; + depOnValue: string; + heldOnValue: number; + holdOnType: string; + id: number; + jobID: string; + } + + export interface ChangeRule { + description: string; + evaluators: any[]; + id: number; + name: string; + notifier: any; + summarize: boolean; + } + + export interface DataSetEvaluator { + dataSetConfigurations: DatasetConfiguration[]; + name: string; + type: string; + } + + export interface AOIEvaluator { + aoi: Polygon; + inverse: boolean; + name: string; + relation: string; + type: string; + useJobAOI: boolean; + } + + export interface DatasetConfiguration { + changeCondition: number; + changeFields: string; + dataset: string; + dataWorkspaceId: string; + name: string; + whereConditions: WhereCondition[]; + } + + export interface EmailNotifier { + attachJobAttachments: boolean; + message: string; + name: string; + senderEmail: string; + senderName: string; + subject: string; + subscribers: string[]; + type: string; + } + + export interface WhereCondition { + compareValue: any; + field: string; + operator: string; + } + + export interface NotificationType { + attachJobAttachments: boolean; + id: number; + message: string; + senderEmail: string; + senderName: string; + subject: string; + subscribers: string[]; + type: string; + } + + export interface ChangeRuleMatch { + changeTime: Date; + changeType: string; + dataset: string; + dataWorkspaceId: string; + id: string; + jobID: string; + ruleID: string; + } + + export interface ReportDataGroup { + aggregateLabel: string; + aggregateValue: string; + row: string[]; + value: string; + } + + export interface ReportData { + columns: string[]; + description: string; + groups: ReportDataGroup[]; + title: string; + } + + export interface Report { + description: string; + hierarchy: string; + id: number; + name: string; + title: string; + } + + export interface ExecuteInfo { + conflicts: WorkflowConflicts; + errorCode: number; + errorDescription: string; + executionResult: string; + hasConflicts: boolean; + hasReturnCode: boolean; + jobID: number; + returnCode: number; + stepID: number; + threwError: boolean; + } + + export interface Step { + hasBeenExecuted: boolean; + assignedTo: string; + async: boolean; + autoRun: boolean; + canSkip: boolean; + canSpawnConcurrency: boolean; + commonId: number; + defaultPercentComplete: number; + assignedType: string; + hasBeenStarted: boolean; + id: number; + name: string; + selfCheck: boolean; + statusId: number; + stepPercentComplete: number; + notificationType: string; + stepType: StepType; + } + + export interface StepType { + program: string; + arguments: string; + executionType: string; + id: number; + name: string; + description: string; + stepDescriptionLink: string; + stepDescriptionType: string; + stepIndicatorType: string; + supportedPlatform: string; + visible: boolean; + } + + export interface WorkflowDisplayDetails { + annotations: WorkflowAnnotationDisplayDetails[]; + paths: WorkflowPathDisplayDetails[]; + steps: WorkflowStepDisplayDetails[]; + } + + export interface WorkflowOption { + returnCode: number; + steps: WorkflowStepInfo[]; + } + + export interface WorkflowStepInfo { + id: number; + name: string; + } + + export interface WorkflowAnnotationDisplayDetails { + centerX: number; + centerY: number; + fillColor: any; + height: number; + label: string; + labelColor: any; + OutlineColor: any; + width: number; + } + + export interface WorkflowConflicts { + jobID: number; + options: WorkflowOption[]; + spawnsConcurrency: boolean; + stepId: number; + } + + export interface WorkflowPathDisplayDetails { + destStepId: number; + sourceStepID: number; + label: string; + labelColor: any; + labelX: number; + labelY: number; + lineColor: any; + pathObject: any; + } + + export interface WorkflowStepDisplayDetails { + labelColor: any; + centerX: number; + fillColor: any; + height: number; + label: string; + centerY: number; + OutlineColor: any; + shape: string; + stepId: number; + stepType: string; + width: number; + } + export interface ExternalRenderer { setup(): void; render(): void; @@ -139,26 +647,6 @@ declare namespace __esri { suggestionTemplate: string; } - export interface SearchViewModelLocatorSource { - categories: string[]; - countryCode: string; - localSearchOptions: any; - locationToAddressDistance: number; - searchTemplate: string; - locator: Locator; - singleLineFieldName: string; - } - - export interface SearchViewModelFeatureLayerSource { - displayField: string; - exactMatch: boolean; - featureLayer: FeatureLayer; - searchFields: string[]; - searchQueryParams: any; - suggestQueryParams: any; - suggestionTemplate: string; - } - export type GetHeader = (headerName: string) => string; export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void; @@ -282,11 +770,33 @@ declare namespace __esri { offset?: number; } + export interface FeatureLayerApplyEditsEdits { + addFeatures?: Graphic[]; + updateFeatures?: Graphic[]; + deleteFeatures?: Graphic[] | any[]; + } + + export interface FeatureLayerCapabilities { + operations: FeatureLayerCapabilitiesOperations; + } + + export interface FeatureLayerCapabilitiesOperations { + supportsAdd: boolean; + supportsDelete: boolean; + supportsUpdate: boolean; + supportsEditing: boolean; + supportsQuery: boolean; + } + export interface FeatureLayerElevationInfo { mode: string; offset?: number; } + export interface FeatureLayerGetFieldDomainOptions { + feature: Graphic; + } + export interface GraphicsLayerElevationInfo { mode: string; offset?: number; @@ -306,6 +816,21 @@ declare namespace __esri { offset?: number; } + export interface StreamLayerFilter { + geometry: Extent; + where: string; + } + + export interface StreamLayerPurgeOptions { + displayCount: number; + age: number; + } + + export interface StreamLayerUpdateFilterFilterChanges { + geometry: Extent; + where: string; + } + export interface VectorTileLayerCurrentStyleInfo { serviceUrl: string; styleUrl: string; @@ -382,6 +907,14 @@ declare namespace __esri { label: string; } + export interface PointCloudRendererPointSizeAlgorithm { + type: string; + useRealWorldSymbolSizes: boolean; + size: number; + scaleFactor: number; + minSize: number; + } + export interface PointCloudClassBreaksRendererColorClassBreakInfos { minValue: number; maxValue: number; @@ -422,8 +955,8 @@ declare namespace __esri { } export interface Symbol3DStyleOrigin { - styleName: string; - styleUrl: string; + styleName?: string; + styleUrl?: string; name: string; } @@ -508,6 +1041,294 @@ declare namespace __esri { tolerance: number; } + export interface ConfigurationTaskGetDataWorkspaceDetailsParams { + dataWorkspaceId: string; + user: string; + } + + export interface ConfigurationTaskGetUserJobQueryDetailsParams { + queryId: number; + user: string; + } + + export interface JobTaskAddEmbeddedAttachmentParams { + jobId: number; + form: any; + user: string; + } + + export interface JobTaskAddLinkedAttachmentParams { + jobId: number; + attachmentType: number; + path: string; + user: string; + } + + export interface JobTaskAddLinkedRecordParams { + jobId: number; + tableName: string; + user: string; + } + + export interface JobTaskAssignJobsParams { + jobIds: number[]; + assignedType: string; + assignedTo: string; + user: string; + } + + export interface JobTaskCloseJobsParams { + jobIds: number[]; + user: string; + } + + export interface JobTaskCreateDependencyParams { + jobId: number; + heldOnType: string; + heldOnValue: number; + depJobId: number; + depOnType: string; + depOnValue: number; + user: string; + } + + export interface JobTaskCreateHoldParams { + jobId: number; + holdTypeId: number; + comments: string; + user: string; + } + + export interface JobTaskCreateJobVersionParams { + jobId: number; + name: string; + parent: string; + user: string; + } + + export interface JobTaskDeleteAttachmentParams { + jobId: number; + attachmentId: number; + user: string; + } + + export interface JobTaskDeleteDependencyParams { + jobId: number; + dependencyId: number; + user: string; + } + + export interface JobTaskDeleteJobsParams { + jobIds: number[]; + deleteHistory?: boolean; + user: string; + } + + export interface JobTaskDeleteLinkedRecordParams { + jobId: number; + tableName: string; + recordId: number; + user: string; + } + + export interface JobTaskGetAttachmentContentUrlParams { + jobId: number; + attachmentId: number; + } + + export interface JobTaskListFieldValuesParams { + jobId: number; + tableName: string; + field: string; + user: string; + } + + export interface JobTaskListMultiLevelFieldValuesParams { + field: string; + previousSelectedValues: string[]; + user: string; + } + + export interface JobTaskLogActionParams { + jobId: number; + activityTypeId: number; + comments: string; + user: string; + } + + export interface JobTaskQueryJobsParams { + queryId: number; + user: string; + } + + export interface JobTaskQueryMultiLevelSelectedValuesParams { + field: string; + user: string; + } + + export interface JobTaskReleaseHoldParams { + jobId: number; + holdId: number; + } + + export interface JobTaskReopenClosedJobsParams { + jobIds: number[]; + user: string; + } + + export interface JobTaskSearchJobsParams { + text: string; + user: string; + } + + export interface JobTaskUnassignJobsParams { + jobIds: number[]; + user: string; + } + + export interface JobTaskUpdateNotesParams { + jobId: number; + notes: string; + user: string; + } + + export interface JobTaskUpdateRecordParams { + jobId: number; + record: AuxRecordDescription; + user: string; + } + + export interface NotificationTaskAddChangeRuleParams { + rule: ChangeRule; + user: string; + } + + export interface NotificationTaskDeleteChangeRuleParams { + ruleId: string; + user: string; + } + + export interface NotificationTaskNotifySessionParams { + sessionid: string; + deleteAfter: boolean; + user: string; + } + + export interface NotificationTaskQueryChangeRulesParams { + name: string; + description: string; + searchType: string; + user: string; + } + + export interface NotificationTaskRunSpatialNotificationOnHistoryParams { + dataWorkspaceId: string; + from: Date; + to: Date; + logMatches: boolean; + send: boolean; + user: string; + } + + export interface NotificationTaskSendNotificationParams { + jobId: number; + notificationType: string; + user: string; + } + + export interface NotificationTaskSubscribeToNotificationParams { + notificationTypeId: number; + email: string; + user: string; + } + + export interface NotificationTaskUnsubscribeFromNotificationParams { + notificationTypeId: number; + email: string; + user: string; + } + + export interface ReportTaskGenerateReportParams { + reportId: number; + user: string; + } + + export interface ReportTaskGetReportContentUrlParams { + reportId: number; + user: number; + } + + export interface ReportTaskGetReportDataParams { + reportId: number; + user: string; + } + + export interface TokenTaskParseTokensParams { + jobId: any; + stringToParse: string; + user: string; + } + + export interface WorkflowTaskCanRunStepParams { + jobId: number; + stepId: number; + user: string; + } + + export interface WorkflowTaskExecuteStepsParams { + jobId: number; + stepIds: number[]; + auto: boolean; + user: string; + } + + export interface WorkflowTaskGetStepDescriptionParams { + jobId: number; + stepId: number; + } + + export interface WorkflowTaskGetStepFileUrlParams { + jobId: number; + stepId: number; + } + + export interface WorkflowTaskGetStepParams { + jobId: number; + stepId: number; + } + + export interface WorkflowTaskMarkStepsAsDoneParams { + jobId: number; + stepIds: number[]; + user: string; + } + + export interface WorkflowTaskMoveToNextStepParams { + jobId: number; + stepId: number; + returnCode: number; + user: string; + } + + export interface WorkflowTaskRecreateWorkflowParams { + jobId: number; + user: string; + } + + export interface WorkflowTaskResolveConflictParams { + jobId: number; + stepId: number; + optionReturnCode: number; + optionStepIds: number[]; + user: string; + } + + export interface WorkflowTaskSetCurrentStepParams { + jobId: number; + stepId: number; + user: string; + } + export interface MapViewConstraints { lods?: LOD[]; minScale?: number; @@ -804,6 +1625,17 @@ declare namespace __esri { urlPrefix: string; } + export interface configWorkers { + loaderConfig: configWorkersLoaderConfig; + } + + export interface configWorkersLoaderConfig { + has: any; + paths: any; + map: any; + packages: any[]; + } + export interface requestEsriRequestOptions { callbackParamName?: string; query?: any; @@ -827,6 +1659,7 @@ declare namespace __esri { cast?: Function; readOnly?: boolean; aliasOf?: string; + value?: any; } export interface colorCreateContinuousRendererParams { @@ -895,21 +1728,22 @@ declare namespace __esri { title: string; } - export interface sizeCreateVisualVariableParams { + export interface sizeCreateVisualVariablesParams { layer: FeatureLayer | SceneLayer; field: string; normalizationField?: string; basemap?: string | Basemap; sizeScheme?: any | any | any; - legendOptions?: sizeCreateVisualVariableParamsLegendOptions; + legendOptions?: sizeCreateVisualVariablesParamsLegendOptions; statistics?: any; minValue?: number; maxValue?: number; view?: SceneView; worldScale?: boolean; + axis?: boolean; } - export interface sizeCreateVisualVariableParamsLegendOptions { + export interface sizeCreateVisualVariablesParamsLegendOptions { title: string; } @@ -972,6 +1806,7 @@ declare namespace __esri { } export interface univariateColorSizeCreateVisualVariablesParamsSizeOptions { + axis?: boolean; sizeScheme?: any | any | any; legendOptions?: univariateColorSizeCreateVisualVariablesParamsSizeOptionsLegendOptions; } @@ -1433,6 +2268,7 @@ declare namespace __esri { expand(factor: number): Extent; intersection(extent: Extent): Extent; intersects(geometry: Geometry): boolean; + normalize(): Extent[]; offset(dx: number, dy: number, dz: number): Extent; union(extent: Extent): Extent; } @@ -1519,6 +2355,7 @@ declare namespace __esri { copy(other: Point): void; distance(other: Point): number; equals(point: Point): boolean; + normalize(): Point; } interface PointConstructor { @@ -1556,6 +2393,9 @@ declare namespace __esri { interface PolygonConstructor { new(properties?: PolygonProperties): Polygon; + + fromExtent(extent: Extent): Polygon; + fromJSON(json: any): Polygon; } @@ -1873,6 +2713,7 @@ declare namespace __esri { } interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer { + capabilities: FeatureLayerCapabilities; copyright: string; definitionExpression: string; elevationInfo: FeatureLayerElevationInfo; @@ -1898,7 +2739,9 @@ declare namespace __esri { url: string; version: number; + applyEdits(edits: FeatureLayerApplyEditsEdits): IPromise; createQuery(): Query; + getFieldDomain(fieldName: string, options?: FeatureLayerGetFieldDomainOptions): Domain; queryExtent(params?: Query): IPromise; queryFeatureCount(params?: Query): IPromise; queryFeatures(params?: Query): IPromise; @@ -1914,6 +2757,7 @@ declare namespace __esri { export const FeatureLayer: FeatureLayerConstructor; interface FeatureLayerProperties extends LayerProperties, PortalLayerProperties, ScaleRangeLayerProperties { + capabilities?: FeatureLayerCapabilities; copyright?: string; definitionExpression?: string; elevationInfo?: FeatureLayerElevationInfo; @@ -1940,6 +2784,26 @@ declare namespace __esri { version?: number; } + interface GeoRSSLayer extends Layer { + lineSymbol: SimpleLineSymbol; + pointSymbol: PictureMarkerSymbol; + polygonSymbol: SimpleFillSymbol; + url: string; + } + + interface GeoRSSLayerConstructor { + new(properties?: GeoRSSLayerProperties): GeoRSSLayer; + } + + export const GeoRSSLayer: GeoRSSLayerConstructor; + + interface GeoRSSLayerProperties extends LayerProperties { + lineSymbol?: SimpleLineSymbolProperties; + pointSymbol?: PictureMarkerSymbolProperties; + polygonSymbol?: SimpleFillSymbolProperties; + url?: string; + } + interface GraphicsLayer extends Layer, ScaleRangeLayer { elevationInfo: GraphicsLayerElevationInfo; graphics: Collection; @@ -2061,6 +2925,7 @@ declare namespace __esri { } interface SceneLayer extends Layer, SceneService, PortalLayer { + definitionExpression: string; elevationInfo: SceneLayerElevationInfo; fields: Field[]; geometryType: string; @@ -2072,6 +2937,7 @@ declare namespace __esri { popupTemplate: PopupTemplate; renderer: Renderer; + createQuery(): Query; getFieldUsageInfo(fieldName: string): any; queryExtent(params?: Query): IPromise; queryFeatureCount(params?: Query): IPromise; @@ -2088,6 +2954,7 @@ declare namespace __esri { export const SceneLayer: SceneLayerConstructor; interface SceneLayerProperties extends LayerProperties, SceneServiceProperties, PortalLayerProperties { + definitionExpression?: string; elevationInfo?: SceneLayerElevationInfo; fields?: FieldProperties[]; geometryType?: string; @@ -2101,9 +2968,12 @@ declare namespace __esri { } interface StreamLayer extends FeatureLayer { + filter: StreamLayerFilter; geometryDefinition: Extent; maximumTrackPoints: number; - purgeOptions: any; + purgeOptions: StreamLayerPurgeOptions; + + updateFilter(filterChanges: StreamLayerUpdateFilterFilterChanges): IPromise; } interface StreamLayerConstructor { @@ -2115,9 +2985,10 @@ declare namespace __esri { export const StreamLayer: StreamLayerConstructor; interface StreamLayerProperties extends FeatureLayerProperties { + filter?: StreamLayerFilter; geometryDefinition?: ExtentProperties; maximumTrackPoints?: number; - purgeOptions?: any; + purgeOptions?: StreamLayerPurgeOptions; } interface UnknownLayer extends Layer { @@ -2199,13 +3070,20 @@ declare namespace __esri { } interface CodedValueDomainConstructor { - new(properties?: any): CodedValueDomain; + new(properties?: CodedValueDomainProperties): CodedValueDomain; + getName(code: string | number): string; + + fromJSON(json: any): CodedValueDomain; } export const CodedValueDomain: CodedValueDomainConstructor; + interface CodedValueDomainProperties extends DomainProperties { + codedValues?: CodedValueDomainCodedValues[]; + } + interface DimensionalDefinition { dimensionName: string; isSlice: boolean; @@ -2221,20 +3099,25 @@ declare namespace __esri { export const DimensionalDefinition: DimensionalDefinitionConstructor; - interface Domain { + interface Domain extends Accessor, JSONSupport { name: string; type: string; - - toJSON(): any; } interface DomainConstructor { - new(): Domain; + new(properties?: DomainProperties): Domain; + + fromJSON(json: any): Domain; } export const Domain: DomainConstructor; - interface Field extends JSONSupport { + interface DomainProperties { + name?: string; + type?: string; + } + + interface Field extends Accessor, JSONSupport { alias: string; domain: Domain; editable: boolean; @@ -2254,7 +3137,7 @@ declare namespace __esri { interface FieldProperties { alias?: string; - domain?: Domain; + domain?: DomainProperties; editable?: boolean; length?: number; name?: string; @@ -2262,7 +3145,7 @@ declare namespace __esri { type?: string; } - interface ImageParameters { + interface ImageParameters extends Accessor { dpi: number; extent: Extent; format: string; @@ -2278,20 +3161,39 @@ declare namespace __esri { } interface ImageParametersConstructor { - new(properties?: any): ImageParameters; + new(properties?: ImageParametersProperties): ImageParameters; } export const ImageParameters: ImageParametersConstructor; + interface ImageParametersProperties { + dpi?: number; + extent?: ExtentProperties; + format?: string; + height?: number; + imageSpatialReference?: SpatialReferenceProperties; + layerDefinitions?: string[]; + layerIds?: number[]; + layerOption?: string; + transparent?: boolean; + width?: number; + } + interface InheritedDomain extends Domain { } interface InheritedDomainConstructor { - new(): InheritedDomain; + new(properties?: InheritedDomainProperties): InheritedDomain; + + fromJSON(json: any): InheritedDomain; } export const InheritedDomain: InheritedDomainConstructor; + interface InheritedDomainProperties extends DomainProperties { + + } + interface LabelClass extends Accessor, JSONSupport { labelExpression: string; labelExpressionInfo: LabelClassLabelExpressionInfo; @@ -2301,6 +3203,8 @@ declare namespace __esri { symbol: TextSymbol | LabelSymbol3D; useCodedValues: boolean; where: string; + + clone(): LabelClass; } interface LabelClassConstructor { @@ -2372,7 +3276,7 @@ declare namespace __esri { width?: number; } - interface MosaicRule extends JSONSupport { + interface MosaicRule extends Accessor, JSONSupport { ascending: boolean; lockRasterIds: number[]; method: string; @@ -2406,7 +3310,7 @@ declare namespace __esri { where?: string; } - interface PixelBlock { + interface PixelBlock extends Accessor { height: number; mask: number[]; pixels: number[][]; @@ -2421,23 +3325,39 @@ declare namespace __esri { } interface PixelBlockConstructor { - new(properties?: any): PixelBlock; + new(properties?: PixelBlockProperties): PixelBlock; } export const PixelBlock: PixelBlockConstructor; + interface PixelBlockProperties { + height?: number; + mask?: number[]; + pixels?: number[][]; + pixelType?: string; + statistics?: PixelBlockStatistics[]; + width?: number; + } + interface RangeDomain extends Domain { maxValue: number; minValue: number; } interface RangeDomainConstructor { - new(): RangeDomain; + new(properties?: RangeDomainProperties): RangeDomain; + + fromJSON(json: any): RangeDomain; } export const RangeDomain: RangeDomainConstructor; - interface RasterFunction extends JSONSupport { + interface RangeDomainProperties extends DomainProperties { + maxValue?: number; + minValue?: number; + } + + interface RasterFunction extends Accessor, JSONSupport { functionArguments: any; functionName: string; outputPixelType: string; @@ -2875,6 +3795,7 @@ declare namespace __esri { role: string; roleId: string; thumbnailUrl: string; + units: string; userContentUrl: string; username: string; @@ -2907,6 +3828,7 @@ declare namespace __esri { role?: string; roleId?: string; thumbnailUrl?: string; + units?: string; userContentUrl?: string; username?: string; } @@ -3005,7 +3927,7 @@ declare namespace __esri { valueExpression: string; valueExpressionTitle: string; - addUniqueValueInfo(valueOrInfo: string | any, symbol: Symbol): void; + addUniqueValueInfo(valueOrInfo: string | any, symbol?: Symbol): void; clone(): UniqueValueRenderer; getUniqueValueInfo(graphic: Graphic): any; removeUniqueValueInfo(value: string): void; @@ -3034,6 +3956,7 @@ declare namespace __esri { } interface PointCloudRenderer extends Accessor, JSONSupport { + pointSizeAlgorithm: PointCloudRendererPointSizeAlgorithm; pointsPerInch: number; } @@ -3046,6 +3969,7 @@ declare namespace __esri { export const PointCloudRenderer: PointCloudRendererConstructor; interface PointCloudRendererProperties { + pointSizeAlgorithm?: PointCloudRendererPointSizeAlgorithm; pointsPerInch?: number; } @@ -3133,6 +4057,30 @@ declare namespace __esri { type?: string; } + interface Action extends Accessor { + className: string; + id: string; + image: string; + title: string; + visible: boolean; + + clone(): Action; + } + + interface ActionConstructor { + new(properties?: ActionProperties): Action; + } + + export const Action: ActionConstructor; + + interface ActionProperties { + className?: string; + id?: string; + image?: string; + title?: string; + visible?: boolean; + } + interface ExtrudeSymbol3DLayer extends Symbol3DLayer { size: number; @@ -3817,8 +4765,6 @@ declare namespace __esri { } interface QueryTask extends Task { - gdbVersion: string; - execute(params: Query, requestOptions?: any): IPromise; executeForCount(params: Query, requestOptions?: any): IPromise; executeForExtent(params: Query, requestOptions?: any): IPromise; @@ -3833,7 +4779,7 @@ declare namespace __esri { export const QueryTask: QueryTaskConstructor; interface QueryTaskProperties extends TaskProperties { - gdbVersion?: string; + } interface PrintTask extends Task { @@ -4276,6 +5222,7 @@ declare namespace __esri { foundFieldName: string; layerId: number; layerName: string; + value: void; } interface FindResultConstructor { @@ -4292,6 +5239,7 @@ declare namespace __esri { foundFieldName?: string; layerId?: number; layerName?: string; + value?: void; } interface GeneralizeParameters extends Accessor { @@ -5042,6 +5990,173 @@ declare namespace __esri { trimExtendTo?: PolylineProperties; } + interface ConfigurationTask extends Task { + url: string; + + getAllGroups(requestOptions?: any): IPromise; + getAllUsers(requestOptions?: any): IPromise; + getDataWorkspaceDetails(params: ConfigurationTaskGetDataWorkspaceDetailsParams, requestOptions?: any): IPromise; + getGroup(groupId: number, requestOptions?: any): IPromise; + getJobTypeDetails(jobTypeId: number, requestOptions?: any): IPromise; + getPublicJobQueryDetails(queryId: number, requestOptions?: any): IPromise; + getServiceInfo(requestOptions?: any): IPromise; + getTableRelationshipsDetails(requestOptions?: any): IPromise; + getUser(user: string, requestOptions?: any): IPromise; + getUserJobQueryDetails(params: ConfigurationTaskGetUserJobQueryDetailsParams, requestOptions?: any): IPromise; + getVisibleJobTypes(user: string, requestOptions?: any): IPromise; + } + + interface ConfigurationTaskConstructor { + new(properties?: ConfigurationTaskProperties): ConfigurationTask; + } + + export const ConfigurationTask: ConfigurationTaskConstructor; + + interface ConfigurationTaskProperties extends TaskProperties { + url?: string; + } + + interface JobTask extends Task { + url: string; + + addEmbeddedAttachment(params: JobTaskAddEmbeddedAttachmentParams, requestOptions?: any): IPromise; + addLinkedAttachment(params: JobTaskAddLinkedAttachmentParams, requestOptions?: any): IPromise; + addLinkedRecord(params: JobTaskAddLinkedRecordParams, requestOptions?: any): IPromise; + assignJobs(params: JobTaskAssignJobsParams, requestOptions?: any): IPromise; + closeJobs(params: JobTaskCloseJobsParams, requestOptions?: any): IPromise; + createDependency(params: JobTaskCreateDependencyParams, requestOptions?: any): IPromise; + createHold(params: JobTaskCreateHoldParams, requestOptions?: any): IPromise; + createJobs(params: JobCreationParameters, requestOptions?: any): IPromise; + createJobVersion(params: JobTaskCreateJobVersionParams, requestOptions?: any): IPromise; + deleteAttachment(params: JobTaskDeleteAttachmentParams, requestOptions?: any): IPromise; + deleteDependency(params: JobTaskDeleteDependencyParams, requestOptions?: any): IPromise; + deleteJobs(params: JobTaskDeleteJobsParams, requestOptions?: any): IPromise; + deleteLinkedRecord(params: JobTaskDeleteLinkedRecordParams, requestOptions?: any): IPromise; + getActivityLog(jobId: number, requestOptions?: any): IPromise; + getAttachmentContentUrl(params: JobTaskGetAttachmentContentUrlParams): string; + getAttachments(jobId: number, requestOptions?: any): IPromise; + getDependencies(jobId: number, requestOptions?: any): IPromise; + getExtendedProperties(jobId: number, requestOptions?: any): IPromise; + getHolds(jobId: number, requestOptions?: any): IPromise; + getJob(jobId: number, requestOptions?: any): IPromise; + getJobIds(requestOptions?: any): IPromise; + getNotes(jobId: number, requestOptions?: any): IPromise; + listFieldValues(params: JobTaskListFieldValuesParams, requestOptions?: any): IPromise; + listMultiLevelFieldValues(params: JobTaskListMultiLevelFieldValuesParams, requestOptions?: any): IPromise; + logAction(params: JobTaskLogActionParams, requestOptions?: any): IPromise; + queryJobs(params: JobTaskQueryJobsParams, requestOptions?: any): IPromise; + queryJobsAdHoc(params: JobQueryParameters, requestOptions?: any): IPromise; + queryMultiLevelSelectedValues(params: JobTaskQueryMultiLevelSelectedValuesParams, requestOptions?: any): IPromise; + releaseHold(params: JobTaskReleaseHoldParams, requestOptions?: any): IPromise; + reopenClosedJobs(params: JobTaskReopenClosedJobsParams, requestOptions?: any): IPromise; + searchJobs(params: JobTaskSearchJobsParams, requestOptions?: any): IPromise; + unassignJobs(params: JobTaskUnassignJobsParams, requestOptions?: any): IPromise; + updateJob(params: JobUpdateParameters, requestOptions?: any): IPromise; + updateNotes(params: JobTaskUpdateNotesParams, requestOptions?: any): IPromise; + updateRecord(params: JobTaskUpdateRecordParams, requestOptions?: any): IPromise; + } + + interface JobTaskConstructor { + new(properties?: JobTaskProperties): JobTask; + } + + export const JobTask: JobTaskConstructor; + + interface JobTaskProperties extends TaskProperties { + url?: string; + } + + interface NotificationTask extends Task { + url: string; + + addChangeRule(params: NotificationTaskAddChangeRuleParams, requestOptions?: any): IPromise; + deleteChangeRule(params: NotificationTaskDeleteChangeRuleParams, requestOptions?: any): IPromise; + getAllChangeRules(requestOptions?: any): IPromise; + getChangeRule(ruleId: string, requestOptions?: any): IPromise; + getChangeRuleMatch(matchId: string, requestOptions?: any): IPromise; + getDatabaseTime(dataWorkspaceId: string, requestOptions?: any): IPromise; + getSessionMatches(sessionId: string, requestOptions?: any): IPromise; + notifySession(params: NotificationTaskNotifySessionParams, requestOptions?: any): IPromise; + queryChangeRules(params: NotificationTaskQueryChangeRulesParams, requestOptions?: any): IPromise; + runSpatialNotificationOnHistory(params: NotificationTaskRunSpatialNotificationOnHistoryParams, requestOptions?: any): IPromise; + sendNotification(params: NotificationTaskSendNotificationParams, requestOptions?: any): IPromise; + subscribeToNotification(params: NotificationTaskSubscribeToNotificationParams, requestOptions?: any): IPromise; + unsubscribeFromNotification(params: NotificationTaskUnsubscribeFromNotificationParams, requestOptions?: any): IPromise; + } + + interface NotificationTaskConstructor { + new(properties?: NotificationTaskProperties): NotificationTask; + } + + export const NotificationTask: NotificationTaskConstructor; + + interface NotificationTaskProperties extends TaskProperties { + url?: string; + } + + interface ReportTask extends Task { + url: string; + + generateReport(params: ReportTaskGenerateReportParams, requestOptions?: any): IPromise; + getAllReports(requestOptions?: any): IPromise; + getReportContentUrl(params: ReportTaskGetReportContentUrlParams): string; + getReportData(params: ReportTaskGetReportDataParams, requestOptions?: any): IPromise; + getReportStylesheet(reportId: number, requestOptions?: any): IPromise; + } + + interface ReportTaskConstructor { + new(properties?: ReportTaskProperties): ReportTask; + } + + export const ReportTask: ReportTaskConstructor; + + interface ReportTaskProperties extends TaskProperties { + url?: string; + } + + interface TokenTask extends Task { + parseTokens(params: TokenTaskParseTokensParams, requestOptions?: any): IPromise; + } + + interface TokenTaskConstructor { + new(properties?: TokenTaskProperties): TokenTask; + } + + export const TokenTask: TokenTaskConstructor; + + interface TokenTaskProperties extends TaskProperties { + + } + + interface WorkflowTask extends Task { + url: string; + + canRunStep(params: WorkflowTaskCanRunStepParams, requestOptions?: any): IPromise; + executeSteps(params: WorkflowTaskExecuteStepsParams, requestOptions?: any): IPromise; + getAllSteps(jobId: number, requestOptions?: any): IPromise; + getCurrentSteps(jobId: number, requestOptions?: any): IPromise; + getStep(params: WorkflowTaskGetStepParams, requestOptions?: any): IPromise; + getStepDescription(params: WorkflowTaskGetStepDescriptionParams, requestOptions?: any): IPromise; + getStepFileUrl(params: WorkflowTaskGetStepFileUrlParams): string; + getWorkflowDisplayDetails(jobId: number, requestOptions?: any): IPromise; + getWorkflowImageUrl(jobId: number): string; + markStepsAsDone(params: WorkflowTaskMarkStepsAsDoneParams, requestOptions?: any): IPromise; + moveToNextStep(params: WorkflowTaskMoveToNextStepParams, requestOptions?: any): IPromise; + recreateWorkflow(params: WorkflowTaskRecreateWorkflowParams, requestOptions?: any): IPromise; + resolveConflict(params: WorkflowTaskResolveConflictParams, requestOptions?: any): IPromise; + setCurrentStep(params: WorkflowTaskSetCurrentStepParams, requestOptions?: any): IPromise; + } + + interface WorkflowTaskConstructor { + new(properties?: WorkflowTaskProperties): WorkflowTask; + } + + export const WorkflowTask: WorkflowTaskConstructor; + + interface WorkflowTaskProperties extends TaskProperties { + url?: string; + } + interface MapView extends View { center: Point; constraints: MapViewConstraints; @@ -5053,6 +6168,7 @@ declare namespace __esri { zoom: number; goTo(target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | any, options?: MapViewGoToOptions): IPromise; + hasEventListener(type: string): boolean; hitTest(screenPoint: MapViewHitTestScreenPoint): IPromise; on(type: string | string[], modifiersOrHandler: string[] | Function, handler?: Function): any; toMap(screenPoint: ScreenPoint, mapPoint?: Point): Point; @@ -5090,6 +6206,7 @@ declare namespace __esri { zoom: number; goTo(target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | Camera | any, options?: SceneViewGoToOptions): IPromise; + hasEventListener(type: string): boolean; hitTest(screenPoint: SceneViewHitTestScreenPoint): IPromise; on(type: string | string[], modifiersOrHandler: string[] | Function, handler?: Function): any; toMap(screenPoint: ScreenPoint, mapPoint?: Point): Point; @@ -5116,7 +6233,7 @@ declare namespace __esri { zoom?: number; } - interface View extends Accessor, corePromise, Evented, BreakpointsOwner, DOMContainer { + interface View extends Accessor, corePromise, BreakpointsOwner, DOMContainer { allLayerViews: Collection; animation: ViewAnimation; graphics: Collection; @@ -5238,16 +6355,33 @@ declare namespace __esri { pixelData?: ImageryLayerViewPixelData; } + interface SceneLayerView extends LayerView { + queryExtent(params?: Query): IPromise; + queryFeatureCount(params?: Query): IPromise; + queryFeatures(params?: Query): IPromise; + queryObjectIds(params?: Query): IPromise; + } + + interface SceneLayerViewConstructor { + new(properties?: SceneLayerViewProperties): SceneLayerView; + } + + export const SceneLayerView: SceneLayerViewConstructor; + + interface SceneLayerViewProperties extends LayerViewProperties { + + } + interface UI extends Accessor { container: any; height: number; padding: any; - view: SceneView | MapView; + view: MapView | SceneView; width: number; - add(component: any | any[], position?: string | any): void; + add(component: Widget | any | string | any | any, position?: string | any): void; empty(position?: string): void; - move(component: any | any[], position?: string): void; + move(component: Widget | any | string | any | any, position?: string): void; remove(component: any | any[]): void; } @@ -5261,7 +6395,7 @@ declare namespace __esri { container?: any; height?: number; padding?: any | number; - view?: SceneView | MapView; + view?: MapView | SceneView; width?: number; } @@ -5406,9 +6540,11 @@ declare namespace __esri { visibleLayers?: SlideVisibleLayers; } - interface Attribution extends Accessor { - view: SceneView | MapView; + interface Attribution extends Widget { + view: MapView | SceneView; viewModel: AttributionViewModel; + + render(): any; } interface AttributionConstructor { @@ -5417,18 +6553,41 @@ declare namespace __esri { export const Attribution: AttributionConstructor; - interface AttributionProperties { - view?: SceneView | MapView; + interface AttributionProperties extends WidgetProperties { + view?: MapView | SceneView; viewModel?: AttributionViewModel; } - interface BasemapToggle extends Accessor, Evented { + interface BasemapGallery extends Widget { + activeBasemap: Basemap; + source: LocalBasemapsSource | PortalBasemapsSource; + view: MapView | SceneView; + viewModel: BasemapGalleryViewModel; + + render(): any; + } + + interface BasemapGalleryConstructor { + new(properties?: BasemapGalleryProperties): BasemapGallery; + } + + export const BasemapGallery: BasemapGalleryConstructor; + + interface BasemapGalleryProperties extends WidgetProperties { + activeBasemap?: BasemapProperties; + source?: LocalBasemapsSource | PortalBasemapsSource; + view?: MapView | SceneView; + viewModel?: BasemapGalleryViewModelProperties; + } + + interface BasemapToggle extends Widget { activeBasemap: Basemap; nextBasemap: Basemap; titleVisible: boolean; - view: SceneView | MapView; + view: MapView | SceneView; viewModel: BasemapToggleViewModel; + render(): any; toggle(): void; } @@ -5438,15 +6597,15 @@ declare namespace __esri { export const BasemapToggle: BasemapToggleConstructor; - interface BasemapToggleProperties { + interface BasemapToggleProperties extends WidgetProperties { activeBasemap?: BasemapProperties; nextBasemap?: Basemap | string; titleVisible?: boolean; - view?: SceneView | MapView; + view?: MapView | SceneView; viewModel?: BasemapToggleViewModelProperties; } - interface ColorSlider extends Accessor { + interface ColorSlider extends Accessor, Widgette { handlesVisible: boolean; histogram: any; histogramVisible: boolean; @@ -5469,7 +6628,7 @@ declare namespace __esri { export const ColorSlider: ColorSliderConstructor; - interface ColorSliderProperties { + interface ColorSliderProperties extends WidgetteProperties { handlesVisible?: boolean; histogram?: any; histogramVisible?: boolean; @@ -5486,10 +6645,11 @@ declare namespace __esri { visualVariable?: any; } - interface Compass extends Accessor { - view: SceneView | MapView; + interface Compass extends Widget { + view: MapView | SceneView; viewModel: CompassViewModel; + render(): any; reset(): void; } @@ -5499,17 +6659,51 @@ declare namespace __esri { export const Compass: CompassConstructor; - interface CompassProperties { - view?: SceneView | MapView; + interface CompassProperties extends WidgetProperties { + view?: MapView | SceneView; viewModel?: CompassViewModelProperties; } - interface Home extends Accessor, Evented { + interface Expand extends Widget { + collapseTooltip: string; + content: any; + expanded: boolean; + expandIconClass: string; + expandTooltip: string; + iconNumber: string; + view: MapView | SceneView; + viewModel: ExpandViewModel; + + collapse(): void; + expand(): void; + render(): any; + toggle(): void; + } + + interface ExpandConstructor { + new(properties?: ExpandProperties): Expand; + } + + export const Expand: ExpandConstructor; + + interface ExpandProperties extends WidgetProperties { + collapseTooltip?: string; + content?: any | any | string | Widget; + expanded?: boolean; + expandIconClass?: string; + expandTooltip?: string; + iconNumber?: string; + view?: MapView | SceneView; + viewModel?: ExpandViewModelProperties; + } + + interface Home extends Widget { view: MapView | SceneView; viewModel: HomeViewModel; viewpoint: Viewpoint; go(): void; + render(): any; } interface HomeConstructor { @@ -5518,7 +6712,7 @@ declare namespace __esri { export const Home: HomeConstructor; - interface HomeProperties { + interface HomeProperties extends WidgetProperties { view?: MapView | SceneView; viewModel?: HomeViewModelProperties; viewpoint?: ViewpointProperties; @@ -5526,10 +6720,12 @@ declare namespace __esri { interface LayerList extends Widget { createActionsFunction: Function; - view: SceneView | MapView; + operationalItems: Collection; + view: MapView | SceneView; viewModel: LayerListViewModel; render(): any; + triggerAction(action: Action, item: ListItem): void; } interface LayerListConstructor { @@ -5540,13 +6736,14 @@ declare namespace __esri { interface LayerListProperties extends WidgetProperties { createActionsFunction?: Function; - view?: SceneView | MapView; + operationalItems?: Collection; + view?: MapView | SceneView; viewModel?: LayerListViewModelProperties; } - interface Legend extends Accessor { + interface Legend extends Accessor, Widgette { layerInfos: LegendLayerInfos[]; - view: SceneView | MapView; + view: MapView | SceneView; } interface LegendConstructor { @@ -5555,12 +6752,12 @@ declare namespace __esri { export const Legend: LegendConstructor; - interface LegendProperties { + interface LegendProperties extends WidgetteProperties { layerInfos?: LegendLayerInfos[]; - view?: SceneView | MapView; + view?: MapView | SceneView; } - interface Locate extends Accessor, Evented { + interface Locate extends Widget { geolocationOptions: any; goToLocationEnabled: boolean; graphic: Graphic; @@ -5568,6 +6765,7 @@ declare namespace __esri { viewModel: LocateViewModel; locate(): IPromise; + render(): any; } interface LocateConstructor { @@ -5576,7 +6774,7 @@ declare namespace __esri { export const Locate: LocateConstructor; - interface LocateProperties { + interface LocateProperties extends WidgetProperties { geolocationOptions?: any; goToLocationEnabled?: boolean; graphic?: GraphicProperties; @@ -5584,11 +6782,12 @@ declare namespace __esri { viewModel?: LocateViewModelProperties; } - interface NavigationToggle extends Accessor { + interface NavigationToggle extends Widget { layout: string; view: SceneView; viewModel: NavigationToggleViewModel; + render(): any; toggle(): void; } @@ -5598,13 +6797,13 @@ declare namespace __esri { export const NavigationToggle: NavigationToggleConstructor; - interface NavigationToggleProperties { + interface NavigationToggleProperties extends WidgetProperties { layout?: string; view?: SceneViewProperties; viewModel?: NavigationToggleViewModelProperties; } - interface Popup extends Accessor, Evented { + interface Popup extends Accessor, Widgette, Evented { actions: Collection; content: string; currentDockPosition: string; @@ -5636,7 +6835,7 @@ declare namespace __esri { export const Popup: PopupConstructor; - interface PopupProperties { + interface PopupProperties extends WidgetteProperties { actions?: Collection; content?: string | any; currentDockPosition?: string; @@ -5674,12 +6873,34 @@ declare namespace __esri { viewModel?: PrintViewModelProperties; } - interface Search extends Accessor, Evented { + interface ScaleBar extends Widget { + style: string; + unit: string; + view: MapView; + viewModel: ScaleBarViewModel; + + render(): any; + } + + interface ScaleBarConstructor { + new(properties?: ScaleBarProperties): ScaleBar; + } + + export const ScaleBar: ScaleBarConstructor; + + interface ScaleBarProperties extends WidgetProperties { + style?: string; + unit?: string; + view?: MapViewProperties; + viewModel?: ScaleBarViewModelProperties; + } + + interface Search extends Widget { activeSource: FeatureLayer | Locator; activeSourceIndex: number; allPlaceholder: string; autoSelect: boolean; - defaultSource: any; + defaultSource: any | any; maxResults: number; maxSuggestions: number; minSuggestCharacters: number; @@ -5690,6 +6911,7 @@ declare namespace __esri { resultGraphicEnabled: boolean; results: any[]; searchAllEnabled: boolean; + searching: boolean; searchTerm: string; selectedResult: any; sources: SearchSources; @@ -5699,6 +6921,7 @@ declare namespace __esri { viewModel: SearchViewModel; clear(): void; + render(): any; search(searchTerm?: string | Geometry | any | number[][]): IPromise; suggest(value?: string): IPromise; } @@ -5709,12 +6932,12 @@ declare namespace __esri { export const Search: SearchConstructor; - interface SearchProperties { + interface SearchProperties extends WidgetProperties { activeSource?: FeatureLayer | Locator; activeSourceIndex?: number; allPlaceholder?: string; autoSelect?: boolean; - defaultSource?: any; + defaultSource?: any | any; maxResults?: number; maxSuggestions?: number; minSuggestCharacters?: number; @@ -5725,6 +6948,7 @@ declare namespace __esri { resultGraphicEnabled?: boolean; results?: any[]; searchAllEnabled?: boolean; + searching?: boolean; searchTerm?: string; selectedResult?: any; sources?: SearchSources; @@ -5734,7 +6958,7 @@ declare namespace __esri { viewModel?: SearchViewModelProperties; } - interface SizeSlider extends Accessor { + interface SizeSlider extends Accessor, Widgette { handlesVisible: boolean; histogram: any; histogramVisible: boolean; @@ -5757,7 +6981,7 @@ declare namespace __esri { export const SizeSlider: SizeSliderConstructor; - interface SizeSliderProperties { + interface SizeSliderProperties extends WidgetteProperties { handlesVisible?: boolean; histogram?: any; histogramVisible?: boolean; @@ -5774,7 +6998,7 @@ declare namespace __esri { visualVariable?: any; } - interface Track extends Accessor { + interface Track extends Widget { geolocationOptions: any; goToLocationEnabled: boolean; graphic: Graphic; @@ -5782,6 +7006,7 @@ declare namespace __esri { view: MapView | SceneView; viewModel: TrackViewModel; + render(): any; start(): void; stop(): void; } @@ -5792,7 +7017,7 @@ declare namespace __esri { export const Track: TrackConstructor; - interface TrackProperties { + interface TrackProperties extends WidgetProperties { geolocationOptions?: any; goToLocationEnabled?: boolean; graphic?: GraphicProperties; @@ -5801,7 +7026,7 @@ declare namespace __esri { viewModel?: TrackViewModelProperties; } - interface UnivariateColorSizeSlider extends Accessor { + interface UnivariateColorSizeSlider extends Accessor, Widgette { handlesVisible: boolean; histogram: any; histogramVisible: boolean; @@ -5824,7 +7049,7 @@ declare namespace __esri { export const UnivariateColorSizeSlider: UnivariateColorSizeSliderConstructor; - interface UnivariateColorSizeSliderProperties { + interface UnivariateColorSizeSliderProperties extends WidgetteProperties { handlesVisible?: boolean; histogram?: any; histogramVisible?: boolean; @@ -5847,7 +7072,9 @@ declare namespace __esri { id: string; destroy(): void; + own(handles: any[]): void; postInitialize(): void; + renderNow(): void; scheduleRender(): void; startup(): void; } @@ -5859,15 +7086,16 @@ declare namespace __esri { export const Widget: WidgetConstructor; interface WidgetProperties { - container?: string; + container?: string | any; destroyed?: boolean; id?: string; } - interface Zoom extends Accessor { - view: SceneView | MapView; + interface Zoom extends Widget { + view: MapView | SceneView; viewModel: ZoomViewModel; + render(): any; zoomIn(): void; zoomOut(): void; } @@ -5878,8 +7106,8 @@ declare namespace __esri { export const Zoom: ZoomConstructor; - interface ZoomProperties { - view?: SceneView | MapView; + interface ZoomProperties extends WidgetProperties { + view?: MapView | SceneView; viewModel?: ZoomViewModelProperties; } @@ -5887,7 +7115,7 @@ declare namespace __esri { attributionText: string; itemDelimiter: string; state: string; - view: SceneView | MapView; + view: MapView | SceneView; } interface AttributionViewModelConstructor { @@ -5896,11 +7124,35 @@ declare namespace __esri { export const AttributionViewModel: AttributionViewModelConstructor; + interface BasemapGalleryViewModel extends Accessor { + activeBasemap: Basemap; + items: Collection; + source: LocalBasemapsSource | PortalBasemapsSource; + state: string; + view: MapView | SceneView; + + basemapEquals(basemap1: Basemap, basemap2: Basemap): boolean; + } + + interface BasemapGalleryViewModelConstructor { + new(properties?: BasemapGalleryViewModelProperties): BasemapGalleryViewModel; + } + + export const BasemapGalleryViewModel: BasemapGalleryViewModelConstructor; + + interface BasemapGalleryViewModelProperties { + activeBasemap?: BasemapProperties; + items?: Collection; + source?: LocalBasemapsSource | PortalBasemapsSource; + state?: string; + view?: MapView | SceneView; + } + interface BasemapToggleViewModel extends Accessor, Evented { activeBasemap: Basemap; nextBasemap: Basemap; state: string; - view: SceneView | MapView; + view: MapView | SceneView; toggle(): void; } @@ -5915,12 +7167,13 @@ declare namespace __esri { activeBasemap?: BasemapProperties; nextBasemap?: Basemap | string; state?: string; - view?: SceneView | MapView; + view?: MapView | SceneView; } interface CompassViewModel extends Accessor { + orientation: any; state: string; - view: SceneView | MapView; + view: MapView | SceneView; reset(): void; } @@ -5932,8 +7185,27 @@ declare namespace __esri { export const CompassViewModel: CompassViewModelConstructor; interface CompassViewModelProperties { + orientation?: any; state?: string; - view?: SceneView | MapView; + view?: MapView | SceneView; + } + + interface ExpandViewModel extends Accessor { + expanded: boolean; + state: string; + view: MapView | SceneView; + } + + interface ExpandViewModelConstructor { + new(properties?: ExpandViewModelProperties): ExpandViewModel; + } + + export const ExpandViewModel: ExpandViewModelConstructor; + + interface ExpandViewModelProperties { + expanded?: boolean; + state?: string; + view?: MapView | SceneView; } interface HomeViewModel extends Accessor, Evented { @@ -5960,9 +7232,9 @@ declare namespace __esri { createActionsFunction: Function; operationalItems: Collection; state: string; - view: SceneView | MapView; + view: MapView | SceneView; - triggerAction(actionIndex: number): void; + triggerAction(action: Action, item: ListItem): void; } interface LayerListViewModelConstructor { @@ -5975,9 +7247,32 @@ declare namespace __esri { createActionsFunction?: Function; operationalItems?: Collection; state?: string; - view?: SceneView | MapView; + view?: MapView | SceneView; } + interface ListItem { + actionsOpen: boolean; + actionsSections: Collection; + children: Collection; + error: Error; + layer: Layer; + open: boolean; + title: string; + updating: boolean; + view: MapView | SceneView; + visibilityMode: string; + visible: boolean; + visibleAtCurrentScale: boolean; + + clone(): ListItem; + } + + interface ListItemConstructor { + new(): ListItem; + } + + export const ListItem: ListItemConstructor; + interface LocateViewModel extends Accessor, Evented, GeolocationPositioning { state: string; @@ -6075,6 +7370,20 @@ declare namespace __esri { view?: MapView | SceneView; } + interface ScaleBarViewModel extends Accessor { + view: MapView; + } + + interface ScaleBarViewModelConstructor { + new(properties?: ScaleBarViewModelProperties): ScaleBarViewModel; + } + + export const ScaleBarViewModel: ScaleBarViewModelConstructor; + + interface ScaleBarViewModelProperties { + view?: MapViewProperties; + } + interface SearchViewModel extends Accessor, Evented { activeSource: FeatureLayer | Locator; activeSourceIndex: number; @@ -6163,7 +7472,7 @@ declare namespace __esri { canZoomIn: boolean; canZoomOut: boolean; state: string; - view: SceneView | MapView; + view: MapView | SceneView; zoomIn(): void; zoomOut(): void; @@ -6179,7 +7488,7 @@ declare namespace __esri { canZoomIn?: boolean; canZoomOut?: boolean; state?: string; - view?: SceneView | MapView; + view?: MapView | SceneView; } interface JSONSupport { @@ -6301,6 +7610,8 @@ declare namespace __esri { dpi: number; gdbVersion: string; imageFormat: string; + imageMaxHeight: number; + imageMaxWidth: number; imageTransparency: boolean; sublayers: Collection; @@ -6320,6 +7631,8 @@ declare namespace __esri { dpi?: number; gdbVersion?: string; imageFormat?: string; + imageMaxHeight?: number; + imageMaxWidth?: number; imageTransparency?: boolean; sublayers?: Collection; } @@ -6547,6 +7860,24 @@ declare namespace __esri { width?: number; } + interface Widgette { + container: string | any; + visible: boolean; + + destroy(): void; + } + + interface WidgetteConstructor { + new(): Widgette; + } + + export const Widgette: WidgetteConstructor; + + interface WidgetteProperties { + container?: string | any; + visible?: boolean; + } + interface GeolocationPositioning { geolocationOptions: any; goToLocationEnabled: boolean; @@ -6569,8 +7900,10 @@ declare namespace __esri { interface config { geometryServiceUrl: string; + geoRSSServiceUrl: string; portalUrl: string; request: configRequest; + workers: configWorkers; } export const config: config; @@ -6596,13 +7929,19 @@ declare namespace __esri { export const lang: lang; interface promiseUtils { - eachAlways(promises: IPromise[]): IPromise[]; - reject(error?: any): IPromise; - resolve(value?: any): IPromise; + eachAlways(promises: IPromise[] | any): IPromise | any; + reject(error?: any): IPromise; + resolve(value?: T): IPromise; } export const promiseUtils: promiseUtils; + interface requireUtils { + when(moduleRequire: any, moduleNames: string[] | string): IPromise; + } + + export const requireUtils: requireUtils; + interface urlUtils { addProxyRule(rule: urlUtilsAddProxyRuleRule): number; getProxyRule(url: string): any; @@ -6636,7 +7975,7 @@ declare namespace __esri { interface decorators { aliasOf(propertyName: string): Function; cast(propertyName: string): Function; - cast(classFunction: Function): void; + cast(classFunction: Function): Function; declared(baseClass: T, ...mixinClasses: any[]): T; property(propertyMetadata?: decoratorsPropertyPropertyMetadata): Function; subclass(declaredClass?: string): Function; @@ -6739,6 +8078,12 @@ declare namespace __esri { export const jsonUtils: jsonUtils; + interface normalizeUtils { + normalizeCentralMeridian(geometries: Geometry[], geometryService?: GeometryService): IPromise; + } + + export const normalizeUtils: normalizeUtils; + interface webMercatorUtils { canProject(source: SpatialReference | any, target: SpatialReference | any): boolean; geographicToWebMercator(geometry: Geometry): Geometry; @@ -6765,7 +8110,7 @@ declare namespace __esri { interface size { createContinuousRenderer(params: sizeCreateContinuousRendererParams): IPromise; - createVisualVariable(params: sizeCreateVisualVariableParams): IPromise; + createVisualVariables(params: sizeCreateVisualVariablesParams): IPromise; } export const size: size; @@ -6787,13 +8132,17 @@ declare namespace __esri { histogram(params: histogramHistogramParams): IPromise; } - export const histogram: histogram; + const __histogramMapped: histogram; + export const histogram: typeof __histogramMapped.histogram; + interface summaryStatistics { summaryStatistics(params: summaryStatisticsSummaryStatisticsParams): IPromise; } - export const summaryStatistics: summaryStatistics; + const __summaryStatisticsMapped: summaryStatistics; + export const summaryStatistics: typeof __summaryStatisticsMapped.summaryStatistics; + interface symbologyColor { cloneScheme(scheme: any): any; @@ -6824,16 +8173,6 @@ declare namespace __esri { export const supportJsonUtils: supportJsonUtils; - interface Action { - className: string; - id: string; - image: string; - title: string; - visible: boolean; - } - - export const Action: Action; - interface symbolsSupportJsonUtils { fromJSON(json: any): Symbol; } @@ -6861,20 +8200,30 @@ declare namespace __esri { export const widget: widget; - interface ListItem { - actionsOpen: boolean; - actionsSections: Collection; - children: Collection; + interface BasemapGalleryItem { + basemap: Basemap; error: Error; - open: boolean; - title: string; - updating: boolean; - visibilityMode: string; - visible: boolean; - visibleAtCurrentScale: boolean; + state: string; + view: MapView | SceneView; } - export const ListItem: ListItem; + export const BasemapGalleryItem: BasemapGalleryItem; + + interface LocalBasemapsSource { + basemaps: Collection; + state: string; + } + + export const LocalBasemapsSource: LocalBasemapsSource; + + interface PortalBasemapsSource { + basemaps: Collection; + filterFunction: Function; + portal: Portal; + state: string; + } + + export const PortalBasemapsSource: PortalBasemapsSource; } declare module "esri" { @@ -6888,10 +8237,116 @@ declare module "esri" { export import WatchHandle = __esri.WatchHandle; + export import EachAlwaysResult = __esri.EachAlwaysResult; + export import PausableWatchHandle = __esri.PausableWatchHandle; + export import FeatureEditResult = __esri.FeatureEditResult; + export import AttributeParamValue = __esri.AttributeParamValue; + export import DataWorkspace = __esri.DataWorkspace; + + export import GroupMembership = __esri.GroupMembership; + + export import HoldType = __esri.HoldType; + + export import JobPriority = __esri.JobPriority; + + export import JobQuery = __esri.JobQuery; + + export import JobStatus = __esri.JobStatus; + + export import JobQueryContainer = __esri.JobQueryContainer; + + export import JobQueryDetails = __esri.JobQueryDetails; + + export import Privilege = __esri.Privilege; + + export import UserDetails = __esri.UserDetails; + + export import VersionInfo = __esri.VersionInfo; + + export import WorkflowManagerServiceInfo = __esri.WorkflowManagerServiceInfo; + + export import JobType = __esri.JobType; + + export import JobTypeDetails = __esri.JobTypeDetails; + + export import TableRelationship = __esri.TableRelationship; + + export import JobCreationParameters = __esri.JobCreationParameters; + + export import JobQueryParameters = __esri.JobQueryParameters; + + export import JobUpdateParameters = __esri.JobUpdateParameters; + + export import AuxRecordDescription = __esri.AuxRecordDescription; + + export import ActivityType = __esri.ActivityType; + + export import AuxRecordContainer = __esri.AuxRecordContainer; + + export import JobTaskJobInfo = __esri.JobTaskJobInfo; + + export import QueryResult = __esri.QueryResult; + + export import AuxRecord = __esri.AuxRecord; + + export import AuxRecordValue = __esri.AuxRecordValue; + + export import FieldValue = __esri.FieldValue; + + export import JobVersionInfo = __esri.JobVersionInfo; + + export import QueryFieldInfo = __esri.QueryFieldInfo; + + export import JobAttachment = __esri.JobAttachment; + + export import JobDependency = __esri.JobDependency; + + export import ChangeRule = __esri.ChangeRule; + + export import DataSetEvaluator = __esri.DataSetEvaluator; + + export import AOIEvaluator = __esri.AOIEvaluator; + + export import DatasetConfiguration = __esri.DatasetConfiguration; + + export import EmailNotifier = __esri.EmailNotifier; + + export import WhereCondition = __esri.WhereCondition; + + export import NotificationType = __esri.NotificationType; + + export import ChangeRuleMatch = __esri.ChangeRuleMatch; + + export import ReportDataGroup = __esri.ReportDataGroup; + + export import ReportData = __esri.ReportData; + + export import Report = __esri.Report; + + export import ExecuteInfo = __esri.ExecuteInfo; + + export import Step = __esri.Step; + + export import StepType = __esri.StepType; + + export import WorkflowDisplayDetails = __esri.WorkflowDisplayDetails; + + export import WorkflowOption = __esri.WorkflowOption; + + export import WorkflowStepInfo = __esri.WorkflowStepInfo; + + export import WorkflowAnnotationDisplayDetails = __esri.WorkflowAnnotationDisplayDetails; + + export import WorkflowConflicts = __esri.WorkflowConflicts; + + export import WorkflowPathDisplayDetails = __esri.WorkflowPathDisplayDetails; + + export import WorkflowStepDisplayDetails = __esri.WorkflowStepDisplayDetails; + export import ExternalRenderer = __esri.ExternalRenderer; export import RenderContext = __esri.RenderContext; @@ -6906,10 +8361,6 @@ declare module "esri" { export import FeatureLayerSource = __esri.FeatureLayerSource; - export import SearchViewModelLocatorSource = __esri.SearchViewModelLocatorSource; - - export import SearchViewModelFeatureLayerSource = __esri.SearchViewModelFeatureLayerSource; - export import GetHeader = __esri.GetHeader; export import WatchCallback = __esri.WatchCallback; @@ -6966,8 +8417,16 @@ declare module "esri" { export import CSVLayerElevationInfo = __esri.CSVLayerElevationInfo; + export import FeatureLayerApplyEditsEdits = __esri.FeatureLayerApplyEditsEdits; + + export import FeatureLayerCapabilities = __esri.FeatureLayerCapabilities; + + export import FeatureLayerCapabilitiesOperations = __esri.FeatureLayerCapabilitiesOperations; + export import FeatureLayerElevationInfo = __esri.FeatureLayerElevationInfo; + export import FeatureLayerGetFieldDomainOptions = __esri.FeatureLayerGetFieldDomainOptions; + export import GraphicsLayerElevationInfo = __esri.GraphicsLayerElevationInfo; export import LayerFromArcGISServerUrlParams = __esri.LayerFromArcGISServerUrlParams; @@ -6976,6 +8435,12 @@ declare module "esri" { export import SceneLayerElevationInfo = __esri.SceneLayerElevationInfo; + export import StreamLayerFilter = __esri.StreamLayerFilter; + + export import StreamLayerPurgeOptions = __esri.StreamLayerPurgeOptions; + + export import StreamLayerUpdateFilterFilterChanges = __esri.StreamLayerUpdateFilterFilterChanges; + export import VectorTileLayerCurrentStyleInfo = __esri.VectorTileLayerCurrentStyleInfo; export import CodedValueDomainCodedValues = __esri.CodedValueDomainCodedValues; @@ -7004,6 +8469,8 @@ declare module "esri" { export import UniqueValueRendererUniqueValueInfos = __esri.UniqueValueRendererUniqueValueInfos; + export import PointCloudRendererPointSizeAlgorithm = __esri.PointCloudRendererPointSizeAlgorithm; + export import PointCloudClassBreaksRendererColorClassBreakInfos = __esri.PointCloudClassBreaksRendererColorClassBreakInfos; export import PointCloudStretchRendererStops = __esri.PointCloudStretchRendererStops; @@ -7042,6 +8509,102 @@ declare module "esri" { export import QueryQuantizationParameters = __esri.QueryQuantizationParameters; + export import ConfigurationTaskGetDataWorkspaceDetailsParams = __esri.ConfigurationTaskGetDataWorkspaceDetailsParams; + + export import ConfigurationTaskGetUserJobQueryDetailsParams = __esri.ConfigurationTaskGetUserJobQueryDetailsParams; + + export import JobTaskAddEmbeddedAttachmentParams = __esri.JobTaskAddEmbeddedAttachmentParams; + + export import JobTaskAddLinkedAttachmentParams = __esri.JobTaskAddLinkedAttachmentParams; + + export import JobTaskAddLinkedRecordParams = __esri.JobTaskAddLinkedRecordParams; + + export import JobTaskAssignJobsParams = __esri.JobTaskAssignJobsParams; + + export import JobTaskCloseJobsParams = __esri.JobTaskCloseJobsParams; + + export import JobTaskCreateDependencyParams = __esri.JobTaskCreateDependencyParams; + + export import JobTaskCreateHoldParams = __esri.JobTaskCreateHoldParams; + + export import JobTaskCreateJobVersionParams = __esri.JobTaskCreateJobVersionParams; + + export import JobTaskDeleteAttachmentParams = __esri.JobTaskDeleteAttachmentParams; + + export import JobTaskDeleteDependencyParams = __esri.JobTaskDeleteDependencyParams; + + export import JobTaskDeleteJobsParams = __esri.JobTaskDeleteJobsParams; + + export import JobTaskDeleteLinkedRecordParams = __esri.JobTaskDeleteLinkedRecordParams; + + export import JobTaskGetAttachmentContentUrlParams = __esri.JobTaskGetAttachmentContentUrlParams; + + export import JobTaskListFieldValuesParams = __esri.JobTaskListFieldValuesParams; + + export import JobTaskListMultiLevelFieldValuesParams = __esri.JobTaskListMultiLevelFieldValuesParams; + + export import JobTaskLogActionParams = __esri.JobTaskLogActionParams; + + export import JobTaskQueryJobsParams = __esri.JobTaskQueryJobsParams; + + export import JobTaskQueryMultiLevelSelectedValuesParams = __esri.JobTaskQueryMultiLevelSelectedValuesParams; + + export import JobTaskReleaseHoldParams = __esri.JobTaskReleaseHoldParams; + + export import JobTaskReopenClosedJobsParams = __esri.JobTaskReopenClosedJobsParams; + + export import JobTaskSearchJobsParams = __esri.JobTaskSearchJobsParams; + + export import JobTaskUnassignJobsParams = __esri.JobTaskUnassignJobsParams; + + export import JobTaskUpdateNotesParams = __esri.JobTaskUpdateNotesParams; + + export import JobTaskUpdateRecordParams = __esri.JobTaskUpdateRecordParams; + + export import NotificationTaskAddChangeRuleParams = __esri.NotificationTaskAddChangeRuleParams; + + export import NotificationTaskDeleteChangeRuleParams = __esri.NotificationTaskDeleteChangeRuleParams; + + export import NotificationTaskNotifySessionParams = __esri.NotificationTaskNotifySessionParams; + + export import NotificationTaskQueryChangeRulesParams = __esri.NotificationTaskQueryChangeRulesParams; + + export import NotificationTaskRunSpatialNotificationOnHistoryParams = __esri.NotificationTaskRunSpatialNotificationOnHistoryParams; + + export import NotificationTaskSendNotificationParams = __esri.NotificationTaskSendNotificationParams; + + export import NotificationTaskSubscribeToNotificationParams = __esri.NotificationTaskSubscribeToNotificationParams; + + export import NotificationTaskUnsubscribeFromNotificationParams = __esri.NotificationTaskUnsubscribeFromNotificationParams; + + export import ReportTaskGenerateReportParams = __esri.ReportTaskGenerateReportParams; + + export import ReportTaskGetReportContentUrlParams = __esri.ReportTaskGetReportContentUrlParams; + + export import ReportTaskGetReportDataParams = __esri.ReportTaskGetReportDataParams; + + export import TokenTaskParseTokensParams = __esri.TokenTaskParseTokensParams; + + export import WorkflowTaskCanRunStepParams = __esri.WorkflowTaskCanRunStepParams; + + export import WorkflowTaskExecuteStepsParams = __esri.WorkflowTaskExecuteStepsParams; + + export import WorkflowTaskGetStepDescriptionParams = __esri.WorkflowTaskGetStepDescriptionParams; + + export import WorkflowTaskGetStepFileUrlParams = __esri.WorkflowTaskGetStepFileUrlParams; + + export import WorkflowTaskGetStepParams = __esri.WorkflowTaskGetStepParams; + + export import WorkflowTaskMarkStepsAsDoneParams = __esri.WorkflowTaskMarkStepsAsDoneParams; + + export import WorkflowTaskMoveToNextStepParams = __esri.WorkflowTaskMoveToNextStepParams; + + export import WorkflowTaskRecreateWorkflowParams = __esri.WorkflowTaskRecreateWorkflowParams; + + export import WorkflowTaskResolveConflictParams = __esri.WorkflowTaskResolveConflictParams; + + export import WorkflowTaskSetCurrentStepParams = __esri.WorkflowTaskSetCurrentStepParams; + export import MapViewConstraints = __esri.MapViewConstraints; export import MapViewGoToOptions = __esri.MapViewGoToOptions; @@ -7124,6 +8687,10 @@ declare module "esri" { export import configRequestProxyRules = __esri.configRequestProxyRules; + export import configWorkers = __esri.configWorkers; + + export import configWorkersLoaderConfig = __esri.configWorkersLoaderConfig; + export import requestEsriRequestOptions = __esri.requestEsriRequestOptions; export import urlUtilsAddProxyRuleRule = __esri.urlUtilsAddProxyRuleRule; @@ -7144,9 +8711,9 @@ declare module "esri" { export import sizeCreateContinuousRendererParamsLegendOptions = __esri.sizeCreateContinuousRendererParamsLegendOptions; - export import sizeCreateVisualVariableParams = __esri.sizeCreateVisualVariableParams; + export import sizeCreateVisualVariablesParams = __esri.sizeCreateVisualVariablesParams; - export import sizeCreateVisualVariableParamsLegendOptions = __esri.sizeCreateVisualVariableParamsLegendOptions; + export import sizeCreateVisualVariablesParamsLegendOptions = __esri.sizeCreateVisualVariablesParamsLegendOptions; export import univariateColorSizeCreateContinuousRendererParams = __esri.univariateColorSizeCreateContinuousRendererParams; @@ -7351,6 +8918,11 @@ declare module "esri/layers/FeatureLayer" { export = FeatureLayer; } +declare module "esri/layers/GeoRSSLayer" { + import GeoRSSLayer = __esri.GeoRSSLayer; + export = GeoRSSLayer; +} + declare module "esri/layers/GraphicsLayer" { import GraphicsLayer = __esri.GraphicsLayer; export = GraphicsLayer; @@ -7571,6 +9143,11 @@ declare module "esri/renderers/PointCloudUniqueValueRenderer" { export = PointCloudUniqueValueRenderer; } +declare module "esri/support/Action" { + import Action = __esri.Action; + export = Action; +} + declare module "esri/symbols/ExtrudeSymbol3DLayer" { import ExtrudeSymbol3DLayer = __esri.ExtrudeSymbol3DLayer; export = ExtrudeSymbol3DLayer; @@ -7961,6 +9538,36 @@ declare module "esri/tasks/support/TrimExtendParameters" { export = TrimExtendParameters; } +declare module "esri/tasks/workflow/ConfigurationTask" { + import ConfigurationTask = __esri.ConfigurationTask; + export = ConfigurationTask; +} + +declare module "esri/tasks/workflow/JobTask" { + import JobTask = __esri.JobTask; + export = JobTask; +} + +declare module "esri/tasks/workflow/NotificationTask" { + import NotificationTask = __esri.NotificationTask; + export = NotificationTask; +} + +declare module "esri/tasks/workflow/ReportTask" { + import ReportTask = __esri.ReportTask; + export = ReportTask; +} + +declare module "esri/tasks/workflow/TokenTask" { + import TokenTask = __esri.TokenTask; + export = TokenTask; +} + +declare module "esri/tasks/workflow/WorkflowTask" { + import WorkflowTask = __esri.WorkflowTask; + export = WorkflowTask; +} + declare module "esri/views/MapView" { import MapView = __esri.MapView; export = MapView; @@ -8001,6 +9608,11 @@ declare module "esri/views/layers/ImageryLayerView" { export = ImageryLayerView; } +declare module "esri/views/layers/SceneLayerView" { + import SceneLayerView = __esri.SceneLayerView; + export = SceneLayerView; +} + declare module "esri/views/ui/UI" { import UI = __esri.UI; export = UI; @@ -8046,6 +9658,11 @@ declare module "esri/widgets/Attribution" { export = Attribution; } +declare module "esri/widgets/BasemapGallery" { + import BasemapGallery = __esri.BasemapGallery; + export = BasemapGallery; +} + declare module "esri/widgets/BasemapToggle" { import BasemapToggle = __esri.BasemapToggle; export = BasemapToggle; @@ -8061,6 +9678,11 @@ declare module "esri/widgets/Compass" { export = Compass; } +declare module "esri/widgets/Expand" { + import Expand = __esri.Expand; + export = Expand; +} + declare module "esri/widgets/Home" { import Home = __esri.Home; export = Home; @@ -8096,6 +9718,11 @@ declare module "esri/widgets/Print" { export = Print; } +declare module "esri/widgets/ScaleBar" { + import ScaleBar = __esri.ScaleBar; + export = ScaleBar; +} + declare module "esri/widgets/Search" { import Search = __esri.Search; export = Search; @@ -8131,6 +9758,11 @@ declare module "esri/widgets/Attribution/AttributionViewModel" { export = AttributionViewModel; } +declare module "esri/widgets/BasemapGallery/BasemapGalleryViewModel" { + import BasemapGalleryViewModel = __esri.BasemapGalleryViewModel; + export = BasemapGalleryViewModel; +} + declare module "esri/widgets/BasemapToggle/BasemapToggleViewModel" { import BasemapToggleViewModel = __esri.BasemapToggleViewModel; export = BasemapToggleViewModel; @@ -8141,6 +9773,11 @@ declare module "esri/widgets/Compass/CompassViewModel" { export = CompassViewModel; } +declare module "esri/widgets/Expand/ExpandViewModel" { + import ExpandViewModel = __esri.ExpandViewModel; + export = ExpandViewModel; +} + declare module "esri/widgets/Home/HomeViewModel" { import HomeViewModel = __esri.HomeViewModel; export = HomeViewModel; @@ -8151,6 +9788,11 @@ declare module "esri/widgets/LayerList/LayerListViewModel" { export = LayerListViewModel; } +declare module "esri/widgets/LayerList/ListItem" { + import ListItem = __esri.ListItem; + export = ListItem; +} + declare module "esri/widgets/Locate/LocateViewModel" { import LocateViewModel = __esri.LocateViewModel; export = LocateViewModel; @@ -8171,6 +9813,11 @@ declare module "esri/widgets/Popup/PopupViewModel" { export = PopupViewModel; } +declare module "esri/widgets/ScaleBar/ScaleBarViewModel" { + import ScaleBarViewModel = __esri.ScaleBarViewModel; + export = ScaleBarViewModel; +} + declare module "esri/widgets/Search/SearchViewModel" { import SearchViewModel = __esri.SearchViewModel; export = SearchViewModel; @@ -8266,6 +9913,11 @@ declare module "esri/views/DOMContainer" { export = DOMContainer; } +declare module "esri/widgets/Widgette" { + import Widgette = __esri.Widgette; + export = Widgette; +} + declare module "esri/widgets/support/GeolocationPositioning" { import GeolocationPositioning = __esri.GeolocationPositioning; export = GeolocationPositioning; @@ -8296,6 +9948,11 @@ declare module "esri/core/promiseUtils" { export = promiseUtils; } +declare module "esri/core/requireUtils" { + import requireUtils = __esri.requireUtils; + export = requireUtils; +} + declare module "esri/core/urlUtils" { import urlUtils = __esri.urlUtils; export = urlUtils; @@ -8331,6 +9988,11 @@ declare module "esri/geometry/support/jsonUtils" { export = jsonUtils; } +declare module "esri/geometry/support/normalizeUtils" { + import normalizeUtils = __esri.normalizeUtils; + export = normalizeUtils; +} + declare module "esri/geometry/support/webMercatorUtils" { import webMercatorUtils = __esri.webMercatorUtils; export = webMercatorUtils; @@ -8391,11 +10053,6 @@ declare module "esri/renderers/support/jsonUtils" { export = supportJsonUtils; } -declare module "esri/support/Action" { - import Action = __esri.Action; - export = Action; -} - declare module "esri/symbols/support/jsonUtils" { import symbolsSupportJsonUtils = __esri.symbolsSupportJsonUtils; export = symbolsSupportJsonUtils; @@ -8411,7 +10068,17 @@ declare module "esri/widgets/support/widget" { export = widget; } -declare module "esri/widgets/LayerList/ListItem" { - import ListItem = __esri.ListItem; - export = ListItem; +declare module "esri/widgets/BasemapGallery/BasemapGalleryItem" { + import BasemapGalleryItem = __esri.BasemapGalleryItem; + export = BasemapGalleryItem; } + +declare module "esri/widgets/BasemapGallery/support/LocalBasemapsSource" { + import LocalBasemapsSource = __esri.LocalBasemapsSource; + export = LocalBasemapsSource; +} + +declare module "esri/widgets/BasemapGallery/support/PortalBasemapsSource" { + import PortalBasemapsSource = __esri.PortalBasemapsSource; + export = PortalBasemapsSource; +} \ No newline at end of file diff --git a/arcgis-js-api/v3/index.d.ts b/arcgis-js-api/v3/index.d.ts index c32749eb26..40875ddd48 100644 --- a/arcgis-js-api/v3/index.d.ts +++ b/arcgis-js-api/v3/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 3.19 +// Type definitions for ArcGIS API for JavaScript 3.20 // Project: https://developers.arcgis.com/javascript/3/ // Definitions by: Esri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -21,7 +21,6 @@ declare module "esri" { import Color = require("esri/Color"); import LocationProviderBase = require("esri/tasks/locationproviders/LocationProviderBase"); import PictureMarkerSymbol = require("esri/symbols/PictureMarkerSymbol"); - import RouteParameters = require("esri/tasks/RouteParameters"); import SimpleLineSymbol = require("esri/symbols/SimpleLineSymbol"); import Font = require("esri/symbols/Font"); import ArcGISDynamicMapServiceLayer = require("esri/layers/ArcGISDynamicMapServiceLayer"); @@ -263,6 +262,12 @@ declare module "esri" { /** The symbol in which the BlendRenderer is applied. */ symbol: Symbol; } + export interface BookmarkItemOptions { + /** The extent for the specified bookmark item. */ + extent?: Extent; + /** The name for the bookmark item. */ + name?: string; + } export interface BookmarksOptions { /** An array of BookmarkItem objects or a json object with the BookmarkItem format to initially display in the bookmark widget. */ bookmarks?: BookmarkItem[]; @@ -282,8 +287,14 @@ declare module "esri" { latitudeFieldName?: string; /** The longitude field name. */ longitudeFieldName?: string; + /** Opacity or transparency of layer. */ + opacity?: number; /** An array of strings which correspond to fields to include in the CSVLayer. */ outFields?: string[]; + /** Refresh interval of the layer in minutes. */ + refreshInterval?: number; + /** Visibility of the layer. */ + visible?: boolean; } export interface ChooseBestFacilitiesOptions { /** The URL to the analysis service, for example "http://analysis.arcgis.com/arcgis/rest/services/tasks/GPServer". */ @@ -624,8 +635,8 @@ declare module "esri" { canModifyStops?: boolean; /** Center the map at the start of the selected route segment. */ centerAtSegmentStart?: boolean; - /** The returned directions object from the routing solve result. */ - directions?: any; + /** The locale used for the directions. */ + directionsLanguage?: string; /** Length units. */ directionsLengthUnits?: string; /** Enable the dragging of stop locations on the map. */ @@ -658,8 +669,6 @@ declare module "esri" { printTemplate?: string; /** When true, the route will return to start point. */ returnToStart?: boolean; - /** Specify the input parameters for the route task. */ - routeParams?: RouteParameters; /** Define the symbol used to draw the route on the map. */ routeSymbol?: SimpleLineSymbol; /** Specify the service that will be used to calculate directions. */ @@ -672,6 +681,8 @@ declare module "esri" { segmentSymbol?: SimpleLineSymbol; /** Defines whether the Directions widget will show the map-click-active toggle button. */ showActivateButton?: boolean; + /** Indicates whether to expose barriers when using the widget. */ + showBarriersButton?: boolean; /** If true, the Clear button is shown. */ showClearButton?: boolean; /** If true, the toggle button group allowing user to choose between Miles and Kilometers is shown. */ @@ -1076,6 +1087,8 @@ declare module "esri" { export interface GeoRSSLayerOptions { /** The template used to display popup window for identify operation. */ infoTemplate?: InfoTemplate; + /** Opacity or transparency of layer. */ + opacity?: number; /** The output spatial reference for the GeoRSSLayer. */ outSpatialReference?: SpatialReference; /** The default symbol use to display point features. */ @@ -1084,6 +1097,8 @@ declare module "esri" { polygonSymbol?: Symbol; /** The default symbol used to display polyline features. */ polylineSymbol?: Symbol; + /** Refresh interval of the layer in minutes. */ + refreshInterval?: number; } export interface GeocoderOptions { /** By default, the Geocoder widget uses the Esri World Locator to find search locations. */ @@ -3235,7 +3250,7 @@ declare module "esri/arcgis/Portal" { tags: string[]; /** The url to the thumbnail image for the user. */ thumbnailUrl: string; - /** The url for the user content. */ + /** The URL for the user content. */ userContentUrl: string; /** The username for the user. */ username: string; @@ -3554,16 +3569,15 @@ declare module "esri/dijit/BasemapToggle" { } declare module "esri/dijit/BookmarkItem" { - import Extent = require("esri/geometry/Extent"); + import esri = require("esri"); /** Defines a bookmark for use in the Bookmark widget. */ class BookmarkItem { /** * Creates a new BookmarkItem. - * @param name The name for the bookmark item. - * @param extent The extent for the specified bookmark item. + * @param params See options list for parameters. */ - constructor(name: string, extent: Extent); + constructor(params?: esri.BookmarkItemOptions); } export = BookmarkItem; } @@ -3815,7 +3829,6 @@ declare module "esri/dijit/Directions" { import esri = require("esri"); import DirectionsFeatureSet = require("esri/tasks/DirectionsFeatureSet"); import Graphic = require("esri/graphic"); - import RouteParameters = require("esri/tasks/RouteParameters"); import RouteTask = require("esri/tasks/RouteTask"); import Point = require("esri/geometry/Point"); import RouteResult = require("esri/tasks/RouteResult"); @@ -3832,14 +3845,14 @@ declare module "esri/dijit/Directions" { mergedRouteGraphic: Graphic; /** If specified, this specifies the portal where the produced route layers are going to be stored and accessed. */ portalUrl: string; - /** Routing parameters for the widget. */ - routeParams: RouteParameters; /** Routing task for the widget. */ routeTask: RouteTask; /** Read-only: The Service Description object returned by the Route REST Endpoint. */ serviceDescription: any; /** Indicates whether the Directions widget will display the map-click-active toggle button. */ showActivateButton: boolean; + /** Indicates whether to expose barriers when using the widget. */ + showBarriersButton: boolean; /** If true, the Clear button is shown. */ showClearButton: boolean; /** If true, the toggle button group allowing user to choose between Miles and Kilometers is shown. */ @@ -9230,8 +9243,14 @@ declare module "esri/layers/CSVLayer" { latitudeFieldName: string; /** The longitude field name. */ longitudeFieldName: string; + /** Opacity or transparency of layer. */ + opacity: number; + /** Refresh interval of the layer in minutes. */ + refreshInterval: number; /** The url to a CSV resource. */ url: string; + /** Visibility of the layer. */ + visible: boolean; /** * Creates a CSV layer. * @param url URL to a CSV resource. @@ -9938,6 +9957,10 @@ declare module "esri/layers/GeoRSSLayer" { items: Graphic[]; /** The name of the layer. */ name: string; + /** Opacity or transparency of layer. */ + opacity: number; + /** Refresh interval of the layer in minutes. */ + refreshInterval: number; /** The publicly accessible URL to a GeoRSS file. */ url: string; /** @@ -11703,6 +11726,7 @@ declare module "esri/layers/pixelfilters/StretchFilter" { declare module "esri/map" { import esri = require("esri"); import Attribution = require("esri/dijit/Attribution"); + import Color = require("esri/Color"); import Extent = require("esri/geometry/Extent"); import GraphicsLayer = require("esri/layers/GraphicsLayer"); import InfoWindowBase = require("esri/InfoWindowBase"); @@ -11721,6 +11745,8 @@ declare module "esri/map" { attribution: Attribution; /** Value is true when the map automatically resizes if the browser window or ContentPane widget enclosing the map is resized. */ autoResize: boolean; + /** The background color "behind" the map. */ + backgroundColor: Color; /** An array of IDs corresponding to the layers that make up the map's current basemap. */ basemapLayerIds: string[]; /** The current extent of the map in map units. */ @@ -11924,6 +11950,11 @@ declare module "esri/map" { * @param immediate By default, the actual resize logic is delayed internally in order to throttle spurious resize events dispatched by some browsers. */ resize(immediate?: boolean): void; + /** + * Change the background color of the map. + * @param color Color specified using either a named string (e.g. + */ + setBackgroundColor(color: Color | string): void; /** * Change the map's current basemap. * @param basemap A valid basemap name. diff --git a/archiver/archiver-tests.ts b/archiver/archiver-tests.ts index d79b29f079..f186fb9bcb 100644 --- a/archiver/archiver-tests.ts +++ b/archiver/archiver-tests.ts @@ -1,6 +1,3 @@ - -/// - import Archiver = require('archiver'); import FS = require('fs'); diff --git a/artyom.js/index.d.ts b/artyom.js/index.d.ts index 0b0f253827..ae120015ca 100644 --- a/artyom.js/index.d.ts +++ b/artyom.js/index.d.ts @@ -164,7 +164,6 @@ interface SpeechSynthesisVoice { } declare namespace Artyom { - interface ArtyomDevice { isChrome(): boolean; isMobile(): boolean; @@ -235,7 +234,7 @@ declare namespace Artyom { onend(): void; } - export interface ArtyomJS { + interface ArtyomJS { /** * Contains some basic information that artyom needs to know as the type of device and browser * @see http://ourcodeworld.com/projects/projects-documentation/6/read-doc/artyom-device/artyom-js @@ -499,13 +498,12 @@ declare namespace Artyom { /** * ArtyomBuilder bla, bla... */ - export class ArtyomBuilder { + class ArtyomBuilder { /** * Method to bla, bla, bla... */ static getInstance(): ArtyomJS } - } // tslint:disable-next-line:export-just-namespace diff --git a/async/index.d.ts b/async/index.d.ts index e3fbe7e512..62e047b209 100644 --- a/async/index.d.ts +++ b/async/index.d.ts @@ -6,17 +6,16 @@ interface Dictionary { [key: string]: T; } interface ErrorCallback { (err?: T): void; } -interface AsyncWaterfallCallback { (err: E, ...args: any[]): void; } -interface AsyncBooleanResultCallback { (err: E, truthValue: boolean): void; } -interface AsyncResultCallback { (err: E, result: T): void; } -interface AsyncResultArrayCallback { (err: E, results: T[]): void; } -interface AsyncResultObjectCallback { (err: E, results: Dictionary): void; } +interface AsyncBooleanResultCallback { (err?: E, truthValue?: boolean): void; } +interface AsyncResultCallback { (err?: E, result?: T): void; } +interface AsyncResultArrayCallback { (err?: E, results?: (T | undefined)[]): void; } +interface AsyncResultObjectCallback { (err: E | undefined, results: Dictionary): void; } interface AsyncFunction { (callback: (err?: E, result?: T) => void): void; } interface AsyncIterator { (item: T, callback: ErrorCallback): void; } interface AsyncForEachOfIterator { (item: T, key: number|string, callback: ErrorCallback): void; } interface AsyncResultIterator { (item: T, callback: AsyncResultCallback): void; } -interface AsyncMemoIterator { (memo: R, item: T, callback: AsyncResultCallback): void; } +interface AsyncMemoIterator { (memo: R | undefined, item: T, callback: AsyncResultCallback): void; } interface AsyncBooleanIterator { (item: T, callback: AsyncBooleanResultCallback): void; } interface AsyncWorker { (task: T, callback: ErrorCallback): void; } @@ -76,7 +75,7 @@ interface AsyncPriorityQueue { interface AsyncCargo { length(): number; - payload: number; + payload?: number; push(task: any, callback? : Function): void; push(task: any[], callback? : Function): void; saturated(): void; @@ -175,7 +174,7 @@ interface Async { during(test: (testCallback : AsyncBooleanResultCallback) => void, fn: AsyncVoidFunction, callback: ErrorCallback): void; doDuring(fn: AsyncVoidFunction, test: (testCallback: AsyncBooleanResultCallback) => void, callback: ErrorCallback): void; forever(next: (next : ErrorCallback) => void, errBack: ErrorCallback) : void; - waterfall(tasks: Function[], callback?: AsyncResultCallback): void; + waterfall(tasks: Function[], callback?: AsyncResultCallback): void; compose(...fns: Function[]): Function; seq(...fns: Function[]): Function; applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. @@ -186,29 +185,30 @@ interface Async { cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo; auto(tasks: any, concurrency?: number, callback?: AsyncResultCallback): void; autoInject(tasks: any, callback?: AsyncResultCallback): void; - retry(opts: number, task: (callback : AsyncResultCallback, results: any) => void, callback: AsyncResultCallback): void; - retry(opts: { times: number, interval: number|((retryCount: number) => number) }, task: (callback: AsyncResultCallback, results : any) => void, callback: AsyncResultCallback): void; - retryable(opts: number | {times: number, interval: number}, task: AsyncFunction): AsyncFunction; - apply(fn: Function, ...arguments: any[]): AsyncFunction; + retry(opts: number, task: (callback : AsyncResultCallback, results: any) => void, callback: AsyncResultCallback): void; + retry(opts: { times: number, interval: number|((retryCount: number) => number) }, task: (callback: AsyncResultCallback, results : any) => void, callback: AsyncResultCallback): void; + retryable(opts: number | {times: number, interval: number}, task: AsyncFunction): AsyncFunction; + apply(fn: Function, ...arguments: any[]): AsyncFunction; nextTick(callback: Function, ...args: any[]): void; setImmediate: typeof async.nextTick; - reflect(fn: AsyncFunction) : (callback: (err: void, result: {error?: Error, value?: T}) => void) => void; - reflectAll(tasks: AsyncFunction[]): ((callback: (err: void, result: {error?: Error, value?: T}) => void) => void)[]; + reflect(fn: AsyncFunction) : (callback: (err: null, result: {error?: E, value?: T}) => void) => void; + reflectAll(tasks: AsyncFunction[]): ((callback: (err: null, result: {error?: E, value?: T}) => void) => void)[]; - timeout(fn: AsyncFunction, milliseconds: number, info?: any): AsyncFunction; - timeout(fn: AsyncResultIterator, milliseconds: number, info?: any): AsyncResultIterator; + timeout(fn: AsyncFunction, milliseconds: number, info?: any): AsyncFunction; + timeout(fn: AsyncResultIterator, milliseconds: number, info?: any): AsyncResultIterator; times (n: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void; timesSeries(n: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void; timesLimit(n: number, limit: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void; - transform(arr: T[], iteratee: (acc: R[], item: T, key: string, callback: (error?: E) => void) => void): void; - transform(arr: T[], acc: R[], iteratee: (acc: R[], item: T, key: string, callback: (error?: E) => void) => void): void; - transform(arr: {[key: string] : T}, iteratee: (acc: {[key: string] : R}, item: T, key: string, callback: (error?: E) => void) => void): void; - transform(arr: {[key: string] : T}, acc: {[key: string] : R}, iteratee: (acc: {[key: string] : R}, item: T, key: string, callback: (error?: E) => void) => void): void; + transform(arr: T[], iteratee: (acc: R[], item: T, key: number, callback: (error?: E) => void) => void, callback?: AsyncResultArrayCallback): void; + transform(arr: T[], acc: R[], iteratee: (acc: R[], item: T, key: number, callback: (error?: E) => void) => void, callback?: AsyncResultArrayCallback): void; - race(tasks: (AsyncFunction)[], callback: AsyncResultCallback) : void; + transform(arr: {[key: string] : T}, iteratee: (acc: {[key: string] : R}, item: T, key: string, callback: (error?: E) => void) => void, callback?: AsyncResultObjectCallback): void; + transform(arr: {[key: string] : T}, acc: {[key: string] : R}, iteratee: (acc: {[key: string] : R}, item: T, key: string, callback: (error?: E) => void) => void, callback?: AsyncResultObjectCallback): void; + + race(tasks: (AsyncFunction)[], callback: AsyncResultCallback) : void; // Utils memoize(fn: Function, hasher?: Function): Function; @@ -226,4 +226,3 @@ declare var async: Async; declare module "async" { export = async; } - diff --git a/async/test/explicit.ts b/async/test/explicit.ts index 80343cf6b1..b9ea9c84ed 100644 --- a/async/test/explicit.ts +++ b/async/test/explicit.ts @@ -1,44 +1,74 @@ -interface StringCallback { (err: Error, result: string): void; } +interface StringCallback { (err?: Error, result?: string): void; } interface AsyncStringGetter { (callback: StringCallback): void; } var taskArray: AsyncStringGetter[] = [ function (callback) { setTimeout(function () { - callback(null, 'one'); + callback(undefined, 'one'); }, 200); }, function (callback) { setTimeout(function () { - callback(null, 'two'); + callback(undefined, 'two'); }, 100); }, ]; -async.series(taskArray, function (err, results) { console.log(results[0].match(/o/)) }); -async.parallel(taskArray, function (err, results) { console.log(results[0].match(/o/)) }); -async.parallelLimit(taskArray, 3, function (err, results) { console.log(results[0].match(/o/)) }); +async.series(taskArray, function (err, results) { + if (results) { + let first = results[0]; + if (first) { + console.log(first.match(/o/)) + } + } +}); +async.parallel(taskArray, function (err, results) { + if (results) { + let first = results[0]; + if (first) { + console.log(first.match(/o/)) + } + } +}); +async.parallelLimit(taskArray, 3, function (err, results) { + if (results) { + let first = results[0]; + if (first) { + console.log(first.match(/o/)) + } + } +}); interface Lookup { [key: string]: T; } -interface NumberCallback { (err: Error, result: number): void; } +interface NumberCallback { (err?: Error, result?: number): void; } interface AsyncNumberGetter { (callback: NumberCallback): void; } var taskDict: Lookup = { one: function(callback){ setTimeout(function(){ - callback(null, 1); + callback(undefined, 1); }, 200); }, two: function(callback){ setTimeout(function(){ - callback(null, 2); + callback(undefined, 2); }, 100); } } -async.series(taskDict, function(err, results) { console.log(results['one'].toFixed(1)) }); -async.parallel(taskDict, function(err, results) { console.log(results['one'].toFixed(1)) }); -async.parallelLimit(taskDict, 3, function(err, results) { console.log(results['one'].toFixed(1)) }); +async.series(taskDict, function(err, results) { + let one = results['one']; + console.log(one && one.toFixed(1)) +}); +async.parallel(taskDict, function(err, results) { + let one = results['one']; + console.log(one && one.toFixed(1)) +}); +async.parallelLimit(taskDict, 3, function(err, results) { + let one = results['one']; + console.log(one && one.toFixed(1)) +}); diff --git a/async/test/index.ts b/async/test/index.ts index 8c6be303e4..b30ca4c7ba 100644 --- a/async/test/index.ts +++ b/async/test/index.ts @@ -350,9 +350,9 @@ q2.unshift(['task3', 'task4', 'task5'], function (error) { }); -var aq = async.queue(function (level: number, callback: (error : Error, newLevel: number) => void) { +var aq = async.queue(function (level: number, callback: (error?: Error, newLevel?: number) => void) { console.log('hello ' + level); - callback(null, level+1); + callback(undefined, level+1); }); aq.push(1, function (err : Error, newLevel : number) { @@ -807,9 +807,9 @@ async.some({ // timeout -function myFunction1(foo : any, callback: (err : Error, result : any) => void ) : void { +function myFunction1(foo : any, callback: (err?: Error, result?: any) => void ) : void { console.log(`async.timeout 1 ${foo}`); - return callback(null, foo); + return callback(undefined, foo); } var wrapped1 = async.timeout(myFunction1, 1000); wrapped1({ bar: 'bar' }, function(err : Error, data : any) { @@ -817,9 +817,9 @@ wrapped1({ bar: 'bar' }, function(err : Error, data : any) { }); -function myFunction2(callback: (err : Error, result : any) => void ) : void { +function myFunction2(callback: (err?: Error, result?: any) => void ) : void { console.log(`async.timeout 2`); - return callback(null, { bar: 'bar' }); + return callback(undefined, { bar: 'bar' }); } var wrapped2 = async.timeout(myFunction2, 1000); @@ -827,9 +827,9 @@ wrapped2( function(err : Error, data : any) { console.log(`async.timeout 2 end ${data}`); }); -function myFunction3(callback: (err : Error, result : any) => void ) : void { +function myFunction3(callback: (err?: Error, result?: any) => void ) : void { console.log(`async.timeout 3`); - return callback(null, { bar: 'bar' }); + return callback(undefined, { bar: 'bar' }); } var wrapped3 = async.timeout(myFunction3, 1000, { bar: 'bar' }); diff --git a/async/tsconfig.json b/async/tsconfig.json index 851293fccf..5b8f42c6d2 100644 --- a/async/tsconfig.json +++ b/async/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "test/index.ts", "test/explicit.ts" ] -} \ No newline at end of file +} diff --git a/atom/atom-tests.ts b/atom/atom-tests.ts index 37b2fb314c..1b141fb492 100644 --- a/atom/atom-tests.ts +++ b/atom/atom-tests.ts @@ -1,5 +1,4 @@ /// -/// import path = require("path"); import _atom = require("atom"); diff --git a/atom/index.d.ts b/atom/index.d.ts index 7c984bd812..05c9794eec 100644 --- a/atom/index.d.ts +++ b/atom/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: vvakame // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// /// /// /// @@ -1519,6 +1518,7 @@ declare var atom:AtomCore.IAtom; declare module "atom" { import spacePen = require("space-pen"); + import Q = require("q"); var $:typeof spacePen.$; var $$:typeof spacePen.$$; diff --git a/atom/tsconfig.json b/atom/tsconfig.json index 3bb8fe9761..6c1bb13aef 100644 --- a/atom/tsconfig.json +++ b/atom/tsconfig.json @@ -12,6 +12,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/aurelia-knockout/aurelia-knockout-tests.ts b/aurelia-knockout/aurelia-knockout-tests.ts new file mode 100644 index 0000000000..cf769d0dc2 --- /dev/null +++ b/aurelia-knockout/aurelia-knockout-tests.ts @@ -0,0 +1,9 @@ +export class ViewModel { + constructor(private knockoutBindable: KnockoutBindable) { + } + + activate(settings: any): void { + this.knockoutBindable.applyBindableValues(settings, this); + this.knockoutBindable.applyBindableValues(settings, this, true); + } +} diff --git a/aurelia-knockout/index.d.ts b/aurelia-knockout/index.d.ts new file mode 100644 index 0000000000..6f04567a5f --- /dev/null +++ b/aurelia-knockout/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for aurelia-knockout 2.0 +// Project: https://github.com/code-chris/aurelia-knockout +// Definitions by: Christian Kotzbauer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface KnockoutBindable { + /** + * Applys all values from a data object (usually the activation data) to the corresponding instance fields + * in the current view model if they are marked as @bindable. By default all matching values from the data object + * are applied. To only apply observable values set the last parameter to `true`. Subscriptions are created + * for all Knockout observables in the data object to update the view-model values respectively. + * + * @param data - the data object + * @param target - the target view model + * @param applyOnlyObservables - `true` if only observable values should be applied, false by default. + */ + applyBindableValues(data: any, target: any, applyOnlyObservables?: boolean): void; +} diff --git a/localforage/tsconfig.json b/aurelia-knockout/tsconfig.json similarity index 92% rename from localforage/tsconfig.json rename to aurelia-knockout/tsconfig.json index 1e3cbf9e63..aa45dc1157 100644 --- a/localforage/tsconfig.json +++ b/aurelia-knockout/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "localforage-tests.ts" + "aurelia-knockout-tests.ts" ] -} \ No newline at end of file +} diff --git a/service_worker_api/tslint.json b/aurelia-knockout/tslint.json similarity index 100% rename from service_worker_api/tslint.json rename to aurelia-knockout/tslint.json diff --git a/auth0-js/auth0-js-tests.ts b/auth0-js/auth0-js-tests.ts index 7c910d1765..cd7789c62d 100644 --- a/auth0-js/auth0-js-tests.ts +++ b/auth0-js/auth0-js-tests.ts @@ -1,4 +1,4 @@ -import 'auth0-js'; +import * as auth0 from 'auth0-js'; let webAuth = new auth0.WebAuth({ domain: 'mine.auth0.com', @@ -61,10 +61,8 @@ webAuth.signupAndAuthorize({ }); - - webAuth.client.login({ - ealm: 'Username-Password-Authentication', //connection name or HRD domain + realm: 'Username-Password-Authentication', //connection name or HRD domain username: 'info@auth0.com', password: 'areallystrongpassword', audience: 'https://mystore.com/api/v2', @@ -73,6 +71,26 @@ webAuth.client.login({ // Auth tokens in the result or an error }); +webAuth.popup.buildPopupHandler(); +webAuth.popup.preload({}); +webAuth.popup.authorize({}, (err, data) => { + if (err) /* handle error */ return; + // do something with data +}); +webAuth.popup.loginWithCredentials({}, (err, data) => { + if (err) /* handle error */ return; + // do something with data +}); +webAuth.popup.passwordlessVerify({}, (err, data) => { + if (err) /* handle error */ return; + // do something with data +}); +webAuth.popup.signupAndLogin({}, (err, data) => { + if (err) /* handle error */ return; + // do something with data +}); + + let authentication = new auth0.Authentication({ domain: 'me.auth0.com', clientID: '...', @@ -101,7 +119,9 @@ authentication.delegation({ refresh_token: 'your_refresh_token', api_type: 'app' }, (err, data) => { - + if (!err) { + localStorage.setItem('token', data.idToken) + } }); authentication.loginWithDefaultDirectory({ @@ -146,6 +166,8 @@ let management = new auth0.Management({ management.getUser('asd', (err, user) => {}); -management.patchUserMetadata('asd', {role: 'admin'}, (err, user) => {}); +management.patchUserMetadata('asd', {role: 'admin'}, (err, user) => { + if (!err && user.email_verified) return; // do something +}); management.linkUser('asd', 'eqwe', (err, user) => {}); diff --git a/auth0-js/index.d.ts b/auth0-js/index.d.ts index 11cf16a3ed..d8d1e6f392 100644 --- a/auth0-js/index.d.ts +++ b/auth0-js/index.d.ts @@ -1,456 +1,516 @@ -// Type definitions for Auth0.js 8.1 +// Type definitions for Auth0.js 8.3 // Project: https://github.com/auth0/auth0.js // Definitions by: Adrian Chia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace auth0 { +export as namespace auth0; - export class Authentication { - constructor(options: AuthOptions); - passwordless: PasswordlessAuthentication; - dbConnection: DBConnection; +export class Authentication { + constructor(options: AuthOptions); - /** - * Builds and returns the `/authorize` url in order to initialize a new authN/authZ transaction - * - * @method buildAuthorizeUrl - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db - */ - buildAuthorizeUrl(options: any): string; + passwordless: PasswordlessAuthentication; + dbConnection: DBConnection; - /** - * Builds and returns the Logout url in order to initialize a new authN/authZ transaction - * - * @method buildLogoutUrl - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--v2-logout - */ - buildLogoutUrl(options?: any): string; + /** + * Builds and returns the `/authorize` url in order to initialize a new authN/authZ transaction + * + * @method buildAuthorizeUrl + * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db + */ + buildAuthorizeUrl(options: any): string; - /** - * Makes a call to the `oauth/token` endpoint with `password` grant type - * - * @method loginWithDefaultDirectory - * @param {Object} options: https://auth0.com/docs/api-auth/grant/password - * @param {Function} callback - */ - loginWithDefaultDirectory(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; + /** + * Builds and returns the Logout url in order to initialize a new authN/authZ transaction + * + * @method buildLogoutUrl + * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--v2-logout + */ + buildLogoutUrl(options?: any): string; - /** - * Makes a call to the `/ro` endpoint - * @param {any} options - * @param {Function} callback - * @deprecated `loginWithResourceOwner` will be soon deprecated, user `login` instead. - */ - loginWithResourceOwner(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; + /** + * Makes a call to the `oauth/token` endpoint with `password` grant type + * + * @method loginWithDefaultDirectory + * @param {Object} options: https://auth0.com/docs/api-auth/grant/password + * @param {Function} callback + */ + loginWithDefaultDirectory(options: any, callback: Auth0Callback): void; - /** - * Makes a call to the `oauth/token` endpoint with `password-realm` grant type - * @param {any} options - * @param {Function} callback - */ - login(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; + /** + * Makes a call to the `/ro` endpoint + * @param {any} options + * @param {Function} callback + * @deprecated `loginWithResourceOwner` will be soon deprecated, user `login` instead. + */ + loginWithResourceOwner(options: any, callback: Auth0Callback): void; - /** - * Makes a call to the `oauth/token` endpoint - * @param {any} options - * @param {Function} callback - */ - oauthToken(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; + /** + * Makes a call to the `oauth/token` endpoint with `password-realm` grant type + * @param {any} options + * @param {Function} callback + */ + login(options: any, callback: Auth0Callback): void; - /** - * Makes a call to the `/ssodata` endpoint - * - * @method getSSOData - * @param {Boolean} withActiveDirectories - * @param {Function} callback - * @deprecated `getSSOData` will be soon deprecated. - */ - getSSOData(callback?: (error?: Auth0Error, authResult?: any) => any): void; + /** + * Makes a call to the `oauth/token` endpoint + * @param {any} options + * @param {Function} callback + */ + oauthToken(options: any, callback: Auth0Callback): void; - /** - * Makes a call to the `/ssodata` endpoint - * - * @method getSSOData - * @param {Boolean} withActiveDirectories - * @param {Function} callback - * @deprecated `getSSOData` will be soon deprecated. - */ - getSSOData(withActiveDirectories: boolean, callback?: (error?: Auth0Error, authResult?: any) => any): void; + /** + * Makes a call to the `/ssodata` endpoint + * + * @method getSSOData + * @param {Function} callback + */ + getSSOData(callback?: Auth0Callback): void; - /** - * Makes a call to the `/userinfo` endpoint and returns the user profile - * - * @method userInfo - * @param {String} accessToken - * @param {Function} callback - */ - userInfo(token: string, callback: (error?: Auth0Error, user?: any) => any): void; + /** + * Makes a call to the `/ssodata` endpoint + * + * @method getSSOData + * @param {Boolean} withActiveDirectories + * @param {Function} callback + */ + getSSOData(withActiveDirectories: boolean, callback?: Auth0Callback): void; - /** - * Makes a call to the `/delegation` endpoint - * - * @method delegation - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--delegation - * @param {Function} callback - * @deprecated `delegation` will be soon deprecated. - */ - delegation(options: any, callback: (error?: Auth0Error, authResult?: Auth0DelegationToken) => any): any; + /** + * Makes a call to the `/userinfo` endpoint and returns the user profile + * + * @method userInfo + * @param {String} accessToken + * @param {Function} callback + */ + userInfo(token: string, callback: Auth0Callback): void; - /** - * Fetches the user country based on the ip. - * - * @method getUserCountry - * @param {Function} callback - */ - getUserCountry(callback: (error?: Auth0Error, result?: any) => any): void; - } - - export class PasswordlessAuthentication { - constructor(request: any, option: any); - - /** - * Builds and returns the passwordless TOTP verify url in order to initialize a new authN/authZ transaction - * - * @method buildVerifyUrl - * @param {Object} options - * @param {Function} callback - */ - buildVerifyUrl(options: any): string; - - /** - * Initializes a new passwordless authN/authZ transaction - * - * @method start - * @param {Object} options: https://auth0.com/docs/api/authentication#passwordless - * @param {Function} callback - */ - start(options: PasswordlessStartOptions, callback: any): void; - - /** - * Verifies the passwordless TOTP and returns an error if any. - * - * @method buildVerifyUrl - * @param {Object} options - * @param {Function} callback - */ - verify(options: any, callback: any): void; - } - - export class DBConnection { - constructor(request: any, option: any); - - /** - * Signup a new user - * - * @method signup - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} calback - */ - signup(options: any, callback: any): void; - - /** - * Initializes the change password flow - * - * @method signup - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password - * @param {Function} callback - */ - changePassword(options: ChangePasswordOptions, callback: any): void; - } - - export class Management { - constructor(options: ManagementOptions); - - /** - * Returns the user profile. https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id - * - * @method getUser - * @param {String} userId - * @param {Function} callback - */ - getUser(userId: string, callback: (error?: Auth0Error, user?: any) => any): void; - - /** - * Updates the user metdata. It will patch the user metdata with the attributes sent. - * https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id - * - * @method patchUserMetadata - * @param {String} userId - * @param {Object} userMetadata - * @param {Function} callback - */ - patchUserMetadata(userId: string, userMetadata: any, callback: (error?: Auth0Error, user?: any) => any): void; - - /** - * Link two users. https://auth0.com/docs/api/management/v2#!/Users/post_identities - * - * @method linkUser - * @param {String} userId - * @param {String} secondaryUserToken - * @param {Function} callback - */ - linkUser(userId: string, secondaryUserToken: string, callback: (error?: Auth0Error, user?: any) => any): void; - } - - export class WebAuth { - constructor(options: AuthOptions); - client: Authentication; - popup: Popup; - redirect: Redirect; - - /** - * Redirects to the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction - * - * @method authorize - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db - */ - authorize(options: any): void; - - /** - * Parse the url hash and extract the returned tokens depending on the transaction. - * - * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed - * by the `/.well-known/jwks.json` endpoint. Id tokens signed with other algorithms will not be - * accepted. - * - * @method parseHash - * @param {Object} options: - * @param {String} options.state [OPTIONAL] to verify the response - * @param {String} options.nonce [OPTIONAL] to verify the id_token - * @param {String} options.hash [OPTIONAL] the url hash. If not provided it will extract from window.location.hash - * @param {Function} callback: any(err, token_payload) - */ - parseHash(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; - - /** - * Decodes the id_token and verifies the nonce. - * - * @method validateToken - * @param {String} token - * @param {String} state - * @param {String} nonce - * @param {Function} callback: function(err, {payload, transaction}) - */ - validateToken(token: string, state: string, nonce: string, callback: any): void; - - /** - * Executes a silent authentication transaction under the hood in order to fetch a new token. - * - * @method renewAuth - * @param {Object} options: any valid oauth2 parameter to be sent to the `/authorize` endpoint - * @param {Function} callback - */ - renewAuth(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; - - /** - * Initialices a change password transaction - * - * @method changePassword - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password - * @param {Function} callback - */ - changePassword(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; - - /** - * Signs up a new user - * - * @method signup - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} callback - */ - signup(options: any, callback: any): void; - - /** - * Signs up a new user, automatically logs the user in after the signup and returns the user token. - * The login will be done using /oauth/token with password-realm grant type. - * - * @method signupAndAuthorize - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} callback - */ - signupAndAuthorize(options: any, callback: (error?: Auth0Error, authResult?: any) => any): void; - - /** - * Redirects to the auth0 logout page - * - * @method logout - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--v2-logout - */ - logout(options: any): void; - - passwordlessStart(options: PasswordlessStartOptions, callback: (error?: Auth0Error, data?: any) => any): void; - - /** - * Verifies the passwordless TOTP and redirects to finish the passwordless transaction - * - * @method passwordlessVerify - * @param {Object} options: - * @param {Object} options.type: `sms` or `email` - * @param {Object} options.phoneNumber: only if type = sms - * @param {Object} options.email: only if type = email - * @param {Object} options.connection: the connection name - * @param {Object} options.verificationCode: the TOTP code - * @param {Function} callback - */ - passwordlessVerify(options: any, callback: any): void; - } - - export class Redirect { - constructor(client: any, options: any); - - /** - * Initializes the legacy Lock login flow in a popup - * - * @method loginWithCredentials - * @param {Object} options - * @param {Function} callback - * @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead. - */ - loginWithCredentials(options: any, callback: any): void; - - /** - * Signs up a new user and automatically logs the user in after the signup. - * - * @method signupAndLogin - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} callback - */ - signupAndLogin(options: any, callback: any): void; - } - - export class Popup { - constructor(client: any, options: any); - - /** - * Initializes the popup window and returns the instance to be used later in order to avoid being blocked by the browser. - * - * @method preload - * @param {Object} options: receives the window height and width and any other window feature to be sent to window.open - */ - preload(options: any): any; - - /** - * Internal use. - * - * @method getPopupHandler - */ - getPopupHandler(options: any, preload: boolean): any; - /** - * Opens in a popup the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction - * - * @method authorize - * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db - * @param {Function} callback - */ - authorize(options: any, callback: any): void; - - /** - * Initializes the legacy Lock login flow in a popup - * - * @method loginWithCredentials - * @param {Object} options - * @param {Function} callback - * @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead. - */ - loginWithCredentials(options: any, callback: any): void; - - /** - * Verifies the passwordless TOTP and returns the requested token - * - * @method passwordlessVerify - * @param {Object} options: - * @param {Object} options.type: `sms` or `email` - * @param {Object} options.phoneNumber: only if type = sms - * @param {Object} options.email: only if type = email - * @param {Object} options.connection: the connection name - * @param {Object} options.verificationCode: the TOTP code - * @param {Function} callback - */ - passwordlessVerify(options: any, callback: any): void; - - /** - * Signs up a new user and automatically logs the user in after the signup. - * - * @method signupAndLogin - * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup - * @param {Function} callback - */ - signupAndLogin(options: any, callback: any): void; - } - - interface ManagementOptions { - domain: string; - token: string; - _sendTelemetry?: boolean; - _telemetryInfo?: any; - } - - interface AuthOptions { - domain: string; - clientID: string; - responseType?: string; - responseMode?: string; - redirectUri?: string; - scope?: string; - audience?: string; - leeway?: number; - _disableDeprecationWarnings?: boolean; - _sendTelemetry?: boolean; - _telemetryInfo?: any; - } - - interface PasswordlessAuthOptions { - connection: string; - verificationCode: string; - phoneNumber: string; - email: string; - } - - interface Auth0Error { - error: any; - errorDescription: string; - } - - interface Auth0DecodedHash { - accessToken?: string; - idToken?: string; - idTokenPayload?: any; - refreshToken?: string; - state?: string; - expiresIn?: number; - tokenType?: string; - } - - /** Represents the response from an API Token Delegation request. */ - interface Auth0DelegationToken { - /** The length of time in seconds the token is valid for. */ - ExpiresIn: number; - /** The JWT for delegated access. */ - idToken: string; - /** The type of token being returned. Possible values: "Bearer" */ - tokenType: string; - } - - interface ChangePasswordOptions { - connection: string; - email: string; - password?: string; - } - - interface PasswordlessStartOptions { - connection: string; - send: string; - phoneNumber?: string; - email?: string; - authParams?: any; - } - - interface PasswordlessVerifyOptions { - connection: string; - verificationCode: string; - phoneNumber?: string; - email?: string; - } + /** + * Makes a call to the `/delegation` endpoint + * + * @method delegation + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--delegation + * @param {Function} callback + */ + delegation(options: any, callback: Auth0Callback): any; + /** + * Fetches the user country based on the ip. + * + * @method getUserCountry + * @param {Function} callback + */ + getUserCountry(callback: Auth0Callback<{ countryCode: string }>): void; +} + +export class PasswordlessAuthentication { + constructor(request: any, option: any); + + /** + * Builds and returns the passwordless TOTP verify url in order to initialize a new authN/authZ transaction + * + * @method buildVerifyUrl + * @param {Object} options + * @param {Function} callback + */ + buildVerifyUrl(options: any): string; + + /** + * Initializes a new passwordless authN/authZ transaction + * + * @method start + * @param {Object} options: https://auth0.com/docs/api/authentication#passwordless + * @param {Function} callback + */ + start(options: PasswordlessStartOptions, callback: Auth0Callback): void; + + /** + * Verifies the passwordless TOTP and returns an error if any. + * + * @method buildVerifyUrl + * @param {Object} options + * @param {Function} callback + */ + verify(options: any, callback: Auth0Callback): void; +} + +export class DBConnection { + constructor(request: any, option: any); + + /** + * Signup a new user + * + * @method signup + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {Function} calback + */ + signup(options: any, callback: Auth0Callback): void; + + /** + * Initializes the change password flow + * + * @method signup + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password + * @param {Function} callback + */ + changePassword(options: ChangePasswordOptions, callback: Auth0Callback): void; +} + +export class Management { + constructor(options: ManagementOptions); + + /** + * Returns the user profile. https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id + * + * @method getUser + * @param {String} userId + * @param {Function} callback + */ + getUser(userId: string, callback: Auth0Callback): void; + + /** + * Updates the user metdata. It will patch the user metdata with the attributes sent. + * https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id + * + * @method patchUserMetadata + * @param {String} userId + * @param {Object} userMetadata + * @param {Function} callback + */ + patchUserMetadata(userId: string, userMetadata: any, callback: Auth0Callback): void; + + /** + * Link two users. https://auth0.com/docs/api/management/v2#!/Users/post_identities + * + * @method linkUser + * @param {String} userId + * @param {String} secondaryUserToken + * @param {Function} callback + */ + linkUser(userId: string, secondaryUserToken: string, callback: Auth0Callback): void; +} + +export class WebAuth { + constructor(options: AuthOptions); + client: Authentication; + popup: Popup; + redirect: Redirect; + + /** + * Redirects to the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction + * + * @method authorize + * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db + */ + authorize(options: any): void; + + /** + * Parse the url hash and extract the returned tokens depending on the transaction. + * + * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed + * by the `/.well-known/jwks.json` endpoint. Id tokens signed with other algorithms will not be + * accepted. + * + * @method parseHash + * @param {Object} options: + * @param {String} options._idTokenVerification [OPTIONAL] Default: true + * @param {String} options.state [OPTIONAL] to verify the response + * @param {String} options.nonce [OPTIONAL] to verify the id_token + * @param {String} options.hash [OPTIONAL] the url hash. If not provided it will extract from window.location.hash + * @param {Function} callback: any(err, token_payload) + */ + parseHash(options: any, callback: Auth0Callback): void; + + /** + * Decodes the id_token and verifies the nonce. + * + * @method validateToken + * @param {String} token + * @param {String} state + * @param {String} nonce + * @param {Function} callback: function(err, {payload, transaction}) + */ + validateToken(token: string, state: string, nonce: string, callback: Auth0Callback): void; + + /** + * Executes a silent authentication transaction under the hood in order to fetch a new token. + * + * @method renewAuth + * @param {Object} options: any valid oauth2 parameter to be sent to the `/authorize` endpoint + * @param {Function} callback + */ + renewAuth(options: any, callback: Auth0Callback): void; + + /** + * Initialices a change password transaction + * + * @method changePassword + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password + * @param {Function} callback + */ + changePassword(options: any, callback: Auth0Callback): void; + + /** + * Signs up a new user + * + * @method signup + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {Function} callback + */ + signup(options: any, callback: Auth0Callback): void; + + /** + * Signs up a new user, automatically logs the user in after the signup and returns the user token. + * The login will be done using /oauth/token with password-realm grant type. + * + * @method signupAndAuthorize + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {Function} callback + */ + signupAndAuthorize(options: any, callback: Auth0Callback): void; + + /** + * Redirects to the auth0 logout page + * + * @method logout + * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--v2-logout + */ + logout(options: any): void; + + /** + * Initialices a passwordless authentication transaction + * + * @method passwordlessStart + * @param {Object} options: https://auth0.com/docs/api/authentication#passwordless + * @param {Object} options.send: `link` or `code` + * @param {Object} options.phoneNumber: send should be code and email not set + * @param {Object} options.email: phoneNumber should be ignored + * @param {Object} options.connection + * @param {Object} options.authParams + * @param {Function} callback + */ + passwordlessStart(options: PasswordlessStartOptions, callback: Auth0Callback): void; + + /** + * Verifies the passwordless TOTP and redirects to finish the passwordless transaction + * + * @method passwordlessVerify + * @param {Object} options: + * @param {Object} options.type: `sms` or `email` + * @param {Object} options.phoneNumber: only if type = sms + * @param {Object} options.email: only if type = email + * @param {Object} options.connection: the connection name + * @param {Object} options.verificationCode: the TOTP code + * @param {Function} callback + */ + passwordlessVerify(options: any, callback: Auth0Callback): void; +} + +export class Redirect { + constructor(client: any, options: any); + + /** + * Initializes the legacy Lock login flow in a popup + * + * @method loginWithCredentials + * @param {Object} options + * @param {Function} callback + * @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead. + */ + loginWithCredentials(options: any, callback: Auth0Callback): void; + + /** + * Signs up a new user and automatically logs the user in after the signup. + * + * @method signupAndLogin + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {Function} callback + */ + signupAndLogin(options: any, callback: Auth0Callback): void; +} + +export class Popup { + constructor(client: any, options: any); + + /** + * Returns a new instance of the popup handler + * + * @method buildPopupHandler + */ + buildPopupHandler(): any; + + /** + * Initializes the popup window and returns the instance to be used later in order to avoid being blocked by the browser. + * + * @method preload + * @param {Object} options: receives the window height and width and any other window feature to be sent to window.open + */ + preload(options: any): any; + + /** + * Opens in a popup the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction + * + * @method authorize + * @param {Object} options: https://auth0.com/docs/api/authentication#!#get--authorize_db + * @param {Function} callback + */ + authorize(options: any, callback: Auth0Callback): void; + + /** + * Initializes the legacy Lock login flow in a popup + * + * @method loginWithCredentials + * @param {Object} options + * @param {Function} callback + * @deprecated `webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead. + */ + loginWithCredentials(options: any, callback: Auth0Callback): void; + + /** + * Verifies the passwordless TOTP and returns the requested token + * + * @method passwordlessVerify + * @param {Object} options: + * @param {Object} options.type: `sms` or `email` + * @param {Object} options.phoneNumber: only if type = sms + * @param {Object} options.email: only if type = email + * @param {Object} options.connection: the connection name + * @param {Object} options.verificationCode: the TOTP code + * @param {Function} callback + */ + passwordlessVerify(options: any, callback: Auth0Callback): void; + + /** + * Signs up a new user and automatically logs the user in after the signup. + * + * @method signupAndLogin + * @param {Object} options: https://auth0.com/docs/api/authentication#!#post--dbconnections-signup + * @param {Function} callback + */ + signupAndLogin(options: any, callback: Auth0Callback): void; +} + +type Auth0Callback = (error: null | Auth0Error, result: T) => void; + +interface ManagementOptions { + domain: string; + token: string; + _sendTelemetry?: boolean; + _telemetryInfo?: any; +} + +interface AuthOptions { + domain: string; + clientID: string; + responseType?: string; + responseMode?: string; + redirectUri?: string; + scope?: string; + audience?: string; + leeway?: number; + plugins?: any[]; + _disableDeprecationWarnings?: boolean; + _sendTelemetry?: boolean; + _telemetryInfo?: any; +} + +interface PasswordlessAuthOptions { + connection: string; + verificationCode: string; + phoneNumber: string; + email: string; +} + +interface Auth0Error { + error?: any; + errorDescription?: string; + code?: string; + description?: string; + name?: string; + policy?: string; + original?: any; + statusCode?: number; + statusText?: string; +} + +interface Auth0DecodedHash { + accessToken?: string; + idToken?: string; + idTokenPayload?: any; + refreshToken?: string; + state?: string; + expiresIn?: number; + tokenType?: string; +} + +/** Represents the response from an API Token Delegation request. */ +interface Auth0DelegationToken { + /** The length of time in seconds the token is valid for. */ + expiresIn: number; + /** The JWT for delegated access. */ + idToken: string; + /** The type of token being returned. Possible values: "Bearer" */ + tokenType: string; +} + +interface ChangePasswordOptions { + connection: string; + email: string; + password?: string; +} + +interface PasswordlessStartOptions { + connection: string; + send: string; + phoneNumber?: string; + email?: string; + authParams?: any; +} + +interface PasswordlessVerifyOptions { + connection: string; + verificationCode: string; + phoneNumber?: string; + email?: string; +} + +interface Auth0UserProfile { + name: string; + nickname: string; + picture: string; + user_id: string; + username?: string; + given_name?: string; + family_name?: string; + email?: string; + email_verified?: string; + clientID: string; + gender?: string; + locale?: string; + identities: Auth0Identity[]; + created_at: string; + updated_at: string; + sub: string; + user_metadata?: any; + app_metadata?: any; +} + +interface MicrosoftUserProfile extends Auth0UserProfile { + emails?: string[]; //optional depending on whether email addresses permission is granted +} + +interface Office365UserProfile extends Auth0UserProfile { + tenantid: string; + upn: string; +} + +interface AdfsUserProfile extends Auth0UserProfile { + issuer?: string; +} + +interface Auth0Identity { + connection: string; + isSocial: boolean; + provider: string; + user_id: string; } diff --git a/auth0-lock/auth0-lock-tests.ts b/auth0-lock/auth0-lock-tests.ts index 8045386586..a241eb6d0c 100644 --- a/auth0-lock/auth0-lock-tests.ts +++ b/auth0-lock/auth0-lock-tests.ts @@ -1,4 +1,4 @@ -import 'auth0-js/v7'; +import * as auth0 from 'auth0-js'; import Auth0Lock from 'auth0-lock'; const CLIENT_ID = "YOUR_AUTH0_APP_CLIENTID"; @@ -38,7 +38,7 @@ lock.show(showOptions); // "on" event-driven example lock.on("authenticated", function(authResult : any) { - lock.getProfile(authResult.idToken, function(error, profile) { + lock.getProfile(authResult.idToken, function(error: auth0.Auth0Error, profile: auth0.Auth0UserProfile) { if (error) { // Handle error return; diff --git a/auth0-lock/index.d.ts b/auth0-lock/index.d.ts index 09c3f4fedd..285ad25288 100644 --- a/auth0-lock/index.d.ts +++ b/auth0-lock/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for auth0-lock 10.9 +// Type definitions for auth0-lock 10.10 // Project: http://auth0.com // Definitions by: Brian Caruso // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// interface Auth0LockAdditionalSignUpFieldOption { value: string; @@ -11,13 +11,13 @@ interface Auth0LockAdditionalSignUpFieldOption { } type Auth0LockAdditionalSignUpFieldOptionsCallback = - (error: Auth0Error, options: Auth0LockAdditionalSignUpFieldOption[]) => void; + (error: auth0.Auth0Error, options: Auth0LockAdditionalSignUpFieldOption[]) => void; type Auth0LockAdditionalSignUpFieldOptionsFunction = (callback: Auth0LockAdditionalSignUpFieldOptionsCallback) => void; type Auth0LockAdditionalSignUpFieldPrefillCallback = - (error: Auth0Error, prefill: string) => void; + (error: auth0.Auth0Error, prefill: string) => void; type Auth0LockAdditionalSignUpFieldPrefillFunction = (callback: Auth0LockAdditionalSignUpFieldPrefillCallback) => void; @@ -32,8 +32,8 @@ interface Auth0LockAdditionalSignUpField { validator?: (input: string) => { valid: boolean; hint?: string }; } -type Auth0LockAvatarUrlCallback = (error: Auth0Error, url: string) => void; -type Auth0LockAvatarDisplayNameCallback = (error: Auth0Error, displayName: string) => void; +type Auth0LockAvatarUrlCallback = (error: auth0.Auth0Error, url: string) => void; +type Auth0LockAvatarDisplayNameCallback = (error: auth0.Auth0Error, displayName: string) => void; interface Auth0LockAvatarOptions { url: (email: string, callback: Auth0LockAvatarUrlCallback) => void; @@ -63,6 +63,7 @@ interface Auth0LockAuthOptions { redirectUrl?: string; responseType?: string; sso?: boolean; + audience?: string; } interface Auth0LockPopupOptions { @@ -101,6 +102,7 @@ interface Auth0LockConstructorOptions { socialButtonStyle?: "big" | "small"; theme?: Auth0LockThemeOptions; usernameStyle?: string; + oidcConformant?: boolean; } interface Auth0LockFlashMessageOptions { @@ -123,15 +125,16 @@ interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; // deprecated - getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void): void; - getUserInfo(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void): void; - + getProfile(token: string, callback: (error: auth0.Auth0Error, profile: auth0.Auth0UserProfile) => void): void; + getUserInfo(token: string, callback: (error: auth0.Auth0Error, profile: auth0.Auth0UserProfile) => void): void; + // https://github.com/auth0/lock#resumeauthhash-callback + resumeAuth( hash: string, callback: (error: auth0.Auth0Error, authResult: any) => void): void; show(options?: Auth0LockShowOptions): void; hide(): void; logout(query: any): void; on(event: "show" | "hide", callback: () => void): void; - on(event: "unrecoverable_error" | "authorization_error", callback: (error: Auth0Error) => void): void; + on(event: "unrecoverable_error" | "authorization_error", callback: (error: auth0.Auth0Error) => void): void; on(event: "authenticated", callback: (authResult: any) => void): void; on(event: string, callback: (...args: any[]) => void): void; } diff --git a/auth0/auth0-tests.ts b/auth0/auth0-tests.ts index 502a72eec1..24a4aad87d 100644 --- a/auth0/auth0-tests.ts +++ b/auth0/auth0-tests.ts @@ -1,5 +1,3 @@ -/// - import * as auth0 from 'auth0'; const management = new auth0.ManagementClient({ diff --git a/autobahn/autobahn-tests.ts b/autobahn/autobahn-tests.ts index 141a43547e..d753e960fe 100644 --- a/autobahn/autobahn-tests.ts +++ b/autobahn/autobahn-tests.ts @@ -34,7 +34,7 @@ function test_client() { session.publish('com.myapp.hello', ['Hello, world!']); // 3) register a procedure for remoting - session.register('com.myapp.add2', myInstance.add2); + session.register('com.myapp.add2', myInstance.add2, { invoke: 'roundrobin' }); // 4) call a remote procedure session.call('com.myapp.add2', [2, 3]).then( diff --git a/autobahn/index.d.ts b/autobahn/index.d.ts index e93d3c065f..8a37bdf21b 100644 --- a/autobahn/index.d.ts +++ b/autobahn/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for AutobahnJS v0.9.6 +// Type definitions for AutobahnJS v0.9.7 // Project: http://autobahn.ws/js/ // Definitions by: Elad Zelingher , Andy Hawkins // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -177,6 +177,7 @@ declare namespace autobahn { interface IRegisterOptions { disclose_caller?: boolean; + invoke?: 'single' | 'roundrobin' | 'random' | 'first' | 'last'; } export class Connection { diff --git a/autoprefixer/autoprefixer-tests.ts b/autoprefixer/autoprefixer-tests.ts new file mode 100644 index 0000000000..47ef1cbc08 --- /dev/null +++ b/autoprefixer/autoprefixer-tests.ts @@ -0,0 +1,17 @@ +import * as autopref from 'autoprefixer'; + +const ap: autopref.Transformer = autopref({ + browsers: ['> 5%', 'last 2 versions'], + env: '', + cascade: true, + add: true, + remove: true, + supports: true, + flexbox: true, + grid: true, + stats: {}, +}); +const ap2: autopref.Transformer = autopref({ + flexbox: 'no-2009', +}); +const info: string = ap.info(); diff --git a/autoprefixer/index.d.ts b/autoprefixer/index.d.ts new file mode 100644 index 0000000000..b5249746d1 --- /dev/null +++ b/autoprefixer/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for autoprefixer 6.7 +// Project: https://github.com/postcss/autoprefixer +// Definitions by: Armando Meziat +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Plugin, Transformer as PostcssTransformer } from 'postcss'; + +declare namespace autoprefixer { + interface Options { + browsers?: string[]; + env?: string; + cascade?: boolean; + add?: boolean; + remove?: boolean; + supports?: boolean; + flexbox?: boolean | 'no-2009'; + grid?: boolean; + stats?: any; + } + + interface Transformer extends PostcssTransformer { + info(): string; + } + + interface Autoprefixer extends Plugin { + (opts?: Options): Transformer; + } +} + +declare const autoprefixer: autoprefixer.Autoprefixer; +export = autoprefixer; diff --git a/autoprefixer/package.json b/autoprefixer/package.json new file mode 100644 index 0000000000..aa284a6db8 --- /dev/null +++ b/autoprefixer/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "postcss": "^5.2.15" + } +} diff --git a/autoprefixer/tsconfig.json b/autoprefixer/tsconfig.json new file mode 100644 index 0000000000..244c865adf --- /dev/null +++ b/autoprefixer/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "autoprefixer-tests.ts" + ] +} diff --git a/xmpp-jid/tslint.json b/autoprefixer/tslint.json similarity index 100% rename from xmpp-jid/tslint.json rename to autoprefixer/tslint.json diff --git a/autosize/autosize-tests.ts b/autosize/autosize-tests.ts index a7eea57a62..fa0988be24 100644 --- a/autosize/autosize-tests.ts +++ b/autosize/autosize-tests.ts @@ -1,5 +1,3 @@ -/// - // from a NodeList autosize(document.querySelectorAll('textarea')); diff --git a/awesomplete/awesomplete-tests.ts b/awesomplete/awesomplete-tests.ts index 11abfdcba0..5a33aeb135 100644 --- a/awesomplete/awesomplete-tests.ts +++ b/awesomplete/awesomplete-tests.ts @@ -1,3 +1,5 @@ +import * as Awesomplete from 'awesomplete'; + var input = document.getElementById("myinput"); new Awesomplete(input, {list: "#mylist"}); @@ -11,45 +13,48 @@ var awesomplete = new Awesomplete(input); awesomplete.list = ["Ada", "Java", "JavaScript", "LOLCODE", "Node.js", "Ruby on Rails"]; new Awesomplete(input, { - list: [ - { label: "Belarus", value: "BY" }, - { label: "China", value: "CN" }, - { label: "United States", value: "US" } - ] + list: [ + { label: "Belarus", value: "BY" }, + { label: "China", value: "CN" }, + { label: "United States", value: "US" } + ] }); // Same with arrays: new Awesomplete(input, { - list: [ - [ "Belarus", "BY" ], - [ "China", "CN" ], - [ "United States", "US" ] - ] + list: [ + [ "Belarus", "BY" ], + [ "China", "CN" ], + [ "United States", "US" ] + ] }); new Awesomplete('input[type="email"]', { - list: ["aol.com", "att.net", "comcast.net", "facebook.com", "gmail.com", "gmx.com", "googlemail.com", "google.com", "hotmail.com", "hotmail.co.uk", "mac.com", "me.com", "mail.com", "msn.com", "live.com", "sbcglobal.net", "verizon.net", "yahoo.com", "yahoo.co.uk"], - data: function (text: string, input: any) { - return input.slice(0, input.indexOf("@")) + "@" + text; - }, - filter: Awesomplete.FILTER_STARTSWITH + list: ["aol.com", "att.net", "comcast.net", "facebook.com", "gmail.com", + "gmx.com", "googlemail.com", "google.com", "hotmail.com", + "hotmail.co.uk", "mac.com", "me.com", "mail.com", "msn.com", + "live.com", "sbcglobal.net", "verizon.net", "yahoo.com", "yahoo.co.uk"], + data: (text: string, input: string) => { + return input.slice(0, input.indexOf("@")) + "@" + text; + }, + filter: Awesomplete.FILTER_STARTSWITH }); new Awesomplete('input[data-multiple]', { - filter: function(text: string, input: any) { - return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]); - }, + filter: (text: string, input: any) => { + return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]); + }, - replace: function(text: string) { - var before = this.input.value.match(/^.+,\s*|/)[0]; - this.input.value = before + text + ", "; - } + replace: (text: string) => { + var before = this.input.value.match(/^.+,\s*|/)[0]; + this.input.value = before + text + ", "; + } }); var ajax = new XMLHttpRequest(); ajax.open("GET", "https://restcountries.eu/rest/v1/lang/fr", true); -ajax.onload = function() { - var list = JSON.parse(ajax.responseText).map(function(i: any) { return i.name; }); - new Awesomplete(document.querySelector("#ajax-example input"),{ list: list }); +ajax.onload = () => { + var list = JSON.parse(ajax.responseText).map((i: any) => i.name); + new Awesomplete(document.querySelector("#ajax-example input"), { list }); }; -ajax.send(); \ No newline at end of file +ajax.send(); diff --git a/awesomplete/index.d.ts b/awesomplete/index.d.ts index d39389f008..41abc36be6 100644 --- a/awesomplete/index.d.ts +++ b/awesomplete/index.d.ts @@ -1,49 +1,57 @@ -// Type definitions for Awesomplete v1.1.0 +// Type definitions for Awesomplete 1.1 // Project: https://leaverou.github.io/awesomplete/ -// Definitions by: webbiesdk , Ben Dixon +// Definitions by: webbiesdk , Ben Dixon , Trevor Bekolay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Awesomplete { - constructor(input: Element | HTMLElement | string, o?: AwesompleteOptions); - static all: Array; - static $$: (expr: string | NodeSelector, con?: any) => NodeList; - static ITEM: (text: string, input: string) => HTMLElement; - static $: { - (expr: string|Element, con?: NodeSelector): string | Element; - regExpEscape: (s: { replace: (arg0: RegExp, arg1: string) => void }) => any; - create: (tag: string, o: any) => HTMLElement; - fire: (target: EventTarget, type: string, properties: any) => any; - siblingIndex: (el: Element) => number; - }; - static FILTER_STARTSWITH: (text: string, input: string) => boolean; - static FILTER_CONTAINS: (text: string, input: string) => boolean; - static SORT_BYLENGTH: (a: number | any[], b: number | any[]) => number; - static REPLACE: (text: any) => void; - next: () => void; - container: HTMLElement; - select: (selected?: HTMLElement, originalTarget?: HTMLElement) => void; - previous: () => void; - index: number; - opened: number; - list: string | string[] | Element | { label: string, value: any }[] | [string, string][]; - input: HTMLElement | string; - goto: (i: number) => void; - ul: HTMLElement; - close: () => void; - evaluate: () => void; - selected: boolean; - open: () => void; - status: HTMLElement; + constructor(input: Element | HTMLElement | string, o?: Awesomplete.Options); + static all: any[]; + static $$: (expr: string | NodeSelector, con?: any) => NodeList; + static ITEM: (text: string, input: string) => HTMLElement; + static $: { + (expr: string|Element, con?: NodeSelector): string | Element; + regExpEscape: (s: { replace: (arg0: RegExp, arg1: string) => void }) => any; + create: (tag: string, o: any) => HTMLElement; + fire: (target: EventTarget, type: string, properties: any) => any; + siblingIndex: (el: Element) => number; + }; + static FILTER_STARTSWITH: (text: string, input: string) => boolean; + static FILTER_CONTAINS: (text: string, input: string) => boolean; + static SORT_BYLENGTH: (left: number | any[], right: number | any[]) => number; + static REPLACE: (text: string) => void; + static DATA: (item: Awesomplete.Suggestion) => Awesomplete.Suggestion; + next: () => void; + container: HTMLElement; + select: (selected?: HTMLElement, originalTarget?: HTMLElement) => void; + previous: () => void; + index: number; + opened: number; + list: string | Element | Awesomplete.Suggestion[]; + input: HTMLElement | string; + goto: (i: number) => void; + ul: HTMLElement; + close: () => void; + evaluate: () => void; + selected: boolean; + open: () => void; + status: HTMLElement; } -interface AwesompleteOptions { - list?: string | string[] | Element | { label: string, value: any }[] | [string, string][]; - minChars?: Number; - maxItems?: Number; - autoFirst?: boolean; - data?: Function; - filter?: Function; - sort?: Function; - item?: Function; - replace?: Function; +declare namespace Awesomplete { + type Suggestion = string | {label: string | any, value: string | any} | [string, string]; + + interface Options { + list?: string | string[] | Element | Array<{ label: string, value: any }> | Array<[string, string]>; + minChars?: number; + maxItems?: number; + autoFirst?: boolean; + data?: (item: Suggestion, input: string) => string; + filter?: (text: string, input: string) => boolean; + sort?: (left: number | any[], right: number | any[]) => number; + item?: (text: string, input: string) => HTMLElement; + replace?: (text: string) => void; + } } + +export = Awesomplete; +export as namespace Awesomplete; diff --git a/awesomplete/tslint.json b/awesomplete/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/awesomplete/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/aws-lambda/aws-lambda-tests.ts b/aws-lambda/aws-lambda-tests.ts index fb09beda8a..3aede36d4c 100644 --- a/aws-lambda/aws-lambda-tests.ts +++ b/aws-lambda/aws-lambda-tests.ts @@ -1,5 +1,3 @@ -/// - var str: string = "any string"; var date: Date = new Date(); var anyObj: any = { abc: 123 }; @@ -13,6 +11,51 @@ var clientContextClient: AWSLambda.ClientContextClient; var context: AWSLambda.Context; var identity: AWSLambda.CognitoIdentity; var proxyResult: AWSLambda.ProxyResult; +var snsEvt: AWSLambda.SNSEvent; +var snsEvtRecs: AWSLambda.SNSEventRecord[]; +var snsEvtRec: AWSLambda.SNSEventRecord; +var snsMsg: AWSLambda.SNSMessage; +var snsMsgAttr: AWSLambda.SNSMessageAttribute; +var snsMsgAttrs: AWSLambda.SNSMessageAttributes; +var S3CreateEvent: AWSLambda.S3CreateEvent = { + Records: [{ + eventVersion: 'string', + eventSource: 'string', + awsRegion: 'string', + eventTime: 'string', + eventName: 'string', + userIdentity: { + principalId: 'string' + }, + requestParameters: { + sourceIPAddress: 'string' + }, + responseElements: { + 'x-amz-request-id': 'string', + 'x-amz-id-2': 'string' + }, + s3: { + s3SchemaVersion: 'string', + configurationId: 'string', + bucket: { + name: 'string', + ownerIdentity: { + principalId: 'string' + }, + arn: 'string' + }, + object: { + key: 'string', + size: 1, + eTag: 'string', + versionId: 'string', + sequencer: 'string' + } + } + } + ] +}; + /* API Gateway Event */ str = apiGwEvt.body; @@ -44,10 +87,37 @@ str = apiGwEvt.requestContext.resourceId; str = apiGwEvt.requestContext.resourcePath; str = apiGwEvt.resource; +/* SNS Event */ +snsEvtRecs = snsEvt.Records; + +str = snsEvtRec.EventSource; +str = snsEvtRec.EventSubscriptionArn; +str = snsEvtRec.EventVersion; +snsMsg = snsEvtRec.Sns; + +str = snsMsg.SignatureVersion; +str = snsMsg.Timestamp; +str = snsMsg.Signature; +str = snsMsg.SigningCertUrl; +str = snsMsg.MessageId; +str = snsMsg.Message; +snsMsgAttrs = snsMsg.MessageAttributes; +str = snsMsg.Type; +str = snsMsg.UnsubscribeUrl; +str = snsMsg.TopicArn; +str = snsMsg.Subject; + +snsMsgAttrs["example"] = snsMsgAttr; + +str = snsMsgAttr.Type; +str = snsMsgAttr.Value; + /* Lambda Proxy Result */ num = proxyResult.statusCode; -str = proxyResult.headers["example"]; -str = proxyResult.body +proxyResult.headers["example"] = str; +proxyResult.headers["example"] = b; +proxyResult.headers["example"] = num; +str = proxyResult.body; /* Context */ b = context.callbackWaitsForEmptyEventLoop; @@ -111,5 +181,5 @@ context.fail(error); context.fail(str); /* Handler */ -let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => {}; -let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => {}; +let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; +let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => { }; diff --git a/aws-lambda/index.d.ts b/aws-lambda/index.d.ts index e8b70db7bd..c5e49d54c6 100644 --- a/aws-lambda/index.d.ts +++ b/aws-lambda/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for AWS Lambda // Project: http://docs.aws.amazon.com/lambda -// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy +// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy , Simon Ramsay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // API Gateway "event" @@ -39,6 +39,84 @@ interface APIGatewayEvent { resource: string; } +// SNS "event" +interface SNSMessageAttribute { + Type: string; + Value: string; +} + +interface SNSMessageAttributes { + [name: string]: SNSMessageAttribute; +} + +interface SNSMessage { + SignatureVersion: string; + Timestamp: string; + Signature: string; + SigningCertUrl: string; + MessageId: string; + Message: string; + MessageAttributes: SNSMessageAttributes; + Type: string; + UnsubscribeUrl: string; + TopicArn: string; + Subject: string; +} + +interface SNSEventRecord { + EventVersion: string; + EventSubscriptionArn: string; + EventSource: string; + Sns: SNSMessage; +} + +interface SNSEvent { + Records: Array; +} + +/** + * S3Create event + * https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html + */ +interface S3CreateEvent { + Records: [{ + eventVersion: string; + eventSource: string; + awsRegion: string + eventTime: string; + eventName: string; + userIdentity: { + principalId: string; + }, + requestParameters: { + sourceIPAddress: string; + }, + responseElements: { + 'x-amz-request-id': string; + 'x-amz-id-2': string; + }, + s3: { + s3SchemaVersion: string; + configurationId: string; + bucket: { + name: string; + ownerIdentity: { + principalId: string; + }, + arn: string; + }, + object: { + key: string; + size: number; + eTag: string; + versionId: string; + sequencer: string; + } + } + } + ]; +} + // Context // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html interface Context { @@ -97,7 +175,7 @@ interface ClientContextEnv { interface ProxyResult { statusCode: number; headers?: { - [header: string]: string; + [header: string]: boolean | number | string; }, body: string; } @@ -110,8 +188,8 @@ interface ProxyResult { * @param context – runtime information of the Lambda function that is executing. * @param callback – optional callback to return information to the caller, otherwise return value is null. */ -export type Handler = (event: any, context: Context, callback?: Callback) => void; -export type ProxyHandler = (event: APIGatewayEvent, context: Context, callback?: ProxyCallback) => void; +export type Handler = (event: any, context: Context, callback?: Callback) => void; +export type ProxyHandler = (event: APIGatewayEvent, context: Context, callback?: ProxyCallback) => void; /** * Optional callback parameter. diff --git a/aws-serverless-express/aws-serverless-express-tests.ts b/aws-serverless-express/aws-serverless-express-tests.ts index c46056ed25..97d236e043 100644 --- a/aws-serverless-express/aws-serverless-express-tests.ts +++ b/aws-serverless-express/aws-serverless-express-tests.ts @@ -1,9 +1,10 @@ -/// - import * as awsServerlessExpress from 'aws-serverless-express'; import * as express from 'express'; +import { eventContext } from 'aws-serverless-express/middleware'; const app = express(); +app.use(eventContext()); + const server = awsServerlessExpress.createServer(app, () => {}); const mockEvent = { diff --git a/aws-serverless-express/index.d.ts b/aws-serverless-express/index.d.ts index e4601e6ccd..db49e6ca6b 100644 --- a/aws-serverless-express/index.d.ts +++ b/aws-serverless-express/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for aws-serverless-express +// Type definitions for aws-serverless-express 2.1 // Project: https://github.com/awslabs/aws-serverless-express -// Definitions by: Ben Speakman +// Definitions by: Ben Speakman , Josh Caffey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -16,4 +16,4 @@ export function proxy( server: http.Server, event: any, context: lambda.Context -): void; \ No newline at end of file +): void; diff --git a/aws-serverless-express/middleware.d.ts b/aws-serverless-express/middleware.d.ts new file mode 100644 index 0000000000..ff33b4c6ea --- /dev/null +++ b/aws-serverless-express/middleware.d.ts @@ -0,0 +1,8 @@ +import { RequestHandler } from 'express'; + +export interface Options { + reqPropKey?: string; + deleteHeaders?: boolean; +} + +export function eventContext(options?: Options): RequestHandler; diff --git a/aws-serverless-express/tsconfig.json b/aws-serverless-express/tsconfig.json index a62cead1a1..62885fcda3 100644 --- a/aws-serverless-express/tsconfig.json +++ b/aws-serverless-express/tsconfig.json @@ -17,6 +17,7 @@ }, "files": [ "index.d.ts", + "middleware.d.ts", "aws-serverless-express-tests.ts" ] -} \ No newline at end of file +} diff --git a/aws-serverless-express/tslint.json b/aws-serverless-express/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/aws-serverless-express/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/axel/axel-tests.ts b/axel/axel-tests.ts new file mode 100644 index 0000000000..553973b210 --- /dev/null +++ b/axel/axel-tests.ts @@ -0,0 +1,7 @@ + +import * as axel from 'axel'; + +axel.clear(); +axel.bg(0,255,0); +axel.line(1,1,10,10); +axel.cursor.restore(); diff --git a/axel/index.d.ts b/axel/index.d.ts new file mode 100644 index 0000000000..751e2c33fa --- /dev/null +++ b/axel/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for Axel module +// Project: https://github.com/F1LT3R/axel +// Definitions by: Ruslan Molodyko +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Axel { + brush: string; + rows: number; + cols: number; + cursor: cursorInterface; + + lerp(p1: number, p2: number, m: number): number; + circ(x: number, y: number, m: number): number; + goto(x: number, y: number): void; + scrub(x1: number, y1: number, w: number, h: number): void; + box(x1: number, y1: number, w: number, h: number): void; + point(x: number, y: number, char: string): void; + dist(x1: number, y1: number, x2: number, y2: number): number; + line(x1: number, y1: number, x2: number, y2: number): void; + text(x: number, y: number, text: string): void; + fg(r: number, g: number, b: number): void; + bg(r: number, g: number, b: number): void; + draw(cb: Function): void; + clear(): void; +} + +declare interface cursorInterface { + on(): void; + off(): void; + reset(): void; + restore(): void; +} + +declare module 'axel' { + const instance: Axel; + export = instance; +} diff --git a/axel/tsconfig.json b/axel/tsconfig.json new file mode 100644 index 0000000000..0ac3689676 --- /dev/null +++ b/axel/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "axel-tests.ts", + "index.d.ts" + ] +} \ No newline at end of file diff --git a/b_/b_-tests.ts b/b_/b_-tests.ts new file mode 100644 index 0000000000..c0a92a4c7d --- /dev/null +++ b/b_/b_-tests.ts @@ -0,0 +1,52 @@ +import b_ = require("b_"); + +const blockClass: string = b_("block"); +const blockWithModsClass: string = b_("block", {stringMod: "string", boolMod: true, numberMod: 5}); +const elemClass: string = b_("block", "elem"); +const elemWithModsClass: string = b_("block", "elem", {stringMod: "string", boolMod: true, numberMod: 5}); + +const withBlock = b_.with("block"); +const withBlockClass: string = withBlock(); +const withBlockWithModsClass: string = withBlock({stringMod: "string", boolMod: true, numberMod: 5}); +const withBlockElemClass: string = withBlock("elem"); +const withBlockElemWithModsClass: string = withBlock("elem", {stringMod: "string", boolMod: true, numberMod: 5}); + +const lockBlock = b_.lock("block"); +const lockBlockClass: string = lockBlock(); +const lockBlockWithModsClass: string = lockBlock({stringMod: "string", boolMod: true, numberMod: 5}); +const lockBlockElemClass: string = lockBlock("elem"); +const lockBlockElemWithModsClass: string = lockBlock("elem", {stringMod: "string", boolMod: true, numberMod: 5}); + +const withElem = b_.with("block", "elem"); +const withElemClass: string = withElem(); +const withElemWithModsClass: string = withElem({stringMod: "string", boolMod: true, numberMod: 5}); + +const parameterizedB_ = b_.B({ + tailSpace: " ", + elementSeparator: "-", + modSeparator: "_", + modValueSeparator: "-", + classSeparator: " ", + isFullModifier: true +}); + +const parameterizedBlockClass: string = parameterizedB_("block"); +const parameterizedBlockWithModsClass: string = parameterizedB_("block", {stringMod: "string", boolMod: true, numberMod: 5}); +const parameterizedElemClass: string = parameterizedB_("block", "elem"); +const parameterizedElemWithModsClass: string = parameterizedB_("block", "elem", {stringMod: "string", boolMod: true, numberMod: 5}); + +const parameterizedWithBlock = parameterizedB_.with("block"); +const parameterizedWithBlockClass: string = parameterizedWithBlock(); +const parameterizedWithBlockWithModsClass: string = parameterizedWithBlock({stringMod: "string", boolMod: true, numberMod: 5}); +const parameterizedWithBlockElemClass: string = parameterizedWithBlock("elem"); +const parameterizedWithBlockElemWithModsClass: string = parameterizedWithBlock("elem", {stringMod: "string", boolMod: true, numberMod: 5}); + +const parameterizedLockBlock = parameterizedB_.lock("block"); +const parameterizedLockBlockClass: string = parameterizedLockBlock(); +const parameterizedLockBlockWithModsClass: string = parameterizedLockBlock({stringMod: "string", boolMod: true, numberMod: 5}); +const parameterizedLockBlockElemClass: string = parameterizedLockBlock("elem"); +const parameterizedLockBlockElemWithModsClass: string = parameterizedLockBlock("elem", {stringMod: "string", boolMod: true, numberMod: 5}); + +const parameterizedWithElem = parameterizedB_.with("block", "elem"); +const parameterizedWithElemClass: string = parameterizedWithElem(); +const parameterizedWithElemWithModsClass: string = parameterizedWithElem({stringMod: "string", boolMod: true, numberMod: 5}); diff --git a/b_/index.d.ts b/b_/index.d.ts new file mode 100644 index 0000000000..fe59f2d72e --- /dev/null +++ b/b_/index.d.ts @@ -0,0 +1,40 @@ +// Type definitions for b_ 1.3 +// Project: https://github.com/azproduction/b_ +// Definitions by: Vasya Aksyonov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Options { + tailSpace?: string; + elementSeparator?: string; + modSeparator?: string; + modValueSeparator?: string; + classSeparator?: string; + isFullModifier?: boolean; +} + +interface Mods { + [name: string]: any; +} + +interface Formatter { + (block: string, mods?: Mods): string; + (block: string, elem: string, mods?: Mods): string; + + with(block: string): BlockFormatter; + with(block: string, elem: string): ElemFormatter; + + lock(block: string): BlockFormatter; + lock(block: string, elem: string): ElemFormatter; + + B(options: Options): Formatter; +} + +interface BlockFormatter { + (mods?: Mods): string; + (elem: string, mods?: Mods): string; +} + +type ElemFormatter = (mods?: Mods) => string; + +declare const formatter: Formatter; +export = formatter; diff --git a/b_/tsconfig.json b/b_/tsconfig.json new file mode 100644 index 0000000000..5271d3aeeb --- /dev/null +++ b/b_/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "b_-tests.ts" + ] +} diff --git a/b_/tslint.json b/b_/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/b_/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/babel-template/babel-template-tests.ts b/babel-template/babel-template-tests.ts index b5d4547188..31e3bd44d9 100644 --- a/babel-template/babel-template-tests.ts +++ b/babel-template/babel-template-tests.ts @@ -1,7 +1,4 @@ - /// -/// - // Example from https://github.com/babel/babel/tree/master/packages/babel-template import template = require('babel-template'); diff --git a/babel-traverse/babel-traverse-tests.ts b/babel-traverse/babel-traverse-tests.ts index 3779852c5f..98afbbc0a7 100644 --- a/babel-traverse/babel-traverse-tests.ts +++ b/babel-traverse/babel-traverse-tests.ts @@ -1,5 +1,3 @@ - -/// /// diff --git a/babylon/babylon-tests.ts b/babylon/babylon-tests.ts index bb95625935..769d635e89 100644 --- a/babylon/babylon-tests.ts +++ b/babylon/babylon-tests.ts @@ -1,8 +1,3 @@ - -/// -/// - - // Example from https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babylon import * as babylon from "babylon"; declare function assert(expr: boolean): void; diff --git a/babylon/index.d.ts b/babylon/index.d.ts index 45b929264d..4400a8f1a0 100644 --- a/babylon/index.d.ts +++ b/babylon/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for babylon v6.7 +// Type definitions for babylon v6.16.1 // Project: https://github.com/babel/babylon // Definitions by: Troy Gerwien // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -41,7 +41,17 @@ export interface BabylonOptions { plugins?: PluginName[]; } -export type PluginName = 'jsx' | 'flow' | 'asyncFunctions' | 'classConstructorCall' | 'doExpressions' - | 'trailingFunctionCommas' | 'objectRestSpread' | 'decorators' | 'classProperties' | 'exportExtensions' - | 'exponentiationOperator' | 'asyncGenerators' | 'functionBind' | 'functionSent' | '*'; - +export type PluginName = + 'estree' | + 'jsx' | + 'flow' | + 'classConstructorCall' | + 'doExpressions' | + 'objectRestSpread' | + 'decorators' | + 'classProperties' | + 'exportExtensions' | + 'asyncGenerators' | + 'functionBind' | + 'functionSent' | + 'dynamicImport'; diff --git a/backbone.layoutmanager/backbone.layoutmanager-tests.ts b/backbone.layoutmanager/backbone.layoutmanager-tests.ts index fe11ce9b18..edddb8352b 100644 --- a/backbone.layoutmanager/backbone.layoutmanager-tests.ts +++ b/backbone.layoutmanager/backbone.layoutmanager-tests.ts @@ -1,5 +1,3 @@ -/// - import * as Backbone from 'backbone'; // Example code. @@ -26,7 +24,7 @@ class View extends Backbone.Layout { "mouseleave": "removeElement" } } - + wrapElement(): void { this.$el.wrap(""); } diff --git a/backbone.marionette/backbone.marionette-tests.ts b/backbone.marionette/backbone.marionette-tests.ts index b5eb9d07c6..2c1f5b68bd 100644 --- a/backbone.marionette/backbone.marionette-tests.ts +++ b/backbone.marionette/backbone.marionette-tests.ts @@ -66,11 +66,11 @@ namespace MarionetteTests { let regions: {[key: string]: Marionette.Region} = this.layoutView.getRegions(); let prefix: string = this.layoutView.childViewEventPrefix; let region: Marionette.Region = this.layoutView.removeRegion('main'); - let layout: Marionette.LayoutView = this.layoutView.destroy(); + let layout: Marionette.View = this.layoutView.destroy(); } } - class AppLayoutView extends Marionette.LayoutView { + class AppLayoutView extends Marionette.View { constructor() { super({ el: 'body' }); } @@ -111,7 +111,7 @@ namespace MarionetteTests { } - class MyView extends Marionette.ItemView { + class MyView extends Marionette.View { behaviors: any; constructor(model: MyModel) { @@ -189,7 +189,7 @@ namespace MarionetteTests { constructor() { super(); this.childView = MyView; - this.childEvents = { + this.childViewEvents = { render: function () { console.log("a childView has been rendered"); } diff --git a/backbone.marionette/index.d.ts b/backbone.marionette/index.d.ts index edaab2c2d6..d24f9d64f9 100644 --- a/backbone.marionette/index.d.ts +++ b/backbone.marionette/index.d.ts @@ -4,6 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Backbone from 'backbone'; +import * as Radio from 'backbone.radio'; export as namespace Marionette; export = Marionette; @@ -22,8 +23,6 @@ declare module 'backbone' { findByIndex(index: number): TView; findByCid(cid: string): TView; remove(view: TView): void; - call(method: any): void; - apply(method: any, args?: any[]): void; //mixins from Collection (copied from Backbone's Collection declaration) @@ -180,6 +179,27 @@ declare namespace Marionette { * backbone conventions and utilities like initialize and Backbone.Events. */ class Object extends Backbone.Events { + + /** + * Defines the Radio channel that will be used for the requests and/or events + */ + channelName: string; + + /** + * Returns a Radio.Channel instance using 'channelName' + */ + getChannel(): Backbone.Radio.Channel; + + /** + * Defines an events hash with the events to be listened and its respective handlers + */ + radioEvents: any; + + /** + * Defines an events hash with the requests to be replied and its respective handlers + */ + radioRequests: any; + /** * Initialize is called immediately after the Object has been instantiated, * and is invoked with the same arguments that the constructor received. @@ -750,7 +770,7 @@ declare namespace Marionette { /** * View implements a destroy method, which is called by the region managers automatically. As part of the implementation. */ - destroy(...args: any[]): void; + destroy(...args: any[]): View; /** * In several cases you need to access ui elements inside the view to @@ -772,12 +792,37 @@ declare namespace Marionette { triggerMethod(name: string, ...args: any[]): any; /** - * Called on the view instance when the view has been rendered and - * displayed. This event can be used to react to when a view has been - * shown via a region. A common use case for the onShow method is to - * use it to add children views. + * Item views will serialize a model or collection, by default, by calling + * .toJSON on either the model or collection. If both a model and + * collection are attached to an item view, the model will be used as the + * data source. The results of the data serialization will be passed to + * the template that is rendered. + * + * If you need custom serialization for your data, you can provide a serializeData + * method on your view. It must return a valid JSON object, as if you had + * called .toJSON on a model or collection. */ - onShow(): void; + serializeData(): any; + + /** + * Renders the view. It is unwise to override the render method of any + * Marionette view. Instead, you should use the onBeforeRender and + * onRender callbacks to layer in additional functionality to the + * rendering of your view. + */ + render(): any; + + /** + * Triggered before an ItemView is rendered. + */ + onBeforeRender(): void; + + /** + * Triggered after the view has been rendered. You can implement this in + * your view to provide custom code for dealing with the view's el after + * it has been rendered. + */ + onRender(): void; /** * Triggered just after the view has been destroyed. @@ -814,49 +859,65 @@ declare namespace Marionette { isDestroyed: boolean; supportsRenderLifecycle: boolean; supportsDestroyLifecycle: boolean; - } - - /** - * An ItemView is a view that represents a single item. That item may be - * a Backbone.Model or may be a Backbone.Collection. Whichever it is though, - * it will be treated as a single item. - */ - class ItemView extends View { - - constructor(options?: Backbone.ViewOptions); /** - * Item views will serialize a model or collection, by default, by calling - * .toJSON on either the model or collection. If both a model and - * collection are attached to an item view, the model will be used as the - * data source. The results of the data serialization will be passed to - * the template that is rendered. - * - * If you need custom serialization for your data, you can provide a serializeData - * method on your view. It must return a valid JSON object, as if you had - * called .toJSON on a model or collection. + * If you have the need to replace the Region with a region class of your + * own implementation, you can specify an alternate class to use with this + * property. */ - serializeData(): any; + regionClass: any; /** - * Renders the view. It is unwise to override the render method of any - * Marionette view. Instead, you should use the onBeforeRender and - * onRender callbacks to layer in additional functionality to the - * rendering of your view. - */ - render(): ItemView; + * Regions hash or a method returning the regions hash that maps + * regions/selectors to methods on your View. + **/ + regions(): any; + + /** Adds a region to the layout view. */ + addRegion(name: string, definition: any): Region; /** - * Triggered before an ItemView is rendered. + * Add multiple regions as a {name: definition, name2: def2} object literal. */ - onBeforeRender(): void; + addRegions(regions: any): any; + + /** Returns a region from the layout view */ + getRegion(name: string): Region; /** - * Triggered after the view has been rendered. You can implement this in - * your view to provide custom code for dealing with the view's el after - * it has been rendered. + * Removes the region with the specified name. + * @param name the name of the region to remove. */ - onRender(): void; + removeRegion(name: string): Region; + + /** Enable easy overriding of the default `RegionManager` + * for customized region interactions and business specific + * view logic for better control over single regions. + */ + getRegionManager(): RegionManager; + + /** + * Show a view into the region specified by `regionName`. + */ + showChildView(regionName: string, view: any, options?: RegionShowOptions): void; + + /** + * Get the current view that is shown in the region specified by + * `regionName`. + */ + getChildView(regionName: string): Backbone.View; + + /** + * Returns all regions from the layout view. The results contains an + * Object hash that has `string`s as keys and `Region`s as values. + */ + getRegions(): {[key: string]: Region}; + + /** + * You can customize the event prefix for events that are forwarded through + * the layout view with this property. + */ + childViewEventPrefix: string; } @@ -928,12 +989,12 @@ declare namespace Marionette { childViewEventPrefix: string; /** - * You can specify a childEvents hash or method which allows you to - * capture all bubbling childEvents without having to manually set bindings. + * You can specify a childViewEvents hash or method which allows you to + * capture all bubbling childViewEvents without having to manually set bindings. * The keys of the hash can either be a function or a string that is the * name of a method on the collection view. */ - childEvents: any; + childViewEvents: any; /** * When a collection has no children, and you need to render a view other than @@ -1034,37 +1095,9 @@ declare namespace Marionette { */ attachHtml(collectionView: CollectionView, childView: TView, index: number): void; - /** - * The value returned by this method is the ChildView class that will be - * instantiated when a Model needs to be initially rendered. This method - * also gives you the ability to customize per Model ChildViews. - */ - getChildView(item: M): new (...args:any[]) => TView; - - /** - * If you need the emptyView's class chosen dynamically, specify - * getEmptyView. - */ - getEmptyView(): any; - /** Serialize a collection by serializing each of its models. */ serializeCollection(): any; - /** - * Attaches the content of a given view. - * This method can be overridden to optimize rendering, - * or to render in a non standard way. - * - * For example, using `innerHTML` instead of `$el.html` - * - * @example - * attachElContent: function(html) { - * this.el.innerHTML = html; - * return this; - * } - */ - attachElContent(html: string): ItemView; - /** * Reorder DOM after sorting. When your element's rendering * do not use their index, you can pass reorderOnSort: true @@ -1132,165 +1165,6 @@ declare namespace Marionette { onRemoveChild(childView: TView): void; } - /** - * A CompositeView extends from CollectionView to be used as a composite view - * for scenarios where it should represent both a branch and leaf in a tree - * structure, or for scenarios where a collection needs to be rendered within - * a wrapper template. - */ - class CompositeView> extends CollectionView { - - constructor(options?: CollectionViewOptions); - - /** - * Each childView will be rendered using the childView's template. The - * CompositeView's template is rendered and the childView's templates are - * added to this. - */ - childView: new (...args:any[]) => TView; - - /** - * By default the composite view uses the same attachHtml method that the - * collection view provides. This means the view will call jQuery's - * .append to move the HTML contents from the child view instance in to - * the collection view's el. - * This is typically not very useful as a composite view will usually render - * a container DOM element in which the child views should be placed. - * This can be either a string or a function returning a string. - */ - childViewContainer: any; - - /** - * Renders the view. - */ - render(): CompositeView; - - /** - * Invoked before the model has been rendered - */ - onBeforeRenderTemplate(): void; - - /** - * Invoked after the model has been rendered. - */ - onRenderTemplate(): void; - - /** - * Invoked before the collection of models is rendered - */ - onBeforeRenderCollection(): void; - - /** - * Invoked after the collection of models has been rendered - */ - onRenderCollection(): void; - } - - interface LayoutViewOptions extends Backbone.ViewOptions { - /** - * The LayoutView takes an additional parameter where you can pass the regions as option on creation. - */ - regions?:any; - - /** - * This option removes the layoutView from the DOM before destroying the - * children preventing repaints as each option is removed. However, it - * makes it difficult to do close animations for a child view (false by - * default) - */ - destroyImmediate?: boolean; - } - - /** - * A LayoutView is a hybrid of an ItemView and a collection of Region objects. - * They are ideal for rendering application layouts with multiple sub-regions - * managed by specified region managers. - * A layoutView can also act as a composite-view to aggregate multiple views - * and sub-application areas of the screen allowing applications to attach - * multiple region managers to dynamically rendered HTML. - * You can create complex views by nesting layoutView managers within Regions. - */ - class LayoutView extends ItemView { - /** - * If you have the need to replace the Region with a region class of your - * own implementation, you can specify an alternate class to use with this - * property. - */ - regionClass: any; - - /** - * Constructor. - * A hash that can contain a regions hash that allows you to specify regions per - * LayoutView instance. - */ - constructor(options?: LayoutViewOptions); - - /** - * Handle destroying regions, and then destroy the view itself. - */ - destroy(): LayoutView; - - /** - * Regions hash or a method returning the regions hash that maps - * regions/selectors to methods on your View. - **/ - regions(): any; - - /** Adds a region to the layout view. */ - addRegion(name: string, definition: any): Region; - - /** - * Add multiple regions as a {name: definition, name2: def2} object literal. - */ - addRegions(regions: any): any; - - /** Returns a region from the layout view */ - getRegion(name: string): Region; - - /** - * Renders the view. It will use the existing region objects the first - * time it is called. Subsequent calls will destroy the views that the - * regions are showing and then reset the `el` for the regions to the - * newly rendered DOM elements. - */ - render(): LayoutView; - - /** - * Removes the region with the specified name. - * @param name the name of the region to remove. - */ - removeRegion(name: string): Region; - - /** Enable easy overriding of the default `RegionManager` - * for customized region interactions and business specific - * view logic for better control over single regions. - */ - getRegionManager(): RegionManager; - - /** - * Show a view into the region specified by `regionName`. - */ - showChildView(regionName: string, view: any, options?: RegionShowOptions): void; - - /** - * Get the current view that is shown in the region specified by - * `regionName`. - */ - getChildView(regionName: string): Backbone.View; - - /** - * Returns all regions from the layout view. The results contains an - * Object hash that has `string`s as keys and `Region`s as values. - */ - getRegions(): {[key: string]: Region}; - - /** - * You can customize the event prefix for events that are forwarded through - * the layout view with this property. - */ - childViewEventPrefix: string; - } - interface AppRouterOptions extends Backbone.RouterOptions { /** * The appRoutes. @@ -1437,7 +1311,7 @@ declare namespace Marionette { options: any; - /** + /** * Behaviors can have their own ui hash, which will be mixed into the ui * hash of its associated View instance. ui elements defined on either the * Behavior or the View will be made available within events and triggers. diff --git a/backbone/backbone-tests.ts b/backbone/backbone-tests.ts index accdb93979..c074ac57e5 100644 --- a/backbone/backbone-tests.ts +++ b/backbone/backbone-tests.ts @@ -1,5 +1,3 @@ -/// - function test_events() { var object = new Backbone.Events(); diff --git a/bardjs/bardjs-tests.ts b/bardjs/bardjs-tests.ts index 2d312634ca..91172b7255 100644 --- a/bardjs/bardjs-tests.ts +++ b/bardjs/bardjs-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as angular from 'angular'; import 'angular-mocks'; diff --git a/batch-stream/batch-stream-tests.ts b/batch-stream/batch-stream-tests.ts index d3195466e8..4554530072 100644 --- a/batch-stream/batch-stream-tests.ts +++ b/batch-stream/batch-stream-tests.ts @@ -1,5 +1,3 @@ -/// - import fs = require('fs'); import BatchStream = require('batch-stream'); diff --git a/bazinga-translator/bazinga-translator-tests.ts b/bazinga-translator/bazinga-translator-tests.ts index 8c5d1dafa8..3856ff22a1 100644 --- a/bazinga-translator/bazinga-translator-tests.ts +++ b/bazinga-translator/bazinga-translator-tests.ts @@ -1,5 +1,3 @@ -/// - Translator.fallback = 'en'; Translator.defaultDomain = 'messages'; diff --git a/bezier-js/bezier-js-tests.ts b/bezier-js/bezier-js-tests.ts index f5fba4d947..003b6e1c45 100644 --- a/bezier-js/bezier-js-tests.ts +++ b/bezier-js/bezier-js-tests.ts @@ -1,5 +1,3 @@ -/// - function test() { var bezierjs: typeof BezierJs; diff --git a/big-integer/big-integer-tests.ts b/big-integer/big-integer-tests.ts index 2ab3c1fad5..62f234b371 100644 --- a/big-integer/big-integer-tests.ts +++ b/big-integer/big-integer-tests.ts @@ -113,5 +113,6 @@ isBigInteger = x.times( "100" ); isNumber = x.toJSNumber(); isString = x.toString(); +isString = x.toString(36); isNumber = x.valueOf(); diff --git a/big-integer/index.d.ts b/big-integer/index.d.ts index 452593e950..f8ca2b488c 100644 --- a/big-integer/index.d.ts +++ b/big-integer/index.d.ts @@ -195,7 +195,7 @@ interface BigInteger { toJSNumber(): number; /** Converts a bigInt to a string. */ - toString(): string; + toString( radix?: number ): string; /** Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion. */ valueOf(): number; diff --git a/bignumber.js/bignumber.js-tests.ts b/bignumber.js/bignumber.js-tests.ts new file mode 100644 index 0000000000..9dc96dd7ea --- /dev/null +++ b/bignumber.js/bignumber.js-tests.ts @@ -0,0 +1,443 @@ +var x: BigNumber.BigNumber = new BigNumber(9); +var y = new BigNumber(x); + +BigNumber(435.345); + +new BigNumber('5032485723458348569331745.33434346346912144534543'); +new BigNumber('4.321e+4'); +new BigNumber('-735.0918e-430'); +new BigNumber(Infinity); +new BigNumber(NaN); +new BigNumber('.5'); +new BigNumber('+2'); +new BigNumber(-10110100.1, 2); +new BigNumber(-0b10110100); +new BigNumber('123412421.234324', 5); +new BigNumber('ff.8', 16); +new BigNumber('0xff.8'); + +new BigNumber(9, 2); + +new BigNumber(96517860459076817.4395); + +new BigNumber('blurgh'); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +new BigNumber(1.23456789); +new BigNumber(1.23456789, 10); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +var BN = BigNumber.another({ DECIMAL_PLACES: 9 }); + +x = new BigNumber(1); +y = new BN(1); + +x.div(3); +y.div(3); + +BN = BigNumber.another(); +BN.config({ DECIMAL_PLACES: 9 }); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +BigNumber.set({ DECIMAL_PLACES: 5 }); +BigNumber.config(5); + +BigNumber.config({ ROUNDING_MODE: 0 }); +BigNumber.config(undefined, BigNumber.ROUND_UP); + +BigNumber.config({ EXPONENTIAL_AT: 2 }); +new BigNumber(12.3); +new BigNumber(123); +new BigNumber(0.123); +new BigNumber(0.0123); + +BigNumber.config({ EXPONENTIAL_AT: [-7, 20] }); +new BigNumber(123456789); +new BigNumber(0.000000123); + +BigNumber.config({ EXPONENTIAL_AT: 1e+9 }); + +BigNumber.config({ EXPONENTIAL_AT: 0 }); + +BigNumber.config({ RANGE: 500 }); +BigNumber.config().RANGE; +new BigNumber('9.999e499'); +new BigNumber('1e500'); +new BigNumber('1e-499'); +new BigNumber('1e-500'); + +BigNumber.config({ RANGE: [-3, 4] }); +new BigNumber(99999); +new BigNumber(100000); +new BigNumber(0.001); +new BigNumber(0.0001); + +BigNumber.config({ ERRORS: false }); + +BigNumber.config({ CRYPTO: true }); +BigNumber.config().CRYPTO; +BigNumber.random(); + +BigNumber.config({ MODULO_MODE: BigNumber.EUCLID }); +BigNumber.config({ MODULO_MODE: 9 }); + +BigNumber.config({ POW_PRECISION: 100 }); + +BigNumber.config({ + FORMAT: { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: ' ', + fractionGroupSize: 0 + } +}); + +BigNumber.config({ + DECIMAL_PLACES: 40, + ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL, + EXPONENTIAL_AT: [-10, 20], + RANGE: [-500, 500], + ERRORS: true, + CRYPTO: true, + MODULO_MODE: BigNumber.ROUND_FLOOR, + POW_PRECISION: 80, + FORMAT: { + groupSize: 3, + groupSeparator: ' ', + decimalSeparator: ',' + } +}); + +BigNumber.config(40, 7, [-10, 20], 500, 1, 1, 3, 80); + +var obj = BigNumber.config(); +obj.ERRORS; +obj.RANGE; + +x = new BigNumber('3257869345.0378653'); +BigNumber.max(4e9, x, '123456789.9'); + +var arr = [12, '13', new BigNumber(14)]; +BigNumber.max(arr); + +x = new BigNumber('3257869345.0378653'); +BigNumber.min(4e9, x, '123456789.9'); + +arr = [2, new BigNumber(-14), '-15.9999', -12]; +BigNumber.min(arr); + +BigNumber.config({ DECIMAL_PLACES: 10 }); +BigNumber.random(); +BigNumber.random(20); + +BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL }); +BigNumber.config({ ROUNDING_MODE: 2 }); + +x = new BigNumber(-0.8); +y = x.absoluteValue(); +var z = y.abs(); + +x = new BigNumber(1.3); +x.ceil(); +y = new BigNumber(-1.8); +y.ceil(); + +x = new BigNumber(Infinity); +y = new BigNumber(5); +x.comparedTo(y); +x.comparedTo(x.minus(1)); +y.cmp(NaN); +y.cmp('110', 2); + +x = new BigNumber(123.45); +x.decimalPlaces(); +y = new BigNumber('9.9e-101'); +y.dp(); + +x = new BigNumber(355); +y = new BigNumber(113); +x.dividedBy(y); +x.div(5); +x.div(47, 16); + +x = new BigNumber(5); +y = new BigNumber(3); +x.dividedToIntegerBy(y); +x.divToInt(0.7); +x.divToInt('0.f', 16); + +0 === 1e-324; +x = new BigNumber(0); +x.equals('1e-324'); +BigNumber(-0).eq(x); +BigNumber(255).eq('ff', 16); + +y = new BigNumber(NaN); +y.equals(NaN); + +x = new BigNumber(1.8); +x.floor(); +y = new BigNumber(-1.3); +y.floor(); + +0.1 > (0.3 - 0.2); +x = new BigNumber(0.1); +x.greaterThan(BigNumber(0.3).minus(0.2)); +BigNumber(0).gt(x); +BigNumber(11, 3).gt(11.1, 2); + +x = new BigNumber(0.3).minus(0.2); +x.greaterThanOrEqualTo(0.1); +BigNumber(1).gte(x); +BigNumber(10, 18).gte('i', 36); + +x = new BigNumber(1); +x.isFinite(); +y = new BigNumber(Infinity); +y.isFinite(); + +x = new BigNumber(1); +x.isInteger(); +y = new BigNumber(123.456); +y.isInt(); + +x = new BigNumber(NaN); +x.isNaN(); +y = new BigNumber('Infinity'); +y.isNaN(); + +x = new BigNumber(-0); +x.isNegative(); +y = new BigNumber(2); +y.isNeg(); + +x = new BigNumber(-0); +x.isZero() && x.isNeg(); +y = new BigNumber(Infinity); +y.isZero(); + +x = new BigNumber(0.3).minus(0.2); +x.lessThan(0.1); +BigNumber(0).lt(x); +BigNumber(11.1, 2).lt(11, 3); + +x = new BigNumber(0.1); +x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2)); +BigNumber(-1).lte(x); +BigNumber(10, 18).lte('i', 36); + +x = new BigNumber(0.3); +x.minus(0.1); +x.sub(0.6, 20); + +x = new BigNumber(1); +x.modulo(0.9); +y = new BigNumber(33); +y.mod('a', 33); + +x = new BigNumber(1.8); +x.negated(); +y = new BigNumber(-1.3); +y.neg(); + +x = new BigNumber(0.1); +y = x.plus(0.2); +BigNumber(0.7).plus(x).add(y); +x.plus('0.1', 8); + +x = new BigNumber(1.234); +x.precision(); +y = new BigNumber(987000); +y.sd(); +y.sd(true); + +y = new BigNumber(x); +y.round(); +y.round(1); +y.round(2); +y.round(10); +y.round(0, 1); +y.round(0, 6); +y.round(1, 1); +y.round(1, BigNumber.ROUND_HALF_EVEN); + +x = new BigNumber(1.23); +x.shift(3); +x.shift(-3); + +x = new BigNumber(16); +x.squareRoot(); +y = new BigNumber(3); +y.sqrt(); + +x = new BigNumber(0.6); +y = x.times(3); +BigNumber('7e+500').times(y); +x.times('-a', 16); + +BigNumber.config({ DECIMAL_PLACES: 5, ROUNDING_MODE: 4 }); +x = new BigNumber(9876.54321); + +x.toDigits(); +x.toDigits(6); +x.toDigits(6, BigNumber.ROUND_UP); +x.toDigits(2); +x.toDigits(2, 1); + +y = new BigNumber(45.6); +y.toExponential(); +y.toExponential(0); +y.toExponential(1); +y.toExponential(1, 1); +y.toExponential(3); + +y = new BigNumber(3.456); +y.toFixed(); +y.toFixed(0); +y.toFixed(2); +y.toFixed(2, 1); +y.toFixed(5); + +var format = { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: ' ', + fractionGroupSize: 0 +}; +BigNumber.config({ FORMAT: format }); + +x = new BigNumber('123456789.123456789'); +x.toFormat(); +x.toFormat(1); + +format.groupSeparator = ' '; +format.fractionGroupSize = 5; +x.toFormat(); + +BigNumber.config({ + FORMAT: { + decimalSeparator: ',', + groupSeparator: '.', + groupSize: 3, + secondaryGroupSize: 2 + } +}); + +x.toFormat(6); + +x = new BigNumber(1.75); +x.toFraction(); + +var pi = new BigNumber('3.14159265358'); +pi.toFraction(); +pi.toFraction(100000); +pi.toFraction(10000); +pi.toFraction(100); +pi.toFraction(10); +pi.toFraction(1); + +x = new BigNumber('177.7e+457'); +y = new BigNumber(235.4325); +z = new BigNumber('0.0098074'); + +var str = JSON.stringify([x, y, z]); + +JSON.parse(str, (key, val) => key === '' ? val : new BigNumber(val)); + +x = new BigNumber(456.789); +x.toNumber(); +{ +x; } + +y = new BigNumber('45987349857634085409857349856430985'); +y.toNumber(); + +z = new BigNumber(-0); +1 / +z; +1 / z.toNumber(); + +x = new BigNumber(0.7); +x.toPower(2); +BigNumber(3).pow(-2); + +y = new BigNumber(45.6); +x.toPrecision(); +y.toPrecision(); +x.toPrecision(1); +y.toPrecision(1); +y.toPrecision(2, 0); +y.toPrecision(2, 1); +x.toPrecision(5); +y.toPrecision(5); + +x = new BigNumber(750000); +x.toString(); +BigNumber.config({ EXPONENTIAL_AT: 5 }); +x.toString(); + +y = new BigNumber(362.875); +y.toString(2); +y.toString(9); +y.toString(32); + +BigNumber.config({ DECIMAL_PLACES: 4 }); +z = new BigNumber('1.23456789'); +z.toString(); +z.toString(10); + +x = new BigNumber(123.456); +x.truncated(); +y = new BigNumber(-12.3); +y.trunc(); + +x = new BigNumber('-0'); +x.toString(); +x.valueOf(); +y = new BigNumber('1.777e+457'); +y.valueOf(); + +x = new BigNumber(0.123); +x.toExponential(); +x.c; +x.e; +x.s; + +z = new BigNumber('-123.4567000e+2'); +z.toExponential(); +z.c; +z.e; +z.s; + +x = new BigNumber(3); +x instanceof BigNumber; +x.isBigNumber; + +BN = BigNumber.another(); + +y = new BN(3); +y instanceof BigNumber; +y.isBigNumber; + +y = new BigNumber(-0); +y.c; +y.e; +y.s; + +try { + // ... +} catch (e) { + if (e instanceof Error && e.name === 'BigNumber Error') { + // ... + } +} + +x = new BigNumber("1.0"); +y = new BigNumber("1.1000"); +z = x.add(y); + +x = new BigNumber("1.20"); +y = new BigNumber("3.45000"); +z = x.mul(y); diff --git a/bignumber.js/index.d.ts b/bignumber.js/index.d.ts new file mode 100644 index 0000000000..10423b1ed3 --- /dev/null +++ b/bignumber.js/index.d.ts @@ -0,0 +1,676 @@ +// Type definitions for bignumber.js 4.0 +// Project: https://github.com/MikeMcl/bignumber.js/ +// Definitions by: Viktor Smirnov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare var BigNumber: BigNumber.BigNumberStatic; + +export as namespace BigNumber; +export = BigNumber; + +declare namespace BigNumber { + interface FormatConfig { + /** + * The decimal separator. + */ + decimalSeparator: string; + + /** + * The grouping separator of the integer part. + */ + groupSeparator: string; + + /** + * The primary grouping size of the integer part. + */ + groupSize: number; + + /** + * The secondary grouping size of the integer part. + */ + secondaryGroupSize: number; + + /** + * The grouping separator of the fraction part. + */ + fractionGroupSeparator: string; + + /** + * The grouping size of the fraction part. + */ + fractionGroupSize: number; + } + + interface BigNumberConfig { + /** + * The maximum number of decimal places of the results of operations involving division, + * i.e. division, square root and base conversion operations, and power operations with negative exponents. + */ + DECIMAL_PLACES: number; + + /** + * The rounding mode used in the above operations and the default rounding mode of round, `toExponential`, `toFixed`, `toFormat` and `toPrecision`. + */ + ROUNDING_MODE: RoundingMode; + + /** + * The exponent value(s) at which `toString` returns exponential notation. + * + * If a single number is assigned, the value is the exponent magnitude. + * + * If an array of two numbers is assigned then the first number is the negative exponent value at and beneath which exponential notation is used, + * and the second number is the positive exponent value at and above which the same. + */ + EXPONENTIAL_AT: number | number[]; + + /** + * The exponent value(s) beyond which overflow to `Infinity` and underflow to zero occurs. + * + * If a single number is assigned, it is the maximum exponent magnitude: + * values wth a positive exponent of greater magnitude become `Infinity` + * and those with a negative exponent of greater magnitude become zero. + * + * If an array of two numbers is assigned then the first number is the negative exponent limit and the second number is the positive exponent limit. + */ + RANGE: number | number[]; + + /** + * The value that determines whether BigNumber Errors are thrown. + * + * If `ERRORS` is false, no errors will be thrown. + */ + ERRORS: boolean | 0 | 1; + + /** + * The value that determines whether cryptographically-secure pseudo-random number generation is used. + * + * If `CRYPTO` is set to `true` then the `random` method will generate random digits using `crypto.getRandomValues` in browsers that support it, + * or `crypto.randomBytes` if using a version of Node.js that supports it. + * + * If neither function is supported by the host environment then attempting to set `CRYPTO` to `true` will fail, and if `ERRORS` is `true` an exception will be thrown. + * + * If `CRYPTO` is `false` then the source of randomness used will be `Math.random` (which is assumed to generate at least `30` bits of randomness). + */ + CRYPTO: boolean | 0 | 1; + + /** + * The modulo mode used when calculating the modulus: `a mod n`. + * + * The quotient, `q = a / n`, is calculated according to the `ROUNDING_MODE` that corresponds to the chosen `MODULO_MODE`. + * + * The remainder, `r`, is calculated as: `r = a - n * q`. + */ + MODULO_MODE: ModuloMode; + + /** + * The maximum number of significant digits of the result of the power operation (unless a modulus is specified). + * + * If set to `0`, the number of signifcant digits will not be limited. + */ + POW_PRECISION: number; + + /** + * The `FORMAT` object configures the format of the string returned by the toFormat method. + */ + FORMAT: Partial; + } + + type NumberLike = number | string | BigNumber; + type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + type ModuloMode = RoundingMode | 9; + + interface BigNumberStatic { + /** + * Returns a new instance of a BigNumber object. + */ + (value: NumberLike, base?: number): BigNumber; + + /** + * Returns a new instance of a BigNumber object. + */ + new (value: NumberLike, base?: number): BigNumber; + + /** + * Returns a new independent BigNumber constructor with configuration as described by obj, or with the default configuration if obj is null or undefined. + */ + another(obj?: Partial): BigNumberStatic; + + /** + * Configures the settings for this particular BigNumber constructor. + * + */ + config(obj?: Partial): BigNumberConfig; + + /** + * Configures the settings for this particular BigNumber constructor. + */ + config( + DECIMAL_PLACES?: number, + ROUNDING_MODE?: RoundingMode, + EXPONENTIAL_AT?: number | number[], + RANGE?: number | number[], + ERRORS?: boolean | 0 | 1, + CRYPTO?: boolean | 0 | 1, + MODULO_MODE?: ModuloMode, + POW_PRECISION?: number + ): BigNumberConfig; + + /** + * Configures the settings for this particular BigNumber constructor. + */ + set(obj?: Partial): BigNumberConfig; + + /** + * Configures the settings for this particular BigNumber constructor. + */ + set( + DECIMAL_PLACES?: number, + ROUNDING_MODE?: RoundingMode, + EXPONENTIAL_AT?: number | number[], + RANGE?: number | number[], + ERRORS?: boolean | 0 | 1, + CRYPTO?: boolean | 0 | 1, + MODULO_MODE?: ModuloMode, + POW_PRECISION?: number + ): BigNumberConfig; + + /** + * Returns a BigNumber whose value is the maximum of `args`. + */ + max(...args: NumberLike[]): BigNumber; + + /** + * Returns a BigNumber whose value is the maximum of `args`. + */ + max(args: NumberLike[]): BigNumber; + + /** + * Returns a BigNumber whose value is the minimum of `args`. + */ + min(...args: NumberLike[]): BigNumber; + + /** + * Returns a BigNumber whose value is the minimum of `args`. + */ + min(args: NumberLike[]): BigNumber; + + /** + * Returns a new BigNumber with a pseudo-random value equal to or greater than `0` and less than `1`. + * + * The return value will have `dp` decimal places (or less if trailing zeros are produced). + * If `dp` is omitted then the number of decimal places will default to the current `DECIMAL_PLACES` setting. + * + * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the `crypto` object in the host environment, + * the random digits of the return value are generated by either + * `Math.random` (fastest), + * `crypto.getRandomValues` (Web Cryptography API in recent browsers) + * or `crypto.randomBytes` (Node.js). + * + * If `CRYPTO` is `true`, i.e. one of the `crypto` methods is to be used, + * the value of a returned BigNumber should be cryptographically-secure and statistically indistinguishable from a random value. + */ + random(dp?: number): BigNumber; + + /** + * Rounds away from zero + */ + ROUND_UP: 0; + + /** + * Rounds towards zero + */ + ROUND_DOWN: 1; + + /** + * Rounds towards `Infinity` + */ + ROUND_CEIL: 2; + + /** + * Rounds towards `-Infinity` + */ + ROUND_FLOOR: 3; + + /** + * Rounds towards nearest neighbour. + * If equidistant, rounds away from zero. + */ + ROUND_HALF_UP: 4; + + /** + * Rounds towards nearest neighbour. + * If equidistant, rounds towards zero. + */ + ROUND_HALF_DOWN: 5; + + /** + * Rounds towards nearest neighbour. + * If equidistant, rounds towards even neighbour. + */ + ROUND_HALF_EVEN: 6; + + /** + * Rounds towards nearest neighbour. + * If equidistant, rounds towards `Infinity`. + */ + ROUND_HALF_CEIL: 7; + + /** + * Rounds towards nearest neighbour. + * If equidistant, rounds towards `-Infinity`. + */ + ROUND_HALF_FLOOR: 8; + + /** + * The remainder is always positive. + * + * Euclidian division: `q = sign(n) * floor(a / abs(n))` + */ + EUCLID: 9; + } + + interface BigNumber { + /** + * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this BigNumber. + */ + absoluteValue(): BigNumber; + + /** + * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this BigNumber. + */ + abs(): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber rounded to a whole number in the direction of positive Infinity. + */ + ceil(): BigNumber; + + /** + * Returns + * + * `1` if the value of this BigNumber is greater than the value of `n` + * + * `-1` if the value of this BigNumber is less than the value of `n` + * + * `0` if this BigNumber and `n` have the same value + * + * `null` if the value of either this BigNumber or `n` is `NaN` + */ + comparedTo(n: NumberLike, base?: number): 1 | -1 | 0 | null; + + /** + * Returns + * + * `1` if the value of this BigNumber is greater than the value of `n` + * + * `-1` if the value of this BigNumber is less than the value of `n` + * + * `0` if this BigNumber and `n` have the same value + * + * `null` if the value of either this BigNumber or `n` is `NaN` + */ + cmp(n: NumberLike, base?: number): 1 | -1 | 0 | null; + + /** + * Return the number of decimal places of the value of this BigNumber, or `null` if the value of this BigNumber is `±Infinity` or `NaN`. + */ + decimalPlaces(): number; + + /** + * Return the number of decimal places of the value of this BigNumber, or `null` if the value of this BigNumber is `±Infinity` or `NaN`. + */ + dp(): number; + + /** + * Returns a BigNumber whose value is the value of this BigNumber divided by `n`, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. + */ + dividedBy(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber divided by `n`, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. + */ + div(n: NumberLike, base?: number): BigNumber; + + /** + * Return a BigNumber whose value is the integer part of dividing the value of this BigNumber by `n`. + */ + dividedToIntegerBy(n: NumberLike, base?: number): BigNumber; + + /** + * Return a BigNumber whose value is the integer part of dividing the value of this BigNumber by `n`. + */ + divToInt(n: NumberLike, base?: number): BigNumber; + + /** + * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. + * + * As with JavaScript, `NaN` does not equal `NaN`. + */ + equals(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. + * + * As with JavaScript, `NaN` does not equal `NaN`. + */ + eq(n: NumberLike, base?: number): boolean; + + /** + * Returns a BigNumber whose value is the value of this BigNumber rounded to a whole number in the direction of negative `Infinity`. + */ + floor(): BigNumber; + + /** + * Returns `true` if the value of this BigNumber is greater than the value of `n`, otherwise returns `false`. + */ + greaterThan(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is greater than the value of `n`, otherwise returns `false`. + */ + gt(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is greater than or equal to the value of `n`, otherwise returns `false`. + */ + greaterThanOrEqualTo(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is greater than or equal to the value of `n`, otherwise returns `false`. + */ + gte(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is a finite number, otherwise returns `false`. + * + * The only possible non-finite values of a BigNumber are `NaN`, `Infinity` and `-Infinity`. + */ + isFinite(): boolean; + + /** + * Returns `true` if the value of this BigNumber is a whole number, otherwise returns `false`. + */ + isInteger(): boolean; + + /** + * Returns `true` if the value of this BigNumber is a whole number, otherwise returns `false`. + */ + isInt(): boolean; + + /** + * Returns `true` if the value of this BigNumber is NaN, otherwise returns `false`. + */ + isNaN(): boolean; + + /** + * Returns `true` if the value of this BigNumber is negative, otherwise returns `false`. + */ + isNegative(): boolean; + + /** + * Returns `true` if the value of this BigNumber is negative, otherwise returns `false`. + */ + isNeg(): boolean; + + /** + * Returns `true` if the value of this BigNumber is zero or minus zero, otherwise returns `false`. + */ + isZero(): boolean; + + /** + * Returns `true` if the value of this BigNumber is less than the value of `n`, otherwise returns `false`. + */ + lessThan(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is less than the value of `n`, otherwise returns `false`. + */ + lt(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns + */ + lessThanOrEqualTo(n: NumberLike, base?: number): boolean; + + /** + * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns + */ + lte(n: NumberLike, base?: number): boolean; + + /** + * Returns a BigNumber whose value is the value of this BigNumber minus `n`. + */ + minus(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber minus `n`. + */ + sub(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`. + * + * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. + * If it is `1` (default value), the result will have the same sign as this BigNumber, + * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method. + */ + modulo(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`. + * + * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. + * If it is `1` (default value), the result will have the same sign as this BigNumber, + * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method. + */ + mod(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by `-1`. + */ + negated(): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by `-1`. + */ + neg(): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber plus `n`. + */ + plus(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber plus `n`. + */ + add(n: NumberLike, base?: number): BigNumber; + + /** + * Returns the number of significant digits of the value of this BigNumber. + * + * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not. + */ + precision(z?: boolean | 0 | 1): number; + + /** + * Returns the number of significant digits of the value of this BigNumber. + * + * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not. + */ + sd(z?: boolean | 0 | 1): number; + + /** + * Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode `rm` to a maximum of `dp` decimal places. + * + * If `dp` is omitted, or is `null` or `undefined`, the return value is `n` rounded to a whole number. + * + * If `rm` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used. + */ + round(dp?: number, rm?: RoundingMode): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber shifted `n` places. + * + * The shift is of the decimal point, i.e. of powers of ten, and is to the left if `n` is negative or to the right if `n` is positive. + */ + shift(n: number): BigNumber; + + /** + * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. + * + * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + */ + squareRoot(): BigNumber; + + /** + * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. + * + * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + */ + sqrt(): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber times `n`. + */ + times(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber times `n`. + */ + mul(n: NumberLike, base?: number): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`. + * + * If `sd` is omitted or is `null` or `undefined`, the return value will not be rounded. + * + * If `rm` is omitted or is `null` or `undefined`, ROUNDING_MODE will be used. + */ + toDigits(sd?: number, rm?: RoundingMode): BigNumber; + + /** + * Returns a string representing the value of this BigNumber in exponential notation rounded using rounding mode `rm` to `dp` decimal places, + * i.e with one digit before the decimal point and `dp` digits after it. + * + * If the value of this BigNumber in exponential notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly. + * + * If `dp` is omitted, or is `null` or `undefined`, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly. + * + * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. + */ + toExponential(dp?: number, rm?: RoundingMode): string; + + /** + * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`. + * + * If the value of this BigNumber in normal notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly. + * + * Unlike `Number.prototype.toFixed`, which returns exponential notation if a number is greater or equal to `10e21`, this method will always return normal notation. + * + * If `dp` is omitted or is `null` or `undefined`, the return value will be unrounded and in normal notation. + * This is also unlike `Number.prototype.toFixed`, which returns the value to zero decimal places. + * It is useful when fixed-point notation is required and the current `EXPONENTIAL_AT` setting causes `toString` to return exponential notation. + * + * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. + */ + toFixed(dp?: number, rm?: RoundingMode): string; + + /** + * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`, + * and formatted according to the properties of the `FORMAT` object. + * + * If `dp` is omitted or is `null` or `undefined`, then the return value is not rounded to a fixed number of decimal places. + * + * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. + */ + toFormat(dp?: number, rm?: RoundingMode): string; + + /** + * Returns a string array representing the value of this BigNumber as a simple fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to `max`. + * + * If a maximum denominator, `max`, is not specified, or is `null` or `undefined`, the denominator will be the lowest value necessary to represent the number exactly. + */ + toFraction(max?: NumberLike): [string, string]; + + /** + * As `valueOf`. + */ + toJSON(): string; + + /** + * Returns the value of this BigNumber as a JavaScript number primitive. + * + * Type coercion with, for example, the unary plus operator will also work, except that a BigNumber with the value minus zero will be converted to positive zero. + */ + toNumber(): number; + + /** + * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`. + * + * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. + */ + toPower(n: number, m?: NumberLike): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`. + * + * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. + */ + pow(n: number, m?: NumberLike): BigNumber; + + /** + * Returns a string representing the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`. + * + * If `sd` is less than the number of digits necessary to represent the integer part of the value in normal (fixed-point) notation, then exponential notation is used. + * + * If `sd` is omitted, or is `null` or `undefined`, then the return value is the same as `n.toString()`. + * + * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. + */ + toPrecision(sd?: number, rm?: RoundingMode): string; + + /** + * Returns a string representing the value of this BigNumber in the specified base, or base `10` if `base` is omitted or is `null` or `undefined`. + */ + toString(base?: number): string; + + /** + * Returns a BigNumber whose value is the value of this BigNumber truncated to a whole number. + */ + truncated(): BigNumber; + + /** + * Returns a BigNumber whose value is the value of this BigNumber truncated to a whole number. + */ + trunc(): BigNumber; + + /** + * As `toString`, but does not accept a base argument and includes the minus sign for negative zero. + */ + valueOf(): string; + + /** + * coefficient + * @description Array of base 1e14 numbers + */ + c: number[] | null; + + /** + * exponent + * @description Integer, -1000000000 to 1000000000 inclusive + */ + e: number | null; + + /** + * sign + */ + s: -1 | 1 | null; + + /** + * type identifier + */ + isBigNumber: true; + } +} \ No newline at end of file diff --git a/bignumber.js/tsconfig.json b/bignumber.js/tsconfig.json new file mode 100644 index 0000000000..485dace353 --- /dev/null +++ b/bignumber.js/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bignumber.js-tests.ts" + ] +} \ No newline at end of file diff --git a/bignumber.js/tslint.json b/bignumber.js/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/bignumber.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/bingmaps/bingmaps-tests.ts b/bingmaps/bingmaps-tests.ts index 239e33094a..e83ff89aba 100644 --- a/bingmaps/bingmaps-tests.ts +++ b/bingmaps/bingmaps-tests.ts @@ -1,10 +1,3 @@ -/// -/// -/// -/// -/// -/// - namespace BingMapsTests { // An interactive set of Bing Maps AJAX control usages can be found at http://www.bingmapsportal.com/isdk/ajaxv7 diff --git a/bit-array/bit-array-tests.ts b/bit-array/bit-array-tests.ts index 7c1ff57b1b..7d50de143c 100644 --- a/bit-array/bit-array-tests.ts +++ b/bit-array/bit-array-tests.ts @@ -1,5 +1,3 @@ -/// - import BitArray = require("bit-array"); const a = new BitArray(32); diff --git a/bittorrent-protocol/index.d.ts b/bittorrent-protocol/index.d.ts index 688527e71f..2570dd7132 100644 --- a/bittorrent-protocol/index.d.ts +++ b/bittorrent-protocol/index.d.ts @@ -16,6 +16,7 @@ declare namespace BittorrentProtocol { } export interface Extension { + // tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible constructor(wire: Wire): this; onHandshake?: () => void; onExtendedHandshake?: () => void; @@ -24,6 +25,7 @@ declare namespace BittorrentProtocol { } export interface Request { + //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible constructor(piece: number, offset: number, length: number, callback: () => void): this; piece: number; offset: number; diff --git a/bittorrent-protocol/tsconfig.json b/bittorrent-protocol/tsconfig.json index 9258205ba7..1bc778df1b 100644 --- a/bittorrent-protocol/tsconfig.json +++ b/bittorrent-protocol/tsconfig.json @@ -19,4 +19,4 @@ "index.d.ts", "bittorrent-protocol-tests.ts" ] -} \ No newline at end of file +} diff --git a/blob-stream/blob-stream-tests.ts b/blob-stream/blob-stream-tests.ts index b9174859f9..40f9888788 100644 --- a/blob-stream/blob-stream-tests.ts +++ b/blob-stream/blob-stream-tests.ts @@ -1,6 +1,3 @@ - -/// - var bl = require('blob-stream'); var blob = bl.toBlob(); diff --git a/blue-tape/blue-tape-tests.ts b/blue-tape/blue-tape-tests.ts index 92b2641115..c34bc6e32c 100644 --- a/blue-tape/blue-tape-tests.ts +++ b/blue-tape/blue-tape-tests.ts @@ -1,4 +1,3 @@ -/// /// import tape = require('blue-tape'); diff --git a/bluebird-global/index.d.ts b/bluebird-global/index.d.ts index caf873510d..a705222e9d 100644 --- a/bluebird-global/index.d.ts +++ b/bluebird-global/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bluebird 3.0 +// Type definitions for bluebird 3.5 // Project: https://github.com/petkaantonov/bluebird // Definitions by: d-ph // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -76,9 +76,12 @@ declare global { spread: typeof Bluebird.prototype.spread; suppressUnhandledRejections: typeof Bluebird.prototype.suppressUnhandledRejections; tap: typeof Bluebird.prototype.tap; + tapCatch: typeof Bluebird.prototype.tapCatch; // then: typeof Bluebird.prototype.then; thenReturn: typeof Bluebird.prototype.thenReturn; thenThrow: typeof Bluebird.prototype.thenThrow; + catchReturn: typeof Bluebird.prototype.catchReturn; + catchThrow: typeof Bluebird.prototype.catchThrow; throw: typeof Bluebird.prototype.throw; timeout: typeof Bluebird.prototype.timeout; toJSON: typeof Bluebird.prototype.toJSON; diff --git a/bluebird-retry/bluebird-retry-tests.ts b/bluebird-retry/bluebird-retry-tests.ts index b63b360160..eb3260a007 100644 --- a/bluebird-retry/bluebird-retry-tests.ts +++ b/bluebird-retry/bluebird-retry-tests.ts @@ -1,5 +1,3 @@ - -/// import Promise = require('bluebird'); import retry = require('bluebird-retry'); diff --git a/bluebird-retry/index.d.ts b/bluebird-retry/index.d.ts index 22c7b1c95e..63adc1476d 100644 --- a/bluebird-retry/index.d.ts +++ b/bluebird-retry/index.d.ts @@ -17,6 +17,9 @@ declare namespace retry { timeout?: number; max_tries?: number; predicate?: any; + throw_original?: boolean; + context?: any; + args?: any; } } diff --git a/bluebird/bluebird-tests.ts b/bluebird/bluebird-tests.ts index ea1ea69882..b9fc8d0cef 100644 --- a/bluebird/bluebird-tests.ts +++ b/bluebird/bluebird-tests.ts @@ -151,6 +151,10 @@ var BlueBird: typeof Promise; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +var version: string = Promise.version; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + var nodeCallbackFunc = (callback: (err: any, result: string) => void) => {} var nodeCallbackFuncErrorOnly = (callback: (err: any) => void) => {} @@ -336,14 +340,12 @@ fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ - class CustomError extends Error { - public customField: number; - } - fooProm = fooProm.catch(CustomError, reason => { - let a: number = reason.customField - }) +class CustomError extends Error { + public customField: number; } +fooProm = fooProm.catch(CustomError, reason => { + let a: number = reason.customField +}) { class CustomErrorWithConstructor extends Error { @@ -433,6 +435,24 @@ fooProm = fooProm.tap(() => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fooProm = fooProm.tapCatch((err) => { + return "foo"; +}); + +fooProm = fooProm.tapCatch(err => { + return Promise.resolve("foo"); +}); + +fooProm.tapCatch(CustomError, (err: CustomError) => { + return err.customField; +}); + +fooProm.tapCatch((e: any) => e instanceof CustomError, (err: CustomError) => { + return err.customField; +}); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + fooProm = fooProm.delay(num); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -486,6 +506,15 @@ fooProm = fooProm.thenThrow(err); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +barProm = fooProm.catchReturn(bar); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +// fooProm +fooProm = fooProm.catchThrow(err); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + str = fooProm.toString(); obj = fooProm.toJSON(); diff --git a/bluebird/index.d.ts b/bluebird/index.d.ts index 2faa74e285..3508a4e742 100644 --- a/bluebird/index.d.ts +++ b/bluebird/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bluebird 3.0.0 +// Type definitions for bluebird 3.5.0 // Project: https://github.com/petkaantonov/bluebird // Definitions by: Leonard Hecker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -68,19 +68,19 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection boolean, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; caught(predicate: (error: any) => boolean, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - + catch(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; caught(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; - + catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; caught(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird; caught(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird; - + catch(predicate: Object, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; caught(predicate: Object, onReject: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; - + catch(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; caught(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; @@ -114,6 +114,14 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(onFulFill: (value: R) => Bluebird.Thenable): Bluebird; tap(onFulfill: (value: R) => U): Bluebird; + /** + * Like `.catch()` but rethrows the error + */ + tapCatch(onReject: (error?: any) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; + tapCatch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; + tapCatch(predicate: (error?: any) => boolean, onReject: (error?: any) => U | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird; + + /** * Same as calling `Promise.delay(ms, this)`. */ @@ -240,6 +248,37 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection; thenThrow(reason: Error): Bluebird; + /** + * Convenience method for: + * + * + * .catch(function() { + * return value; + * }); + * + * + * in the case where `value` doesn't change its value. That means `value` is bound at the time of calling `.catchReturn()` + */ + catchReturn(value: U): Bluebird; + catchReturn(predicate: (error: any) => boolean, value: U): Bluebird; + catchReturn(ErrorClass: new (...args: any[]) => E, value: U): Bluebird; + catchReturn(predicate: Object, value: U): Bluebird; + + /** + * Convenience method for: + * + * + * .catch(function() { + * throw reason; + * }); + * + * Same limitations apply as with `.catchReturn()`. + */ + catchThrow(reason: Error): Bluebird; + catchThrow(predicate: (error: any) => boolean, reason: Error): Bluebird; + catchThrow(ErrorClass: new (...args: any[]) => E, reason: Error): Bluebird; + catchThrow(predicate: Object, reason: Error): Bluebird; + /** * Convert to String. */ @@ -321,7 +360,7 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection implements Bluebird.Thenable, Bluebird.Inspection { + console.log(req.body); + res.json(req.body); +}); + +app.listen(8080); diff --git a/body-parser/index.d.ts b/body-parser/index.d.ts index 4627c2c5b3..8d068cb66a 100644 --- a/body-parser/index.d.ts +++ b/body-parser/index.d.ts @@ -1,202 +1,46 @@ -// Type definitions for body-parser -// Project: http://expressjs.com -// Definitions by: Santi Albo , VILIC VANE , Jonathan Häberle , Gevik Babakhani +// Type definitions for body-parser 1.16 +// Project: https://github.com/expressjs/body-parser +// Definitions by: Santi Albo , Vilic Vane , Jonathan Häberle , Gevik Babakhani , Tomasz Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// +import { Request, RequestHandler, Response } from 'express'; +// for docs go to https://github.com/expressjs/body-parser/tree/1.16.0#body-parser -import * as express from "express"; - -/** - * bodyParser: use individual json/urlencoded middlewares - * @deprecated - */ - -declare function bodyParser(options?: { - /** - * if deflated bodies will be inflated. (default: true) - */ - inflate?: boolean; - /** - * maximum request body size. (default: '100kb') - */ - limit?: any; - /** - * function to verify body content, the parsing can be aborted by throwing an error. - */ - verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void; - /** - * only parse objects and arrays. (default: true) - */ - strict?: boolean; - /** - * passed to JSON.parse(). - */ - reviver?: (key: string, value: any) => any; - /** - * parse extended syntax with the qs module. (default: true) - */ - extended?: boolean; -}): express.RequestHandler; +// @deprecated +declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler; declare namespace bodyParser { - - /** - * Interface for defining the options for the json() middleware - * - * @export - * @interface JsonOptions - */ - export interface JsonOptions { - /** - * if deflated bodies will be inflated. (default: true) - */ + interface Options { inflate?: boolean; - /** - * maximum request body size. (default: '100kb') - */ - limit?: any; - /** - * request content-type to parse, passed directly to the type-is library. (default: 'json') - */ - type?: any; - /** - * function to verify body content, the parsing can be aborted by throwing an error. - */ - verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void; - /** - * only parse objects and arrays. (default: true) - */ + limit?: number | string; + type?: string | ((req: Request) => any); + verify?: (req: Request, res: Response, buf: Buffer, encoding: string) => void; + } + + interface OptionsJson extends Options { + reviever?: (key: string, value: any) => any; strict?: boolean; - /** - * passed to JSON.parse(). - */ - reviver?: (key: string, value: any) => any; } - /** - * Interface for defining the options the raw() middleware - * - * @export - * @interface RawOptions - */ - export interface RawOptions { - /** - * if deflated bodies will be inflated. (default: true) - */ - inflate?: boolean; - /** - * maximum request body size. (default: '100kb') - */ - limit?: any; - /** - * request content-type to parse, passed directly to the type-is library. (default: 'application/octet-stream') - */ - type?: any; - /** - * function to verify body content, the parsing can be aborted by throwing an error. - */ - verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void; - } - - /** - * Interface for defining the options for the text() middleware - * - * @export - * @interface TextOptions - */ - export interface TextOptions { - /** - * if deflated bodies will be inflated. (default: true) - */ - inflate?: boolean; - /** - * maximum request body size. (default: '100kb') - */ - limit?: any; - /** - * request content-type to parse, passed directly to the type-is library. (default: 'text/plain') - */ - type?: any; - /** - * function to verify body content, the parsing can be aborted by throwing an error. - */ - verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void; - /** - * the default charset to parse as, if not specified in content-type. (default: 'utf-8') - */ + interface OptionsText extends Options { defaultCharset?: string; } - /** - * Interface for defining the options for the urlencoded() middleware - * - * @export - * @interface UrlEncodedOptions - */ - export interface UrlEncodedOptions { - /** - * if deflated bodies will be inflated. (default: true) - */ - inflate?: boolean; - /** - * maximum request body size. (default: '100kb') - */ - limit?: any; - /** - * request content-type to parse, passed directly to the type-is library. (default: 'urlencoded') - */ - type?: any; - /** - * function to verify body content, the parsing can be aborted by throwing an error. - */ - verify?: (req: express.Request, res: express.Response, buf: Buffer, encoding: string) => void; - /** - * parse extended syntax with the qs module. - */ - extended: boolean; + interface OptionsUrlencoded extends Options { + extended?: boolean; + parameterLimit?: number; } - /** - * Returns middleware that only parses json. This parser accepts any Unicode encoding - * of the body and supports automatic inflation of gzip and deflate encodings. - * - * @export - * @param {JsonOptions} [options] - * @returns {express.RequestHandler} - */ - export function json(options?: JsonOptions): express.RequestHandler; + function json(options?: OptionsJson): RequestHandler; - /** - * Returns middleware that parses all bodies as a Buffer. This parser supports automatic - * inflation of gzip and deflate encodings. - * - * @export - * @param {RawOptions} [options] - * @returns {express.RequestHandler} - */ - export function raw(options?: RawOptions): express.RequestHandler; + function raw(options?: Options): RequestHandler; - /** - * Returns middleware that parses all bodies as a string. This parser supports - * automatic inflation of gzip and deflate encodings. - * - * @export - * @param {TextOptions} [options] - * @returns {express.RequestHandler} - */ - export function text(options?: TextOptions): express.RequestHandler; + function text(options?: OptionsText): RequestHandler; - /** - * Returns middleware that only parses urlencoded bodies. This parser accepts only - * UTF-8 encoding of the body and supports automatic inflation of gzip and deflate encodings. - * - * @export - * @param {UrlEncodedOptions} [options] - * @returns {express.RequestHandler} - */ - export function urlencoded(options?: UrlEncodedOptions): express.RequestHandler; + function urlencoded(options?: OptionsUrlencoded): RequestHandler; } export = bodyParser; diff --git a/body-parser/tsconfig.json b/body-parser/tsconfig.json index 27e01ecd7b..e798cd97d3 100644 --- a/body-parser/tsconfig.json +++ b/body-parser/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, @@ -16,6 +17,7 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts" + "index.d.ts", + "body-parser-tests.ts" ] -} \ No newline at end of file +} diff --git a/body-parser/tslint.json b/body-parser/tslint.json new file mode 100644 index 0000000000..9311f348d9 --- /dev/null +++ b/body-parser/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "max-line-length": false + } +} diff --git a/bookshelf/bookshelf-tests.ts b/bookshelf/bookshelf-tests.ts index 5b743bef71..98fd0f4599 100644 --- a/bookshelf/bookshelf-tests.ts +++ b/bookshelf/bookshelf-tests.ts @@ -1330,3 +1330,50 @@ new User({name: 'John'}).fetchAll({require: true}) /* events.trigger(), see http://bookshelfjs.org/#Events-instance-trigger */ /* events.triggerThen(), see http://bookshelfjs.org/#Events-instance-triggerThen */ + + +/* model - foreignKey and foreignKeyTarget, see http://bookshelfjs.org/#Model-instance-hasOne */ + +{ + class Capital extends bookshelf.Model { + get tableName() { return 'capitals'; } + } + + class City extends bookshelf.Model { + get tableName() { return 'cities'; } + + country(): Country { + return this.belongsTo(Country, 'key1', 'key2'); + } + } + + class Language extends bookshelf.Model { + get tableName() { return 'languages'; } + + countries(): Bookshelf.Collection { + return this.belongsToMany(Country, 'languages_countries', 'lang_id', 'country_id'); + } + } + + class Country extends bookshelf.Model { + get tableName() { return 'countries'; } + capital(): Capital { + return this.hasOne(Capital, 'id', 'capital_id'); + } + + cities(): Bookshelf.Collection { + return this.hasMany(City, 'key2', 'key1'); + } + } + + // select * from `health_records` where `patient_id` = 1; + const capital = new Country({id: 1}).related('capital'); + capital.fetch().then(model => { + // ... + }); + + // alternatively, if you don't need the relation loaded on the patient's relations hash: + new Country({id: 1}).capital().fetch().then(model => { + // ... + }); +} \ No newline at end of file diff --git a/bookshelf/index.d.ts b/bookshelf/index.d.ts index 56472a3213..c7947579c8 100644 --- a/bookshelf/index.d.ts +++ b/bookshelf/index.d.ts @@ -17,7 +17,7 @@ interface Bookshelf extends Bookshelf.Events { Collection: typeof Bookshelf.Collection; plugin(name: string | string[] | Function, options?: any): Bookshelf; - transaction(callback: (transaction: knex.Transaction) => T): BlueBird; + transaction(callback: (transaction: knex.Transaction) => BlueBird): BlueBird; } declare function Bookshelf(knex: knex): Bookshelf; @@ -92,14 +92,14 @@ declare namespace Bookshelf { static where(properties: { [key: string]: any }): T; static where(key: string, operatorOrValue: string | number | boolean, valueIfOperator?: string | number | boolean): T; - belongsTo>(target: { new (...args: any[]): R }, foreignKey?: string): R; + belongsTo>(target: { new (...args: any[]): R }, foreignKey?: string, foreignKeyTarget?: string): R; belongsToMany>(target: { new (...args: any[]): R }, table?: string, foreignKey?: string, otherKey?: string): Collection; count(column?: string, options?: SyncOptions): BlueBird; destroy(options?: DestroyOptions): BlueBird; fetch(options?: FetchOptions): BlueBird; fetchAll(options?: FetchAllOptions): BlueBird>; - hasMany>(target: { new (...args: any[]): R }, foreignKey?: string): Collection; - hasOne>(target: { new (...args: any[]): R }, foreignKey?: string): R; + hasMany>(target: { new (...args: any[]): R }, foreignKey?: string, foreignKeyTarget?: string): Collection; + hasOne>(target: { new (...args: any[]): R }, foreignKey?: string, foreignKeyTarget?: string): R; load(relations: string | string[], options?: LoadOptions): BlueBird; morphMany>(target: { new (...args: any[]): R }, name?: string, columnNames?: string[], morphValue?: string): Collection; morphOne>(target: { new (...args: any[]): R }, name?: string, columnNames?: string[], morphValue?: string): R; diff --git a/bootbox/bootbox-tests.ts b/bootbox/bootbox-tests.ts index 92a079f456..f5604d5312 100644 --- a/bootbox/bootbox-tests.ts +++ b/bootbox/bootbox-tests.ts @@ -6,7 +6,7 @@ bootbox.alert("Are we ok with callback?", function () { console.log("Callback called!"); }); bootbox.alert({ - size: "medium", + size: "small", message: "Are we ok with callback and custom button?", callback: function () { console.log("Callback called!"); @@ -38,7 +38,29 @@ bootbox.prompt({ console.log(result); } }); - +bootbox.prompt({ + title: "This is a prompt with a set of checkbox inputs!", + inputType: 'checkbox', + inputOptions: [ + { + text: 'Choice One', + value: '1', + group: 'Group 1' + }, + { + text: 'Choice Two', + value: '2', + group: 'Group 1' + }, + { + text: 'Choice Three', + value: '3' + } + ], + callback: function (result) { + console.log(result); + } +}); bootbox.dialog({ title: "Wassup?", diff --git a/bootbox/index.d.ts b/bootbox/index.d.ts index 40494d5ca5..28d30e2ba0 100644 --- a/bootbox/index.d.ts +++ b/bootbox/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Bootbox 4.4.0 // Project: https://github.com/makeusabrew/bootbox -// Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon +// Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon , Stanny Nuytkens // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -15,7 +15,8 @@ interface BootboxBaseOptions { closeButton?: boolean; animate?: boolean; className?: string; - size?: string; + /** All other values result in medium */ + size?: "small" | "large"; buttons?: BootboxButtonMap; // complex object where each key is of type BootboxButton } @@ -40,9 +41,10 @@ interface BootboxConfirmOptions extends BootboxDialogOptions { interface BootboxPromptOptions extends BootboxBaseOptions { title: string; value?: string; - inputType?: string; + inputType?: "text" | "textarea" | "email" | "select" | "checkbox" | "date" | "time" | "number" | "password"; callback: (result: string) => any; buttons?: BootboxConfirmPromptButtonMap; + inputOptions?: { text: string, value: string, group?: string }[]; } /** Bootbox options available when setting defaults for modals */ diff --git a/bootpag/bootpag-tests.ts b/bootpag/bootpag-tests.ts index 6a5503f9f8..a0a2a78cc3 100644 --- a/bootpag/bootpag-tests.ts +++ b/bootpag/bootpag-tests.ts @@ -1,5 +1,3 @@ -/// - var pagerSelector = ".bootpager"; var $pager = $(pagerSelector); diff --git a/bootstrap-datepicker/bootstrap-datepicker-tests.ts b/bootstrap-datepicker/bootstrap-datepicker-tests.ts index cedc28c93c..372967ec21 100644 --- a/bootstrap-datepicker/bootstrap-datepicker-tests.ts +++ b/bootstrap-datepicker/bootstrap-datepicker-tests.ts @@ -1,4 +1,3 @@ -/// function tests_simple() { $('#datepicker').datepicker(); $('#datepicker').datepicker({ diff --git a/bootstrap-maxlength/bootstrap-maxlength-tests.ts b/bootstrap-maxlength/bootstrap-maxlength-tests.ts index 32255bc66b..92c3f1b57e 100644 --- a/bootstrap-maxlength/bootstrap-maxlength-tests.ts +++ b/bootstrap-maxlength/bootstrap-maxlength-tests.ts @@ -1,5 +1,3 @@ -/// - // Examples from the projects github page $('input[maxlength]').maxlength(); diff --git a/bootstrap-notify/bootstrap-notify-tests.ts b/bootstrap-notify/bootstrap-notify-tests.ts index 5ae4f2ffc1..2977d39abf 100644 --- a/bootstrap-notify/bootstrap-notify-tests.ts +++ b/bootstrap-notify/bootstrap-notify-tests.ts @@ -1,6 +1,3 @@ - -/// - //Test for bootstrap-notify v3.1.3 //Copied example directly from Bootstrap-notify site diff --git a/bootstrap-select/bootstrap-select-tests.ts b/bootstrap-select/bootstrap-select-tests.ts index e2e8c88560..55900b3ab7 100644 --- a/bootstrap-select/bootstrap-select-tests.ts +++ b/bootstrap-select/bootstrap-select-tests.ts @@ -1,5 +1,3 @@ -/// - $(".selectpicker").selectpicker({ actionsBox: true, container: "body", diff --git a/bootstrap-slider/bootstrap-slider-tests.ts b/bootstrap-slider/bootstrap-slider-tests.ts index 98701cedc3..df143d4c72 100644 --- a/bootstrap-slider/bootstrap-slider-tests.ts +++ b/bootstrap-slider/bootstrap-slider-tests.ts @@ -1,6 +1,3 @@ -/// - - $(function() { // examples from http://seiyria.github.io/bootstrap-slider/ diff --git a/bootstrap-switch/bootstrap-switch-tests.ts b/bootstrap-switch/bootstrap-switch-tests.ts index 539399a78e..65fafff2e9 100644 --- a/bootstrap-switch/bootstrap-switch-tests.ts +++ b/bootstrap-switch/bootstrap-switch-tests.ts @@ -1,9 +1,6 @@ -/// - - function test_cases() { $('#switch').bootstrapSwitch(); - + $('#switch').bootstrapSwitch({ state: false }); @@ -15,7 +12,7 @@ function test_cases() { //var mySwitch = $('#switch').get(0); //mySwitch.toggleAnimate(); - + $('#switch').bootstrapSwitch('state', true, true); $('#switch').bootstrapSwitch('state') === true; diff --git a/bootstrap-touchspin/bootstrap-touchspin-tests.ts b/bootstrap-touchspin/bootstrap-touchspin-tests.ts index c8a6a713f9..7d1ea73437 100644 --- a/bootstrap-touchspin/bootstrap-touchspin-tests.ts +++ b/bootstrap-touchspin/bootstrap-touchspin-tests.ts @@ -1,6 +1,3 @@ -/// - - $(function () { // Example 1 from http://www.virtuosoft.eu/code/bootstrap-touchspin/ $("input[name='demo1']").TouchSpin({ @@ -26,7 +23,7 @@ $(function () { $("input[name='demo_vertical']").TouchSpin({ verticalbuttons: true }); - + // Example 4 from http://www.virtuosoft.eu/code/bootstrap-touchspin/ $("input[name='demo_vertical2']").TouchSpin({ verticalbuttons: true, diff --git a/bootstrap-validator/bootstrap-validator-tests.ts b/bootstrap-validator/bootstrap-validator-tests.ts index 07d4753ed1..e43a094184 100644 --- a/bootstrap-validator/bootstrap-validator-tests.ts +++ b/bootstrap-validator/bootstrap-validator-tests.ts @@ -1,5 +1,3 @@ -/// - $('#myForm').validator(); $('#myForm').validator('update'); $('#myForm').validator('validate'); diff --git a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts b/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts index 4306bf97c7..575f72b7cb 100644 --- a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts +++ b/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts @@ -1,26 +1,175 @@ -/// +import * as moment from "moment"; -import * as moment from 'moment'; +const dp = $("#picker").datetimepicker().data("DateTimePicker"); function test_cases() { - $('#datetimepicker').datetimepicker(); - $('#datetimepicker').datetimepicker({ - minDate: '2012-12-31' + $("#datetimepicker").datetimepicker(); + $("#datetimepicker").datetimepicker({ + minDate: "2012-12-31" }); - $('#datetimepicker').data("DateTimePicker").maxDate('2012-12-31'); + $("#datetimepicker").data("DateTimePicker").maxDate("2012-12-31"); - var startDate = moment(new Date(2012, 1, 20)); - var endDate = moment(new Date(2012, 1, 25)); - $('#datetimepicker2') + let startDate = moment(new Date(2012, 1, 20)); + const endDate = moment(new Date(2012, 1, 25)); + + $("#datetimepicker2") .datetimepicker() - .on("dp.change", function (ev) { + .on("dp.change", ev => { if (ev.date.valueOf() > endDate.valueOf()) { - $('#alert').show().find('strong').text('The start date must be before the end date.'); + $("#alert").show().find("strong").text("The start date must be before the end date."); } else { - $('#alert').hide(); + $("#alert").hide(); startDate = ev.date; - $('#date-start-display').text($('#date-start').data('date')); + $("#date-start-display").text($("#date-start").data("date")); } + }) + .on("dp.error", ev => { + console.log(`Error: ${ev.date.format("YYYY-MM-DD")}`); + }) + .on("dp.update", ev => { + console.log(`Change: ${ev.change}, ${ev.viewDate.format("YYYY-MM-DD")}`); }); -} \ No newline at end of file +} + +function test_date() { + let momentObj = moment("20111031", "YYYYMMDD"); + + dp.date(null); + dp.date("1969-07-21"); + dp.date(new Date()); + dp.date(momentObj); + + momentObj = dp.date(); +} + +function test_format() { + let boolFormat = false; + let strFormat = "YYYY-MM-DD"; + let momentFormat = moment.ISO_8601; + + $("#picker").datetimepicker({ + format: boolFormat + }); + + $("#picker").datetimepicker({ + format: strFormat + }); + + $("#picker").datetimepicker({ + format: momentFormat + }); + + dp.format(boolFormat); + boolFormat = dp.format() as boolean; + + dp.format(strFormat); + strFormat = dp.format() as string; + + dp.format(momentFormat); + momentFormat = dp.format() as moment.MomentBuiltinFormat; +} + +function test_extraFormats() { + let boolFormat = false; + let strFormats = ["YYYYMMDD", "YYYY/MM/DD"]; + let mixFormats = ["YYYYMMDD", moment.ISO_8601]; + + $("#picker").datetimepicker({ + extraFormats: boolFormat + }); + + $("#picker").datetimepicker({ + extraFormats: strFormats + }); + + $("#picker").datetimepicker({ + extraFormats: mixFormats + }); + + dp.extraFormats(boolFormat); + boolFormat = dp.extraFormats() as boolean; + + dp.extraFormats(strFormats); + strFormats = dp.extraFormats() as string[]; + + dp.extraFormats(mixFormats); + mixFormats = dp.extraFormats() as Array<(string | moment.MomentBuiltinFormat)>; +} + +function test_timeZone() { + let nullTz = null; + let strFormats = "Africa/Abidjan"; + + $("#picker").datetimepicker({ + timeZone: nullTz + }); + + $("#picker").datetimepicker({ + timeZone: strFormats + }); + + dp.timeZone(nullTz); + nullTz = dp.timeZone() as null; + + dp.timeZone(strFormats); + strFormats = dp.timeZone() as string; +} + + +function test_widgetParent() { + let nullW: null = null; + let str: string = "myId"; + let jquery = $("#element"); + + $("#picker").datetimepicker({ + widgetParent: nullW + }); + + $("#picker").datetimepicker({ + widgetParent: str + }); + + $("#picker").datetimepicker({ + widgetParent: jquery + }); + + dp.widgetParent(nullW); + nullW = dp.widgetParent() as null; + + dp.widgetParent(str); + str = dp.widgetParent() as string; + + dp.widgetParent(jquery); + jquery = dp.widgetParent() as JQuery; +} + +function inputParser(inputDate: string | Date | moment.Moment) { + const relativeDatePattern = /[0-9]+\s+(days ago)/; + + if (moment.isMoment(inputDate) || inputDate instanceof Date) { + return moment(inputDate); + } else { + const relativeDate = inputDate.match(relativeDatePattern); + if (relativeDate !== null) { + const subDays = +relativeDate[0].replace("days ago", "").trim(); + return moment().subtract(subDays, "day"); + } else { + return moment(); + } + } +}; + +function test_parseInputDate() { + let undef: undefined; + let parser: BootstrapV3DatetimePicker.InputParser; + + $("#picker").datetimepicker(); + + $("#picker").datetimepicker({ + parseInputDate: inputParser + }); + + undef = dp.parseInputDate() as undefined; + parser = dp.parseInputDate() as BootstrapV3DatetimePicker.InputParser; +} diff --git a/bootstrap.v3.datetimepicker/index.d.ts b/bootstrap.v3.datetimepicker/index.d.ts index 565ad9a356..d8ec008dca 100644 --- a/bootstrap.v3.datetimepicker/index.d.ts +++ b/bootstrap.v3.datetimepicker/index.d.ts @@ -1,21 +1,23 @@ -// Type definitions for Bootstrap 3 Datepicker v4.17.37 +// Type definitions for Bootstrap 3 Datepicker 4.17 // Project: http://eonasdan.github.io/bootstrap-datetimepicker // Definitions by: Katona Péter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // based on the previous version created by Jesica N. Fera /** - * bootstrap-datetimepicker.js 4.17.37 Copyright (c) 2015 Jonathan Peterson + * bootstrap-datetimepicker.js 4.17.45 Copyright (c) 2015 Jonathan Peterson * Available via the MIT license. * see: http://eonasdan.github.io/bootstrap-datetimepicker or https://github.com/Eonasdan/bootstrap-datetimepicker for details. */ /// -import * as moment from 'moment'; +import * as moment from "moment"; export as namespace BootstrapV3DatetimePicker; +type InputParser = (input: string | Date | moment.Moment) => moment.Moment; + export interface Datetimepicker { /**Clears the datepicker by setting the value to null */ clear(): void; @@ -30,7 +32,7 @@ export interface Datetimepicker { * Emits: * - dp.change - In case newDate is different from current moment */ - date(date: moment.Moment | Date | string): void; + date(date: moment.Moment | Date | string | null): void; /**Destroys the widget and removes all attached event listeners */ destroy(): void; /**Disables the input element, the component is attached to, by adding a disabled="true" attribute to it. If the widget was visible before that call it is hidden. @@ -149,21 +151,23 @@ export interface Datetimepicker { * Like en/disabledDates, the en/disabledHours options are mutually exclusive and will reset one of the options back to false. */ enabledHours(value: boolean | Array): void; /**Returns a boolean or array with the options.extraFormats option configuration */ - extraFormats(): boolean | Array; + extraFormats(): boolean | Array; /**Takes an array of valid input moment format options, or boolean:false */ - extraFormats(formats: boolean | Array): void; + extraFormats(formats: boolean | Array): void; /**Returns the options.focusOnShow option. */ focusOnShow(): boolean; /**If false, the textbox will not be given focus when the picker is shown */ focusOnShow(value: boolean): void; /**Returns the component's options.format string */ - format(): boolean | string; + format(): boolean | string | moment.MomentBuiltinFormat; /**Takes a moment.js format string and sets the components options.format. * This is used for displaying and also for parsing input strings either from the input element the component is attached to or the date() function. * The parameter can also be a boolean:false in which case the format is set to the locale's L LT. * Note: this is also used to determine if the TimePicker sub component will display the hours in 12 or 24 format. (if "a" or "h" exists in the passed string then a 12 hour mode is set) + * Throws: + * - TypeError - if format is boolean:true */ - format(format: boolean | string): void; + format(format: boolean | string | moment.MomentBuiltinFormat): void; /**Returns options.icons */ icons(): Icons; /**Takes an Object of strings. @@ -224,11 +228,11 @@ export interface Datetimepicker { */ minDate(date: moment.Moment | Date | string | boolean): void; /**Returns the options.parseInputDate option */ - parseInputDate(): Function; + parseInputDate(): InputParser | undefined; /**Allows custom input formatting For example: the user can enter "yesterday"" or "30 days ago". * {@link http://eonasdan.github.io/bootstrap-datetimepicker/Functions/#parseinputdate} */ - parseInputDate(value: (input: string) => moment.Moment): void; + parseInputDate(value: InputParser): void; /**Returns the options.showClear option. */ showClear(): boolean; /**Set if the clear date button will appear on the widget */ @@ -249,12 +253,19 @@ export interface Datetimepicker { stepping(): number; /**This will be the amount the up/down arrows move the minute value with a time picker. */ stepping(step: number): void; + /** Returns a string of options.timeZone */ + timeZone(): string | null; + /** Takes a null or a string of a valid timezone. + * Throws: + * - TypeError - if tooltips parameter is not a string or null + */ + timeZone(timeZone: string | null): void; /**Returns the options.toolbarplacement option. */ toolbarPlacement(): string; /**Changes the placement of the toolbar where the today, clear, component switch icon are located. * See valid values at DatetimepickerOptions.toolbarplacement * Throws: - * - TypeError if the parameter is not a valid value + * - TypeError - if the parameter is not a valid value */ toolbarPlacement(value: string): void; /**Returns the options.tooltips option */ @@ -267,10 +278,12 @@ export interface Datetimepicker { /**Returns the options.useCurrent option configuration */ useCurrent(): boolean | string; /**Takes a boolean or string. - * If a boolean true is passed and the components model moment is not set (either through setDate or through a valid value on the input element the component is attached to) then the first time the user opens the datetimepicker widget the value is initialized to the current moment of the action. + * If a boolean true is passed and the components model moment is not set (either through setDate or through a valid value on the input element the component is attached to) + * then the first time the user opens the datetimepicker widget the value is initialized to the current moment of the action. * If a false boolean is passed then no initialization happens on the input element. * You can select the granularity on the initialized moment by passing one of the following strings ("year", "month", "day", "hour", "minute") in the variable. - * If for example you pass "day" to the useCurrent function and the input field is empty the first time the user opens the datetimepicker widget the input text will be initialized to the current datetime with day granularity (ie if currentTime = 2014-08-10 13:32:33 the input value will be initialized to 2014-08-10 00:00:00) + * If for example you pass "day" to the useCurrent function and the input field is empty the first time the user opens the datetimepicker widget the input text will be + * initialized to the current datetime with day granularity (ie if currentTime = 2014-08-10 13:32:33 the input value will be initialized to 2014-08-10 00:00:00) * Note: If the options.defaultDate is set or the input element the component is attached to has already a value that takes precedence and the functionality of useCurrent is not triggered! */ useCurrent(value: boolean | string): void; @@ -289,6 +302,10 @@ export interface Datetimepicker { * - TypeError - if the parameter is not a string or not a valid value */ viewMode(value: string): void; + /**Returns a $(element) variable with the currently set options.widgetParent option. */ + widgetParent(): string | JQuery | null + /**Takes a string or $(element) value. */ + widgetParent(widgetParent: string | JQuery | null): void; /**Returns the options.widgetPositioning object */ widgetPositioning(): WidgetPositioningOptions; /**WidgetPositioning defines where the dropdown with the widget will appear relative to the input element the component is attached to. @@ -364,7 +381,7 @@ export interface DatetimepickerOptions { /**Allows for several input formats to be valid. See: https://github.com/Eonasdan/bootstrap-datetimepicker/pull/666 * @default: false */ - extraFormats?: boolean | Array; + extraFormats?: boolean | Array; /**If false, the textbox will not be given focus when the picker is shown * @default: true */ @@ -372,7 +389,7 @@ export interface DatetimepickerOptions { /**See momentjs' docs for valid formats. Format also dictates what components are shown, e.g. MM/dd/YYYY will not display the time picker. * @default: false */ - format?: boolean | string; + format?: boolean | string | moment.MomentBuiltinFormat; /**Change the default icons for the pickers functions. */ icons?: Icons; /**Allow date picker show event to fire even when the associated input element has the readonly="readonly"property. @@ -416,7 +433,7 @@ export interface DatetimepickerOptions { /**Allows custom input formatting For example: the user can enter "yesterday"" or "30 days ago". * {@link http://eonasdan.github.io/bootstrap-datetimepicker/Functions/#parseinputdate} */ - parseInputDate?: (input: string) => moment.Moment; + parseInputDate?: InputParser; /**Show the "Clear" button in the icon toolbar. * Clicking the "Clear" button will set the calendar to null. * @default: false @@ -440,6 +457,11 @@ export interface DatetimepickerOptions { * @default: 1 */ stepping?: number; + /** + * Timezone to use, if moment-timezone is loaded. If null or empty string, ignore timezones. + * @default: "" + */ + timeZone?: string | null; /**Changes the placement of the icon toolbar. * @default: "default" */ @@ -466,7 +488,7 @@ export interface DatetimepickerOptions { /**On picker show, places the widget at the identifier (string) or jQuery object if the element has css position: "relative" * @default: null */ - widgetParent?: string | JQuery; + widgetParent?: string | JQuery | null; widgetPositioning?: WidgetPositioningOptions; } @@ -540,12 +562,12 @@ export interface UpdateEvent extends JQueryEventObject { viewDate: moment.Moment; } +type EventName = "dp.show" | "dp.hide" | "dp.error"; declare global { interface JQuery { - datetimepicker(): JQuery; - datetimepicker(options: DatetimepickerOptions): JQuery; + datetimepicker(options?: DatetimepickerOptions): JQuery; data(key: "DateTimePicker"): Datetimepicker; @@ -556,36 +578,18 @@ declare global { off(events: "dp.change", handler: (eventobject: ChangeEvent) => any): JQuery; off(events: "dp.change", selector?: string, handler?: (eventobject: ChangeEvent) => any): JQuery; + on(events: EventName , handler: (eventObject: Event) => any): JQuery; + on(events: EventName, selector: string, handler: (eventobject: Event) => any): JQuery; + on(events: EventName, selector: string, data: any, handler?: (eventobject: Event) => any): JQuery; - on(events: "dp.show", handler: (eventObject: Event) => any): JQuery; - on(events: "dp.show", selector: string, handler: (eventobject: Event) => any): JQuery; - on(events: "dp.show", selector: string, data: any, handler?: (eventobject: Event) => any): JQuery; - - off(events: "dp.show", handler: (eventobject: Event) => any): JQuery; - off(events: "dp.show", selector?: string, handler?: (eventobject: Event) => any): JQuery; - - - on(events: "dp.hide", handler: (eventObject: Event) => any): JQuery; - on(events: "dp.hide", selector: string, handler: (eventobject: Event) => any): JQuery; - on(events: "dp.hide", selector: string, data: any, handler?: (eventobject: Event) => any): JQuery; - - off(events: "dp.hide", handler: (eventobject: Event) => any): JQuery; - off(events: "dp.hide", selector?: string, handler?: (eventobject: Event) => any): JQuery; - - - on(events: "dp.error", handler: (eventObject: Event) => any): JQuery; - on(events: "dp.error", selector: string, handler: (eventobject: Event) => any): JQuery; - on(events: "dp.error", selector: string, data: any, handler?: (eventobject: Event) => any): JQuery; - - off(events: "dp.error", handler: (eventobject: Event) => any): JQuery; - off(events: "dp.error", selector?: string, handler?: (eventobject: Event) => any): JQuery; - + off(events: EventName, handler: (eventobject: Event) => any): JQuery; + off(events: EventName, selector?: string, handler?: (eventobject: Event) => any): JQuery; on(events: "dp.update", handler: (eventObject: UpdateEvent) => any): JQuery; on(events: "dp.update", selector: string, handler: (eventobject: UpdateEvent) => any): JQuery; on(events: "dp.update", selector: string, data: any, handler?: (eventobject: UpdateEvent) => any): JQuery; - off(events: "dp.update", handler: (eventobject: Event) => any): JQuery; + off(events: "dp.update", handler: (eventobject: UpdateEvent) => any): JQuery; off(events: "dp.update", selector?: string, handler?: (eventobject: UpdateEvent) => any): JQuery; } } diff --git a/bootstrap.v3.datetimepicker/tsconfig.json b/bootstrap.v3.datetimepicker/tsconfig.json index 27ff9874c6..a405cd85dc 100644 --- a/bootstrap.v3.datetimepicker/tsconfig.json +++ b/bootstrap.v3.datetimepicker/tsconfig.json @@ -11,7 +11,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/bootstrap.v3.datetimepicker/tslint.json b/bootstrap.v3.datetimepicker/tslint.json new file mode 100644 index 0000000000..341858d283 --- /dev/null +++ b/bootstrap.v3.datetimepicker/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "quotemark": [true, "double", "avoid-escape"] + } +} \ No newline at end of file diff --git a/bootstrap/bootstrap-tests.ts b/bootstrap/bootstrap-tests.ts index cef85d5d42..cd786b41a7 100644 --- a/bootstrap/bootstrap-tests.ts +++ b/bootstrap/bootstrap-tests.ts @@ -1,6 +1,3 @@ -/// - - $('body').off('.data-api'); $('body').off('.alert.data-api'); diff --git a/breeze/index.d.ts b/breeze/index.d.ts index 8cc109d746..323e9a8f87 100644 --- a/breeze/index.d.ts +++ b/breeze/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Breeze 1.5.x +// Type definitions for Breeze 1.6.3 // Project: http://www.breezejs.com/ // Definitions by: Boris Yankov , IdeaBlade // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,10 @@ // Updated Jan 20 2015 for Breeze 1.5.2 and merging changes from DefinitelyTyped // Updated Feb 28 2015 add any/all clause on Predicate // Updated Jun 27 2016 - Marcel Good (www.ideablade.com) -// Updated Jul 28 2016 - Serkan "coni2k" Holat +// Updated Jun 29 2016 - Marcel Good (www.ideablade.com) +// Updated Jul 15 2016 - Added methods to JsonResultsAdapter - Steve Schmitt +// Updated Sep 23 2016 - Added core methods +// Updated March 5 2017 - Eliminate promises.IPromise and replace with Promise declare namespace breeze.core { @@ -89,6 +92,19 @@ declare namespace breeze.core { export function stringStartsWith(str: string, prefix: string): boolean; export function stringEndsWith(str: string, suffix: string): boolean; export function formatString(format: string, ...args: any[]): string; + + /** Change text to title case with spaces, e.g. 'myPropertyName12' to 'My Property Name 12' */ + export function titleCase(str: string): string; + + /** Return the ES5 property descriptor for the property, which may be on a prototype of the object */ + export function getPropertyDescriptor(obj: any, propertyName: string): PropertyDescriptor + + /** safely perform toJSON logic on objects with cycles. Replacer function can map or exclude properties. */ + export function toJSONSafe(obj: any, replacer: (prop: string, val: any) => any): any + + /** Default value replacer for toJSONSafe. Replaces entityAspect and other internal properties with undefined. */ + export function toJSONSafeReplacer(prop: string, val: any): any + } declare namespace breeze { @@ -214,19 +230,23 @@ declare namespace breeze { export class DataServiceAdapter { checkForRecomposition(interfaceInitializedArgs: { interfaceName: string; isDefault: boolean }): void; initialize(): void; - fetchMetadata(metadataStore: MetadataStore, dataService: DataService): breeze.promises.IPromise; - executeQuery(mappingContext: { getUrl: () => string; query: EntityQuery; dataService: DataService }): breeze.promises.IPromise; - saveChanges(saveContext: { resourceName: string; dataService: DataService }, saveBundle: Object): breeze.promises.IPromise; + fetchMetadata(metadataStore: MetadataStore, dataService: DataService): Promise; + executeQuery(mappingContext: { getUrl: () => string; query: EntityQuery; dataService: DataService }): Promise; + saveChanges(saveContext: { resourceName: string; dataService: DataService }, saveBundle: Object): Promise; JsonResultsAdapter: JsonResultsAdapter; } export class JsonResultsAdapter { name: string; extractResults: (data: {}) => {}; + extractSaveResults: (data: {}) => any[]; + extractKeyMappings: (data: {}) => KeyMapping[]; visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; }; constructor(config: { name: string; extractResults?: (data: {}) => {}; + extractSaveResults?: (data: {}) => any[]; + extractKeyMappings?: (data: {}) => KeyMapping[]; visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; }; }); } @@ -241,6 +261,7 @@ declare namespace breeze { export interface NodeContext { nodeType: string; + propertyName: string; } export class DataTypeSymbol extends breeze.core.EnumSymbol { @@ -333,8 +354,8 @@ declare namespace breeze { isNavigationPropertyLoaded(navigationProperty: string): boolean; isNavigationPropertyLoaded(navigationProperty: NavigationProperty): boolean; - loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): breeze.promises.IPromise; - loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): breeze.promises.IPromise; + loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): Promise; + loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): Promise; rejectChanges(): void; @@ -423,16 +444,16 @@ declare namespace breeze { createEntity(typeName: string, config?: {}, entityState?: EntityStateSymbol, mergeStrategy?: MergeStrategySymbol): Entity; createEntity(entityType: EntityType, config?: {}, entityState?: EntityStateSymbol, mergeStrategy?: MergeStrategySymbol): Entity; detachEntity(entity: Entity): boolean; - executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; - executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; + executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; + executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; executeQueryLocally(query: EntityQuery): Entity[]; exportEntities(entities?: Entity[], includeMetadata?: boolean): string; exportEntities(entities?: Entity[], options?: ExportEntitiesOptions): any; // string | Object - fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): breeze.promises.IPromise; - fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): breeze.promises.IPromise; - fetchEntityByKey(entityKey: EntityKey): breeze.promises.IPromise; - fetchMetadata(callback?: (schema: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; + fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): Promise; + fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): Promise; + fetchEntityByKey(entityKey: EntityKey): Promise; + fetchMetadata(callback?: (schema: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; generateTempKeyValue(entity: Entity): any; getChanges(): Entity[]; getChanges(entityTypeName: string): Entity[]; @@ -466,7 +487,7 @@ declare namespace breeze { importEntities(exportedData: Object, config?: { mergeStrategy?: MergeStrategySymbol; metadataVersionFn?: (any: any) => void }): { entities: Entity[]; tempKeyMapping: { [key: string]: EntityKey } }; rejectChanges(): Entity[]; - saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): breeze.promises.IPromise; + saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): Promise; setProperties(config: EntityManagerProperties): void; } @@ -554,7 +575,7 @@ declare namespace breeze { /** Create query from an expression tree */ constructor(tree: Object); - execute(callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; + execute(callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; executeLocally(): Entity[]; expand(propertyPaths: string[]): EntityQuery; expand(propertyPaths: string): EntityQuery; @@ -591,6 +612,8 @@ declare namespace breeze { where(property: string, filterop: FilterQueryOpSymbol, property2: string, filterop2: FilterQueryOpSymbol, value: any): EntityQuery; // for any/all clauses where(property: string, filterop: string, property2: string, filterop2: string, value: any): EntityQuery; // for any/all clauses where(predicate: FilterQueryOpSymbol): EntityQuery; + where(anArray: IRecursiveArray): EntityQuery; + withParameters(params: Object): EntityQuery; toJSON(): string; @@ -721,13 +744,14 @@ declare namespace breeze { addDataService(dataService: DataService, shouldOverwrite?: boolean): void; addEntityType(structuralType: IStructuralType): void; exportMetadata(): string; - fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; - fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; + fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; + fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; getDataService(serviceName: string): DataService; getEntityType(entityTypeName: string, okIfNotFound?: boolean): IStructuralType; getEntityTypes(): IStructuralType[]; hasMetadataFor(serviceName: string): boolean; static importMetadata(exportedString: string): MetadataStore; + static normalizeTypeName(typeName: string): string; importMetadata(exportedString: string, allowMerge?: boolean): MetadataStore; isEmpty(): boolean; registerEntityTypeCtor(entityTypeName: string, entityCtor: Function, initializationFn?: (entity: Entity) => void, noTrackingFn?: (node: Object, entityType: EntityType) => Object): void; @@ -796,7 +820,7 @@ declare namespace breeze { export interface IRecursiveArray { [i: number]: T | IRecursiveArray; } - + export class Predicate { constructor(); constructor(property: string, operator: string, value: any); @@ -904,10 +928,16 @@ declare namespace breeze { export interface SaveResult { entities: Entity[]; - keyMappings: any; + keyMappings: KeyMapping[]; XHR: XMLHttpRequest; } + export interface KeyMapping { + entityTypeName: string; + tempValue: any; + realValue: any; + } + export class ValidationError { key: string; context: any; @@ -993,7 +1023,7 @@ declare namespace breeze { /** Creates a regular expression validator with a fixed expression. */ static makeRegExpValidator(validatorName: string, expression: RegExp, defaultMessage: string, context?: any): Validator; - /** Run this validator against the specified value. + /** Run this validator against the specified value. @param value {Object} Value to validate @param additionalContext {Object} Any additional contextual information that the Validator can make use of. @return {ValidationError|null} A ValidationError if validation fails, null otherwise */ @@ -1044,20 +1074,16 @@ declare namespace breeze.config { @return {an instance of the specified adapter} **/ export function getAdapterInstance(interfaceName: string, adapterName?: string): Object; - - export interface Adapter { - getRoutePrefix: Function - } /** - Initializes a single adapter implementation. Initialization means either newing a instance of the + Initializes a single adapter implementation. Initialization means either newing a instance of the specified interface and then calling "initialize" on it or simply calling "initialize" on the instance if it already exists. @param interfaceName {String} The name of the interface to which the adapter to initialize belongs. @param adapterName {String} - The name of a previously registered adapter to initialize. - @param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface. + @param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface. @return {an instance of the specified adapter} **/ - export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Adapter; + export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Object; export interface AdapterInstancesConfig { /** the name of a previously registered "ajax" adapter */ @@ -1080,15 +1106,15 @@ declare namespace breeze.config { export var objectRegistry: Object; /** Method use to register implementations of standard breeze interfaces. Calls to this method are usually - made as the last step within an adapter implementation. + made as the last step within an adapter implementation. @param interfaceName {String} - one of the following interface names "ajax", "dataService" or "modelLibrary" - @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface. + @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface. **/ export function registerAdapter(interfaceName: string, adapterCtor: Function): void; export function registerFunction(fn: Function, fnName: string): void; export function registerType(ctor: Function, typeName: string): void; //static setProperties(config: Object): void; //deprecated - /** + /** Set the promise implementation, if Q.js is not found. @param q - implementation of promise. @see http://wiki.commonjs.org/wiki/Promises/A */ @@ -1101,27 +1127,17 @@ declare namespace breeze.config { /** Promises interface used by Breeze. Usually implemented by Q (https://github.com/kriskowal/q) or angular.$q using breeze.config.setQ(impl) */ declare namespace breeze.promises { - export interface IPromise { - then(onFulfill: (value: T) => U, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise): IPromise; - catch(onRejected: (reason: any) => U): IPromise; - catch(onRejected: (reason: any) => IPromise): IPromise; - finally(finallyCallback: () => any): IPromise; - } - export interface IDeferred { - promise: IPromise; + promise: Promise; resolve(value: T): void; reject(reason: any): void; } export interface IPromiseService { defer(): IDeferred; - reject(reason?: any): IPromise; - resolve(object: T): IPromise; - resolve(object: IPromise): IPromise; + reject(reason?: any): Promise; + resolve(object: T): Promise; + resolve(object: Promise): Promise; } } diff --git a/browser-resolve/browser-resolve-tests.ts b/browser-resolve/browser-resolve-tests.ts index 2225f7754c..7d08de726f 100644 --- a/browser-resolve/browser-resolve-tests.ts +++ b/browser-resolve/browser-resolve-tests.ts @@ -1,5 +1,3 @@ -/// - import * as browserResolve from 'browser-resolve'; function basic_test_async(callback: (err?: Error, resolved?: string) => void) { diff --git a/bull/bull-tests.tsx b/bull/bull-tests.tsx index 1d307fd31e..fcf339b3c3 100644 --- a/bull/bull-tests.tsx +++ b/bull/bull-tests.tsx @@ -98,3 +98,18 @@ videoQueue.process( ( job: VideoJob ) => { // don't forget to remove the done ca // If the job throws an unhandled exception it is also handled correctly throw new Error( 'some unexpected error' ); } ); + + +var addVideo1Job = videoQueue.add( { video: 'http://example.com/video1.mov' } ); + +addVideo1Job.then((video1Job) => { + // When job has successfully be placed in the queue the job is returned + // then wait for completion + return video1Job.finished(); +}) +.then(() => { + // video1Job completed successfully +}) +.catch((err) => { + // error +}); diff --git a/bull/index.d.ts b/bull/index.d.ts index c604fe25d6..3c89655101 100644 --- a/bull/index.d.ts +++ b/bull/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for bull 1.0.0 +// Type definitions for bull 2.1.2 // Project: https://github.com/OptimalBits/bull -// Definitions by: Bruno Grieder +// Definitions by: Bruno Grieder , Cameron Crothers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -47,6 +47,13 @@ declare module "bull" { * @returns {Promise} A promise that resolves when the job is scheduled for retry. */ retry(): Promise; + + /** + * Returns a promise the resolves when the job has been finished. + * TODO: Add a watchdog to check if the job has finished periodically. + * since pubsub does not give any guarantees. + */ + finished(): Promise; } export interface Backoff { diff --git a/bunyan-blackhole/bunyan-blackhole-tests.ts b/bunyan-blackhole/bunyan-blackhole-tests.ts new file mode 100644 index 0000000000..ef2096a4c8 --- /dev/null +++ b/bunyan-blackhole/bunyan-blackhole-tests.ts @@ -0,0 +1,26 @@ +import blackhole = require("bunyan-blackhole"); + + + +var logsLaboursLost = blackhole("lost"); + +const rotten = new Error("Something is rotten in the state of Denmark"); + +logsLaboursLost.info(rotten, "Play %s", "Hamlet"); +logsLaboursLost.debug(rotten, "Play %s", "King Lear"); +logsLaboursLost.trace(rotten, "Play %s", "Much Ado About Nothing"); +logsLaboursLost.warn(rotten, "Play %s", "All's Well That Ends Well"); +logsLaboursLost.error(rotten, "Play %s", "Romeo and Juliet"); + +logsLaboursLost.error("Something is rotten in the state of Denmark"); + +logsLaboursLost.debug({character: "Marcellus", play: "King Lear"}, "Friends of my soul, you twain"); +logsLaboursLost.trace({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none"); +logsLaboursLost.info({play: "Much Ado About Nothing"}, "Let me be that I am and seek not to alter me."); +logsLaboursLost.warn({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none"); +logsLaboursLost.error({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none"); + +var hamlet = logsLaboursLost.child({play: "Hamlet"}); +hamlet.info({character: "Polonius"}, "Though this be madness, yet there is method in't"); + + diff --git a/bunyan-blackhole/index.d.ts b/bunyan-blackhole/index.d.ts new file mode 100644 index 0000000000..f8be6fc730 --- /dev/null +++ b/bunyan-blackhole/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for bunyan-blackhole 0.2 +// Project: https://github.com/Floby/node-bunyan-blackhole +// Definitions by: Olivier Chevet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as Logger from "bunyan"; + +/** + * Constructor. + * @param {string} [name] name of the blackhole Logger + * @return {Logger} A bunyan logger . + */ +declare function bunyanBlackHole(name: string): Logger; +export = bunyanBlackHole; diff --git a/node-form/tsconfig.json b/bunyan-blackhole/tsconfig.json similarity index 92% rename from node-form/tsconfig.json rename to bunyan-blackhole/tsconfig.json index 1bb627df73..cddd529d29 100644 --- a/node-form/tsconfig.json +++ b/bunyan-blackhole/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "node-form-tests.ts" + "bunyan-blackhole-tests.ts" ] } \ No newline at end of file diff --git a/bunyan-blackhole/tslint.json b/bunyan-blackhole/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/bunyan-blackhole/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/bunyan/bunyan-tests.ts b/bunyan/bunyan-tests.ts index 91b45765d1..acf382c7c2 100644 --- a/bunyan/bunyan-tests.ts +++ b/bunyan/bunyan-tests.ts @@ -86,26 +86,32 @@ var object = { test: 123 }; +log.trace(); log.trace(buffer); log.trace(error); log.trace(object); log.trace('Hello, %s', 'world!'); +log.debug(); log.debug(buffer); log.debug(error); log.debug(object); log.debug('Hello, %s', 'world!'); +log.info(); log.info(buffer); log.info(error); log.info(object); log.info('Hello, %s', 'world!'); +log.warn(); log.warn(buffer); log.warn(error); log.warn(object); log.warn('Hello, %s', 'world!'); +log.error(); log.error(buffer); log.error(error); log.error(object); log.error('Hello, %s', 'world!'); +log.fatal(); log.fatal(buffer); log.fatal(error); log.fatal(object); diff --git a/bunyan/index.d.ts b/bunyan/index.d.ts index 787a0225f1..060fa8eaa3 100644 --- a/bunyan/index.d.ts +++ b/bunyan/index.d.ts @@ -22,30 +22,191 @@ declare class Logger extends EventEmitter { fields: any; src: boolean; + /** + * Returns a boolean: is the `trace` level enabled? + * + * This is equivalent to `log.isTraceEnabled()` or `log.isEnabledFor(TRACE)` in log4j. + */ + trace(): boolean; + + /** + * Special case to log an `Error` instance to the record. + * This adds an `err` field with exception details + * (including the stack) and sets `msg` to the exception + * message or you can specify the `msg`. + */ trace(error: Error, format?: any, ...params: any[]): void; + trace(buffer: Buffer, format?: any, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + trace(format: string | number, ...params: any[]): void; + + /** + * The first field can optionally be a "fields" object, which + * is merged into the log record. + * + * To pass in an Error *and* other fields, use the `err` + * field name for the Error instance. + */ trace(obj: Object, format?: any, ...params: any[]): void; - trace(format: string, ...params: any[]): void; + + /** + * Returns a boolean: is the `debug` level enabled? + * + * This is equivalent to `log.isDebugEnabled()` or `log.isEnabledFor(DEBUG)` in log4j. + */ + debug(): boolean; + + /** + * Special case to log an `Error` instance to the record. + * This adds an `err` field with exception details + * (including the stack) and sets `msg` to the exception + * message or you can specify the `msg`. + */ debug(error: Error, format?: any, ...params: any[]): void; + debug(buffer: Buffer, format?: any, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + debug(format: string | number, ...params: any[]): void; + + /** + * The first field can optionally be a "fields" object, which + * is merged into the log record. + * + * To pass in an Error *and* other fields, use the `err` + * field name for the Error instance. + */ debug(obj: Object, format?: any, ...params: any[]): void; - debug(format: string, ...params: any[]): void; + + /** + * Returns a boolean: is the `info` level enabled? + * + * This is equivalent to `log.isInfoEnabled()` or `log.isEnabledFor(INFO)` in log4j. + */ + info(): boolean; + + /** + * Special case to log an `Error` instance to the record. + * This adds an `err` field with exception details + * (including the stack) and sets `msg` to the exception + * message or you can specify the `msg`. + */ info(error: Error, format?: any, ...params: any[]): void; + info(buffer: Buffer, format?: any, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + info(format: string | number, ...params: any[]): void; + + /** + * The first field can optionally be a "fields" object, which + * is merged into the log record. + * + * To pass in an Error *and* other fields, use the `err` + * field name for the Error instance. + */ info(obj: Object, format?: any, ...params: any[]): void; - info(format: string, ...params: any[]): void; + + /** + * Returns a boolean: is the `warn` level enabled? + * + * This is equivalent to `log.isWarnEnabled()` or `log.isEnabledFor(WARN)` in log4j. + */ + warn(): boolean; + + /** + * Special case to log an `Error` instance to the record. + * This adds an `err` field with exception details + * (including the stack) and sets `msg` to the exception + * message or you can specify the `msg`. + */ warn(error: Error, format?: any, ...params: any[]): void; + warn(buffer: Buffer, format?: any, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + warn(format: string | number, ...params: any[]): void; + + /** + * The first field can optionally be a "fields" object, which + * is merged into the log record. + * + * To pass in an Error *and* other fields, use the `err` + * field name for the Error instance. + */ warn(obj: Object, format?: any, ...params: any[]): void; - warn(format: string, ...params: any[]): void; + + /** + * Returns a boolean: is the `error` level enabled? + * + * This is equivalent to `log.isErrorEnabled()` or `log.isEnabledFor(ERROR)` in log4j. + */ + error(): boolean; + + /** + * Special case to log an `Error` instance to the record. + * This adds an `err` field with exception details + * (including the stack) and sets `msg` to the exception + * message or you can specify the `msg`. + */ error(error: Error, format?: any, ...params: any[]): void; + error(buffer: Buffer, format?: any, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + error(format: string | number, ...params: any[]): void; + + /** + * The first field can optionally be a "fields" object, which + * is merged into the log record. + * + * To pass in an Error *and* other fields, use the `err` + * field name for the Error instance. + */ error(obj: Object, format?: any, ...params: any[]): void; - error(format: string, ...params: any[]): void; + + /** + * Returns a boolean: is the `fatal` level enabled? + * + * This is equivalent to `log.isFatalEnabled()` or `log.isEnabledFor(FATAL)` in log4j. + */ + fatal(): boolean; + + /** + * Special case to log an `Error` instance to the record. + * This adds an `err` field with exception details + * (including the stack) and sets `msg` to the exception + * message or you can specify the `msg`. + */ fatal(error: Error, format?: any, ...params: any[]): void; + fatal(buffer: Buffer, format?: any, ...params: any[]): void; + + /** + * Uses `util.format` for msg formatting. + */ + fatal(format: string | number, ...params: any[]): void; + + /** + * The first field can optionally be a "fields" object, which + * is merged into the log record. + * + * To pass in an Error *and* other fields, use the `err` + * field name for the Error instance. + */ fatal(obj: Object, format?: any, ...params: any[]): void; - fatal(format: string, ...params: any[]): void; } declare namespace Logger { diff --git a/business-rules-engine/Validation.d.ts b/business-rules-engine/Validation.d.ts index 0dd8283dc2..7f61f517be 100644 --- a/business-rules-engine/Validation.d.ts +++ b/business-rules-engine/Validation.d.ts @@ -3,8 +3,6 @@ // Definitions by: Roman Samec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare namespace Validation { interface IErrorCustomMessage { (config: any, args: any): string; diff --git a/business-rules-engine/business-rules-engine-tests.ts b/business-rules-engine/business-rules-engine-tests.ts index 3ffbe2948c..4ae31155f2 100644 --- a/business-rules-engine/business-rules-engine-tests.ts +++ b/business-rules-engine/business-rules-engine-tests.ts @@ -1,4 +1,3 @@ -/// import * as Validators from 'business-rules-engine/node-validators'; import Validation = require("business-rules-engine"); diff --git a/business-rules-engine/index.d.ts b/business-rules-engine/index.d.ts index 4f71b43dfb..a74bcf180d 100644 --- a/business-rules-engine/index.d.ts +++ b/business-rules-engine/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Source: typings/business-rules-engine/Validation.d.ts -/// import * as Q from "q"; diff --git a/business-rules-engine/node-validators.d.ts b/business-rules-engine/node-validators.d.ts index 73746eef92..fa2b9cb39e 100644 --- a/business-rules-engine/node-validators.d.ts +++ b/business-rules-engine/node-validators.d.ts @@ -3,7 +3,6 @@ // Definitions by: Roman Samec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// /// import Validation = require("business-rules-engine"); diff --git a/business-rules-engine/tsconfig.json b/business-rules-engine/tsconfig.json index 008e622d1f..a80b05099b 100644 --- a/business-rules-engine/tsconfig.json +++ b/business-rules-engine/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/c3/c3-tests.ts b/c3/c3-tests.ts index 4a0695af1f..d9057eabb6 100644 --- a/c3/c3-tests.ts +++ b/c3/c3-tests.ts @@ -368,7 +368,9 @@ function line_examples() { data: {}, line: { connectNull: true, - step_type: "step-after" + step: { + type: "step-after" + } } }); } diff --git a/c3/index.d.ts b/c3/index.d.ts index 5edb096395..748b19bfc5 100644 --- a/c3/index.d.ts +++ b/c3/index.d.ts @@ -145,7 +145,9 @@ declare namespace c3 { /** * Change step type for step chart. 'step', 'step-before' and 'step-after' can be used. */ - step_type?: string; + step?: { + type: string; + }; }; area?: { diff --git a/cachefactory/cachefactory-tests.ts b/cachefactory/cachefactory-tests.ts index 73397dd8bf..32eeb63257 100644 --- a/cachefactory/cachefactory-tests.ts +++ b/cachefactory/cachefactory-tests.ts @@ -1,5 +1,3 @@ -/// - CacheFactory.get('test'); CacheFactory.createCache('test', { diff --git a/cal-heatmap/cal-heatmap-tests.ts b/cal-heatmap/cal-heatmap-tests.ts index 47020b811c..ff0e3c0d06 100644 --- a/cal-heatmap/cal-heatmap-tests.ts +++ b/cal-heatmap/cal-heatmap-tests.ts @@ -1,6 +1,4 @@ - /// -/// var cal = new CalHeatMap(); cal.init(); diff --git a/cassandra-driver/cassandra-driver-tests.ts b/cassandra-driver/cassandra-driver-tests.ts index 9feee249ac..e5d8f2ab60 100644 --- a/cassandra-driver/cassandra-driver-tests.ts +++ b/cassandra-driver/cassandra-driver-tests.ts @@ -1,5 +1,3 @@ -/// - import * as cassandra from 'cassandra-driver'; import * as util from 'util'; diff --git a/cbor/cbor-tests.ts b/cbor/cbor-tests.ts index e1a7abb9cf..eb84201b97 100644 --- a/cbor/cbor-tests.ts +++ b/cbor/cbor-tests.ts @@ -1,5 +1,3 @@ -/// - import cbor = require('cbor'); import assert = require('assert'); import fs = require('fs'); diff --git a/chai-as-promised/chai-as-promised-tests.ts b/chai-as-promised/chai-as-promised-tests.ts index 0fde03dfa3..d9f681769b 100644 --- a/chai-as-promised/chai-as-promised-tests.ts +++ b/chai-as-promised/chai-as-promised-tests.ts @@ -1,7 +1,3 @@ - -/// -/// - import chai = require('chai'); import chaiAsPromised = require('chai-as-promised'); import Q = require('q'); @@ -12,7 +8,7 @@ class TestClass {} // ReSharper disable WrongExpressionStatement // BDD API (expect) -var thenableNum: PromisesAPlus.Thenable; +var thenableNum: PromiseLike; thenableNum = chai.expect(thenableNum).to.eventually.equal(3); thenableNum = chai.expect(thenableNum).to.eventually.have.property('foo'); thenableNum = chai.expect(thenableNum).to.become(3); @@ -56,7 +52,7 @@ Q.all([ ]).should.notify(() => console.log('done')); // Assert API -var thenableVoid: PromisesAPlus.Thenable; +var thenableVoid: PromiseLike; thenableVoid = chai.assert.eventually.equal(thenableNum, 4, 'Message'); thenableVoid = chai.assert.isFulfilled(thenableNum, "optional message"); thenableVoid = chai.assert.becomes(thenableNum, "foo", "optional message"); diff --git a/chai-as-promised/index.d.ts b/chai-as-promised/index.d.ts index b4f3ca405d..4c36eccb61 100644 --- a/chai-as-promised/index.d.ts +++ b/chai-as-promised/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// declare module 'chai-as-promised' { function chaiAsPromised(chai: any, utils: any): void; @@ -27,7 +26,7 @@ declare namespace Chai { // Eventually does not have .then(), but PromisedAssertion have. interface Eventually extends PromisedLanguageChains, PromisedNumericComparison, PromisedTypeComparison { // From chai-as-promised - become(expected: PromisesAPlus.Thenable): PromisedAssertion; + become(expected: PromiseLike): PromisedAssertion; fulfilled: PromisedAssertion; rejected: PromisedAssertion; rejectedWith(expected: any, message?: string | RegExp): PromisedAssertion; @@ -74,7 +73,7 @@ declare namespace Chai { members: PromisedMembers; } - interface PromisedAssertion extends Eventually, PromisesAPlus.Thenable { + interface PromisedAssertion extends Eventually, PromiseLike { } interface PromisedLanguageChains { @@ -181,111 +180,111 @@ declare namespace Chai { // For Assert API interface Assert { eventually: PromisedAssert; - isFulfilled(promise: PromisesAPlus.Thenable, message?: string): PromisesAPlus.Thenable; - becomes(promise: PromisesAPlus.Thenable, expected: any, message?: string): PromisesAPlus.Thenable; - doesNotBecome(promise: PromisesAPlus.Thenable, expected: any, message?: string): PromisesAPlus.Thenable; - isRejected(promise: PromisesAPlus.Thenable, message?: string): PromisesAPlus.Thenable; - isRejected(promise: PromisesAPlus.Thenable, expected: any, message?: string): PromisesAPlus.Thenable; - isRejected(promise: PromisesAPlus.Thenable, match: RegExp, message?: string): PromisesAPlus.Thenable; - notify(fn: Function): PromisesAPlus.Thenable; + isFulfilled(promise: PromiseLike, message?: string): PromiseLike; + becomes(promise: PromiseLike, expected: any, message?: string): PromiseLike; + doesNotBecome(promise: PromiseLike, expected: any, message?: string): PromiseLike; + isRejected(promise: PromiseLike, message?: string): PromiseLike; + isRejected(promise: PromiseLike, expected: any, message?: string): PromiseLike; + isRejected(promise: PromiseLike, match: RegExp, message?: string): PromiseLike; + notify(fn: Function): PromiseLike; } export interface PromisedAssert { - fail(actual?: any, expected?: any, msg?: string, operator?: string): PromisesAPlus.Thenable; + fail(actual?: any, expected?: any, msg?: string, operator?: string): PromiseLike; - ok(val: any, msg?: string): PromisesAPlus.Thenable; - notOk(val: any, msg?: string): PromisesAPlus.Thenable; + ok(val: any, msg?: string): PromiseLike; + notOk(val: any, msg?: string): PromiseLike; - equal(act: any, exp: any, msg?: string): PromisesAPlus.Thenable; - notEqual(act: any, exp: any, msg?: string): PromisesAPlus.Thenable; + equal(act: any, exp: any, msg?: string): PromiseLike; + notEqual(act: any, exp: any, msg?: string): PromiseLike; - strictEqual(act: any, exp: any, msg?: string): PromisesAPlus.Thenable; - notStrictEqual(act: any, exp: any, msg?: string): PromisesAPlus.Thenable; + strictEqual(act: any, exp: any, msg?: string): PromiseLike; + notStrictEqual(act: any, exp: any, msg?: string): PromiseLike; - deepEqual(act: any, exp: any, msg?: string): PromisesAPlus.Thenable; - notDeepEqual(act: any, exp: any, msg?: string): PromisesAPlus.Thenable; + deepEqual(act: any, exp: any, msg?: string): PromiseLike; + notDeepEqual(act: any, exp: any, msg?: string): PromiseLike; - isTrue(val: any, msg?: string): PromisesAPlus.Thenable; - isFalse(val: any, msg?: string): PromisesAPlus.Thenable; + isTrue(val: any, msg?: string): PromiseLike; + isFalse(val: any, msg?: string): PromiseLike; - isNull(val: any, msg?: string): PromisesAPlus.Thenable; - isNotNull(val: any, msg?: string): PromisesAPlus.Thenable; + isNull(val: any, msg?: string): PromiseLike; + isNotNull(val: any, msg?: string): PromiseLike; - isUndefined(val: any, msg?: string): PromisesAPlus.Thenable; - isDefined(val: any, msg?: string): PromisesAPlus.Thenable; + isUndefined(val: any, msg?: string): PromiseLike; + isDefined(val: any, msg?: string): PromiseLike; - isFunction(val: any, msg?: string): PromisesAPlus.Thenable; - isNotFunction(val: any, msg?: string): PromisesAPlus.Thenable; + isFunction(val: any, msg?: string): PromiseLike; + isNotFunction(val: any, msg?: string): PromiseLike; - isObject(val: any, msg?: string): PromisesAPlus.Thenable; - isNotObject(val: any, msg?: string): PromisesAPlus.Thenable; + isObject(val: any, msg?: string): PromiseLike; + isNotObject(val: any, msg?: string): PromiseLike; - isArray(val: any, msg?: string): PromisesAPlus.Thenable; - isNotArray(val: any, msg?: string): PromisesAPlus.Thenable; + isArray(val: any, msg?: string): PromiseLike; + isNotArray(val: any, msg?: string): PromiseLike; - isString(val: any, msg?: string): PromisesAPlus.Thenable; - isNotString(val: any, msg?: string): PromisesAPlus.Thenable; + isString(val: any, msg?: string): PromiseLike; + isNotString(val: any, msg?: string): PromiseLike; - isNumber(val: any, msg?: string): PromisesAPlus.Thenable; - isNotNumber(val: any, msg?: string): PromisesAPlus.Thenable; + isNumber(val: any, msg?: string): PromiseLike; + isNotNumber(val: any, msg?: string): PromiseLike; - isBoolean(val: any, msg?: string): PromisesAPlus.Thenable; - isNotBoolean(val: any, msg?: string): PromisesAPlus.Thenable; + isBoolean(val: any, msg?: string): PromiseLike; + isNotBoolean(val: any, msg?: string): PromiseLike; - typeOf(val: any, type: string, msg?: string): PromisesAPlus.Thenable; - notTypeOf(val: any, type: string, msg?: string): PromisesAPlus.Thenable; + typeOf(val: any, type: string, msg?: string): PromiseLike; + notTypeOf(val: any, type: string, msg?: string): PromiseLike; - instanceOf(val: any, type: Function, msg?: string): PromisesAPlus.Thenable; - notInstanceOf(val: any, type: Function, msg?: string): PromisesAPlus.Thenable; + instanceOf(val: any, type: Function, msg?: string): PromiseLike; + notInstanceOf(val: any, type: Function, msg?: string): PromiseLike; - include(exp: string, inc: any, msg?: string): PromisesAPlus.Thenable; - include(exp: any[], inc: any, msg?: string): PromisesAPlus.Thenable; + include(exp: string, inc: any, msg?: string): PromiseLike; + include(exp: any[], inc: any, msg?: string): PromiseLike; - notInclude(exp: string, inc: any, msg?: string): PromisesAPlus.Thenable; - notInclude(exp: any[], inc: any, msg?: string): PromisesAPlus.Thenable; + notInclude(exp: string, inc: any, msg?: string): PromiseLike; + notInclude(exp: any[], inc: any, msg?: string): PromiseLike; - match(exp: any, re: RegExp, msg?: string): PromisesAPlus.Thenable; - notMatch(exp: any, re: RegExp, msg?: string): PromisesAPlus.Thenable; + match(exp: any, re: RegExp, msg?: string): PromiseLike; + notMatch(exp: any, re: RegExp, msg?: string): PromiseLike; - property(obj: Object, prop: string, msg?: string): PromisesAPlus.Thenable; - notProperty(obj: Object, prop: string, msg?: string): PromisesAPlus.Thenable; - deepProperty(obj: Object, prop: string, msg?: string): PromisesAPlus.Thenable; - notDeepProperty(obj: Object, prop: string, msg?: string): PromisesAPlus.Thenable; + property(obj: Object, prop: string, msg?: string): PromiseLike; + notProperty(obj: Object, prop: string, msg?: string): PromiseLike; + deepProperty(obj: Object, prop: string, msg?: string): PromiseLike; + notDeepProperty(obj: Object, prop: string, msg?: string): PromiseLike; - propertyVal(obj: Object, prop: string, val: any, msg?: string): PromisesAPlus.Thenable; - propertyNotVal(obj: Object, prop: string, val: any, msg?: string): PromisesAPlus.Thenable; + propertyVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike; + propertyNotVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike; - deepPropertyVal(obj: Object, prop: string, val: any, msg?: string): PromisesAPlus.Thenable; - deepPropertyNotVal(obj: Object, prop: string, val: any, msg?: string): PromisesAPlus.Thenable; + deepPropertyVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike; + deepPropertyNotVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike; - lengthOf(exp: any, len: number, msg?: string): PromisesAPlus.Thenable; + lengthOf(exp: any, len: number, msg?: string): PromiseLike; //alias frenzy - throw(fn: Function, msg?: string): PromisesAPlus.Thenable; - throw(fn: Function, regExp: RegExp): PromisesAPlus.Thenable; - throw(fn: Function, errType: Function, msg?: string): PromisesAPlus.Thenable; - throw(fn: Function, errType: Function, regExp: RegExp): PromisesAPlus.Thenable; + throw(fn: Function, msg?: string): PromiseLike; + throw(fn: Function, regExp: RegExp): PromiseLike; + throw(fn: Function, errType: Function, msg?: string): PromiseLike; + throw(fn: Function, errType: Function, regExp: RegExp): PromiseLike; - throws(fn: Function, msg?: string): PromisesAPlus.Thenable; - throws(fn: Function, regExp: RegExp): PromisesAPlus.Thenable; - throws(fn: Function, errType: Function, msg?: string): PromisesAPlus.Thenable; - throws(fn: Function, errType: Function, regExp: RegExp): PromisesAPlus.Thenable; + throws(fn: Function, msg?: string): PromiseLike; + throws(fn: Function, regExp: RegExp): PromiseLike; + throws(fn: Function, errType: Function, msg?: string): PromiseLike; + throws(fn: Function, errType: Function, regExp: RegExp): PromiseLike; - Throw(fn: Function, msg?: string): PromisesAPlus.Thenable; - Throw(fn: Function, regExp: RegExp): PromisesAPlus.Thenable; - Throw(fn: Function, errType: Function, msg?: string): PromisesAPlus.Thenable; - Throw(fn: Function, errType: Function, regExp: RegExp): PromisesAPlus.Thenable; + Throw(fn: Function, msg?: string): PromiseLike; + Throw(fn: Function, regExp: RegExp): PromiseLike; + Throw(fn: Function, errType: Function, msg?: string): PromiseLike; + Throw(fn: Function, errType: Function, regExp: RegExp): PromiseLike; - doesNotThrow(fn: Function, msg?: string): PromisesAPlus.Thenable; - doesNotThrow(fn: Function, regExp: RegExp): PromisesAPlus.Thenable; - doesNotThrow(fn: Function, errType: Function, msg?: string): PromisesAPlus.Thenable; - doesNotThrow(fn: Function, errType: Function, regExp: RegExp): PromisesAPlus.Thenable; + doesNotThrow(fn: Function, msg?: string): PromiseLike; + doesNotThrow(fn: Function, regExp: RegExp): PromiseLike; + doesNotThrow(fn: Function, errType: Function, msg?: string): PromiseLike; + doesNotThrow(fn: Function, errType: Function, regExp: RegExp): PromiseLike; - operator(val: any, operator: string, val2: any, msg?: string): PromisesAPlus.Thenable; - closeTo(act: number, exp: number, delta: number, msg?: string): PromisesAPlus.Thenable; + operator(val: any, operator: string, val2: any, msg?: string): PromiseLike; + closeTo(act: number, exp: number, delta: number, msg?: string): PromiseLike; - sameMembers(set1: any[], set2: any[], msg?: string): PromisesAPlus.Thenable; - includeMembers(set1: any[], set2: any[], msg?: string): PromisesAPlus.Thenable; + sameMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + includeMembers(set1: any[], set2: any[], msg?: string): PromiseLike; - ifError(val: any, msg?: string): PromisesAPlus.Thenable; + ifError(val: any, msg?: string): PromiseLike; } } diff --git a/chai-enzyme/chai-enzyme-tests.tsx b/chai-enzyme/chai-enzyme-tests.tsx index a70f7e7f96..8fc64e2711 100644 --- a/chai-enzyme/chai-enzyme-tests.tsx +++ b/chai-enzyme/chai-enzyme-tests.tsx @@ -1,7 +1,3 @@ -/// -/// -/// - import * as React from "react"; import * as chaiEnzyme from "chai-enzyme"; import { expect } from "chai"; @@ -34,11 +30,15 @@ expect(wrapper).to.have.ref("test"); expect(wrapper).to.be.selected(); expect(wrapper).to.have.tagName("div"); expect(wrapper).to.have.text(""); +expect(wrapper).to.have.type(Test); expect(wrapper).to.have.value("test"); expect(wrapper).to.have.attr("test", "test"); expect(wrapper).to.have.data("test", "Test"); expect(wrapper).to.have.style("background", "green"); expect(wrapper).to.have.state("test", "test"); expect(wrapper).to.have.prop("test", 5); +expect(wrapper).to.have.props(["test1", "test2"]); +expect(wrapper).to.have.props({ test: 5 }); expect(wrapper).to.contain(); +expect(wrapper).to.containMatchingElement(); expect(wrapper).to.match(); diff --git a/chai-enzyme/index.d.ts b/chai-enzyme/index.d.ts index 6997abd5fe..92c5817504 100644 --- a/chai-enzyme/index.d.ts +++ b/chai-enzyme/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for chai-enzyme 0.5.0 +// Type definitions for chai-enzyme 0.6.1 // Project: https://github.com/producthunt/chai-enzyme // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -39,6 +39,12 @@ declare namespace Chai { */ className(name: string): Assertion; + /** + * Assert that the wrapper contains a certain element: + * @param selector + */ + containMatchingElement(selector: EnzymeSelector): Assertion; + /** * Assert that the wrapper contains a descendant matching the given selector: * @param selector @@ -100,6 +106,12 @@ declare namespace Chai { */ text(str?: string): Assertion; + /** + * Assert that the given wrapper has a given type: + * @param func + */ + type(func: EnzymeSelector): Assertion; + /** * Assert that the given wrapper has given value: * @param str @@ -140,6 +152,18 @@ declare namespace Chai { * @param val */ prop(key: string, val?: any): Assertion; + + /** + * Assert that the wrapper has given props [with values]: + * @param keys + */ + props(keys: string[]): Assertion; + + /** + * Assert that the wrapper has given props [with values]: + * @param props + */ + props(props: EnzymeSelector): Assertion; } } diff --git a/chai-spies/chai-spies-tests.ts b/chai-spies/chai-spies-tests.ts index 7ac0610e4d..326b1e0137 100644 --- a/chai-spies/chai-spies-tests.ts +++ b/chai-spies/chai-spies-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as chai from 'chai'; import * as spies from 'chai-spies'; import * as Mocha from 'mocha'; diff --git a/chance/index.d.ts b/chance/index.d.ts index 7ce79b431f..10538b747c 100644 --- a/chance/index.d.ts +++ b/chance/index.d.ts @@ -129,7 +129,7 @@ declare namespace Chance { * @deprecated Use pickset */ pick(arr: T[], count: number): T[]; - pickset(arr: T[], count: number): T[]; + pickset(arr: T[], count?: number): T[]; set: Setter; shuffle(arr: T[]): T[]; diff --git a/chart.js/index.d.ts b/chart.js/index.d.ts index 08781f4463..cad58a2aa8 100644 --- a/chart.js/index.d.ts +++ b/chart.js/index.d.ts @@ -1,11 +1,16 @@ -// Type definitions for Chart.js +// Type definitions for Chart.js 2.4.0 // Project: https://github.com/nnnick/Chart.js // Definitions by: Alberto Nuti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + declare class Chart { static readonly Chart: typeof Chart; - constructor(context: CanvasRenderingContext2D | HTMLCanvasElement, options: Chart.ChartConfiguration); + constructor( + context: string | JQuery | CanvasRenderingContext2D | HTMLCanvasElement | string[] | CanvasRenderingContext2D[] | HTMLCanvasElement[], + options: Chart.ChartConfiguration + ); config: Chart.ChartConfiguration; data: Chart.ChartData; destroy: () => {}; @@ -20,7 +25,7 @@ declare class Chart { getElementsAtEvent: (e: any) => {}[]; getDatasetAtEvent: (e: any) => {}[]; - defaults: { + static defaults: { global: Chart.ChartOptions; } } @@ -32,6 +37,8 @@ declare namespace Chart { export type ScaleType = 'category' | 'linear' | 'logarithmic' | 'time' | 'radialLinear'; + export type PositionType = 'left' | 'right' | 'top' | 'bottom'; + export interface ChartLegendItem { text?: string; fillStyle?: string; @@ -342,7 +349,7 @@ declare namespace Chart { export interface ChartScales { type?: ScaleType | string; display?: boolean; - position?: string; + position?: PositionType | string; beforeUpdate?: (scale?: any) => void; beforeSetDimension?: (scale?: any) => void; beforeDataLimits?: (scale?: any) => void; @@ -364,29 +371,25 @@ declare namespace Chart { yAxes?: ChartYAxe[]; } - export interface ChartXAxe { + export interface CommonAxe { type?: ScaleType | string; display?: boolean; id?: string; stacked?: boolean; - categoryPercentage?: number; - barPercentage?: number; - barThickness?: number; - gridLines?: GridLineOptions; position?: string; ticks?: TickOptions; - time?: TimeScale; + gridLines?: GridLineOptions; + barThickness?: number; scaleLabel?: ScaleTitleOptions; } - export interface ChartYAxe { - type?: ScaleType | string; - display?: boolean; - id?: string; - stacked?: boolean; - position?: string; - ticks?: TickOptions; - scaleLabel?: ScaleTitleOptions; + export interface ChartXAxe extends CommonAxe { + categoryPercentage?: number; + barPercentage?: number; + time?: TimeScale; + } + + export interface ChartYAxe extends CommonAxe { } export interface LinearScale extends ChartScales { @@ -410,16 +413,16 @@ declare namespace Chart { } export interface TimeScale extends ChartScales { - format?: string; displayFormats?: TimeDisplayFormat; isoWeekday?: boolean; max?: string; min?: string; parser?: string | ((arg: any) => any); - round?: string; + round?: TimeUnit; tooltipFormat?: string; unit?: TimeUnit; unitStepSize?: number; + minUnit?: TimeUnit; } export interface RadialLinearScale { diff --git a/cheerio/cheerio-tests.ts b/cheerio/cheerio-tests.ts index 5b1f6511ec..1c0848eef7 100644 --- a/cheerio/cheerio-tests.ts +++ b/cheerio/cheerio-tests.ts @@ -55,6 +55,10 @@ var $multiEl = $('selector', 'selector', 'selector'); $el.attr('id'); $el.attr('id', 'favorite').html(); +// props +$el.prop('style') +$el.prop('style', 'none').html() + // data $el.data(); $el.data('apple-color'); @@ -86,6 +90,7 @@ $el.is(() => { */ // serializeArray $('').serializeArray(); +$('
').serialize(); /** * Traversing @@ -217,6 +222,9 @@ $el.eq(0).addBack('.class').length * Manipulation */ +$('
  • Plum
  • ').appendTo($el) +$el.prependTo($('
  • Plum
  • ')) + // .append( content, [content, ...] ) $el.append('
  • Plum
  • ').html(); $el.append('
  • Plum
  • ', '
  • Plum
  • ').html(); diff --git a/cheerio/index.d.ts b/cheerio/index.d.ts index e94eb1a68c..f3615674f5 100644 --- a/cheerio/index.d.ts +++ b/cheerio/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Cheerio v0.17.0 +// Type definitions for Cheerio v0.22.0 // Project: https://github.com/cheeriojs/cheerio -// Definitions by: Bret Little , VILIC VANE , Wayne Maurer +// Definitions by: Bret Little , VILIC VANE , Wayne Maurer , Umar Nizamani // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface Cheerio { @@ -47,10 +47,11 @@ interface Cheerio { is(func: (index: number, element: CheerioElement) => boolean): boolean; // Form + serialize(): string; serializeArray(): {name: string, value: string}[]; // Traversing - + find(selector: string): Cheerio; find(element: Cheerio): Cheerio; @@ -60,6 +61,9 @@ interface Cheerio { parentsUntil(element: CheerioElement, filter?: string): Cheerio; parentsUntil(element: Cheerio, filter?: string): Cheerio; + prop(name: string): any; + prop(name: string, value: any): Cheerio; + closest(): Cheerio; closest(selector: string): Cheerio; @@ -126,6 +130,8 @@ interface Cheerio { addBack(filter: string):Cheerio; // Manipulation + appendTo(target: Cheerio) : Cheerio + prependTo(target: Cheerio) : Cheerio append(content: string, ...contents: any[]): Cheerio; append(content: Document, ...contents: any[]): Cheerio; @@ -266,4 +272,4 @@ declare var cheerio:CheerioAPI; declare module "cheerio" { export = cheerio; -} +} \ No newline at end of file diff --git a/chocolatechipjs/chocolatechipjs-tests.ts b/chocolatechipjs/chocolatechipjs-tests.ts index 465ea2b0a9..7036358aed 100644 --- a/chocolatechipjs/chocolatechipjs-tests.ts +++ b/chocolatechipjs/chocolatechipjs-tests.ts @@ -1,4 +1,3 @@ -/// // ChocolateChipStatic -- DOM creation, etc. $(function() { alert('Ready to do stuff!'); @@ -282,7 +281,7 @@ fetch('../controllers/php-post.php', { }, body: formData }) -.then($.json) +.then($.json) .then(function(data: any): any { if(data.email_check == "valid"){ $("#message_ajax").html("
    " + data.email + " is a valid e-mail address. Thank you, " + data.name + ".
    "); @@ -300,12 +299,12 @@ interface putData { var putData = $('#fileText').val(); fetch('../controllers/php-put.php', { method: 'put', - headers: { - "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" + headers: { + "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" }, body: putData }) -.then($.json) +.then($.json) .then(function(data:any): any { console.dir(data.base); $("#message_ajax").append('

    ' + data.result + '

    '); @@ -324,12 +323,12 @@ interface deleteData { var file = $('#fileName').val(); fetch('../controllers/php-delete.php', { method: 'delete', - headers: { - "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" + headers: { + "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" }, body: file }) -.then($.json) +.then($.json) .then(function(data: any): any { $("#message_ajax").html("
    DELETE was sent to the server successfully.
    "); $("#message_ajax").append('

    ' + data.result + '

    '); diff --git a/chrome/index.d.ts b/chrome/index.d.ts index 211375a3fe..b7b6de0076 100644 --- a/chrome/index.d.ts +++ b/chrome/index.d.ts @@ -1831,7 +1831,7 @@ declare namespace chrome.devtools.panels { * If you specify the callback parameter, it should be a function that looks like this: * function() {...}; */ - setObject(jsonObject: string, rootTitle?: string, callback?: () => void): void; + setObject(jsonObject: Object, rootTitle?: string, callback?: () => void): void; /** * Sets a JSON-compliant object to be displayed in the sidebar pane. * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client). @@ -1839,7 +1839,7 @@ declare namespace chrome.devtools.panels { * If you specify the callback parameter, it should be a function that looks like this: * function() {...}; */ - setObject(jsonObject: string, callback?: () => void): void; + setObject(jsonObject: Object, callback?: () => void): void; /** * Sets an HTML page to be displayed in the sidebar pane. * @param path Relative path of an extension page to display within the sidebar. @@ -4854,7 +4854,7 @@ declare namespace chrome.proxy { */ declare namespace chrome.runtime { /** This will be defined during an API method callback if there was an error */ - var lastError: LastError; + var lastError: LastError | undefined; /** The ID of the extension/app. */ var id: string; diff --git a/cliff/cliff-tests.ts b/cliff/cliff-tests.ts index 9217d9a38a..e69de29bb2 100644 --- a/cliff/cliff-tests.ts +++ b/cliff/cliff-tests.ts @@ -1 +0,0 @@ -/// \ No newline at end of file diff --git a/co-body/co-body-tests.ts b/co-body/co-body-tests.ts index 6011632399..944cadd394 100644 --- a/co-body/co-body-tests.ts +++ b/co-body/co-body-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as koa from 'koa'; import * as parse from 'co-body'; diff --git a/coinstring/coinstring-tests.ts b/coinstring/coinstring-tests.ts index ab11a44fb7..1cc3fb9a42 100644 --- a/coinstring/coinstring-tests.ts +++ b/coinstring/coinstring-tests.ts @@ -1,8 +1,5 @@ -/// - import cs = require('coinstring'); - var privateKeyHex = "1184cd2cdd640ca42cfc3a091c51d549b2f016d454b2774019c2b2d2e08529fd"; var privateKeyHexBuf = new Buffer(privateKeyHex, 'hex'); var version = 0x80; // Bitcoin private key diff --git a/combined-stream/combined-stream-tests.ts b/combined-stream/combined-stream-tests.ts new file mode 100644 index 0000000000..776e530e63 --- /dev/null +++ b/combined-stream/combined-stream-tests.ts @@ -0,0 +1,30 @@ +import * as CombinedStream from "combined-stream"; +import { createReadStream, createWriteStream } from "fs"; + +const stream1 = new CombinedStream(); + +stream1.append(createReadStream("tsconfig.json")); +stream1.append(createReadStream("tslint.json")); +stream1.append(createReadStream("index.d.ts")); + +stream1.pipe(createWriteStream("combined.txt")); + +const stream2 = CombinedStream.create({ + maxDataSize: 1 << 32, + pauseStreams: false, +}); + +stream1.destroy(); + +// should log true +console.log(CombinedStream.isStreamLike(stream2)); + +stream2.on("data", (data) => { + console.log(data); +}); + +stream2.pipe(createWriteStream("combined.txt")); + +stream2.write(CombinedStream.name); + +stream2.destroy(); diff --git a/combined-stream/index.d.ts b/combined-stream/index.d.ts new file mode 100644 index 0000000000..cada758701 --- /dev/null +++ b/combined-stream/index.d.ts @@ -0,0 +1,56 @@ +// Type definitions for combined-stream 1.0 +// Project: https://github.com/felixge/node-combined-stream +// Definitions by: Felix Geisendörfer , Tomek Łaziuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Stream } from "stream"; + +declare class CombinedStream extends Stream implements CombinedStream.Options { + readonly writable: boolean; + readonly readable: boolean; + readonly dataSize: number; + maxDataSize: number; + pauseStreams: boolean; + append(stream: NodeJS.ReadableStream | NodeJS.WritableStream | Buffer | string): this; + write(data: any): void; + pause(): void; + resume(): void; + end(): void; + destroy(): void; + + // private properties + _released: boolean; + // @TODO it should be a type of Array<'delayed-stream' instance | Buffer | string> + _streams: Array; + _currentStream: Stream | Buffer | string | null; + _getNext(): void; + _pipeNext(): void; + _handleErrors(stream: NodeJS.EventEmitter): void; + _reset(): void; + _checkDataSize(): void; + _updateDataSize(): void; + _emitError(error: Error): void; + + // events + on(event: "close" | "end" | "resume" | "pause", cb: () => void): this; + on(event: "error", cb: (err: Error) => void): this; + on(event: "data", cb: (data: any) => void): this; + once(event: "close" | "end" | "resume" | "pause", cb: () => void): this; + once(event: "error", cb: (err: Error) => void): this; + once(event: "data", cb: (data: any) => void): this; +} + +declare namespace CombinedStream { + export interface Options { + maxDataSize?: number; + pauseStreams?: boolean; + } + + export function create(options?: Options): CombinedStream; + + export function isStreamLike(stream: any): stream is Stream; +} + +export = CombinedStream; diff --git a/combined-stream/tsconfig.json b/combined-stream/tsconfig.json new file mode 100644 index 0000000000..e1986a21be --- /dev/null +++ b/combined-stream/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "combined-stream-tests.ts" + ] +} diff --git a/combined-stream/tslint.json b/combined-stream/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/combined-stream/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/compression-webpack-plugin/compression-webpack-plugin-tests.ts new file mode 100644 index 0000000000..3939bf5847 --- /dev/null +++ b/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -0,0 +1,14 @@ +import { Configuration } from 'webpack'; +import CompressionPlugin = require('compression-webpack-plugin'); + +const c: Configuration = { + plugins: [ + new CompressionPlugin({ + asset: "[path].gz[query]", + algorithm: "gzip", + test: /\.js$|\.html$/, + threshold: 10240, + minRatio: 0.8 + }) + ] +}; diff --git a/compression-webpack-plugin/index.d.ts b/compression-webpack-plugin/index.d.ts new file mode 100644 index 0000000000..536a77b8e9 --- /dev/null +++ b/compression-webpack-plugin/index.d.ts @@ -0,0 +1,40 @@ +// Type definitions for compression-webpack-plugin 0.3 +// Project: https://github.com/webpack-contrib/compression-webpack-plugin +// Definitions by: Anton Kandybo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Plugin } from 'webpack'; + +export = CompressionPlugin; + +declare class CompressionPlugin extends Plugin { + constructor(options?: CompressionPlugin.Options); +} + +declare namespace CompressionPlugin { + export interface Options { + asset?: string; + algorithm?: string; + test?: RegExp | RegExp[]; + regExp?: RegExp | RegExp[]; + threshold?: number; + minRatio?: number; + + // zopfli options + verbose?: boolean; + verbose_more?: boolean; + numiterations?: number; + blocksplitting?: boolean; + blocksplittinglast?: boolean; + blocksplittingmax?: number; + + // zlib options + level?: number; + flush?: number; + chunkSize?: number; + windowBits?: number; + memLevel?: number; + strategy?: number; + dictionary?: any; + } +} diff --git a/compression-webpack-plugin/tsconfig.json b/compression-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..70383d3658 --- /dev/null +++ b/compression-webpack-plugin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "compression-webpack-plugin-tests.ts" + ] +} diff --git a/compression-webpack-plugin/tslint.json b/compression-webpack-plugin/tslint.json new file mode 100644 index 0000000000..70cee1ba88 --- /dev/null +++ b/compression-webpack-plugin/tslint.json @@ -0,0 +1,4 @@ +{ + "extends": "../tslint.json" +} + \ No newline at end of file diff --git a/connect-redis/connect-redis-tests.ts b/connect-redis/connect-redis-tests.ts index ed21f3b4be..3c50074117 100644 --- a/connect-redis/connect-redis-tests.ts +++ b/connect-redis/connect-redis-tests.ts @@ -1,5 +1,3 @@ -/// - import * as connectRedis from "connect-redis"; import * as session from "express-session"; diff --git a/cookie/cookie-tests.ts b/cookie/cookie-tests.ts index 2581a5c372..dd5be0f850 100644 --- a/cookie/cookie-tests.ts +++ b/cookie/cookie-tests.ts @@ -17,7 +17,7 @@ function test_parse(): void { } function test_options(): void { - var serializeOptions: CookieSerializeOptions = { + var serializeOptions: cookie.CookieSerializeOptions = { encode: (x: string) => x, path: '/', expires: new Date(), @@ -27,7 +27,7 @@ function test_options(): void { httpOnly: false }; - var parseOptios: CookieParseOptions = { + var parseOptios: cookie.CookieParseOptions = { decode: (x: string) => x }; } diff --git a/cookie/index.d.ts b/cookie/index.d.ts index 950796fa22..507eaee01d 100644 --- a/cookie/index.d.ts +++ b/cookie/index.d.ts @@ -1,28 +1,118 @@ -// Type definitions for cookie v0.1.2 +// Type definitions for cookie v0.3.0 // Project: https://github.com/jshttp/cookie // Definitions by: Pine Mizune // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface CookieSerializeOptions { - encode?: (val: string) => string; - path?: string; - expires?: Date; - maxAge?: number; + /** + * Specifies the value for the Domain Set-Cookie attribute. By default, no + * domain is set, and most clients will consider the cookie to apply to only + * the current domain. + */ domain?: string; - secure?: boolean; + /** + * Specifies a function that will be used to encode a cookie's value. Since + * value of a cookie has a limited character set (and must be a simple + * string), this function can be used to encode a value into a string suited + * for a cookie's value. + * + * The default function is the global `encodeURIComponent`, which will + * encode a JavaScript string into UTF-8 byte sequences and then URL-encode + * any that fall outside of the cookie range. + */ + encode?: (val: string) => string; + /** + * Specifies the `Date` object to be the value for the `Expires` + * `Set-Cookie` attribute. By default, no expiration is set, and most + * clients will consider this a "non-persistent cookie" and will delete it + * on a condition like exiting a web browser application. + * + * *Note* the cookie storage model specification states that if both + * `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is + * possible not all clients by obey this, so if both are set, they should + * point to the same date and time. + */ + expires?: Date; + /** + * Specifies the boolean value for the `HttpOnly` `Set-Cookie` attribute. + * When truthy, the `HttpOnly` attribute is set, otherwise it is not. By + * default, the `HttpOnly` attribute is not set. + * + * *Note* be careful when setting this to true, as compliant clients will + * not allow client-side JavaScript to see the cookie in `document.cookie`. + */ httpOnly?: boolean; + /** + * Specifies the number (in seconds) to be the value for the `Max-Age` + * `Set-Cookie` attribute. The given number will be converted to an integer + * by rounding down. By default, no maximum age is set. + * + * *Note* the cookie storage model specification states that if both + * `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is + * possible not all clients by obey this, so if both are set, they should + * point to the same date and time. + */ + maxAge?: number; + /** + * Specifies the value for the `Path` `Set-Cookie` attribute. By default, + * the path is considered the "default path". + */ + path?: string; + /** + * Specifies the boolean or string to be the value for the `SameSite` + * `Set-Cookie` attribute. + * + * - `true` will set the `SameSite` attribute to `Strict` for strict same + * site enforcement. + * - `false` will not set the `SameSite` attribute. + * - `'lax'` will set the `SameSite` attribute to Lax for lax same site + * enforcement. + * - `'strict'` will set the `SameSite` attribute to Strict for strict same + * site enforcement. + */ + sameSite?: boolean | 'lax' | 'strict'; + /** + * Specifies the boolean value for the `Secure` `Set-Cookie` attribute. When + * truthy, the `Secure` attribute is set, otherwise it is not. By default, + * the `Secure` attribute is not set. + * + * *Note* be careful when setting this to `true`, as compliant clients will + * not send the cookie back to the server in the future if the browser does + * not have an HTTPS connection. + */ + secure?: boolean; } interface CookieParseOptions { + /** + * Specifies a function that will be used to decode a cookie's value. Since + * the value of a cookie has a limited character set (and must be a simple + * string), this function can be used to decode a previously-encoded cookie + * value into a JavaScript string or other object. + * + * The default function is the global `decodeURIComponent`, which will decode + * any URL-encoded sequences into their byte representations. + * + * *Note* if an error is thrown from this function, the original, non-decoded + * cookie value will be returned as the cookie's value. + */ decode?: (val: string) => string; } -interface CookieStatic { - serialize(name: string, val: string, options?: CookieSerializeOptions): string; - parse(str: string, options?: CookieParseOptions): { [key: string]: string }; -} +/** + * Parse an HTTP Cookie header string and returning an object of all cookie + * name-value pairs. + * + * @param str the string representing a `Cookie` header value + * @param options object containing parsing options + */ +export function parse(str: string, options?: CookieParseOptions): { [key: string]: string }; -declare module "cookie" { - var cookie: CookieStatic; - export = cookie; -} +/** + * Serialize a cookie name-value pair into a `Set-Cookie` header string. + * + * @param name the name for the cookie + * @param val value to set the cookie to + * @param options object containing serialization options + */ +export function serialize(name: string, val: string, options?: CookieSerializeOptions): string; diff --git a/cookies/cookies-tests.ts b/cookies/cookies-tests.ts index 30e07d3000..5a2ad1e4a7 100644 --- a/cookies/cookies-tests.ts +++ b/cookies/cookies-tests.ts @@ -1,5 +1,3 @@ -/// - import * as Cookies from 'cookies'; import * as http from 'http'; diff --git a/cordova-plugin-app-version/index.d.ts b/cordova-plugin-app-version/index.d.ts index e295724474..b30beef9c6 100644 --- a/cordova-plugin-app-version/index.d.ts +++ b/cordova-plugin-app-version/index.d.ts @@ -3,14 +3,11 @@ // Definitions by: Markus Wagner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// - interface Cordova { getAppVersion: { - getAppName: () => Q.IPromise & JQueryPromise; - getPackageName: () => Q.IPromise & JQueryPromise; - getVersionCode: () => Q.IPromise & JQueryPromise; - getVersionNumber: () => Q.IPromise & JQueryPromise; + getAppName: () => Promise; + getPackageName: () => Promise; + getVersionCode: () => Promise; + getVersionNumber: () => Promise; }; } diff --git a/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts b/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts index 4dafa2e966..1c62521293 100644 --- a/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts +++ b/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts @@ -1,5 +1,3 @@ -/// - window.addEventListener('batterystatus', (ev: BatteryStatusEvent) => { console.log('Battery level is ' + ev.level); }); diff --git a/cordova-plugin-camera/cordova-plugin-camera-tests.ts b/cordova-plugin-camera/cordova-plugin-camera-tests.ts index 00edf02b0a..2f1b661775 100644 --- a/cordova-plugin-camera/cordova-plugin-camera-tests.ts +++ b/cordova-plugin-camera/cordova-plugin-camera-tests.ts @@ -1,5 +1,3 @@ -/// - navigator.camera.getPicture( (data: string) => { alert('Got photo!'); }, (message: string)=> { alert('Failed!: ' + message); }, diff --git a/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts b/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts index c50912c3ba..26243ab43a 100644 --- a/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts +++ b/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts @@ -1,5 +1,3 @@ -/// - var contact: Contact = navigator.contacts.create({ nickname: 'John Smith', displayName: 'John Smith', diff --git a/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts b/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts index 17b1e49930..1b335beaf7 100644 --- a/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts +++ b/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts @@ -1,5 +1,3 @@ -/// - navigator.accelerometer.getCurrentAcceleration( (acc: Acceleration) => { console.log('X: ' + acc.x + 'Y: ' + acc.y + 'Z: ' + acc.z); }, () => { alert('Error!'); }); diff --git a/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts b/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts index 097a66e99e..ab025d5fbf 100644 --- a/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts +++ b/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts @@ -1,5 +1,3 @@ -/// - navigator.compass.getCurrentHeading( (heading: CompassHeading)=> { console.log('Got heading to ' + heading.magneticHeading); }, (error: CompassError)=> { alert('Error! ' + error.code); }, diff --git a/cordova-plugin-device/cordova-plugin-device-tests.ts b/cordova-plugin-device/cordova-plugin-device-tests.ts index 450eadb1f0..cb894785c2 100644 --- a/cordova-plugin-device/cordova-plugin-device-tests.ts +++ b/cordova-plugin-device/cordova-plugin-device-tests.ts @@ -1,3 +1 @@ -/// - console.log(JSON.stringify(device)); \ No newline at end of file diff --git a/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts b/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts index dd9396f36f..498d7d1000 100644 --- a/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts +++ b/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts @@ -1,4 +1,2 @@ -/// - navigator.notification.alert('Alert!', () => { alert('You\'re alerted'); }, 'Alert', 'Ok'); navigator.notification.confirm('Are you ok?', (choice: number) => { alert('Your choice is ' + choice); }); diff --git a/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts b/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts index 4050b2c4aa..eec24db2e0 100644 --- a/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts +++ b/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts @@ -1,5 +1,3 @@ -/// - var file = new FileTransfer(); file.onprogress = (ev: ProgressEvent) => { diff --git a/cordova-plugin-file/cordova-plugin-file-tests.ts b/cordova-plugin-file/cordova-plugin-file-tests.ts index bd9d7de672..37538434e3 100644 --- a/cordova-plugin-file/cordova-plugin-file-tests.ts +++ b/cordova-plugin-file/cordova-plugin-file-tests.ts @@ -1,5 +1,4 @@ /// -/// function fsaccessor(fs: FileSystem) { console.log('FS root is: ' + fs.root.name); diff --git a/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts b/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts index 0a58703a32..4b80f2ff72 100644 --- a/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts +++ b/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts @@ -1,5 +1,3 @@ -/// - navigator.globalization.dateToString(new Date(), (date) => { console.log(JSON.stringify(date)); }, (error) => { alert(error.message); }, diff --git a/cordova-plugin-ibeacon/index.d.ts b/cordova-plugin-ibeacon/index.d.ts index bfbfe607d4..3530ccb70d 100644 --- a/cordova-plugin-ibeacon/index.d.ts +++ b/cordova-plugin-ibeacon/index.d.ts @@ -3,95 +3,97 @@ // Definitions by: Markus Wagner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Q from "q"; -interface CordovaPlugins { - locationManager: BeaconPlugin.LocationManager; -} - -declare namespace BeaconPlugin { - /** - * Beacon Plugin. - */ - export interface LocationManager { - delegate: Delegate; - BeaconRegion: BeaconRegion; - Region: Region; - onDomDelegateReady(): Q.Promise; - startMonitoringForRegion(region: Region): Q.Promise; - stopMonitoringForRegion(region: Region): Q.Promise; - requestStateForRegion(region: Region): Q.Promise; - startRangingBeaconsInRegion(region: Region): Q.Promise; - stopRangingBeaconsInRegion(region: Region): Q.Promise; - getAuthorizationStatus(): Q.Promise; - requestWhenInUseAuthorization(): Q.Promise; - requestAlwaysAuthorization(): Q.Promise; - getMonitoredRegions(): Q.Promise; - getRangedRegions(): Q.Promise; - isRangingAvailable(): Q.Promise; - isMonitoringAvailableForClass(region: Region): Q.Promise; - startAdvertising(region: Region, measuredPower: boolean): Q.Promise; - stopAdvertising(): Q.Promise; - isAdvertisingAvailable(): Q.Promise; - isAdvertising(): Q.Promise; - disableDebugLogs(): Q.Promise; - enableDebugNotifications(): Q.Promise; - disableDebugNotifications(): Q.Promise; - enableDebugLogs(): Q.Promise; - isBluetoothEnabled(): Q.Promise; - enableBluetooth(): Q.Promise; - disableBluetooth(): Q.Promise; - appendToDeviceLog(message: string): Q.Promise; +declare global { + interface CordovaPlugins { + locationManager: BeaconPlugin.LocationManager; } - export interface PluginResult { - eventType: string; - region: Region; - beacons: Beacon[]; - authorizationStatus: string; - state: string; - error: string; - } + namespace BeaconPlugin { + /** + * Beacon Plugin. + */ + export interface LocationManager { + delegate: Delegate; + BeaconRegion: BeaconRegion; + Region: Region; + onDomDelegateReady(): Q.Promise; + startMonitoringForRegion(region: Region): Q.Promise; + stopMonitoringForRegion(region: Region): Q.Promise; + requestStateForRegion(region: Region): Q.Promise; + startRangingBeaconsInRegion(region: Region): Q.Promise; + stopRangingBeaconsInRegion(region: Region): Q.Promise; + getAuthorizationStatus(): Q.Promise; + requestWhenInUseAuthorization(): Q.Promise; + requestAlwaysAuthorization(): Q.Promise; + getMonitoredRegions(): Q.Promise; + getRangedRegions(): Q.Promise; + isRangingAvailable(): Q.Promise; + isMonitoringAvailableForClass(region: Region): Q.Promise; + startAdvertising(region: Region, measuredPower: boolean): Q.Promise; + stopAdvertising(): Q.Promise; + isAdvertisingAvailable(): Q.Promise; + isAdvertising(): Q.Promise; + disableDebugLogs(): Q.Promise; + enableDebugNotifications(): Q.Promise; + disableDebugNotifications(): Q.Promise; + enableDebugLogs(): Q.Promise; + isBluetoothEnabled(): Q.Promise; + enableBluetooth(): Q.Promise; + disableBluetooth(): Q.Promise; + appendToDeviceLog(message: string): Q.Promise; + } - export interface Delegate { - didDetermineStateForRegion(pluginResult: PluginResult): void; - didStartMonitoringForRegion(pluginResult: PluginResult): void; - didExitRegion(pluginResult: PluginResult): void; - didEnterRegion(pluginResult: PluginResult): void; - didRangeBeaconsInRegion(pluginResult: PluginResult): void; - peripheralManagerDidStartAdvertising(pluginResult: PluginResult): void; - peripheralManagerDidUpdateState(pluginResult: PluginResult): void; - didChangeAuthorizationStatus(authorizationStatus: string): void; - monitoringDidFailForRegionWithError(pluginResult: PluginResult): void; - } + export interface PluginResult { + eventType: string; + region: Region; + beacons: Beacon[]; + authorizationStatus: string; + state: string; + error: string; + } - export interface Region { - identifier: string; - new (identifier: string): Region; - } + export interface Delegate { + didDetermineStateForRegion(pluginResult: PluginResult): void; + didStartMonitoringForRegion(pluginResult: PluginResult): void; + didExitRegion(pluginResult: PluginResult): void; + didEnterRegion(pluginResult: PluginResult): void; + didRangeBeaconsInRegion(pluginResult: PluginResult): void; + peripheralManagerDidStartAdvertising(pluginResult: PluginResult): void; + peripheralManagerDidUpdateState(pluginResult: PluginResult): void; + didChangeAuthorizationStatus(authorizationStatus: string): void; + monitoringDidFailForRegionWithError(pluginResult: PluginResult): void; + } - export interface BeaconRegion extends Region { - uuid: string; - major: string; - minor: string; - notifyEntryStateOnDisplay: boolean; - new (identifier: string, uuid: string, major?: number, minor?: number, notifyEntryStateOnDisplay?: boolean): BeaconRegion; - } + export interface Region { + identifier: string; + new (identifier: string): Region; + } - export interface CircularRegion extends Region { - latitude: number; - longitude: number; - radius: number; - new (identifier: string, latitude: number, longitude: number, radius: number): CircularRegion; - } + export interface BeaconRegion extends Region { + uuid: string; + major: string; + minor: string; + notifyEntryStateOnDisplay: boolean; + new (identifier: string, uuid: string, major?: number, minor?: number, notifyEntryStateOnDisplay?: boolean): BeaconRegion; + } - export interface Beacon { - uuid: string; - major: string; - minor: string; - proximity: string; - tx: number; - rssi: number; - accuracy: number; + export interface CircularRegion extends Region { + latitude: number; + longitude: number; + radius: number; + new (identifier: string, latitude: number, longitude: number, radius: number): CircularRegion; + } + + export interface Beacon { + uuid: string; + major: string; + minor: string; + proximity: string; + tx: number; + rssi: number; + accuracy: number; + } } -} +} \ No newline at end of file diff --git a/cordova-plugin-ibeacon/tsconfig.json b/cordova-plugin-ibeacon/tsconfig.json index 603b991c64..af70edc7f5 100644 --- a/cordova-plugin-ibeacon/tsconfig.json +++ b/cordova-plugin-ibeacon/tsconfig.json @@ -12,6 +12,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts b/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts index 43b0d28153..cef288c921 100644 --- a/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts +++ b/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts @@ -1,5 +1,3 @@ -/// - // InAppBrowser plugin //---------------------------------------------------------------------- diff --git a/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts b/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts index 3dce2776bf..767eaa6ed2 100644 --- a/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts +++ b/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts @@ -1,5 +1,3 @@ -/// - Keyboard.shrinkView(true); Keyboard.shrinkView(false); Keyboard.hideFormAccessoryBar(true); diff --git a/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts b/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts index 8bd56c714f..91fdefa74f 100644 --- a/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts +++ b/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts @@ -1,5 +1,3 @@ -/// - console.log('Supported audio modes are: ' + JSON.stringify(navigator.device.capture.supportedAudioModes)); navigator.device.capture.captureAudio( diff --git a/cordova-plugin-media/cordova-plugin-media-tests.ts b/cordova-plugin-media/cordova-plugin-media-tests.ts index 76e39c8d7b..1c00c850e5 100644 --- a/cordova-plugin-media/cordova-plugin-media-tests.ts +++ b/cordova-plugin-media/cordova-plugin-media-tests.ts @@ -1,5 +1,3 @@ -/// - // Media and Media Capture //---------------------------------------------------------------------- diff --git a/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts b/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts index 702aeb5714..0c4bfd7a2d 100644 --- a/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts +++ b/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts @@ -1,5 +1,3 @@ -/// - var connType = navigator.connection.type; if (connType == Connection.WIFI) { console.log('Congratulations, you\'re with fast Internet!'); diff --git a/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts b/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts index d24720eb1d..5938396ad4 100644 --- a/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts +++ b/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts @@ -1,4 +1,2 @@ -/// - navigator.splashscreen.show(); navigator.splashscreen.hide(); \ No newline at end of file diff --git a/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts b/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts index 9d22ca912c..623211d6c6 100644 --- a/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts +++ b/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts @@ -1,6 +1,3 @@ -/// - - var statusBar: StatusBar = window.StatusBar; statusBar.overlaysWebView(true); statusBar.overlaysWebView(false); diff --git a/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts b/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts index b34cd23675..33cdb43436 100644 --- a/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts +++ b/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts @@ -1,5 +1,3 @@ -/// - var notification: Notification; notification.vibrate(100); diff --git a/cordova-plugin-websql/cordova-plugin-websql-tests.ts b/cordova-plugin-websql/cordova-plugin-websql-tests.ts index 8679b3d5c3..c6299a489c 100644 --- a/cordova-plugin-websql/cordova-plugin-websql-tests.ts +++ b/cordova-plugin-websql/cordova-plugin-websql-tests.ts @@ -1,6 +1,3 @@ -/// - - var db = window.openDatabase('Test', '0.1', 'test', 1024 * 1024 * 5); db.transaction( (tx: SqlTransaction) => { diff --git a/core-js/core-js-tests.ts b/core-js/core-js-tests.ts index 42cd770b86..0614b117b9 100644 --- a/core-js/core-js-tests.ts +++ b/core-js/core-js-tests.ts @@ -8,7 +8,7 @@ let s: string; let i: number; let b: boolean; let f: () => void; -let o: Object; +let o: {}; let r: RegExp; let sym: symbol; let e: Error; @@ -21,7 +21,7 @@ let arrayOfPoint3D: Point3D[]; let arrayOfSymbol: symbol[]; let arrayOfPropertyKey: PropertyKey[]; let arrayOfAny: any[]; -let arrayOfStringAny: [string, any][]; +let arrayOfStringAny: Array<[string, any]>; let arrayLikeOfAny: ArrayLike; let iterableOfPoint: Iterable; let iterableOfStringPoint: Iterable<[string, Point]>; @@ -57,7 +57,7 @@ let dictOfAny: Dict; // ############################################################################################# // ECMAScript 6: Object & Function -// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of, +// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of, // es6.object.to-string, es6.function.name and es6.function.has-instance. // ############################################################################################# @@ -88,8 +88,8 @@ arrayOfPoint = Array.of(point, point); // ############################################################################################# // ECMAScript 6: String & RegExp -// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at, -// es6.string.ends-with, es6.string.includes, es6.string.repeat, +// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at, +// es6.string.ends-with, es6.string.includes, es6.string.repeat, // es6.string.starts-with, and es6.regexp // ############################################################################################# diff --git a/core-js/index.d.ts b/core-js/index.d.ts index 7dda59aab3..4191cd11aa 100644 --- a/core-js/index.d.ts +++ b/core-js/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for core-js v0.9.7 +// Type definitions for core-js 0.9 // Project: https://github.com/zloirock/core-js/ // Definitions by: Ron Buckton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,539 +19,12 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare type PropertyKey = string | number | symbol; - -// ############################################################################################# -// ECMAScript 6: Object & Function -// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of, -// es6.object.to-string, es6.function.name and es6.function.has-instance. -// ############################################################################################# - -interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; - - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; - - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: any, ...sources: any[]): any; - - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; - - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - * @remarks Requires `__proto__` support. - */ - setPrototypeOf(o: any, proto: any): any; -} - -interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - name: string; - - /** - * Determines if a constructor object recognizes an object as one of the - * constructor’s instances. - * @param value The object to test. - */ - [Symbol.hasInstance](value: any): boolean; -} - -// ############################################################################################# -// ECMAScript 6: Array -// Modules: es6.array.from, es6.array.of, es6.array.copy-within, es6.array.fill, es6.array.find, -// and es6.array.find-index -// ############################################################################################# - -interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; - - /** - * Returns the index of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T) => boolean, thisArg?: any): number; - - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): T[]; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): T[]; - - [Symbol.unscopables]: any; -} - -interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Array; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable): Array; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): Array; -} - -// ############################################################################################# -// ECMAScript 6: String & RegExp -// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at, -// es6.string.ends-with, es6.string.includes, es6.string.repeat, -// es6.string.starts-with, and es6.regexp -// ############################################################################################# - -interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number; - - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; - - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * T is the empty String is returned. - * @param count number of copies to append - */ - repeat(count: number): string; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; -} - -interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; - - /** - * String.raw is intended for use as a tag function of a Tagged Template String. When called - * as such the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: TemplateStringsArray, ...substitutions: any[]): string; -} - -interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - flags: string; -} - -// ############################################################################################# -// ECMAScript 6: Number & Math -// Modules: es6.number.constructor, es6.number.statics, and es6.math -// ############################################################################################# - -interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - EPSILON: number; - - /** - * Returns true if passed value is finite. - * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: number): boolean; - - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: number): boolean; - - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: number): boolean; - - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: number): boolean; - - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - MAX_SAFE_INTEGER: number; - - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - MIN_SAFE_INTEGER: number; - - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; - - /** - * Converts A string to an integer. - * @param s A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; -} - -interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; - - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; - - /** - * Returns the sign of the x, indicating whether x is positive, negative or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; - - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; - - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; - - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; - - /** - * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of - * the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; - - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; - - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; - - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; - - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; - - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; - - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; - - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; - - /** - * Returns the integral part of the a numeric expression, x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; - - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; - - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; -} - // ############################################################################################# // ECMAScript 6: Symbols // Modules: es6.symbol // ############################################################################################# -interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; - - [Symbol.toStringTag]: string; -} - interface SymbolConstructor { - /** - * A reference to the prototype. - */ - prototype: Symbol; - - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string|number): symbol; - - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; - - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns a undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string; - - // Well-known Symbols - - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - hasInstance: symbol; - - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - isConcatSpreadable: symbol; - - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - iterator: symbol; - - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - match: symbol; - - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - replace: symbol; - - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - search: symbol; - - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - species: symbol; - - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - split: symbol; - - /** - * A method that converts an object to a corresponding primitive value.Called by the ToPrimitive - * abstract operation. - */ - toPrimitive: symbol; - - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - toStringTag: symbol; - - /** - * An Object whose own property names are property names that are excluded from the with - * environment bindings of the associated objects. - */ - unscopables: symbol; - /** * Non-standard. Use simple mode for core-js symbols. See https://github.com/zloirock/core-js/#caveats-when-using-symbol-polyfill */ @@ -562,193 +36,6 @@ interface SymbolConstructor { userSetter(): void; } -declare var Symbol: SymbolConstructor; - -interface Object { - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; - - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; -} - -interface ObjectConstructor { - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; - - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not - * inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor; - - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript - * object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor - * property. - */ - defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any; -} - -interface Math { - [Symbol.toStringTag]: string; -} - -interface JSON { - [Symbol.toStringTag]: string; -} - -// ############################################################################################# -// ECMAScript 6: Collections -// Modules: es6.map, es6.set, es6.weak-map, and es6.weak-set -// ############################################################################################# - -interface Map { - clear(): void; - delete(key: K): boolean; - forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): Map; - size: number; -} - -interface MapConstructor { - new (): Map; - new (iterable: Iterable<[K, V]>): Map; - prototype: Map; -} - -declare var Map: MapConstructor; - -interface Set { - add(value: T): Set; - clear(): void; - delete(value: T): boolean; - forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; - has(value: T): boolean; - size: number; -} - -interface SetConstructor { - new (): Set; - new (iterable: Iterable): Set; - prototype: Set; -} - -declare var Set: SetConstructor; - -interface WeakMap { - delete(key: K): boolean; - get(key: K): V; - has(key: K): boolean; - set(key: K, value?: V): WeakMap; -} - -interface WeakMapConstructor { - new (): WeakMap; - new (iterable: Iterable<[K, V]>): WeakMap; - prototype: WeakMap; -} - -declare var WeakMap: WeakMapConstructor; - -interface WeakSet { - add(value: T): WeakSet; - delete(value: T): boolean; - has(value: T): boolean; -} - -interface WeakSetConstructor { - new (): WeakSet; - new (iterable: Iterable): WeakSet; - prototype: WeakSet; -} - -declare var WeakSet: WeakSetConstructor; - -// ############################################################################################# -// ECMAScript 6: Iterators -// Modules: es6.string.iterator, es6.array.iterator, es6.map, es6.set, web.dom.iterable -// ############################################################################################# - -interface IteratorResult { - done: boolean; - value?: T; -} - -interface Iterator { - next(value?: any): IteratorResult; - return?(value?: any): IteratorResult; - throw?(e?: any): IteratorResult; -} - -interface Iterable { - [Symbol.iterator](): Iterator; -} - -interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; -} - -interface String { - /** Iterator */ - [Symbol.iterator](): IterableIterator; -} - -interface Array { - /** Iterator */ - [Symbol.iterator](): IterableIterator; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, T]>; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; -} - -interface Map { - entries(): IterableIterator<[K, V]>; - keys(): IterableIterator; - values(): IterableIterator; - [Symbol.iterator](): IterableIterator<[K, V]>; -} - -interface Set { - entries(): IterableIterator<[T, T]>; - keys(): IterableIterator; - values(): IterableIterator; - [Symbol.iterator](): IterableIterator; -} - -interface NodeList { - [Symbol.iterator](): IterableIterator; -} - interface $for extends IterableIterator { of(callbackfn: (value: T, key: any) => void, thisArg?: any): void; array(): T[]; @@ -759,135 +46,6 @@ interface $for extends IterableIterator { declare function $for(iterable: Iterable): $for; -// ############################################################################################# -// ECMAScript 6: Promises -// Modules: es6.promise -// ############################################################################################# - -interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; -} - -/** - * Represents the completion of an asynchronous operation - */ -interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: (reason: any) => T | PromiseLike): Promise; - catch(onrejected?: (reason: any) => void): Promise; -} - -interface PromiseConstructor { - /** - * A reference to the prototype. - */ - prototype: Promise; - - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; - all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; - all(values: Iterable>): Promise; - - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason: any): Promise; - - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise; - - /** - * Creates a new resolved promise . - * @returns A resolved promise. - */ - resolve(): Promise; -} - -declare var Promise: PromiseConstructor; - -// ############################################################################################# -// ECMAScript 6: Reflect -// Modules: es6.reflect -// ############################################################################################# - -declare namespace Reflect { - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - function construct(target: Function, argumentsList: ArrayLike, newTarget?: any): any; - function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - function deleteProperty(target: any, propertyKey: PropertyKey): boolean; - function enumerate(target: any): IterableIterator; - function get(target: any, propertyKey: PropertyKey, receiver?: any): any; - function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: PropertyKey): boolean; - function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; - function preventExtensions(target: any): boolean; - function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - function setPrototypeOf(target: any, proto: any): boolean; -} - // ############################################################################################# // ECMAScript 7 // Modules: es7.array.includes, es7.string.at, es7.string.pad-start, es7.string.pad-end, @@ -895,19 +53,11 @@ declare namespace Reflect { // es7.map.to-json, and es7.set.to-json // ############################################################################################# -interface Array { - includes(value: T, fromIndex?: number): boolean; -} - interface String { at(index: number): string; - padStart(length: number, fillStr?: string): string; - padEnd(length: number, fillStr?: string): string; } -interface ObjectConstructor { - values(object: any): any[]; - entries(object: any): [string, any][]; +interface Object { getOwnPropertyDescriptors(object: any): PropertyDescriptorMap; } @@ -942,7 +92,7 @@ interface ArrayConstructor { * Combines two or more arrays. * @param items Additional items to add to the end of array1. */ - concat(array: ArrayLike, ...items: (T[]| T)[]): T[]; + concat(array: ArrayLike, ...items: Array): T[]; /** * Adds all the elements of an array separated by the specified separator string. * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. @@ -969,19 +119,13 @@ interface ArrayConstructor { */ sort(array: ArrayLike, compareFn?: (a: T, b: T) => number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - */ - splice(array: ArrayLike, start: number): T[]; - /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * @param start The zero-based location in the array from which to start removing elements. * @param deleteCount The number of elements to remove. * @param items Elements to insert into the array in place of the deleted elements. */ - splice(array: ArrayLike, start: number, deleteCount: number, ...items: T[]): T[]; + splice(array: ArrayLike, start: number, deleteCount?: number, ...items: T[]): T[]; /** * Inserts new elements at the start of an array. @@ -1005,14 +149,16 @@ interface ArrayConstructor { /** * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. + * @param callbackfn A function that accepts up to three arguments. + * The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ every(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; /** * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. + * @param callbackfn A function that accepts up to three arguments. + * The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ some(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; @@ -1039,30 +185,38 @@ interface ArrayConstructor { filter(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * Calls the specified callback function for all the elements in an array. + * The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. + * The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduce(array: ArrayLike, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * Calls the specified callback function for all the elements in an array. + * The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. + * The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduce(array: ArrayLike, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. + * The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduceRight(array: ArrayLike, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. + * The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduceRight(array: ArrayLike, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; @@ -1090,7 +244,7 @@ interface ArrayConstructor { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(array: ArrayLike, predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; + find(array: ArrayLike, predicate: (value: T, index: number, obj: T[]) => boolean, thisArg?: any): T; /** * Returns the index of the first element in the array where predicate is true, and undefined @@ -1125,8 +279,8 @@ interface ArrayConstructor { copyWithin(array: ArrayLike, target: number, start: number, end?: number): T[]; includes(array: ArrayLike, value: T, fromIndex?: number): boolean; - turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: Array) => void, memo?: U): U; - turn(array: ArrayLike, callbackfn: (memo: Array, value: T, index: number, array: Array) => void, memo?: Array): Array; + turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: T[]) => void, memo?: U): U; + turn(array: ArrayLike, callbackfn: (memo: T[], value: T, index: number, array: T[]) => void, memo?: T[]): T[]; } // ############################################################################################# @@ -1180,7 +334,7 @@ declare var log: Log; interface Dict { [key: string]: T; [key: number]: T; - //[key: symbol]: T; + // [key: symbol]: T; } interface DictConstructor { @@ -1257,12 +411,12 @@ interface Array { /** * Non-standard. */ - turn(callbackfn: (memo: U, value: T, index: number, array: Array) => void, memo?: U): U; + turn(callbackfn: (memo: U, value: T, index: number, array: T[]) => void, memo?: U): U; /** * Non-standard. */ - turn(callbackfn: (memo: Array, value: T, index: number, array: Array) => void, memo?: Array): Array; + turn(callbackfn: (memo: T[], value: T, index: number, array: T[]) => void, memo?: T[]): T[]; } // ############################################################################################# @@ -1313,10 +467,9 @@ declare namespace core { function get(target: any, propertyKey: PropertyKey, receiver?: any): any; function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; function getPrototypeOf(target: any): any; - function has(target: any, propertyKey: string): boolean; - function has(target: any, propertyKey: symbol): boolean; + function has(target: any, propertyKey: string | symbol): boolean; function isExtensible(target: any): boolean; - function ownKeys(target: any): Array; + function ownKeys(target: any): PropertyKey[]; function preventExtensions(target: any): boolean; function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; function setPrototypeOf(target: any, proto: any): boolean; @@ -1324,10 +477,8 @@ declare namespace core { var Object: { getPrototypeOf(o: any): any; - getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; - defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: T): T; freeze(o: T): T; @@ -1357,21 +508,18 @@ declare namespace core { }; var Array: { - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - from(arrayLike: ArrayLike): Array; - from(iterable: Iterable): Array; - of(...items: T[]): Array; + from(arrayLike: ArrayLike | Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + from(arrayLike: ArrayLike | Iterable): T[]; + of(...items: T[]): T[]; push(array: ArrayLike, ...items: T[]): number; pop(array: ArrayLike): T; - concat(array: ArrayLike, ...items: (T[]| T)[]): T[]; + concat(array: ArrayLike, ...items: Array): T[]; join(array: ArrayLike, separator?: string): string; reverse(array: ArrayLike): T[]; shift(array: ArrayLike): T; slice(array: ArrayLike, start?: number, end?: number): T[]; sort(array: ArrayLike, compareFn?: (a: T, b: T) => number): T[]; - splice(array: ArrayLike, start: number): T[]; - splice(array: ArrayLike, start: number, deleteCount: number, ...items: T[]): T[]; + splice(array: ArrayLike, start: number, deleteCount?: number, ...items: T[]): T[]; unshift(array: ArrayLike, ...items: T[]): number; indexOf(array: ArrayLike, searchElement: T, fromIndex?: number): number; lastIndexOf(array: ArrayLike, earchElement: T, fromIndex?: number): number; @@ -1387,13 +535,13 @@ declare namespace core { entries(array: ArrayLike): IterableIterator<[number, T]>; keys(array: ArrayLike): IterableIterator; values(array: ArrayLike): IterableIterator; - find(array: ArrayLike, predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; + find(array: ArrayLike, predicate: (value: T, index: number, obj: T[]) => boolean, thisArg?: any): T; findIndex(array: ArrayLike, predicate: (value: T) => boolean, thisArg?: any): number; fill(array: ArrayLike, value: T, start?: number, end?: number): T[]; copyWithin(array: ArrayLike, target: number, start: number, end?: number): T[]; includes(array: ArrayLike, value: T, fromIndex?: number): boolean; - turn(array: ArrayLike, callbackfn: (memo: Array, value: T, index: number, array: Array) => void, memo?: Array): Array; - turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: Array) => void, memo?: U): U; + turn(array: ArrayLike, callbackfn: (memo: T[], value: T, index: number, array: T[]) => void, memo?: T[]): T[]; + turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: T[]) => void, memo?: U): U; }; var String: { @@ -1782,8 +930,7 @@ declare module "core-js/fn/function/has-instance" { var hasInstance: (value: any) => boolean; export = hasInstance; } -declare module "core-js/fn/function/name" -{ +declare module "core-js/fn/function/name" { } declare module "core-js/fn/function/part" { var part: typeof core.Function.part; diff --git a/core-js/tsconfig.json b/core-js/tsconfig.json index b37502a626..8c7007b563 100644 --- a/core-js/tsconfig.json +++ b/core-js/tsconfig.json @@ -2,8 +2,9 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5", - "dom" + "es2017", + "dom", + "dom.iterable" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/mobservable/tslint.json b/core-js/tslint.json similarity index 97% rename from mobservable/tslint.json rename to core-js/tslint.json index f05741c59b..0f47deabb4 100644 --- a/mobservable/tslint.json +++ b/core-js/tslint.json @@ -3,4 +3,4 @@ "rules": { "forbidden-types": false } -} +} \ No newline at end of file diff --git a/cors/index.d.ts b/cors/index.d.ts index ecad80d187..6c1fc3e4c3 100644 --- a/cors/index.d.ts +++ b/cors/index.d.ts @@ -10,7 +10,7 @@ import express = require('express'); type CustomOrigin = ( requestOrigin: string, - callback: (err: Error, allow?: boolean) => void + callback: (err: Error | null, allow?: boolean) => void ) => void; declare namespace e { diff --git a/cryptojs/test/md5-tests.ts b/cryptojs/test/md5-tests.ts index d44496aae5..4063750d7d 100644 --- a/cryptojs/test/md5-tests.ts +++ b/cryptojs/test/md5-tests.ts @@ -1,6 +1,3 @@ -/// - - YUI.add('algo-md5-test', function (Y) { var C = CryptoJS; diff --git a/csprng/csprng-tests.ts b/csprng/csprng-tests.ts new file mode 100644 index 0000000000..aafddc4021 --- /dev/null +++ b/csprng/csprng-tests.ts @@ -0,0 +1,5 @@ +import csprng = require("csprng"); + +let rngStr: string; + +rngStr = csprng(32, 16); diff --git a/csprng/index.d.ts b/csprng/index.d.ts new file mode 100644 index 0000000000..90aa83b017 --- /dev/null +++ b/csprng/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for csprng 0.1 +// Project: https://github.com/jcoglan/node-csprng +// Definitions by: Wink Saville +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export = csprng; + +declare function csprng(bits: number, radix: number): string; diff --git a/csprng/tsconfig.json b/csprng/tsconfig.json new file mode 100644 index 0000000000..0877c1ab25 --- /dev/null +++ b/csprng/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "csprng-tests.ts" + ] +} diff --git a/csprng/tslint.json b/csprng/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/csprng/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/css-modules-require-hook/css-modules-require-hook-tests.ts b/css-modules-require-hook/css-modules-require-hook-tests.ts index 0e2e366f96..93da1326bd 100644 --- a/css-modules-require-hook/css-modules-require-hook-tests.ts +++ b/css-modules-require-hook/css-modules-require-hook-tests.ts @@ -1,4 +1,3 @@ -/// /// import * as hook from 'css-modules-require-hook'; @@ -63,7 +62,7 @@ hook({ extensions: ['.scss', '.sass'] }); hook({ ignore: (file: string) => false }); hook({ ignore: 'unused' }); -hook({ ignore: /\.test\.(css|scss|sass)/$ }); +hook({ ignore: /\.test\.(css|scss|sass)$/ }); // // https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#preprocesscss-function diff --git a/csv-parse/csv-parse-tests.ts b/csv-parse/csv-parse-tests.ts index 21df979d82..b0f13121fe 100644 --- a/csv-parse/csv-parse-tests.ts +++ b/csv-parse/csv-parse-tests.ts @@ -2,27 +2,27 @@ import parse = require('csv-parse'); function callbackAPITest() { var input = '#Welcome\n"1","2","3","4"\n"a","b","c","d"'; - parse(input, {comment: '#'}, function(err, output){ - output.should.eql([ [ '1', '2', '3', '4' ], [ 'a', 'b', 'c', 'd' ] ]); + parse(input, {comment: '#'}, (err, output) => { + output.should.eql([ [ '1', '2', '3', '4' ], [ 'a', 'b', 'c', 'd' ] ]); }); } function streamAPITest() { - let output:string[][] = []; + let output: string[][] = []; // Create the parser var parser = parse({delimiter: ':'}); let record: string[]; // Use the writable stream api - parser.on('readable', function(){ - while(record = parser.read()){ + parser.on('readable', () => { + while (record = parser.read()) { output.push(record); } }); // Catch any error - parser.on('error', function(err: any){ + parser.on('error', (err: any) => { console.log(err.message); }); - parser.on('finish', function(){ + parser.on('finish', () => { console.log(output); }); // Now that setup is done, write data to the stream @@ -37,12 +37,12 @@ import fs = require('fs'); function pipeFunctionTest() { var transform = require('stream-transform'); - var output:any = []; + var output: any = []; var parser = parse({delimiter: ':'}) var input = fs.createReadStream('/etc/passwd'); - var transformer = transform(function(record: any[], callback: any){ - setTimeout(function(){ - callback(null, record.join(' ')+'\n'); + var transformer = transform((record: any[], callback: any) => { + setTimeout(() => { + callback(null, record.join(' ') + '\n'); }, 500); }, {parallel: 10}); input.pipe(parser).pipe(transformer).pipe(process.stdout); diff --git a/csv-parse/index.d.ts b/csv-parse/index.d.ts index 5cdfe164ef..e780bac27d 100644 --- a/csv-parse/index.d.ts +++ b/csv-parse/index.d.ts @@ -1,136 +1,120 @@ -// Type definitions for csv-parse 1.1.0 +// Type definitions for csv-parse 1.1 // Project: https://github.com/wdavidw/node-csv-parse // Definitions by: David Muller // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare module "csv-parse/types" { - interface callbackFn { - (err: any, output: any): void - } +import * as stream from "stream"; - interface nameCallback { - (line1: any[]): boolean | string[] - } +export = parse; - interface options { - /*** - * Set the field delimiter. One character only, defaults to comma. - */ - delimiter?: string; +declare function parse(input: string, options?: parse.Options, callback?: parse.Callback): any; +declare function parse(options?: parse.Options, callback?: parse.Callback): any; +declare function parse(callback?: parse.Callback): any; +declare namespace parse { + type Callback = (err: any, output: any) => void; - /*** - * String used to delimit record rows or a special value; special constants are 'auto', 'unix', 'mac', 'windows', 'unicode'; defaults to 'auto' (discovered in source or 'unix' if no source is specified). - */ - rowDelimiter?: string; - /*** - * Optional character surrounding a field, one character only, defaults to double quotes. - */ - quote?: string - - /*** - * Set the escape character, one character only, defaults to double quotes. - */ - escape?: string - - /*** - * List of fields as an array, a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line, default to null, affect the result data set in the sense that records will be objects instead of arrays. - */ - columns?: any[]|boolean|nameCallback; - - /*** - * Treat all the characters after this one as a comment, default to '' (disabled). - */ - comment?: string - - /*** - * Name of header-record title to name objects by. - */ - objname?: string - - /*** - * Preserve quotes inside unquoted field. - */ - relax?: boolean - - /*** - * Discard inconsistent columns count, default to false. - */ - relax_column_count?: boolean - - /*** - * Dont generate empty values for empty lines. - */ - skip_empty_lines?: boolean - - /*** - * Maximum numer of characters to be contained in the field and line buffers before an exception is raised, used to guard against a wrong delimiter or rowDelimiter, default to 128000 characters. - */ - max_limit_on_data_read?: number - - /*** - * If true, ignore whitespace immediately around the delimiter, defaults to false. Does not remove whitespace in a quoted field. - */ - trim?: boolean - - /*** - * If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false. Does not remove whitespace in a quoted field. - */ - ltrim?: boolean - - /*** - * If true, ignore whitespace immediately preceding the delimiter (i.e. right-trim all fields), defaults to false. Does not remove whitespace in a quoted field. - */ - rtrim?: boolean - - /*** - * If true, the parser will attempt to convert read data types to native types. - */ - auto_parse?: boolean - - /*** - * If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option. - */ - auto_parse_date?: boolean - } - - import * as stream from "stream"; - - interface Parser extends stream.Transform { + interface Parser extends stream.Transform {} + class Parser { + constructor(options: Options); __push(line: any): any ; __write(chars: any, end: any, callback: any): any; } - interface ParserConstructor { - new (options: options): Parser; + interface Options { + /** + * Set the field delimiter. One character only, defaults to comma. + */ + delimiter?: string; + + /** + * String used to delimit record rows or a special value; + * special constants are 'auto', 'unix', 'mac', 'windows', 'unicode'; + * defaults to 'auto' (discovered in source or 'unix' if no source is specified). + */ + rowDelimiter?: string; + /** + * Optional character surrounding a field, one character only, defaults to double quotes. + */ + quote?: string + + /** + * Set the escape character, one character only, defaults to double quotes. + */ + escape?: string + + /** + * List of fields as an array, + * a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line, + * default to null, + * affect the result data set in the sense that records will be objects instead of arrays. + */ + columns?: any[] | boolean | ((line1: any[]) => boolean | string[]); + + /** + * Treat all the characters after this one as a comment, default to '' (disabled). + */ + comment?: string + + /** + * Name of header-record title to name objects by. + */ + objname?: string + + /** + * Preserve quotes inside unquoted field. + */ + relax?: boolean + + /** + * Discard inconsistent columns count, default to false. + */ + relax_column_count?: boolean + + /** + * Dont generate empty values for empty lines. + */ + skip_empty_lines?: boolean + + /** + * Maximum numer of characters to be contained in the field and line buffers before an exception is raised, + * used to guard against a wrong delimiter or rowDelimiter, + * default to 128000 characters. + */ + max_limit_on_data_read?: number + + /** + * If true, ignore whitespace immediately around the delimiter, defaults to false. + * Does not remove whitespace in a quoted field. + */ + trim?: boolean + + /** + * If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false. + * Does not remove whitespace in a quoted field. + */ + ltrim?: boolean + + /** + * If true, ignore whitespace immediately preceding the delimiter (i.e. right-trim all fields), defaults to false. + * Does not remove whitespace in a quoted field. + */ + rtrim?: boolean + + /** + * If true, the parser will attempt to convert read data types to native types. + */ + auto_parse?: boolean + + /** + * If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option. + */ + auto_parse_date?: boolean } + // TODO: what is this for? interface ParserStream extends NodeJS.ReadWriteStream { read(size?: number): any & string[]; } - - interface parse { - (input: string, options?: options, callback?: callbackFn): any; - (options: options, callback: callbackFn): any; - (callback: callbackFn): any; - (options?: options): ParserStream; - Parser: ParserConstructor; - } } - -declare module "csv-parse" { - import { parse as parseIntf } from "csv-parse/types"; - - let parse: parseIntf; - - export = parse; -} - -declare module "csv-parse/lib/sync" { - import { options } from "csv-parse/types"; - - function parse (input: string, options?: options): any; - - export = parse; -} \ No newline at end of file diff --git a/csv-parse/lib/sync.d.ts b/csv-parse/lib/sync.d.ts new file mode 100644 index 0000000000..5a025f6dab --- /dev/null +++ b/csv-parse/lib/sync.d.ts @@ -0,0 +1,4 @@ +import { Options } from "csv-parse"; + +declare function parse(input: string, options?: Options): any; +export = parse; diff --git a/csv-parse/tsconfig.json b/csv-parse/tsconfig.json index 36611c4d1d..b721ff4fe6 100644 --- a/csv-parse/tsconfig.json +++ b/csv-parse/tsconfig.json @@ -17,6 +17,7 @@ }, "files": [ "index.d.ts", + "lib/sync.d.ts", "csv-parse-tests.ts" ] } \ No newline at end of file diff --git a/csv-parse/tslint.json b/csv-parse/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/csv-parse/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/csv-stringify/csv-stringify-tests.ts b/csv-stringify/csv-stringify-tests.ts index bd6873affb..a05f35d368 100644 --- a/csv-stringify/csv-stringify-tests.ts +++ b/csv-stringify/csv-stringify-tests.ts @@ -1,5 +1,3 @@ -/// - import stringify = require("csv-stringify"); let stream: stringify.Stringifier; diff --git a/csvtojson/csvtojson-tests.ts b/csvtojson/csvtojson-tests.ts new file mode 100644 index 0000000000..4368d00494 --- /dev/null +++ b/csvtojson/csvtojson-tests.ts @@ -0,0 +1,114 @@ +import csv = require('csvtojson'); +import fs = require('fs'); + +// From documentation on project home page -> https://github.com/Keyang/node-csvtojson + +///////////////////////////// +// From CSV String +const csvStr: string = `1,2,3 +4,5,6 +7,8,9`; + +// event emitter version using factory function +csv({ noheader: true }) + .fromString(csvStr) + .on('csv', (csvRow: string[]) => { // this func will be called 3 times + console.log(csvRow); // => [1,2,3] , [4,5,6] , [7,8,9] + }) + .on('done', () => { + //parsing finished + }); + +// event emitter version using Converter class +new csv.Converter({ noheader: true }) + .fromString(csvStr) + .on('csv', (csvRow: string[]) => { // this func will be called 3 times + console.log(csvRow); // => [1,2,3] , [4,5,6] , [7,8,9] + }) + .on('done', () => { + //parsing finished + }); + +// callback version using Converter class +new csv.Converter({ noheader: true }) + .fromString(csvStr, (err, result) => { + console.log(JSON.stringify(result)); + }); + +// callback version using factory function +csv({ noheader: true }) + .fromString(csvStr, (err, result) => { + console.log(JSON.stringify(result)); + }); + +///////////////////////////// +// From CSV File +const filePath = './test.csv'; + +// event emitter version using factory function +csv() + .fromFile(filePath) + .on('json', (jsonObj: any) => { + console.log(JSON.stringify(jsonObj)); + }) + .on('done', (error: any) => { + console.log('end'); + }); + +// event emitter version using Converter class +new csv.Converter() + .fromFile(filePath) + .on('json', (jsonObj: any) => { + console.log(JSON.stringify(jsonObj)); + }) + .on('done', (error: any) => { + console.log('end'); + }); + +// callback version using factory function +csv() + .fromFile(filePath, (err, result) => { + console.log(JSON.stringify(result)); + }); + +// callback version using Converter class +new csv.Converter() + .fromFile(filePath, (err, result) => { + console.log(JSON.stringify(result)); + }); + +///////////////////////////// +// From CSV Stream + +const stream = fs.createReadStream(filePath); + +// event emitter version using factory function +csv().fromStream(stream) + .on('json', (jsonObj: any) => { + console.log(JSON.stringify(jsonObj)); + }) + .on('done', (error: any) => { + console.log('end'); + }); + +// event emitter version using Converter class +new csv.Converter() + .fromStream(stream) + .on('json', (jsonObj: any) => { + console.log(JSON.stringify(jsonObj)); + }) + .on('done', (error: any) => { + console.log('end'); + }); + +// callback version using factory function +csv() + .fromStream(stream, (err, result) => { + console.log(JSON.stringify(result)); + }); + +// callback version using Converter class +new csv.Converter() + .fromStream(stream, (err, result) => { + console.log(JSON.stringify(result)); + }); diff --git a/csvtojson/index.d.ts b/csvtojson/index.d.ts new file mode 100644 index 0000000000..9ba01212c7 --- /dev/null +++ b/csvtojson/index.d.ts @@ -0,0 +1,276 @@ +// Type definitions for csvtojson 1.1 +// Project: https://github.com/Keyang/node-csvtojson +// Definitions by: Eric Byers , Wayne Carson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from 'stream'; + +declare namespace csvtojson { + + /** + * Stream options + */ + type StreamOptions = stream.TransformOptions; + + /** + * Converter options + */ + interface ConverterOptions { + + /** + * Delimiter used for seperating columns. Use "auto" if delimiter is unknown in advance, + * in this case, delimiter will be auto-detected (by best attempt). Use an array to give + * a list of potential delimiters e.g. [",","|","$"]. (default: ",") + */ + delimiter?: string | string[]; + + /** + * If a column contains delimiter, it is able to use quote character to surround the column + * content. e.g. "hello, world" wont be split into two columns while parsing. Set to "off" + * will ignore all quotes. (default: " (double quote)) + */ + quote?: string; + + /** + * Indicate if parser trim off spaces surrounding column content. e.g. " content " will be + * trimmed to "content". (default: true) + */ + trim?: boolean; + + /** + * This parameter turns on and off whether check field type. (default: true) + */ + checkType?: boolean; + + /** + * Stringify the stream output to JSON array. This is useful when pipe output to a file + * which expects stringified JSON array. (default: false and only stringified JSON (without []) + * will be pushed to downstream) + */ + toArrayString?: boolean; + + /** + * Ignore the empty value in CSV columns. If a column value is not giving, set this to true to + * skip them. (default: false) + */ + ignoreEmpty?: boolean; + + /** + * Number of worker processes. The worker process will use multi-cores to help process CSV data. + * Set to number of cores to improve the performance of processing large CSV file. Keep 1 for + * small csv files. (default: 1) + */ + workerNum?: number; + + /** + * Indicating CSV data has no header row and first row is data row. (default: false) + */ + noheader?: boolean; + + /** + * An array to specify the headers of CSV data. If noheader is false, this value will override + * CSV header row. Example: ["my field","name"] (default: null) + */ + headers?: string[]; + + /** + * Don't interpret dots (.) and square brackets in header fields as nested object or array identifiers + * at all (treat them like regular characters for JSON field identifiers). (default: false) + */ + flatKeys?: boolean; + + /** + * The max character a CSV row could have. 0 means infinite. If max number exceeded, parser will emit + * "error" of "row_exceed". if a possibly corrupted CSV data provided, give it a number like 65535 + * so the parser wont consume memory. (default: 0) + */ + maxRowLength?: number; + + /** + * Whether or not to check if the column number of a row is the same as headers. If column number + * mismatched headers number, an error of "mismatched_column" will be emitted. (default: false) + */ + checkColumn?: boolean; + + /** + * End of line character. If omitted, parser will attempt retrieve it from first chunk of CSV data. + * If no valid eol found, then operation system eol will be used. + */ + eol?: string; + + /** + * Escape character used in quoted column. Default is double quote (") according to RFC4108. Change + * to back slash (\) or other chars for your own case. (default: " (double quote)) + */ + escape?: string; + + /** + * This parameter instructs the parser to include only those columns as specified by an array of + * column indexes. Example: [0,2,3] will parse and include only columns 0, 2, and 3 in the JSON output. + */ + includeColumns?: number[]; + + /** + * This parameter instructs the parser to ignore columns as specified by an array of column indexes. + * Example: [1,3,5] will ignore columns 1, 3, and 5 and will not return them in the JSON output. + */ + ignoreColumns?: number[]; + + /** + * Deprecated. Use workerNum instead. + */ + fork?: number; + } + + /** + * Callback function for handling result of parse. + */ + type ParseResultHandler = (err: any, result: any) => void; + + /** + * Event handler for "json" events. + */ + type JsonEventHandler = (jsonObj: any, rowNumber: number) => void; + + /** + * Event handler for "csv" events. + */ + type CsvEventHandler = (csvRow: string[], rowNumber: number) => void; + + /** + * Event handler for "data" events. + */ + type DataEventHandler = (data: any) => void; + + /** + * Event handler for "error" events. + */ + type ErrorEventHandler = (err: any) => void; + + /** + * Event handler for "record_parsed" events. + */ + type RecordParsedEventHandler = (jsonObj: any, csvRoe: string[], rowNumber: number) => void; + + /** + * Event handler for "end" events. + */ + type EndEventHandler = () => void; + + /** + * Event handler for "end_parsed" events. + */ + type EndParsedEventHandler = (jsonObjArray: any[]) => void; + + /** + * Event handler for "done" events. + */ + type DoneEventHandler = (err: any) => void; + + /** + * Converts provided CSV input to a JSON object. + */ + class Converter extends stream.Transform { + + /** + * Initializes a new instance of a Converter + * @param {ConverterOptions} options converter options + * @param {StreamOptions} streamOptions stream options + */ + constructor(options?: ConverterOptions, streamOptions?: StreamOptions); + + /** + * Reads in a CSV from a string. + * @param {string} str the string to convert + * @return {Converter} returns this object for chaining + */ + fromString(str: string): this + + /** + * Reads in a CSV from a string. + * @param {string} str the string to convert + * @param {ParseResultHandler} callback callback function to handle result or error + */ + fromString(str: string, callback: ParseResultHandler): void; + + /** + * Reads in a CSV from a file. + * @param {string} filePath the path to the CSV file + * @return {Converter} returns this object for chaining + */ + fromFile(filePath: string): this + + /** + * Reads in a CSV from a file. + * @param {string} filePath the path to the CSV file + * @param {ParseResultHandler} callback callback function to handle result or error + */ + fromFile(filePath: string, callback: ParseResultHandler): void; + + /** + * Reads in a CSV from a stream. + * @param {Stream} stream the stream + * @return {Converter} returns this object for chaining + */ + fromStream(stream: NodeJS.ReadableStream): this + + /** + * Reads in a CSV from a stream. + * @param {Stream} stream the stream + * @param {ParseResultHandler} callback callback function to handle result or error + */ + fromStream(stream: stream.Stream, callback: ParseResultHandler): void; + + /** + * Adds a listener function to the end of the listeners array for an event. + * Available events: + * - json + * - csv + * - data + * - error + * - record_parsed + * - end + * - end_parsed + * - done + * @param {Event} event name of event + * @param {Function} listener listener function + * @return {this} returns this object for chaining + */ + // tslint:disable-next-line:forbidden-types + on(event: string, listener: Function | JsonEventHandler | CsvEventHandler | DataEventHandler | ErrorEventHandler + | RecordParsedEventHandler | EndEventHandler | EndParsedEventHandler | DoneEventHandler): this; + + /** + * Transform objects after CSV parsing but before result being emitted or pushed downstream. + * @param {Function} callback transform function + * @return {this} returns this object for chaining + */ + transf(callback: (jsonObj: any, csvRow: string[], rowNumber: number) => void): this; + + /** + * The function in preRawData will be called directly with the string from upper stream. + * @param {Function} callback callback function + * @return {this} returns this object for chaining + */ + preRawData(callback: (csvRawData: string, cb: (newData: any) => void) => void): this; + + /** + * The function is called each time a file line being found in csv stream. + * @param {Function} callback callback function + * @return {this} returns this object for chaining + */ + preFileLine(callback: (line: string, rowNumber: number) => string): this; + } +} + +/** + * Factory function which creates an instance of a Converter object. + * @param {ConverterOptions} options converter options + * @param {StreamOptions} streamOptions stream options + * @return {csvtojson.Converter} Converter object + */ +declare function csvtojson(options?: csvtojson.ConverterOptions, streamOptions?: csvtojson.StreamOptions): csvtojson.Converter; + +export = csvtojson; diff --git a/csvtojson/tsconfig.json b/csvtojson/tsconfig.json new file mode 100644 index 0000000000..81ec6a66a2 --- /dev/null +++ b/csvtojson/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "csvtojson-tests.ts" + ] +} diff --git a/csvtojson/tslint.json b/csvtojson/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/csvtojson/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/cucumber/cucumber-tests.ts b/cucumber/cucumber-tests.ts index 87089671ae..802f610a62 100644 --- a/cucumber/cucumber-tests.ts +++ b/cucumber/cucumber-tests.ts @@ -3,7 +3,7 @@ import cucumber = require("cucumber"); function StepSample() { type Callback = cucumber.CallbackStepDefinition; - type Table = cucumber.TableDefinition; + type Table = cucumber.TableDefinition; type HookScenario = cucumber.HookScenario; type Hooks = cucumber.Hooks; var step = this; @@ -19,6 +19,14 @@ function StepSample() { scenario.isFailed() && callback.pending(); }); + hook.Before({ timeout: 1000 }, function(scenario: HookScenario, callback: Callback) { + callback(); + }); + + hook.After({ timeout: 1000 }, function(scenario: HookScenario, callback: Callback) { + callback(); + }); + hook.Around(function(scenario: HookScenario, runScenario: (error:string, callback?:Function)=>void) { scenario.isFailed() && runScenario(null, function(){ console.log('finish tasks'); @@ -97,6 +105,24 @@ function StepSample() { } ) }); + cucumber.defineSupportCode(function(hook: cucumber.Hooks){ + hook.addTransform({ + captureGroupRegexps: ['red|blue|green'], + transformer: (arg: string) => arg, + typeName: 'color' + }); + }); + + cucumber.defineSupportCode(function({After, Given}) { + Given( /^a variable set to (\d+)$/, (x:string) => { + console.log("the number is: " + x); + }); + After((scenario: HookScenario, callback?: Callback) => { + console.log("After"); + callback(); + }); + }); + let fns : cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns() cucumber.clearSupportCodeFns(); diff --git a/cucumber/index.d.ts b/cucumber/index.d.ts index a8b85539ce..2a7efcdb0e 100644 --- a/cucumber/index.d.ts +++ b/cucumber/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for cucumber-js // Project: https://github.com/cucumber/cucumber-js -// Definitions by: Abraão Alves , Jan Molak +// Definitions by: Abraão Alves , Jan Molak , Isaiah Soung // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = cucumber; @@ -64,14 +64,27 @@ declare namespace cucumber { (scenario: HookScenario, runScenario?: (error:string, callback?:Function)=>void): void; } + interface Transform { + captureGroupRegexps: Array; + transformer: (arg: string) => any; + typeName: string; + } + + interface HookOptions{ + timeout?: number; + } + export interface Hooks { Before(code: HookCode): void; + Before(options: HookOptions, code: HookCode): void; After(code: HookCode): void; + After(options: HookOptions, code: HookCode): void; Around(code: AroundCode):void; setDefaultTimeout(time:number): void; setWorldConstructor(world: () => void): void; registerHandler(handlerOption:string, code:(event:any, callback:CallbackStepDefinition) =>void): void; registerListener(listener: EventListener): void; + addTransform(transform: Transform): void; } export class EventListener { diff --git a/cybozulabs-md5/cybozulabs-md5-tests.ts b/cybozulabs-md5/cybozulabs-md5-tests.ts index 7572ed9124..2163b6e8c9 100644 --- a/cybozulabs-md5/cybozulabs-md5-tests.ts +++ b/cybozulabs-md5/cybozulabs-md5-tests.ts @@ -1,5 +1,3 @@ -/// - var hash: string; hash = CybozuLabs.MD5.calc("abc"); hash = CybozuLabs.MD5.calc("abc", CybozuLabs.MD5.BY_ASCII); diff --git a/d3-array/d3-array-tests.ts b/d3-array/d3-array-tests.ts index 74b749bea3..7dbe08bad0 100644 --- a/d3-array/d3-array-tests.ts +++ b/d3-array/d3-array-tests.ts @@ -44,13 +44,13 @@ let num: number; let date: Date; let numOrUndefined: number | undefined; -let strOrUndefined: string | undefined; -let numericOrUndefined: NumCoercible | undefined; -let dateOrUndefined: Date | undefined; +let strOrUndefined: string |  undefined; +let numericOrUndefined: NumCoercible |  undefined; +let dateOrUndefined: Date |  undefined; let numOrUndefinedExtent: [number, number] | [undefined, undefined]; let strOrUndefinedExtent: [string, string] | [undefined, undefined]; let numericOrUndefinedExtent: [NumCoercible, NumCoercible] | [undefined, undefined]; -let dateMixedOrUndefined: [Date , Date] | [undefined, undefined]; +let dateMixedOrUndefined: [Date, Date] | [undefined, undefined]; let mixedOrUndefinedExtent: [d3Array.Primitive | NumCoercible, d3Array.Primitive | NumCoercible] | [undefined, undefined]; let dateOrUndefinedExtent: [Date, Date] | [undefined, undefined]; @@ -330,12 +330,34 @@ mergedArray = d3Array.merge(testArrays); // inferred type mergedArray = d3Array.merge(testArrays); // explicit type // mergedArray = d3Array.merge([[10, 40, 30], [15, 30]]); // fails, type mismatch +// cross() --------------------------------------------------------------------- + +let crossed: Array<[string, number]>; + +crossed = d3Array.cross(['x', 'y'], [1, 2]); +crossed = d3Array.cross(['x', 'y'], [1, 2]); + +let strArray: string[] = d3Array.cross([2, 3], [5, 6], (a, b) => (a + b) + 'px'); +strArray = d3Array.cross([2, 3], [5, 6], (a, b) => { + let aa: number = a; + let bb: number = b; + return (aa + bb) + 'px'; +}); + + // pairs() --------------------------------------------------------------------- let pairs: Array<[MixedObject, MixedObject]>; pairs = d3Array.pairs(mergedArray); +numbersArray = d3Array.pairs(mergedArray, (a, b) => b.num - a.num); +numbersArray = d3Array.pairs(mergedArray, (a, b) => { + let aa: MixedObject = a; + let bb: MixedObject = b; + return bb.num - aa.num; +}); + // permute() ------------------------------------------------------------------- // getting a permutation of array elements diff --git a/d3-array/index.d.ts b/d3-array/index.d.ts index 336eb2bc83..d938a8c032 100644 --- a/d3-array/index.d.ts +++ b/d3-array/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for D3JS d3-array module 1.0 +// Type definitions for D3JS d3-array module 1.1 // Project: https://github.com/d3/d3-array // Definitions by: Alex Ford , Boris Yankov , Tom Wanzek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.2 +// Last module patch version validated against: 1.1.0 // -------------------------------------------------------------------------- // Shared Types and Interfaces @@ -181,6 +181,26 @@ export function descending(a: Primitive | undefined, b: Primitive | undefined): // Transforming Arrays // -------------------------------------------------------------------------------------- +/** + * Returns the Cartesian product of the two arrays a and b. + * For each element i in the specified array a and each element j in the specified array b, in order, + * it creates a two-element array for each pair. + * + * @param a First input array. + * @param b Second input array. + */ +export function cross(a: S[], b: T[]): Array<[S, T]>; + +/** + * Returns the Cartesian product of the two arrays a and b. + * For each element i in the specified array a and each element j in the specified array b, in order, + * invokes the specified reducer function passing the element i and element j. + * + * @param a First input array. + * @param b Second input array. + * @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value. + */ +export function cross(a: S[], b: T[], reducer: (a: S, b: T) => U): U[]; /** * Merges the specified arrays into a single array. @@ -190,8 +210,19 @@ export function merge(arrays: T[][]): T[]; /** * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. * Returns the empty array if the input array has fewer than two elements. + * + * @param array Array of input elements */ export function pairs(array: T[]): Array<[T, T]>; +/** + * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1. + * Returns the resulting array of pair-wise reduced elements. + * Returns the empty array if the input array has fewer than two elements. + * + * @param array Array of input elements + * @param reducer A reducer function taking as input to adjecent elements of the input array and returning a reduced value. + */ +export function pairs(array: T[], reducer: (a: T, b: T) => U): U[]; /** * Given the specified array, return an array corresponding to the list of indices in 'keys'. diff --git a/d3-format/d3-format-tests.ts b/d3-format/d3-format-tests.ts index 3fd5742997..57a98e26c6 100644 --- a/d3-format/d3-format-tests.ts +++ b/d3-format/d3-format-tests.ts @@ -63,11 +63,6 @@ num = d3Format.precisionRound(0.0005, 3000); // Test Locale Definition // ---------------------------------------------------------------------- -let decimal: '.' | ',' = localeDef.decimal; -let thousands: '.' | ',' | '\u00a0' | "'" = localeDef.thousands; -let grouping: Array = localeDef.grouping; -let currency: [string, string] = localeDef.currency; - localeDef = { decimal: ',', thousands: '.', @@ -75,6 +70,20 @@ localeDef = { currency: ['EUR', ''] }; +localeDef = { + decimal: "\u066b", + thousands: "\u066c", + grouping: [3], + currency: ["", ""], + numerals : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] +} + +let decimal: string = localeDef.decimal; +let thousands: string = localeDef.thousands; +let grouping: Array = localeDef.grouping; +let currency: [string, string] = localeDef.currency; +let numerals: string[] | undefined = localeDef.numerals; + localeObj = d3Format.formatLocale(localeDef); localeObj = d3Format.formatDefaultLocale(localeDef); diff --git a/d3-format/index.d.ts b/d3-format/index.d.ts index 92197f6ab8..be6c2b9a99 100644 --- a/d3-format/index.d.ts +++ b/d3-format/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for D3JS d3-format module v1.0.2 +// Type definitions for D3JS d3-format module 1.1 // Project: https://github.com/d3/d3-format/ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Last module patch version validated against: 1.1.0 + /** * Specification of locale to use when creating a new FormatLocaleObject */ @@ -10,12 +12,12 @@ export interface FormatLocaleDefinition { /** * The decimal point (e.g., ".") */ - decimal: '.' | ','; + decimal: string; /** * The group separator (e.g., ","). Note that the thousands property is a misnomer, as\ * the grouping definition allows groups other than thousands. */ - thousands: '.' | ',' | '\u00a0' | "'"; + thousands: string; /** * The array of group sizes (e.g., [3]), cycled as needed. */ @@ -24,6 +26,10 @@ export interface FormatLocaleDefinition { * The currency prefix and suffix (e.g., ["$", ""]) */ currency: [string, string]; + /** + * An array of ten strings to replace the numerals 0-9. + */ + numerals?: string[]; } /** diff --git a/d3-geo/d3-geo-tests.ts b/d3-geo/d3-geo-tests.ts index 3d28bb610f..a29dce0e8b 100644 --- a/d3-geo/d3-geo-tests.ts +++ b/d3-geo/d3-geo-tests.ts @@ -130,6 +130,18 @@ centroid = d3Geo.geoCentroid(sampleExtendedFeature2); centroid = d3Geo.geoCentroid(sampleFeatureCollection); centroid = d3Geo.geoCentroid(sampleExtendedFeatureCollection); +// geoContains(...) ======================================================= + +let contained: boolean = d3Geo.geoContains(samplePolygon, [0, 0]); +contained = d3Geo.geoContains(sampleSphere, [0, 0]); +contained = d3Geo.geoContains(sampleGeometryCollection, [0, 0]); +contained = d3Geo.geoContains(sampleExtendedGeometryCollection, [0, 0]); +contained = d3Geo.geoContains(sampleFeature, [0, 0]); +contained = d3Geo.geoContains(sampleExtendedFeature1, [0, 0]); +contained = d3Geo.geoContains(sampleExtendedFeature2, [0, 0]); +contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]); +contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]); + // geoDistance(...) ======================================================= let distance: number = d3Geo.geoDistance([54, 2], [53, 1]); @@ -198,7 +210,7 @@ class Circulator { private p: number; private circleGenerator: d3Geo.GeoCircleGenerator; - public getCirclePolygon(center?: [number, number]): GeoJSON.Polygon { + getCirclePolygon(center?: [number, number]): GeoJSON.Polygon { if (center && center.length === 2 && typeof center[0] === 'number' && typeof center[1] === 'number') { return this.circleGenerator(center); } else { @@ -489,7 +501,8 @@ geoPathSVG = geoPathSVG.pointRadius(function (datum) { }); let geoPathSVGPointRadiusAccessor: number | ((this: SVGPathElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) = geoPathSVG.pointRadius(); -// let geoPathSVGPointRadiusAccessorWrong1: number | ((this: SVGCircleElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) = geoPathSVG.pointRadius(); // fails, mismatch in this context +// let geoPathSVGPointRadiusAccessorWrong1: number | ((this: SVGCircleElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) +// = geoPathSVG.pointRadius(); // fails, mismatch in this context // let geoPathSVGPointRadiusAccessorWrong2: number | ((this: SVGPathElement, d: d3Geo.GeoGeometryObjects, ...args: any[]) => number) = geoPathSVG.pointRadius(); // fails, mismatch in object datum type // Use geoPath Generator ================================================ @@ -537,6 +550,19 @@ geoPathCentroid = geoPathCanvas.centroid(sampleExtendedFeatureCollection); // geoPathCentroid = geoPathSVG.centroid(sampleExtendedFeatureCollection); // fails, wrong data object type + +// measure(...) ------------------------------------------------------ + +let geoPathMeasure: number = geoPathCanvas.measure(samplePolygon); +geoPathMeasure = geoPathCanvas.measure(sampleSphere); +geoPathMeasure = geoPathCanvas.measure(sampleGeometryCollection); +geoPathMeasure = geoPathCanvas.measure(sampleExtendedGeometryCollection); +geoPathMeasure = geoPathCanvas.measure(sampleFeature); +geoPathMeasure = geoPathCanvas.measure(sampleExtendedFeature1); +geoPathMeasure = geoPathCanvas.measure(sampleExtendedFeature2); +geoPathMeasure = geoPathCanvas.measure(sampleFeatureCollection); +geoPathMeasure = geoPathCanvas.measure(sampleExtendedFeatureCollection); + // render path to context of get path string---------------------------- // render to GeoContext/Canvas diff --git a/d3-geo/index.d.ts b/d3-geo/index.d.ts index 9ab3ae74cd..dfc58a5f9e 100644 --- a/d3-geo/index.d.ts +++ b/d3-geo/index.d.ts @@ -1,10 +1,12 @@ -// Type definitions for D3JS d3-geo module v1.4.0 +// Type definitions for D3JS d3-geo module 1.6 // Project: https://github.com/d3/d3-geo/ // Definitions by: Hugues Stefanski , Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +// Last module patch version validated against: 1.6.1 + // ---------------------------------------------------------------------- // Shared Interfaces and Types // ---------------------------------------------------------------------- @@ -59,7 +61,8 @@ export interface ExtendedFeatureCollection | ExtendedFeature | ExtendedFeatureCollection>; +export type GeoPermissibleObjects = GeoGeometryObjects | ExtendedGeometryCollection + | ExtendedFeature | ExtendedFeatureCollection>; // ---------------------------------------------------------------------- // Spherical Math @@ -67,94 +70,135 @@ export type GeoPermissibleObjects = GeoGeometryObjects | ExtendedGeometryCollect /** * Returns the spherical area of the specified feature in steradians. - * (See also path.area, which computes the projected planar area.) + * This is the spherical equivalent of path.area. * - * @param feature A geographic feature supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoArea(feature: ExtendedFeature): number; +export function geoArea(object: ExtendedFeature): number; /** * Returns the spherical area of the specified feature collection in steradians. - * (See also path.area, which computes the projected planar area.) + * This is the spherical equivalent of path.area. * - * @param feature A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoArea(feature: ExtendedFeatureCollection>): number; +export function geoArea(object: ExtendedFeatureCollection>): number; /** * Returns the spherical area of the specified GeoJson Geometry Object or GeoSphere object in steradians. - * (See also path.area, which computes the projected planar area.) + * This is the spherical equivalent of path.area. * - * @param feature A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). + * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ -export function geoArea(feature: GeoGeometryObjects): number; +export function geoArea(object: GeoGeometryObjects): number; /** * Returns the spherical area of the specified geographic geometry collection in steradians. - * (See also path.area, which computes the projected planar area.) + * This is the spherical equivalent of path.area. * - * @param feature A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoArea(feature: ExtendedGeometryCollection): number; +export function geoArea(object: ExtendedGeometryCollection): number; /** * Returns the spherical bounding box for the specified feature. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) + * This is the spherical equivalent of path.bounds. * - * @param feature A geographic feature supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoBounds(feature: ExtendedFeature): [[number, number], [number, number]]; +export function geoBounds(object: ExtendedFeature): [[number, number], [number, number]]; /** * Returns the spherical bounding box for the specified feature collection. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) + * This is the spherical equivalent of path.bounds. * - * @param feature A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoBounds(feature: ExtendedFeatureCollection>): [[number, number], [number, number]]; +export function geoBounds(object: ExtendedFeatureCollection>): [[number, number], [number, number]]; /** * Returns the spherical bounding box for the specified GeoJson Geometry Object or GeoSphere object. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) + * This is the spherical equivalent of path.bounds. * - * @param feature A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). + * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ -export function geoBounds(feature: GeoGeometryObjects): [[number, number], [number, number]]; +export function geoBounds(object: GeoGeometryObjects): [[number, number], [number, number]]; /** * Returns the spherical bounding box for the specified geometry collection. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) + * This is the spherical equivalent of path.bounds. * - * @param feature A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoBounds(feature: ExtendedGeometryCollection): [[number, number], [number, number]]; +export function geoBounds(object: ExtendedGeometryCollection): [[number, number], [number, number]]; /** * Returns the spherical centroid of the specified feature in steradians. - * (See also path.centroid, which computes the projected planar centroid.) + * This is the spherical equivalent of path.centroid. * - * @param feature A geographic feature supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoCentroid(feature: ExtendedFeature): [number, number]; +export function geoCentroid(object: ExtendedFeature): [number, number]; /** * Returns the spherical centroid of the specified feature collection in steradians. - * (See also path.centroid, which computes the projected planar centroid.) + * This is the spherical equivalent of path.centroid. * - * @param feature A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoCentroid(feature: ExtendedFeatureCollection>): [number, number]; +export function geoCentroid(object: ExtendedFeatureCollection>): [number, number]; /** * Returns the spherical centroid of the specified GeoJson Geometry Object or GeoSphere object in steradians. - * (See also path.centroid, which computes the projected planar centroid.) + * This is the spherical equivalent of path.centroid. * - * @param feature A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). + * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ -export function geoCentroid(feature: GeoGeometryObjects): [number, number]; +export function geoCentroid(object: GeoGeometryObjects): [number, number]; /** * Returns the spherical centroid of the specified geographic geometry collection in steradians. - * (See also path.centroid, which computes the projected planar centroid.) + * This is the spherical equivalent of path.centroid. * - * @param feature A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoCentroid(feature: ExtendedGeometryCollection): [number, number]; +export function geoCentroid(object: ExtendedGeometryCollection): [number, number]; + +/** + * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. + * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; + * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. + * + * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). + * @param point Point specified as a two-element array [longitude, latitude] in degrees. + */ +export function geoContains(object: ExtendedFeature, point: [number, number]): boolean; +/** + * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. + * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; + * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. + * + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). + * @param point Point specified as a two-element array [longitude, latitude] in degrees. + */ +export function geoContains(object: ExtendedFeatureCollection>, point: [number, number]): boolean; +/** + * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. + * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; + * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. + * + * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). + * @param point Point specified as a two-element array [longitude, latitude] in degrees. + */ +export function geoContains(object: GeoGeometryObjects, point: [number, number]): boolean; +/** + * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. + * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; + * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. + * + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + * @param point Point specified as a two-element array [longitude, latitude] in degrees. + */ +export function geoContains(object: ExtendedGeometryCollection, point: [number, number]): boolean; /** * Returns the great-arc distance in radians between the two points a and b. @@ -166,29 +210,33 @@ export function geoCentroid(feature: ExtendedGeometryCollection): number; +export function geoLength(object: ExtendedFeature): number; /** - * Returns the great-arc length of the specified feature collection in radians. + * Returns the great-arc length of the specified feature collection in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. + * This is the spherical equivalent of path.measure. * - * @param feature A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoLength(feature: ExtendedFeatureCollection>): number; +export function geoLength(object: ExtendedFeatureCollection>): number; /** - * Returns the great-arc length of the specified GeoJson Geometry Object or GeoSphere object in radians. + * Returns the great-arc length of the specified GeoJson Geometry Object or GeoSphere object in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. + * This is the spherical equivalent of path.measure. * -* @param feature A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). + * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ -export function geoLength(feature: GeoGeometryObjects): number; +export function geoLength(object: GeoGeometryObjects): number; /** - * Returns the great-arc length of the specified geographic geometry collection in radians. + * Returns the great-arc length of the specified geographic geometry collection in radians For polygons, returns the perimeter of the exterior ring plus that of any interior rings. + * This is the spherical equivalent of path.measure.. * - * @param feature A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoLength(feature: ExtendedGeometryCollection): number; +export function geoLength(object: ExtendedGeometryCollection): number; /** * Returns an interpolator function given two points a and b. @@ -658,15 +706,15 @@ export interface GeoProjection extends GeoStreamWrapper { * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ + /** + * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection>): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. @@ -678,15 +726,15 @@ export interface GeoProjection extends GeoStreamWrapper { * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ fitExtent(extent: [[number, number], [number, number]], object: GeoGeometryObjects): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ + /** + * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; @@ -867,7 +915,8 @@ export interface GeoContext { /** * A Geo Path generator * - * The first generic corresponds to the "this"-context within which the geo path generator will be invoked. This could be e.g. the DOMElement bound to "this" when using selection.attr("d", ...) with the path generator. + * The first generic corresponds to the "this"-context within which the geo path generator will be invoked. + * This could be e.g. the DOMElement bound to "this" when using selection.attr("d", ...) with the path generator. * * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. */ @@ -904,11 +953,11 @@ export interface GeoPath { /** * Returns the projected planar area (typically in square pixels) for the specified GeoJSON object. - * Point, MultiPoint, LineString and MultiLineString features have zero area. For Polygon and MultiPolygon features, + * Point, MultiPoint, LineString and MultiLineString geometries have zero area. For Polygon and MultiPolygon geometries, * this method first computes the area of the exterior ring, and then subtracts the area of any interior holes. - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. + * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoArea. * - * @param An object for which the area is to be calculated. + * @param object An object for which the area is to be calculated. */ area(object: DatumObject): number; @@ -919,9 +968,9 @@ export interface GeoPath { * * This is handy for, say, zooming in to a particular feature. (Note that in projected planar coordinates, * the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. + * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoBounds. * - * @param An object for which the bounds are to be calculated. + * @param object An object for which the bounds are to be calculated. */ bounds(object: DatumObject): [[number, number], [number, number]]; @@ -929,12 +978,22 @@ export interface GeoPath { * Returns the projected planar centroid (typically in pixels) for the specified GeoJSON object. * This is handy for, say, labeling state or county boundaries, or displaying a symbol map. * For example, a noncontiguous cartogram might scale each state around its centroid. - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. + * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoCentroid. * - * @param An object for which the centroid is to be calculated. + * @param object An object for which the centroid is to be calculated. */ centroid(object: DatumObject): [number, number]; + /** + * Returns the projected planar length (typically in pixels) for the specified GeoJSON object. + * Point and MultiPoint geometries have zero length. For Polygon and MultiPolygon geometries, this method computes the summed length of all rings. + * + * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoLength. + * + * @param object An object for which the measure is to be calculated. + */ + measure(object: DatumObject): number; + /** * Returns the current render context which defaults to null. * @@ -1000,27 +1059,28 @@ export interface GeoPath { projection(projection: GeoStreamWrapper): this; /** - * Returns the current radius or radius accessor used to determine the radius for the display of Point and MultiPoint features. + * Returns the current radius or radius accessor used to determine the radius for the display of Point and MultiPoint geometries. * The default is a constant radius of 4.5. */ pointRadius(): ((this: This, object: DatumObject, ...args: any[]) => number) | number; /** - * Sets the radius used to display Point and MultiPoint features to the specified number and return the geo path generator. + * Sets the radius used to display Point and MultiPoint geometries to the specified number and return the geo path generator. * * @param value Fixed radius value. */ pointRadius(value: number): this; /** - * Sets the radius used to display Point and MultiPoint features to use the specified radius accessor function. + * Sets the radius used to display Point and MultiPoint geometries to use the specified radius accessor function. * * While the radius is commonly specified as a number constant, it may also be specified as a function which is computed per feature, * being passed the any arguments passed to the path generator. For example, if your GeoJSON data has additional properties, * you might access those properties inside the radius function to vary the point size; * alternatively, you could d3.symbol and a projection for greater flexibility. * - * @param value A value accessor function for the radius which is evaluated for each path to be rendered. The value accessor function is invoked within the "this" context in which the path generator is used. + * @param value A value accessor function for the radius which is evaluated for each path to be rendered. + * The value accessor function is invoked within the "this" context in which the path generator is used. * It is passed the object to be rendered, and any additional arguments which have been passed into the call to the render function of the path generator. */ pointRadius(value: (this: This, object: DatumObject, ...args: any[]) => number): this; @@ -1070,7 +1130,8 @@ export function geoPath(projection?: * * The default context is null, which implies that the path generator will return an SVG path string. * - * The first generic corresponds to the "this"-context within which the geo path generator will be invoked. This could be e.g. the DOMElement bound to "this" when using selection.attr("d", ...) with the path generator. + * The first generic corresponds to the "this"-context within which the geo path generator will be invoked. + * This could be e.g. the DOMElement bound to "this" when using selection.attr("d", ...) with the path generator. * * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. * @@ -1339,15 +1400,15 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ + /** + * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection>): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. @@ -1359,15 +1420,15 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ fitExtent(extent: [[number, number], [number, number]], object: GeoGeometryObjects): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ + /** + * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; diff --git a/d3-geo/tslint.json b/d3-geo/tslint.json new file mode 100644 index 0000000000..6a00563639 --- /dev/null +++ b/d3-geo/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../tslint.json", + "rules": { + "unified-signatures": false, + "max-line-length": [false, 200] + } +} diff --git a/d3.cloud.layout/d3.cloud.layout-tests.ts b/d3.cloud.layout/d3.cloud.layout-tests.ts index b2e0349cd4..862b7f0d82 100644 --- a/d3.cloud.layout/d3.cloud.layout-tests.ts +++ b/d3.cloud.layout/d3.cloud.layout-tests.ts @@ -1,42 +1,40 @@ -/// +interface ICompTextSize{ + text:string; + size:number; + x?:number; + y?:number; + rotate?:number; +} - interface ICompTextSize{ - text:string; - size:number; - x?:number; - y?:number; - rotate?:number; - } +var fill = d3.scale.category20(); +d3.layout.cloud().size([300, 300]) + .words([ + "Hello", "world", "normally", "you", "want", "more", "words", + "than", "this"].map(function(d:string) { + return {text: d, size: 10 + Math.random() * 90}; + })) + .padding(5) + .rotate(function() { return ~~(Math.random() * 2) * 90; }) + .font("Impact") + .fontSize(function(d:ICompTextSize) { return d.size; }) + .on("end", draw) + .start(); - - var fill = d3.scale.category20(); - d3.layout.cloud().size([300, 300]) - .words([ - "Hello", "world", "normally", "you", "want", "more", "words", - "than", "this"].map(function(d:string) { - return {text: d, size: 10 + Math.random() * 90}; - })) - .padding(5) - .rotate(function() { return ~~(Math.random() * 2) * 90; }) - .font("Impact") - .fontSize(function(d:ICompTextSize) { return d.size; }) - .on("end", draw) - .start(); - function draw(words:ICompTextSize[]) { - d3.select("body").append("svg") - .attr("width", 300) - .attr("height", 300) - .append("g") - .attr("transform", "translate(150,150)") - .selectAll("text") - .data(words) - .enter().append("text") - .style("font-size", function(d:ICompTextSize) { return d.size + "px"; }) - .style("font-family", "Impact") - .style("fill", function(d:ICompTextSize, i:number) { return fill(i); }) - .attr("text-anchor", "middle") - .attr("transform", function(d:ICompTextSize) { - return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; - }) - .text(function(d:ICompTextSize) { return d.text; }); - } +function draw(words:ICompTextSize[]) { + d3.select("body").append("svg") + .attr("width", 300) + .attr("height", 300) + .append("g") + .attr("transform", "translate(150,150)") + .selectAll("text") + .data(words) + .enter().append("text") + .style("font-size", function(d:ICompTextSize) { return d.size + "px"; }) + .style("font-family", "Impact") + .style("fill", function(d:ICompTextSize, i:number) { return fill(i); }) + .attr("text-anchor", "middle") + .attr("transform", function(d:ICompTextSize) { + return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; + }) + .text(function(d:ICompTextSize) { return d.text; }); +} diff --git a/d3/index.d.ts b/d3/index.d.ts index bf7fa8e6b6..525c4dbfd3 100644 --- a/d3/index.d.ts +++ b/d3/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for D3JS d3 standard bundle 4.5 +// Type definitions for D3JS d3 standard bundle 4.7 // Project: https://github.com/d3/d3 // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/d3kit/d3kit-tests.ts b/d3kit/d3kit-tests.ts index c8a447ecda..e1a92d41b9 100644 --- a/d3kit/d3kit-tests.ts +++ b/d3kit/d3kit-tests.ts @@ -1,5 +1,3 @@ -/// - function test_abstract_chart() { let el: Element, chart: d3kit.AbstractChart, @@ -86,8 +84,8 @@ function test_svgchart() { options: d3kit.ChartOptions, margins: d3kit.ChartMargin, offsets: [number, number], - svg: d3.Selection, - rootg: d3.Selection, + svg: d3.Selection, + rootg: d3.Selection, layers: d3kit.LayerOrganizer; // create a div, append to body, return Node as type Element diff --git a/d3kit/v1/d3kit-tests.ts b/d3kit/v1/d3kit-tests.ts index d49891822b..9ffb7ca2ba 100644 --- a/d3kit/v1/d3kit-tests.ts +++ b/d3kit/v1/d3kit-tests.ts @@ -1,9 +1,6 @@ -/// /// /// -/* jshint expr: true */ - var expect = chai.expect; describe('Skeleton', function(){ var element: Element, $element: d3.Selection, $svg: d3.Selection, skeleton: d3kit.Skeleton; diff --git a/datatables-buttons/datatables-buttons-tests.ts b/datatables.net-buttons/datatables.net-buttons-tests.ts similarity index 91% rename from datatables-buttons/datatables-buttons-tests.ts rename to datatables.net-buttons/datatables.net-buttons-tests.ts index 52a21db894..6acbbeaf8a 100644 --- a/datatables-buttons/datatables-buttons-tests.ts +++ b/datatables.net-buttons/datatables.net-buttons-tests.ts @@ -1,7 +1,3 @@ -/// -/// - - $(document).ready(function () { var config: DataTables.Settings = diff --git a/datatables-buttons/index.d.ts b/datatables.net-buttons/index.d.ts similarity index 98% rename from datatables-buttons/index.d.ts rename to datatables.net-buttons/index.d.ts index 2ce52d8483..b4ed4b0eb5 100644 --- a/datatables-buttons/index.d.ts +++ b/datatables.net-buttons/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// +/// declare namespace DataTables { export interface Settings { diff --git a/datatables-buttons/tsconfig.json b/datatables.net-buttons/tsconfig.json similarity index 91% rename from datatables-buttons/tsconfig.json rename to datatables.net-buttons/tsconfig.json index 0793cd2eb3..5e407ab2d8 100644 --- a/datatables-buttons/tsconfig.json +++ b/datatables.net-buttons/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "datatables-buttons-tests.ts" + "datatables.net-buttons-tests.ts" ] } \ No newline at end of file diff --git a/datatables.net-fixedheader/index.d.ts b/datatables.net-fixedheader/index.d.ts index e72360f933..caf3987d35 100644 --- a/datatables.net-fixedheader/index.d.ts +++ b/datatables.net-fixedheader/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jared Szechy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// +/// declare namespace DataTables { export interface Settings { diff --git a/datatables.net-select/index.d.ts b/datatables.net-select/index.d.ts index 1365ab991e..96529a10c1 100644 --- a/datatables.net-select/index.d.ts +++ b/datatables.net-select/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jared Szechy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// +/// declare namespace DataTables { export interface Settings { diff --git a/jquery.datatables/jquery.datatables-tests.ts b/datatables.net/datatables.net-tests.ts similarity index 99% rename from jquery.datatables/jquery.datatables-tests.ts rename to datatables.net/datatables.net-tests.ts index 3bcc931a5f..c4a8fcaf3e 100644 --- a/jquery.datatables/jquery.datatables-tests.ts +++ b/datatables.net/datatables.net-tests.ts @@ -1,6 +1,3 @@ -/// - - $(document).ready(function () { //#region "Language" @@ -908,7 +905,7 @@ $(document).ready(function () { //#region "Methods-Static" - // Variable is a stand-in for $.fn.dataTable. See extension of JQueryStatic at the top of jquery.dataTables.d.ts. + // Variable is a stand-in for $.fn.dataTable. See extension of JQueryStatic at the top of index.d.ts. var staticFn: DataTables.StaticFunctions; // With boolean parameter type, always returns DataTables.DataTable[]. diff --git a/jquery.datatables/index.d.ts b/datatables.net/index.d.ts similarity index 100% rename from jquery.datatables/index.d.ts rename to datatables.net/index.d.ts diff --git a/jquery.datatables/tsconfig.json b/datatables.net/tsconfig.json similarity index 92% rename from jquery.datatables/tsconfig.json rename to datatables.net/tsconfig.json index 0831b7cc76..b48881c33b 100644 --- a/jquery.datatables/tsconfig.json +++ b/datatables.net/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "jquery.datatables-tests.ts" + "datatables.net-tests.ts" ] } \ No newline at end of file diff --git a/daterangepicker/index.d.ts b/daterangepicker/index.d.ts index 7929474994..d78e06dd97 100644 --- a/daterangepicker/index.d.ts +++ b/daterangepicker/index.d.ts @@ -140,6 +140,14 @@ declare namespace daterangepicker { * Text for apply label. */ applyLabel?: string; + /** + * Text for fromLabel label. + */ + fromLabel?: string; + /** + * Text for toLabel label. + */ + toLabel?: string; /** * Format of the date string. example: 'YYYY-MM-DD' */ diff --git a/dc/dc-tests.ts b/dc/dc-tests.ts index 9d2688fdf0..643594276d 100644 --- a/dc/dc-tests.ts +++ b/dc/dc-tests.ts @@ -180,6 +180,8 @@ d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => { .xAxis() .tickFormat((v: string) => v); + lineChart.legend(dc.legend().x(200).y(10).itemHeight(13).gap(5)); + rowChart .width(340) .height(850) diff --git a/dc/index.d.ts b/dc/index.d.ts index e7be4f86aa..9f9d7d3a57 100644 --- a/dc/index.d.ts +++ b/dc/index.d.ts @@ -111,14 +111,14 @@ declare namespace dc { } export interface Legend { - x: IGetSet; - y: IGetSet; - gap: IGetSet; - itemHeight: IGetSet; - horizontal: IGetSet; - legendWidth: IGetSet; - itemWidth: IGetSet; - autoItemWidth: IGetSet; + x: IGetSet; + y: IGetSet; + gap: IGetSet; + itemHeight: IGetSet; + horizontal: IGetSet; + legendWidth: IGetSet; + itemWidth: IGetSet; + autoItemWidth: IGetSet; render: () => void; } diff --git a/deep-equal/deep-equal-tests.ts b/deep-equal/deep-equal-tests.ts index 2f4f238a4f..ed23a35838 100644 --- a/deep-equal/deep-equal-tests.ts +++ b/deep-equal/deep-equal-tests.ts @@ -1,8 +1,11 @@ -import * as deepEqual from "deep-equal"; +import deepEqual = require("deep-equal"); -let isDeepEqual1: boolean = deepEqual({}, {}); -let isDeepEqual2: boolean = deepEqual({}, {}, { strict: true }); -let isDeepEqual3: boolean = deepEqual({}, {}, { strict: false }); +const isDeepEqual1: boolean = deepEqual({}, {}); +const isDeepEqual2: boolean = deepEqual({}, {}, { strict: true }); +const isDeepEqual3: boolean = deepEqual({}, {}, { strict: false }); +const isDeepEqual4: boolean = deepEqual(undefined, undefined); +const isDeepEqual5: boolean = deepEqual(3, false); +const isDeepEqual6: boolean = deepEqual("a-string", null); -console.log(isDeepEqual1, isDeepEqual2, isDeepEqual3); +console.log(isDeepEqual1, isDeepEqual2, isDeepEqual3, isDeepEqual4, isDeepEqual5, isDeepEqual6); diff --git a/deep-equal/index.d.ts b/deep-equal/index.d.ts index eef762a4ea..d9c4b5f6cf 100644 --- a/deep-equal/index.d.ts +++ b/deep-equal/index.d.ts @@ -1,17 +1,15 @@ -// Type definitions for deep-equal +// Type definitions for deep-equal 1.0 // Project: https://github.com/substack/node-deep-equal -// Definitions by: remojansen +// Definitions by: remojansen , Jay Anslow // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - interface DeepEqualOptions { strict: boolean; } -declare let deepEqual: ( - actual: Object, - expected: Object, - opts?: DeepEqualOptions) => boolean; +declare function deepEqual( + actual: any, + expected: any, + opts?: DeepEqualOptions): boolean; export = deepEqual; diff --git a/deep-equal/tsconfig.json b/deep-equal/tsconfig.json index b192443e3f..6d21a4a7e6 100644 --- a/deep-equal/tsconfig.json +++ b/deep-equal/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/deep-equal/tslint.json b/deep-equal/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/deep-equal/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/detect-browser/index.d.ts b/detect-browser/index.d.ts index 0f845cd781..57ed80c411 100644 --- a/detect-browser/index.d.ts +++ b/detect-browser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for detect-browser v1.3.3 +// Type definitions for detect-browser v1.6.2 // Project: https://github.com/DamonOehlman/detect-browser // Definitions by: Rogier Schouten // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -6,7 +6,7 @@ /** * Browser name */ -export const name: string; +export const name: "edge" | "yandexbrowser" | "chrome" | "crios" | "firefox" | "opera" | "ie" | "bb10" | "android" | "ios" | "safari"; /** * Browser version diff --git a/dir-resolve/dir-resolve-tests.ts b/dir-resolve/dir-resolve-tests.ts new file mode 100644 index 0000000000..d84f9d0efc --- /dev/null +++ b/dir-resolve/dir-resolve-tests.ts @@ -0,0 +1,3 @@ +import resolve = require("dir-resolve"); + +resolve("module/package"); diff --git a/dir-resolve/index.d.ts b/dir-resolve/index.d.ts new file mode 100644 index 0000000000..0b8f425b0b --- /dev/null +++ b/dir-resolve/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for dir-resolve 1.0 +// Project: https://github.com/mwinche/dir-resolve +// Definitions by: Andy Hanson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function resolve(path: string): string; +export = resolve; diff --git a/dir-resolve/tsconfig.json b/dir-resolve/tsconfig.json new file mode 100644 index 0000000000..1748792b1d --- /dev/null +++ b/dir-resolve/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dir-resolve-tests.ts" + ] +} \ No newline at end of file diff --git a/dir-resolve/tslint.json b/dir-resolve/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/dir-resolve/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/dockerode/index.d.ts b/dockerode/index.d.ts index c317d5d32e..968199436a 100644 --- a/dockerode/index.d.ts +++ b/dockerode/index.d.ts @@ -184,6 +184,7 @@ declare namespace Dockerode { Created: number; Ports: Port[]; Labels: { [label: string]: string }; + State: string; Status: string; HostConfig: { NetworkMode: string; diff --git a/draft-js/index.d.ts b/draft-js/index.d.ts index 1805a17ab0..a79de31e70 100644 --- a/draft-js/index.d.ts +++ b/draft-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Draft.js v0.9.0 +// Type definitions for Draft.js v0.10.0 // Project: https://facebook.github.io/draft-js/ // Definitions by: Dmitry Rogozhny , Eelco Lempsink // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -357,7 +357,7 @@ declare namespace Draft { * - "props": Props to be passed into the React component that will be used. */ interface DraftDecorator { - strategy: (block: ContentBlock, callback: (start: number, end: number) => void) => void; + strategy: (block: ContentBlock, callback: (start: number, end: number) => void, contentState: ContentState) => void; component: Function; props?: Object; } @@ -564,6 +564,9 @@ declare namespace Draft { import DraftBlockType = Draft.Model.Constants.DraftBlockType; import DraftDecoratorType = Draft.Model.Decorators.DraftDecoratorType; + import DraftEntityType = Draft.Model.Entity.DraftEntityType; + import DraftEntityMutability = Draft.Model.Entity.DraftEntityMutability; + type DraftInlineStyle = Immutable.OrderedSet; type BlockMap = Immutable.OrderedMap; @@ -701,6 +704,10 @@ declare namespace Draft { static createFromBlockArray(blocks: Array): ContentState; static createFromText(text: string, delimiter?: string): ContentState; + createEntity(type: DraftEntityType, mutability: DraftEntityMutability, data?: Object): ContentState; + getEntity(key: string): EntityInstance; + getLastCreatedEntityKey(): string; + getBlockMap(): BlockMap; getSelectionBefore(): SelectionState; getSelectionAfter(): SelectionState; diff --git a/dw-bxslider-4/dw-bxslider-4-tests.ts b/dw-bxslider-4/dw-bxslider-4-tests.ts index e20f748a5d..57092d642f 100644 --- a/dw-bxslider-4/dw-bxslider-4-tests.ts +++ b/dw-bxslider-4/dw-bxslider-4-tests.ts @@ -1,6 +1,3 @@ -/// - - // examples from http://bxslider.com/examples $(document).ready(function() { diff --git a/dynatable/dynatable-tests.ts b/dynatable/dynatable-tests.ts index acba41092a..e727c209c1 100644 --- a/dynatable/dynatable-tests.ts +++ b/dynatable/dynatable-tests.ts @@ -1,5 +1,3 @@ -/// - // Using the global setup option // ============================= $.dynatableSetup({ features: { pushState: false }, dataset: { perPageDefault: 5, perPageOptions: [2, 5, 10] } }); diff --git a/easy-api-request/index.d.ts b/easy-api-request/index.d.ts index 8f4ca0d553..f04b68be3a 100644 --- a/easy-api-request/index.d.ts +++ b/easy-api-request/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Karl Düüna // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// /// import stream = require('stream'); diff --git a/easy-api-request/tsconfig.json b/easy-api-request/tsconfig.json index 663d9a15d0..0f8b3873e0 100644 --- a/easy-api-request/tsconfig.json +++ b/easy-api-request/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/ecurve/ecurve-tests.ts b/ecurve/ecurve-tests.ts index c2214c6905..ced84ef8aa 100644 --- a/ecurve/ecurve-tests.ts +++ b/ecurve/ecurve-tests.ts @@ -1,5 +1,3 @@ -/// - import ecurve = require('ecurve'); import crypto = require('crypto'); diff --git a/ej.web.all/ej.web.all-tests.ts b/ej.web.all/ej.web.all-tests.ts index faf5a48e0f..50b4c117e4 100644 --- a/ej.web.all/ej.web.all-tests.ts +++ b/ej.web.all/ej.web.all-tests.ts @@ -1,8 +1,5 @@ -/// -/// +/* tslint:disable */ - - module AccordionComponent { $(function () { var sample = new ej.Accordion($("#basicAccordion"), { @@ -15,8 +12,6 @@ module AccordionComponent { events: "click", expandSpeed: 500, headerSize: "40px", - height: "500px", - heightAdjustMode: ej.Accordion.HeightAdjustMode.Auto, htmlAttributes: { title: "Demo" }, selectedItemIndex: 1, showCloseButton: true, @@ -25,7 +20,7 @@ module AccordionComponent { }); } - + module AutocompleteComponent{ var carList = [ @@ -49,15 +44,15 @@ module AutocompleteComponent{ "Triumph Spitfire", "Toyota 2000GT", "Volvo P1800", "Volkswagen Shirako" ]; - $(function () { - var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { + $(function () { + var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { width: "100%", watermarkText: "Select a car", dataSource: carList, enableAutoFill: true, showPopupButton: true, multiSelectMode: "delimiter" - }); + }); }); } @@ -155,7 +150,7 @@ module ButtonComponent { }); }); } - + @@ -171,7 +166,7 @@ module ChartComponent { range: { min: 25, max: 50, interval: 5 }, labelFormat: "{value}%", title: { text: "Efficiency" }, - + }, commonSeriesOptions: { @@ -186,28 +181,28 @@ module ChartComponent { }, visible: true }, - border : {width: 2} - }, - series: + border : {width: 2} + }, + series: [ { - points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 },{ x: 2007, y: 26 }, { x: 2008, y: 27 }, - { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], + points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 },{ x: 2007, y: 26 }, { x: 2008, y: 27 }, + { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], name: 'India' - }, + }, { - points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 },{ x: 2007, y: 30 }, { x: 2008, y: 36 }, - { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], + points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 },{ x: 2007, y: 30 }, { x: 2008, y: 36 }, + { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], name: 'Germany' }, { - points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 },{ x: 2007, y: 34 }, { x: 2008, y: 41 }, - { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], + points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 },{ x: 2007, y: 34 }, { x: 2008, y: 41 }, + { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], name: 'England' - }, + }, { - points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 },{ x: 2007, y: 40 }, { x: 2008, y: 44 }, - { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], + points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 },{ x: 2007, y: 40 }, { x: 2008, y: 44 }, + { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], name: 'France' } ], @@ -247,6 +242,62 @@ module ChartComponent { + + +module circulargaugecomponent { + $(function () { + var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { + enableAnimation: false, + isResponsive: true, + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }] + }); + }); +} + + + + module ColorPickerComponent { $(function () { var colorSample = new ej.ColorPicker($("#colorpick"), { @@ -304,14 +355,18 @@ $(function () { snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines }, nodes: [ - createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: "terminator" }), - createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: "process" }), - createNode({ name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], type: "flow", shape: "decision" }), - createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: "decision" }), - createNode({ name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: "process" }), - createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: "card", fillColor: "#858585", borderColor: "#858585" }), - createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: "process" }), - createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: "process" }) + createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), + createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ + name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], + type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision + }), + createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), + createNode({ + name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), + createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) ], connectors: [ createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), @@ -322,7 +377,7 @@ $(function () { createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) ] }); - + }); function createNode(option: ej.datavisualization.Diagram.Node) { @@ -347,7 +402,7 @@ function createLabel(options : any) { return options; } - + module DialogComponent { $(function () { @@ -356,11 +411,14 @@ module DialogComponent { minWidth: 310, minHeight: 215, target:".control", - close:()=>{this.onDialogClose()} + close:()=>{ + $("#btnOpen").show();} }); var btnInstance = new ej.Button($("#btnOpen"), { size: "medium", - click: ()=>{this.onOpen()}, + click: ()=>{ + $("#btnOpen").hide(); + $("#basicDialog").ejDialog("open");}, type: "button", height: 30, width: 150 @@ -368,13 +426,6 @@ module DialogComponent { }); } -function onDialogClose(args:any) { - $("#btnOpen").show(); -} -function onOpen() { - $("#btnOpen").hide(); - $("#basicDialog").ejDialog("open"); -} @@ -401,7 +452,7 @@ module digitalgaugecomponent { } - + @@ -421,16 +472,14 @@ module DropDownListComponent { enableFilterSearch: true, caseSensitiveSearch: true, enableIncrementalSearch: true, - enablePopupResize: true, + enablePopupResize: true, delimiterChar: ";", multiSelectMode: ej.MultiSelectMode.Delimiter, maxPopupHeight: "300px", - minPopupHeight: "150px", - maxPopupWidth: "500px", + minPopupHeight: "150px", + maxPopupWidth: "500px", minPopupWidth: "350px", - selectedIndex: 1, showCheckbox: true, - showPopupOnLoad: true, showRoundedCorner: true }); }); @@ -445,12 +494,12 @@ module DropDownListComponent { module ExplorerComponent { $(function () { var file = new ej.FileExplorer($("#fileExplorer"), { - path: (window).baseurl + "webapi/FileExplorer/FileBrowser/", + path: (window).baseurl + "Content/FileBrowser/", width: "100%", minWidth: "150px", layout: "tile", isResponsive: true, - ajaxAction: (window).baseurl + "api/fileoperation/doJSONAction" + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" }); }); } @@ -464,7 +513,7 @@ module GanttComponent { dataSource: (window).projectData, allowColumnResize: true, allowSorting: true, - allowSelection: true, + allowSelection: true, enableContextMenu: true, taskIdMapping: "taskID", allowDragAndDrop: true, @@ -505,7 +554,7 @@ module GanttComponent { treeColumnIndex: 1, isResponsive: true, }); -}); +}); } @@ -547,7 +596,7 @@ module GridComponent { -var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fltemysost"] +var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] var itemSource: any[] = []; for (var i = 0; i < columns.length; i++) { for (var j = 0; j < 6; j++) { @@ -621,7 +670,7 @@ module KanbanComponent { }); } - + module lineargaugecomponent { @@ -647,14 +696,14 @@ module lineargaugecomponent { backgroundColor: "#E94649", border: { color: "#E94649" }, startWidth: 4, endWidth: 4 }] - }] + }] }); }); } - - + + module ListBoxComponent { $(function () { @@ -664,12 +713,12 @@ module ListBoxComponent { }); } - + module ListviewComponent { $(function () { var listviewInstance = new ej.ListView($("#defaultlistview"), { - enableCheckMark: true, + enableCheckMark: true, width: 400 }); }); @@ -711,7 +760,7 @@ var world_map= { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, - { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Cte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, + { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, @@ -934,7 +983,7 @@ module MenuComponent { - + module NavigationDrawerComponent { $(function () { @@ -946,15 +995,15 @@ module NavigationDrawerComponent { enableListView: true, listViewSettings: { width: 300, - selectedItemIndex: 0, - mouseUp: "headChange" + selectedItemIndex: 0 }, position: "normal" + }); + $("#navpane_listview").click(function(e: any) { + var text=e.target["text"]||$(e.target).closest("li.e-list").text(); + $("#butdrawer").parent().children("h2").text(text); }); }); - function headChange(e:any) { - $("#butdrawer").parent().children("h2").text(e.text); - } } @@ -962,7 +1011,7 @@ module NavigationDrawerComponent { module PDFViewerComponent { $(function () { var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { - serviceUrl: (window).baseurl + "api/PdfViewer", + serviceUrl:(window).baseurl+ "api/PdfViewer", isResponsive: true }); }); @@ -970,9 +1019,348 @@ module PDFViewerComponent { +module PivotChartOlap { + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: "http://bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + } + ], + axis: "columns" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, + primaryYAxis: { title: { text: "Internet Sales Amount" } }, + legend: { visible: true, rowCount: 2 } + }); + }); +} +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotChartRelational { + + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + }, + { + fieldName: "Date", + fieldCaption: "Date" + } + ], + columns: [ + { + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryYAxis: { title: { text: "Amount" } }, + legend: { visible: true } + }); + }); +} + + + +module PivotGaugeOlap { + + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: "http://bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]", + filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } + }, + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + }, + { + fieldName: "[Measures].[Internet Revenue Status]" + }, + { + fieldName: "[Measures].[Internet Revenue Trend]" + }, + { + fieldName: "[Measures].[Internet Revenue Goal]" + }, + ], + axis: "columns" + } + ], + filters:[] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGaugeRelational { + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + }, + { + fieldName: "State", + } + ], + columns: [ + { + fieldName: "Product", + } + ], + values: [ + { + fieldName: "Amount", + }, + { + fieldName: "Quantity", + } + ] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} @@ -1006,17 +1394,10 @@ module PivotGridOlap { ], filters:[] }, - hyperlinkSettings: { - enableValueCellHyperlink: true, - enableRowHeaderHyperlink: true, - enableColumnHeaderHyperlink: true, - enableSummaryCellHyperlink: true - }, - enableGroupingBar: true, - enableCellEditing: true, - enableCellSelection: true, - renderSuccess: function (args) {$("#PivotSchemaDesigner").ejPivotSchemaDesigner({ pivotControl: args, layout: "excel" });} + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); }); } @@ -1064,7 +1445,7 @@ module PivotGridRelational { fieldCaption: "State" } ], - columns: + columns: [{ fieldName: "Product", fieldCaption: "Product" @@ -1082,17 +1463,11 @@ module PivotGridRelational { ], filters:[] }, - hyperlinkSettings: { - enableValueCellHyperlink: true, - enableRowHeaderHyperlink: true, - enableColumnHeaderHyperlink: true, - enableSummaryCellHyperlink: true - }, - enableGroupingBar: true, - enableCellEditing: true, - enableCellSelection: true, - renderSuccess: function (args) {$("#PivotSchemaDesigner").ejPivotSchemaDesigner({ pivotControl: args, layout: "excel" });} + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); } @@ -1156,7 +1531,7 @@ declare var rteObj: any; declare var data: any; var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; var rteEle = $("#rteSample1"); -module AccordionComponent { +module RadialMenuComponent { $(function () { if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { @@ -1165,6 +1540,7 @@ module AccordionComponent { backImageClass: "backimageclass", targetElementId: "radialtarget1" }); + $("#radialtarget1").parent().css("position", "relative"); } else { $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); @@ -1176,7 +1552,7 @@ module AccordionComponent { select: (e) => { var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, // To get Iframe positions - iframeY = target.offset().top + e.event.clientY, iframeX = target.offset().left + e.event.clientX, + iframeY = e.event.clientY, iframeX = e.event.clientX, // To set Radial Menu position within target x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); @@ -1231,7 +1607,7 @@ function redo(e: any) { } - + module RadialSliderComponent { $(function () { @@ -1264,7 +1640,7 @@ module rangecomponent { fill: '#69D2E7' } ]; - } + } }); }); @@ -1316,7 +1692,7 @@ module RatingComponent { shapeWidth: 25, showTooltip: true }); - + var sample2 = new ej.Rating($("#halfRating"),{ precision: ej.Rating.Precision.Half, value: 3.5, @@ -1347,7 +1723,7 @@ module RatingComponent { shapeHeight: 25, shapeWidth: 25, showTooltip: true - }); + }); }); } @@ -1357,7 +1733,7 @@ module RatingComponent { module ReportViewerComponent { $(function () { var report = new ej.ReportViewer($("#territoryReportViewer"), { - reportServiceUrl: (window).baseurl + 'api/SSRSReport', + reportServiceUrl: (window).baseurl + 'api/ReportViewer', reportServerUrl: 'http://mvc.syncfusion.com/reportserver', processingMode: ej.ReportViewer.ProcessingMode.Remote, reportPath: "/SSRSSamples2/Territory Sales new", @@ -1380,7 +1756,7 @@ module RibbonComponent { toolTip: "Pin the Ribbon" }, applicationTab: { - type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } + type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } }, tabs: [{ id: "home", text: "HOME", groups: [{ @@ -1457,7 +1833,7 @@ module RibbonComponent { width: 60, isBig: false } - }] + }] }, { text: "Font", alignType: "rows", content: [{ @@ -1736,7 +2112,7 @@ module RibbonComponent { groups: [{ id: "zoomin", text: "Zoom In", - toolTip: "Zoom In", + toolTip: "Zoom In", buttonSettings: { width: 58, contentType: ej.ContentType.TextAndImage, @@ -1747,7 +2123,7 @@ module RibbonComponent { { id: "zoomout", text: "Zoom Out", - toolTip: "Zoom Out", + toolTip: "Zoom Out", buttonSettings: { width: 70, contentType: ej.ContentType.TextAndImage, @@ -1758,7 +2134,7 @@ module RibbonComponent { { id: "fullscreen", text: "Full Screen", - toolTip: "Full Screen", + toolTip: "Full Screen", buttonSettings: { width: 73, contentType: ej.ContentType.TextAndImage, @@ -1987,7 +2363,7 @@ module RibbonComponent { } ] } - ], + ], create: function createControl(args) { var ribbon = $("#defaultRibbon").data("ejRibbon"); $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); @@ -2003,7 +2379,7 @@ function colorHandler(args:any) { - + module RotatorComponent { $(function () { @@ -2045,14 +2421,14 @@ module RTEComponent { enableResize: true, enableTabKeyNavigation: true, fileBrowser: { - filePath: "../FileExplorerContent/", + filePath: (window).baseurl + "Content/FileBrowser/", extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", - ajaxAction: "http://mvc.syncfusion.com/OdataServices/api/fileoperation/", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" }, imageBrowser: { - filePath: "../FileExplorerContent/", + filePath: (window).baseurl + "Content/FileBrowser/", extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", - ajaxAction: "http://mvc.syncfusion.com/OdataServices/api/fileoperation/", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" }, isResponsive: true, showClearAll: true, @@ -2100,10 +2476,6 @@ module RTEComponent { -declare var window :myWindow; -export interface myWindow extends Window{ -Default:any; -} module ScheduleComponent { $(function () { var sample = new ej.Schedule($("#Schedule1"), { @@ -2157,7 +2529,7 @@ module ScheduleComponent { } }], appointmentSettings: { - dataSource: new ej.DataManager(window.Default).executeLocal(new ej.Query().take(10)), + dataSource: new ej.DataManager((window).Default).executeLocal(new ej.Query().take(10)), id: "Id", subject: "Subject", startTime: "StartTime", @@ -2170,7 +2542,7 @@ module ScheduleComponent { } }); }); -} +} @@ -2182,13 +2554,22 @@ module ScrollerComponent { }); $(window).bind('resize', function () { scrollerSample.refresh(); - }); - - }); + }); }); } +module SignatureComponent { + $(function () { + var basicSignature = new ej.Signature($("#signature"), { + height: "400px", + isResponsive: true, + strokeWidth: 3 + }); + }); +} + + module SliderComponent { @@ -2344,9 +2725,9 @@ module piesparkline4 { }); } - - + + module SplitterComponent { @@ -2373,15 +2754,15 @@ $(function () { height: 550, }, importSettings: { - importMapper: (window).baseurl + "api/JSXLExport/Import" + importMapper: (window).baseurl + "api/Spreadsheet/Import" }, exportSettings: { - excelUrl: (window).baseurl + "api/JSXLExport/ExportToExcel", - csvUrl: (window).baseurl + "api/JSXLExport/ExportToCsv", - pdfUrl: (window).baseurl + "api/JSXLExport/ExportToPdf" + excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", + csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", + pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" }, sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], - loadComplete: () => { + loadComplete: () => { var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; if (!(spreadsheet).isImport) { spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); @@ -2396,6 +2777,69 @@ $(function () { +var default_data: Array = [ + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup:"Executive", EmployeesCount : 50 }, + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Marketing", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 55 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 175}, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 70 }, + { Category : "Employees", Country : "USA", JobDescription : "Management", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Accounts", EmployeesCount : 60 }, + + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 43 }, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 125}, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 60 }, + { Category : "Employees", Country : "India", JobDescription : "HR Executives", EmployeesCount : 70 }, + { Category : "Employees", Country : "India", JobDescription : "Accounts", EmployeesCount : 45 }, + + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Executive", EmployeesCount : 30 }, + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Marketing", EmployeesCount : 50 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "Germany", JobDescription : "Management", EmployeesCount : 33 }, + { Category : "Employees", Country : "Germany", JobDescription : "Accounts", EmployeesCount : 55 }, + + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 45 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 96 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 55 }, + { Category : "Employees", Country : "UK", JobDescription : "HR Executives", EmployeesCount : 60 }, + { Category : "Employees", Country : "UK", JobDescription: "Accounts", EmployeesCount: 30 }, + + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "France", JobDescription: "Marketing", EmployeesCount: 50 } +]; + +module sunburstcomponent { + $(function () { + var sunburstsample = new ej.SunburstChart($("#Sunburst"), { + valueMemberPath: "EmployeesCount", + levels: [ + {groupMemberPath: "Country"}, + {groupMemberPath: "JobDescription"}, + {groupMemberPath: "JobGroup"}, + {groupMemberPath: "JobRole"} + ], + dataSource: default_data, + dataLabelSettings:{visible:true}, + tooltip:{visible:false}, + enableAnimation:false, + size:{height:"600"}, + innerRadius:0.2, + title:{text:"Employees Count"}, + zoomSettings:{enable:false}, + legend:{visible:true,position:'top'} + }); + }); +} + + + + module TabComponent { $(function () { var sample = new ej.Tab($("#defaultTab"),{ @@ -2412,8 +2856,8 @@ module TabComponent { module TagCloudComponent { - - + + var websiteCollection = [ { text: "Google", url: "http://www.google.com", frequency: 12 }, { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, @@ -2444,7 +2888,7 @@ module TagCloudComponent { text: "text", url: "url", frequency: "frequency" } }); - + }); } @@ -2484,9 +2928,9 @@ module EditorComponent { - -module AccordionComponent { + +module TileViewComponent { $(function () { var tile1 = new ej.Tile($("#tile1"), { imagePosition:"fill", @@ -2495,38 +2939,38 @@ module AccordionComponent { imageUrl:'content/images/tile/windows/people_1.png' }); var tile2 = new ej.Tile($("#tile2"), { - imagePosition:"center", + imagePosition:"center", tileSize:"small", - imageUrl:'content/images/tile/windows/alerts.png', - + imageUrl:'content/images/tile/windows/alerts.png', + }); var tile3 = new ej.Tile($("#tile3"), { - imagePosition:"center", + imagePosition:"center", tileSize:"small", - imageUrl:'content/images/tile/windows/bing.png', + imageUrl:'content/images/tile/windows/bing.png', }); var tile4 = new ej.Tile($("#tile4"), { tileSize:"small", - imageUrl:'content/images/tile/windows/camera.png', + imageUrl:'content/images/tile/windows/camera.png', }); var tile5 = new ej.Tile($("#tile5"), { - imagePosition:"center", + imagePosition:"center", tileSize:"small", - imageUrl:'content/images/tile/windows/messages.png', + imageUrl:'content/images/tile/windows/messages.png', }); var tile6 = new ej.Tile($("#tile6"), { - imagePosition:"center", + imagePosition:"center", tileSize:"medium", - imageUrl:'content/images/tile/windows/games.png', + imageUrl:'content/images/tile/windows/games.png', caption:{text:"Play"} }); - var tile7 = new ej.Tile($("#tile7"), { + var tile7 = new ej.Tile($("#tile7"), { tileSize:"medium", imageUrl:'content/images/tile/windows/map.png', caption:{text:"Maps"} }); var tile8 = new ej.Tile($("#tile8"), { - imagePosition:"fill", + imagePosition:"fill", tileSize:"wide", imageUrl:'content/images/tile/windows/sports.png', caption:{text:"Sports"} @@ -2578,7 +3022,7 @@ module TimePickerComponent { module ToolbarComponent { - + $(function () { var sample = new ej.Toolbar($("#editingToolbar"),{ width: "100%", @@ -2597,7 +3041,7 @@ module ToolbarComponent { module TooltipComponent { - + $(function () { var sample1 = new ej.Tooltip($("#link1"),{ @@ -2614,13 +3058,13 @@ module TooltipComponent { content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", position: { stem: { - horizontal: "left", + horizontal: "right", vertical: "center" }, target: { - horizontal: "right", - vertical: "center", - }, + horizontal: "left", + vertical: "center" + } }, autoCloseTimeout: 5000, collision: "fit", @@ -2685,14 +3129,14 @@ module TreeGridComponent { columns: [ { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, - { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker" }, - { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } ], isResponsive: true, }); }); -} +} @@ -2737,7 +3181,7 @@ module treemapcomponent { - + module TreeViewComponent { $(function () { @@ -2754,13 +3198,13 @@ module TreeViewComponent { module UploadboxComponent { - + $(function () { var sample = new ej.Uploadbox($("#UploadDefault"),{ saveUrl: "uploadbox/saveFiles.ashx", removeUrl: "uploadbox/removeFiles.ashx", buttonText: { - browse: "Choose File", upload: "Upload the File", cancel: "Cancel the Upload" + browse: "Choose File", upload: "Upload", cancel: "Cancel" }, cssClass: "gradient- purple", dialogAction: { @@ -2782,8 +3226,10 @@ module WaitingPopupComponent { var sample = new ej.WaitingPopup($("#target"),{ showOnInit: true, showImage: true, - text: 'waiting…' + text: 'waiting…', + target: "#target", + appendTo: "#waiting" }); }); -} +} \ No newline at end of file diff --git a/ej.web.all/index.d.ts b/ej.web.all/index.d.ts index 41d0f2f54f..b1c4261705 100644 --- a/ej.web.all/index.d.ts +++ b/ej.web.all/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ej.web.all 14.4 +// Type definitions for ej.web.all 15.1 // Project: http://help.syncfusion.com/js/typescript // Definitions by: Syncfusion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,16 +7,15 @@ /*! * filename: ej.web.all.d.ts -* version : 14.4.0.20 -* Copyright Syncfusion Inc. 2001 - 2016. All rights reserved. +* version : 15.1.0.37 +* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ -declare module ej { - - var dataUtil: dataUtil; +declare namespace ej { + const dataUtil: dataUtil; function isMobile(): boolean; function isIOS(): boolean; function isAndroid(): boolean; @@ -29,33 +28,33 @@ declare module ej { function isTouchDevice(): boolean; function addPrefix(style: string): string; function animationEndEvent(): string; - function blockDefaultActions(e: Object): void; - function buildTag(tag: string, innerHtml?: string, styles?: Object, attrs?: Object): JQuery; + function blockDefaultActions(e: any): void; + function buildTag(tag: string, innerHtml?: string, styles?: any, attrs?: any): JQuery; function cancelEvent(): string; function copyObject(): string; - function createObject(nameSpace: string, value: Object, initIn: any): JQuery; + function createObject(nameSpace: string, value: any, initIn: any): JQuery; function createObject(element: any, eventEmitter: any, model: any): any; function setCulture(culture: string): void; - function getObject(element :string, model :any ): T; - function defineClass(className: string, constructor:any, proto: Object, replace: boolean): Object; - function destroyWidgets(element: Object): void; + function getObject(element: string, model: any ): T; + function getObject(nameSpace: string, fromdata?: any): any; + function defineClass(className: string, constructor: any, proto: any, replace: boolean): any; + function destroyWidgets(element: any): void; function endEvent(): string; - function event(type: string, data: any, eventProp: Object): Object; - function getAndroidVersion(): Object; - function getAttrVal(ele: Object, val: string, option: Object): Object; - function getBooleanVal(ele: Object, val: string, option: Object): Object; + function event(type: string, data: any, eventProp: any): any; + function getAndroidVersion(): any; + function getAttrVal(ele: any, val: string, option: any): any; + function getBooleanVal(ele: any, val: string, option: any): any; function getClearString(): string; - function getDimension(element: Object, method: string): Object; - function getFontString(fontObj: Object): string; + function getDimension(element: any, method: string): any; + function getFontString(fontObj: any): string; function getFontStyle(style: string): string; function getMaxZindex(): number; function getNameSpace(className: string): string; - function getObject(nameSpace: string, fromdata?: any): Object; - function getOffset(ele: string): Object; + function getOffset(ele: string): any; function getRenderMode(): string; - function getScrollableParents(element: Object): void; + function getScrollableParents(element: any): void; function getTheme(): string; - function getZindexPartial(element: Object, popupEle: string): number; + function getZindexPartial(element: any, popupEle: string): number; function hasRenderMode(element: string): void; function hasStyle(prop: string): boolean; function hasTheme(element: string): string; @@ -66,87 +65,86 @@ declare module ej { function isIOS7(): boolean; function isIOSWebView(): boolean; function isLowerAndroid(): boolean; - function isNullOrUndefined(value: Object): boolean; + function isNullOrUndefined(value: any): boolean; function isPlainObject(): JQuery; function isPortrait(): any; function isTablet(): boolean; function isWindowsWebView(): string; - function listenEvents(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; - function listenTouchEvent(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function listenEvents(selectors: any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function listenTouchEvent(selectors: any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; function logBase(val: string, base: string): number; function measureText(text: string, maxwidth: number, font: string): string; function moveEvent(): string; function print(element: string, printWindow: any): void; - function proxy(fn: Object, context?: string, arg?: string): any; + function proxy(fn: any, context?: string, arg?: string): any; function round(value: string, div: string, up: string): any; - function sendAjaxRequest(ajaxOptions: Object): void; + function sendAjaxRequest(ajaxOptions: any): void; function setCaretToPos(nput: string, pos1: string, pos2: string): void; function setRenderMode(element: string): void; - function setTheme(): Object; + function setTheme(): any; function startEvent(): string; function tapEvent(): string; function tapHoldEvent(): string; - function throwError(): Object; - function transitionEndEvent(): Object; + function throwError(): any; + function transitionEndEvent(): any; function userAgent(): boolean; - function widget(pluginName: string, className: string, proto: Object): Object; - function avg(json: Object, filedName: string): any; + function widget(pluginName: string, className: string, proto: any): any; + function avg(json: any, filedName: string): any; function getGuid(prefix: string): number; - function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): Object; + function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): any; function isJson(jsonData: string): string; function max(jsonArray: any, fieldName?: string, comparer?: string): any; function min(jsonArray: any, fieldName: string, comparer: string): any; function merge(first: string, second: string): any; function mergeshort(jsonArray: any, fieldName: string, comparer: string): any; function parseJson(jsonText: string): string; - function parseTable(table: number, headerOption: string, headerRowIndex: string): Object; + function parseTable(table: number, headerOption: string, headerRowIndex: string): any; function select(jsonArray: any, fields: string): any; function setTransition(): boolean; function sum(json: string, fieldName: string): string; function swap(array: any, x: string, y: string): any; - var cssUA: string; - var serverTimezoneOffset: number; - var transform: string; - var transformOrigin: string; - var transformStyle: string; - var transition: string; - var transitionDelay: string; - var transitionDuration: string; - var transitionProperty: string; - var transitionTimingFunction: string; - var template: any; - var util: { + const cssUA: string; + const serverTimezoneOffset: number; + const transform: string; + const transformOrigin: string; + const transformStyle: string; + const transition: string; + const transitionDelay: string; + const transitionDuration: string; + const transitionProperty: string; + const transitionTimingFunction: string; + const template: any; + const util: { valueFunction(val: string): any; - } - export module device { + }; + export namespace device { function isAndroid(): boolean; function isIOS(): boolean; function isFlat(): boolean; function isIOS7(): boolean; function isWindows(): boolean; } - export module widget { - var autoInit: boolean; - var registeredInstances: Array; - var registeredWidgets: Array; + export namespace widget { + const autoInit: boolean; + const registeredInstances: any[]; + const registeredWidgets: any[]; function register(pluginName: string, className: string, prototype: any): void; function destroyAll(elements: Element): void; function init(element: Element): void; - function registerInstance(element: Element, pluginName: string, className: string, prototype: any):void; + function registerInstance(element: Element, pluginName: string, className: string, prototype: any): void; } - interface browserInfoOptions { name: string; version: string; - culture: Object; + culture: any; isMSPointerEnabled: boolean; } class WidgetBase { destroy(): void; element: JQuery; - setModel(options: Object, forceSet?: boolean):any; - option(prop?: Object, value?: Object, forceSet?: boolean): any; - _trigger(eventName?: string, eventProp?: Object): any; + setModel(options: any, forceSet?: boolean): any; + option(prop?: any, value?: any, forceSet?: boolean): any; + _trigger(eventName?: string, eventProp?: any): any; _on(element: JQuery, eventType?: string, handler?: (eventObject: JQueryEventObject) => any): any; _on(element: JQuery, eventType ?: string, selector ?: string, handler ?: (eventObject: JQueryEventObject) => any): any; _off(element: JQuery, eventName: string, handler ?: (eventObject: JQueryEventObject) => any): any; @@ -175,15 +173,15 @@ declare module ej { executeQuery(query?: ej.Query, done?: any, fail?: any, always?: any): JQueryPromise; executeLocal(query?: ej.Query): ej.DataManager; saveChanges(changes?: Changes, key?: string, tableName?: string): JQueryDeferred; - insert(data: Object, tableName?: string): JQueryPromise; - remove(keyField: string, value: any, tableName?: string): Object; - update(keyField: string, value: any, tableName?: string): Object; + insert(data: any, tableName?: string): JQueryPromise; + remove(keyField: string, value: any, tableName?: string): any; + update(keyField: string, value: any, tableName?: string): any; } class Query { constructor(); static fn: Query; - static extend(prototype: Object): Query; + static extend(prototype: any): Query; key(field: string): ej.Query; using(dataManager: ej.DataManager): ej.Query; execute(dataManager: ej.DataManager, done: any, fail?: string, always?: string): any; @@ -193,8 +191,8 @@ declare module ej { addParams(key: string, value: string): ej.Query; expand(tables: any): ej.Query; where(fieldName: string, operator: ej.FilterOperators, value: any, ignoreCase?: boolean): ej.Query; - where(predicate:ej.Predicate):ej.Query; - search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; + where(predicate: ej.Predicate): ej.Query; + search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; sortBy(fieldName: string, comparer?: ej.SortOrder, isFromGroup?: boolean): ej.Query; sortByDesc(fieldName: string): ej.Query; group(fieldName: string): ej.Query; @@ -205,17 +203,17 @@ declare module ej { hierarchy(query: ej.Query, selectorFn: any): ej.Query; foreignKey(key: string): ej.Query; requiresCount(): ej.Query; - range(start:number, end:number): ej.Query; + range(start: number, end: number): ej.Query; } class Adaptor { constructor(ds: any); - pvt: Object; + pvt: any; type: ej.Adaptor; options: AdaptorOptions; extend(overrides: any): ej.Adaptor; - processQuery(dm: ej.DataManager, query: ej.Query):any; - processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + processQuery(dm: ej.DataManager, query: ej.Query): any; + processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; } @@ -235,18 +233,18 @@ declare module ej { class UrlAdaptor extends ej.Adaptor { constructor(); - processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: Object): { - type: string; url: string; ejPvtData: Object; contentType?: string; data?: Object; + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: any): { + type: string; url: string; ejPvtData: any; contentType?: string; data?: any; } - convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; - processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + processResponse(data: any, ds: any, query: ej.Query, xhr: JQueryXHR, request?: any, changes?: Changes): any; onGroup(e: any): void; batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; - beforeSend(dm: ej.DataManager, request: any, settings?:any): void; - insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: any }; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; - getFiltersFrom(data: Object, query: ej.Query): ej.Predicate; + getFiltersFrom(data: any, query: ej.Query): ej.Predicate; } class ODataAdaptor extends ej.UrlAdaptor { @@ -255,26 +253,26 @@ declare module ej { onEachWhere(filter: any, requiresCast: boolean): any; onPredicate(pred: ej.Predicate, query: ej.Query, requiresCast: boolean): string; onComplexPredicate(pred: ej.Predicate, requiresCast: boolean): string; - onWhere(filters: Array): string; - onEachSearch(e: Object): void; - onSearch(e: Object): string; - onEachSort(e: Object): string; - onSortBy(e: Object): string; - onGroup(e: Object): string; - onSelect(e: Object): string; - onCount(e: Object): string; + onWhere(filters: string[]): string; + onEachSearch(e: any): void; + onSearch(e: any): string; + onEachSort(e: any): string; + onSortBy(e: any): string; + onGroup(e: any): string; + onSelect(e: any): string; + onCount(e: any): string; beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { - result: Object; count: number + processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { + result: any; count: number }; - convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; - insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: Object; } + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any; } remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; } - update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: Object; accept: string; } - batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: Object; contentType: string; } - generateDeleteRequest(arr: Array, e: any): string; - generateInsertRequest(arr: Array, e: any): string; - generateUpdateRequest(arr: Array, e: any): string; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: any; accept: string; } + batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: any; contentType: string; } + generateDeleteRequest(arr: any[], e: any): string; + generateInsertRequest(arr: any[], e: any): string; + generateUpdateRequest(arr: any[], e: any): string; } interface UrlAdaptorOptions { requestType?: string; @@ -295,28 +293,25 @@ declare module ej { changeSetContent?: string; batchChangeSetContentType?: string; } - class WebApiAdaptor extends ej.ODataAdaptor { constructor(); - insert(dm: ej.DataManager, data: Object, tableName?: string): { url: string; type: string; data: Object; } - remove(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: Object; } - update(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: Object; accept: string; } - processResponse(data: Object, ds: Object, query: ej.Query, xhr: any, request: any, changes: Changes): { - result: Object; count: number + insert(dm: ej.DataManager, data: any, tableName?: string): { url: string; type: string; data: any; } + remove(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: any; } + update(dm: ej.DataManager, value: any, keyField?: string, tableName?: string): { url: string; type: string; data: any; accept: string; } + processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { + result: any; count: number }; } - class ODataV4Adaptor extends ej.ODataAdaptor { constructor(); options: ODataAdaptorOptions; - onCount(e: Object): string; - onEachSearch(e: Object): void; - onSearch(e: Object): string; + onCount(e: any): string; + onEachSearch(e: any): void; + onSearch(e: any): string; beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { - result: Object; count: number + processResponse(data: any, ds: any, query: ej.Query, xhr: any, request: any, changes: Changes): { + result: any; count: number }; - } interface ODataAdaptorOptions { requestType?: string; @@ -341,31 +336,31 @@ declare module ej { class JsonAdaptor extends ej.Adaptor { constructor(); - processQuery(ds: Object, query: ej.Query): string; - batchRequest(dm: ej.DataManager, changes: Changes, e:any): Changes; - onWhere(ds: Object, e: any): any; - onSearch(ds: Object, e: any): any - onSortBy(ds: Object, e: any, query: ej.Query): Object; - onGroup(ds: Object, e: any, query: ej.Query): Object; - onPage(ds: Object, e: any, query: ej.Query): Object; - onRange(ds: Object, e: any): Object; - onTake(ds: Object, e: any): Object; - onSkip(ds: Object, e: any): Object; - onSelect(ds: Object, e: any): Object; - insert(dm: ej.DataManager, data: any): Object; - remove(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; - update(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + processQuery(ds: any, query: ej.Query): string; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): Changes; + onWhere(ds: any, e: any): any; + onSearch(ds: any, e: any): any + onSortBy(ds: any, e: any, query: ej.Query): any; + onGroup(ds: any, e: any, query: ej.Query): any; + onPage(ds: any, e: any, query: ej.Query): any; + onRange(ds: any, e: any): any; + onTake(ds: any, e: any): any; + onSkip(ds: any, e: any): any; + onSelect(ds: any, e: any): any; + insert(dm: ej.DataManager, data: any): any; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; } class remoteSaveAdaptor extends ej.UrlAdaptor { constructor(); batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; beforeSend(dm: ej.DataManager, request: any, settings?: any): void; - insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: any }; + insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; } class TableModel { - constructor(name: string, jsonArray: Array, dataManager: ej.DataManager, modelComputed: any); + constructor(name: string, jsonArray: any[], dataManager: ej.DataManager, modelComputed: any); on(eventName: string, handler: any): void; off(eventName: string, handler: any): void; setDataManager(dataManager: DataManager): void; @@ -376,15 +371,15 @@ declare module ej { remove(key: string): void; isDirty(): boolean; getChanges(): Changes; - toArray(): Array; - setDirty(dirty:any, model:any): void; + toArray(): any[]; + setDirty(dirty: any, model: any): void; get(index: number): void; length(): number; bindTo(element: any): void; } class Model { constructor(json: any, table: string, name: string); - formElements: Array; + formElements: string[]; computes(value: any): void; on(eventName: string, handler: any): void; off(eventName: string, handler: any): void; @@ -400,17 +395,17 @@ declare module ej { unbind(element: any): void; } interface Changes { - changed?: Array; - added?: Array; - deleted?: Array; + changed?: any[]; + added?: any[]; + deleted?: any[]; } class Predicate { constructor(); constructor(field: string, operator: ej.FilterOperators, value: any, ignoreCase: boolean); - and(field: string, operator: any, value:any, ignoreCase:boolean): void; - or(field: string, operator: any, value: any, ignoreCase: boolean): void; - or(predicate: Array): any; - validate(record: Object): boolean; + and(field: string, operator: any, value: any, ignoreCase: boolean): ej.Predicate; + or(field: string, operator: any, value: any, ignoreCase: boolean): ej.Predicate; + or(predicate: any[]): any; + validate(record: any): boolean; toJSON(): { isComplex: boolean; field: string; @@ -422,16 +417,16 @@ declare module ej { }; } interface dataUtil { - swap(array: Array, x: number, y: number): void; - mergeSort(jsonArray: Array, fieldName?: string, comparer?:any): Array; - max(jsonArray: Array, fieldName?: string, comparer?: string): Array; - min(jsonArray: Array, fieldName: string, comparer: string): Array; - distinct(jsonArray: Array, fieldName?: string, requiresCompleteRecord?:any): Array; - sum(json:any, fieldName: string): number; - avg(json:any, fieldName: string): number; - select(jsonArray: Array, fieldName: string, fields:string): Array; - group(jsonArray: Array, field: string, /* internal */ level: number): Array; - parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): Object; + swap(array: any[], x: number, y: number): void; + mergeSort(jsonArray: any[], fieldName?: string, comparer?: any): any[]; + max(jsonArray: any[], fieldName?: string, comparer?: string): any[]; + min(jsonArray: any[], fieldName: string, comparer: string): any[]; + distinct(jsonArray: any[], fieldName?: string, requiresCompleteRecord?: any): any[]; + sum(json: any, fieldName: string): number; + avg(json: any, fieldName: string): number; + select(jsonArray: any[], fieldName: string, fields: string): any[]; + group(jsonArray: any[], field: string, /* internal */ level: number): any[]; + parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): any; } interface AjaxSettings { type?: string; @@ -491,8 +486,7 @@ declare module ej { row, tHead } - - enum filterType{ + enum filterType { StartsWith, Contains, EndsWith, @@ -503,33 +497,32 @@ declare module ej { Equal, NotEqual } - enum Animation{ + enum Animation { Fade, None, Slide } - enum Type{ + enum Type { Overlay, Slide } - enum SortOrder{ + enum SortOrder { Ascending, Descending } class Draggable extends ej.Widget { static fn: Draggable; - constructor(element: JQuery, options?: Draggable.Model); - constructor(element: Element, options?: Draggable.Model); + constructor(element: JQuery | Element, options?: Draggable.Model); static Locale: any; - model:Draggable.Model; - defaults:Draggable.Model; + model: Draggable.Model; + defaults: Draggable.Model; /** destroy in the draggable. * @returns {void} */ _destroy(): void; } -export module Draggable{ +export namespace Draggable { export interface Model { @@ -564,19 +557,19 @@ export interface Model { scope?: string; /** This event is triggered when dragging element is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** This event is triggered when the mouse is moved during the dragging. */ - drag? (e: DragEventArgs): void; + drag?(e: DragEventArgs): void; /** Supply a callback function to handle the drag start event as an init option. */ - dragStart? (e: DragStartEventArgs): void; + dragStart?(e: DragStartEventArgs): void; /** This event is triggered when the mouse is moved during the dragging. */ - dragStop? (e: DragStopEventArgs): void; + dragStop?(e: DragStopEventArgs): void; /** This event is triggered when dragged. */ - helper? (e: HelperEventArgs): void; + helper?(e: HelperEventArgs): void; } export interface DestroyEventArgs { @@ -677,18 +670,17 @@ export interface HelperEventArgs { class Droppable extends ej.Widget { static fn: Droppable; - constructor(element: JQuery, options?: Droppable.Model); - constructor(element: Element, options?: Droppable.Model); + constructor(element: JQuery | Element, options?: Droppable.Model); static Locale: any; - model:Droppable.Model; - defaults:Droppable.Model; + model: Droppable.Model; + defaults: Droppable.Model; /** destroy in the Droppable. * @returns {void} */ _destroy(): void; } -export module Droppable{ +export namespace Droppable { export interface Model { @@ -703,13 +695,13 @@ export interface Model { scope?: string; /** This event is triggered when the mouse up is moved during the dragging. */ - drop? (e: DropEventArgs): void; + drop?(e: DropEventArgs): void; /** This event is triggered when the mouse is moved out. */ - out? (e: OutEventArgs): void; + out?(e: OutEventArgs): void; /** This event is triggered when the mouse is moved over. */ - over? (e: OverEventArgs): void; + over?(e: OverEventArgs): void; } export interface DropEventArgs { @@ -772,18 +764,17 @@ export interface OverEventArgs { class Resizable extends ej.Widget { static fn: Resizable; - constructor(element: JQuery, options?: Resizable.Model); - constructor(element: Element, options?: Resizable.Model); + constructor(element: JQuery | Element, options?: Resizable.Model); static Locale: any; - model:Resizable.Model; - defaults:Resizable.Model; + model: Resizable.Model; + defaults: Resizable.Model; /** destroy in the Resizable. * @returns {void} */ _destroy(): void; } -export module Resizable{ +export namespace Resizable { export interface Model { @@ -828,10 +819,10 @@ export interface Model { scope?: string; /** This event is triggered when the widget destroys. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** This event is triggered when resized. */ - helper? (e: HelperEventArgs): void; + helper?(e: HelperEventArgs): void; } export interface DestroyEventArgs { @@ -866,8 +857,8 @@ export interface HelperEventArgs { } - var globalize:globalize; - var cultures:culture; + const globalize: globalize; + const cultures: culture; function addCulture(name: string, culture ?: any): void; function preferredCulture(culture ?: string): culture; function format(value: any, format: string, culture ?: string): string; @@ -895,22 +886,22 @@ interface globalize { calendars?: calendarsSettings; } interface formatSettings { - pattern: Array; + pattern: string[]; decimals: number; - groupSizes: Array; + groupSizes: number[]; percent: percentSettings; currency: currencySettings; } interface percentSettings { - pattern: Array; + pattern: string[]; decimals: number; - groupSizes: Array; + groupSizes: number[]; symbol: string; } interface currencySettings { - pattern: Array; + pattern: string[]; decimals: number; - groupSizes: Array; + groupSizes: number[]; symbol: string; } interface calendarsSettings { @@ -920,19 +911,19 @@ interface globalize { firstDay: number; days: daySettings; months: monthSettings; - AM: Array; - PM: Array; + AM: string[]; + PM: string[]; twoDigitYearMax: number; patterns: patternSettings; } interface daySettings { - names: Array; - namesAbbr: Array; - namesShort: Array; + names: string[]; + namesAbbr: string[]; + namesShort: string[]; } interface monthSettings { - names: Array; - namesAbbr: Array; + names: string[]; + namesAbbr: string[]; } interface patternSettings { d: string; @@ -947,11 +938,10 @@ interface globalize { } class Scroller extends ej.Widget { static fn: Scroller; - constructor(element: JQuery, options?: Scroller.Model); - constructor(element: Element, options?: Scroller.Model); + constructor(element: JQuery | Element, options?: Scroller.Model); static Locale: any; - model:Scroller.Model; - defaults:Scroller.Model; + model: Scroller.Model; + defaults: Scroller.Model; /** destroy the Scroller control, unbind the all ej control related events automatically and bring the control to pre-init state. * @returns {void} @@ -999,7 +989,7 @@ class Scroller extends ej.Widget { */ scrollY(pixel: number|string, disableAnimation: boolean, animationSpeed: number): void; } -export module Scroller{ +export namespace Scroller { export interface Model { @@ -1074,28 +1064,28 @@ export interface Model { width?: number|string; /** Fires when Scroller control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when Scroller control is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when a thumb point is moved along the touch surface. */ - thumbMove? (e: ThumbMoveEventArgs): void; + thumbMove?(e: ThumbMoveEventArgs): void; /** Fires when a thumb point is placed on the touch surface. */ - thumbStart? (e: ThumbStartEventArgs): void; + thumbStart?(e: ThumbStartEventArgs): void; /** Fires when a thumb point is removed from the touch surface. */ - thumbEnd? (e: ThumbEndEventArgs): void; + thumbEnd?(e: ThumbEndEventArgs): void; /** It fires whenever the mouse wheel is rotated either in upwards or downwards. */ - wheelMove? (e: WheelMoveEventArgs): void; + wheelMove?(e: WheelMoveEventArgs): void; /** It will fire when mouse trackball has been start to wheel. */ - wheelStart? (e: WheelStartEventArgs): void; + wheelStart?(e: WheelStartEventArgs): void; /** It will fire when mouse trackball has been stop to wheel. */ - wheelStop? (e: WheelStopEventArgs): void; + wheelStop?(e: WheelStopEventArgs): void; } export interface CreateEventArgs { @@ -1253,11 +1243,10 @@ export interface WheelStopEventArgs { class Accordion extends ej.Widget { static fn: Accordion; - constructor(element: JQuery, options?: Accordion.Model); - constructor(element: Element, options?: Accordion.Model); + constructor(element: JQuery | Element, options?: Accordion.Model); static Locale: any; - model:Accordion.Model; - defaults:Accordion.Model; + model: Accordion.Model; + defaults: Accordion.Model; /** AddItem method is used to add the panel in dynamically. It receives the following parameters * @param {string} specify the name of the header @@ -1292,7 +1281,7 @@ class Accordion extends ej.Widget { * @param {Array} index values to disable the panels * @returns {void} */ - disableItems(index: Array): void; + disableItems(index: any[]): void; /** Enable the accordion widget includes all the headers and content panels. * @returns {void} @@ -1303,7 +1292,7 @@ class Accordion extends ej.Widget { * @param {Array} index values to enable the panels * @returns {void} */ - enableItems(index: Array): void; + enableItems(index: any[]): void; /** To expand all the accordion widget items. * @returns {void} @@ -1341,7 +1330,7 @@ class Accordion extends ej.Widget { */ show(): void; } -export module Accordion{ +export namespace Accordion { export interface Model { @@ -1353,7 +1342,7 @@ export interface Model { /** Accordion headers can be expanded and collapsed on keyboard action. * @Default {true} */ - allowKeyboardNavigation?: Boolean; + allowKeyboardNavigation?: boolean; /** To set the Accordion headers Collapse Speed. * @Default {300} @@ -1367,9 +1356,9 @@ export interface Model { /** Sets the root CSS class for Accordion theme, which is used customize. */ - cssClass?: String; + cssClass?: string; - /** Allows you to set the custom header Icon. It accepts two key values “header”, ”selectedHeader”. + /** Allows you to set the custom header Icon. It accepts two key values “header”, ”selectedHeader”. * @Default {{ header: e-collapse, selectedHeader: e-expand }} */ customIcon?: CustomIcon; @@ -1382,12 +1371,12 @@ export interface Model { /** Specifies the animation behavior in accordion. * @Default {true} */ - enableAnimation?: Boolean; + enableAnimation?: boolean; /** With this enabled property, you can enable or disable the Accordion. * @Default {true} */ - enabled?: Boolean; + enabled?: boolean; /** Used to enable the disabled items in accordion. * @Default {[]} @@ -1397,22 +1386,22 @@ export interface Model { /** Multiple content panels to activate at a time. * @Default {false} */ - enableMultipleOpen?: Boolean; + enableMultipleOpen?: boolean; /** Save current model value to browser cookies for maintaining states. When refreshing the accordion control page, the model value is applied from browser cookies or HTML 5local storage. * @Default {false} */ - enablePersistence?: Boolean; + enablePersistence?: boolean; /** Display headers and panel text from right-to-left. * @Default {false} */ - enableRTL?: Boolean; + enableRTL?: boolean; /** The events API binds the action for activating the accordion header. Users can activate the header by using mouse actions such as mouse-over, mouse-up, mouse-down, and soon. * @Default {click} */ - events?: String; + events?: string; /** To set the Accordion headers Expand Speed. * @Default {300} @@ -1451,7 +1440,7 @@ export interface Model { /** Used to determines the close button visibility an each accordion items. This close button helps to remove the accordion item from the control. * @Default {false} */ - showCloseButton?: Boolean; + showCloseButton?: boolean; /** Displays rounded corner borders on the Accordion control's panels and headers. * @Default {false} @@ -1464,34 +1453,34 @@ export interface Model { width?: number|string; /** Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value. */ - activate? (e: ActivateEventArgs): void; + activate?(e: ActivateEventArgs): void; /** Triggered before the AJAX content is loaded in a content panel. Arguments have location of the content (URL) and current model value. */ - ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; /** Triggered after AJAX load failed action. Arguments have URL, error message, and current model value. */ - ajaxError? (e: AjaxErrorEventArgs): void; + ajaxError?(e: AjaxErrorEventArgs): void; /** Triggered after the AJAX content loads. Arguments have current model values. */ - ajaxLoad? (e: AjaxLoadEventArgs): void; + ajaxLoad?(e: AjaxLoadEventArgs): void; /** Triggered after AJAX success action. Arguments have URL, content, and current model values. */ - ajaxSuccess? (e: AjaxSuccessEventArgs): void; + ajaxSuccess?(e: AjaxSuccessEventArgs): void; /** Triggered before a tab item is active. Arguments have active index and model values. */ - beforeActivate? (e: BeforeActivateEventArgs): void; + beforeActivate?(e: BeforeActivateEventArgs): void; /** Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value. */ - beforeInactivate? (e: BeforeInactivateEventArgs): void; + beforeInactivate?(e: BeforeInactivateEventArgs): void; /** Triggered after Accordion control creation. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered after Accordion control destroy. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value. */ - inActivate? (e: InActivateEventArgs): void; + inActivate?(e: InActivateEventArgs): void; } export interface ActivateEventArgs { @@ -1716,15 +1705,15 @@ export interface AjaxSettings { /** It specifies, whether to enable or disable asynchronous request. */ - async?: Boolean; + async?: boolean; /** It specifies the page will be cached in the web browser. */ - cache?: Boolean; + cache?: boolean; /** It specifies the type of data is send in the query string. */ - contentType?: String; + contentType?: string; /** It specifies the data as an object, will be passed in the query string. */ @@ -1732,25 +1721,25 @@ export interface AjaxSettings { /** It specifies the type of data that you're expecting back from the response. */ - dataType?: String; + dataType?: string; /** It specifies the HTTP request type. */ - type?: String; + type?: string; } export interface CustomIcon { /** This class name set to collapsing header. */ - header?: String; + header?: string; /** This class name set to expanded (active) header. */ - selectedHeader?: String; + selectedHeader?: string; } -enum HeightAdjustMode{ +enum HeightAdjustMode { ///Height fit to the content in the panel Content, @@ -1766,11 +1755,10 @@ enum HeightAdjustMode{ class Autocomplete extends ej.Widget { static fn: Autocomplete; - constructor(element: JQuery, options?: Autocomplete.Model); - constructor(element: Element, options?: Autocomplete.Model); + constructor(element: JQuery | Element, options?: Autocomplete.Model); static Locale: any; - model:Autocomplete.Model; - defaults:Autocomplete.Model; + model: Autocomplete.Model; + defaults: Autocomplete.Model; /** Clears the text in the Autocomplete textbox. * @returns {void} @@ -1829,7 +1817,7 @@ class Autocomplete extends ej.Widget { */ selectValueByText(Text: string): void; } -export module Autocomplete{ +export namespace Autocomplete { export interface Model { @@ -1838,7 +1826,8 @@ export interface Model { */ addNewText?: boolean; - /** Allows new values to be added to the autocomplete input other than the values in the suggestion list. Normally, when there are no suggestions it will display “No suggestions” label in the popup. + /** Allows new values to be added to the autocomplete input other than the values in the suggestion list. + * Normally, when there are no suggestions it will display “No suggestions” label in the popup. * @Default {false} */ allowAddNew?: boolean; @@ -1864,14 +1853,14 @@ export interface Model { caseSensitiveSearch?: boolean; /** The root class for the Autocomplete textbox widget which helps in customizing its theme. - * @Default {””} + * @Default {””} */ cssClass?: string; /** The data source contains the list of data for the suggestions list. It can be a string array or JSON array. * @Default {null} */ - dataSource?: any|Array; + dataSource?: any|any[]; /** The time delay (in milliseconds) after which the suggestion popup will be shown. * @Default {200} @@ -1879,12 +1868,12 @@ export interface Model { delaySuggestionTimeout?: number; /** The special character which acts as a separator for the given words for multi-mode search i.e. the text after the delimiter are considered as a separate word or query for search operation. - * @Default {’,’} + * @Default {’,’} */ delimiterChar?: string; /** The text to be displayed in the popup when there are no suggestions available for the entered text. - * @Default {“No suggestions”} + * @Default {“No suggestions”} */ emptyResultText?: string; @@ -1903,12 +1892,14 @@ export interface Model { */ enableDistinct?: boolean; - /** Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. While refreshing the page, it retains the model value from browser cookies or local storage. + /** Allows the current model values to be saved in local storage or browser cookies for state maintenance + * when it is set to true. + * While refreshing the page, it retains the model value from browser cookies or local storage. * @Default {false} */ enablePersistence?: boolean; - /** Displays the Autocomplete widget’s content from right to left when enabled. + /** Displays the Autocomplete widget’s content from right to left when enabled. * @Default {false} */ enableRTL?: boolean; @@ -1918,7 +1909,10 @@ export interface Model { */ fields?: Fields; - /** Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’. + /** Specifies the search filter type. + * There are several types of search filter available such as ‘startswith’, + * ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, + * ‘greaterthanorequal’, ‘equal’, ‘notequal’. * @Default {ej.filterType.StartsWith} */ filterType?: string; @@ -1957,12 +1951,12 @@ export interface Model { multiSelectMode?: ej.Autocomplete.MultiSelectMode|string; /** The height of the suggestion list. - * @Default {“152px”} + * @Default {“152px”} */ popupHeight?: string; /** The width of the suggestion list. - * @Default {“auto”} + * @Default {“auto”} */ popupWidth?: string; @@ -2046,52 +2040,64 @@ export interface Model { width?: string; /** Triggers when the AJAX requests Begins. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggers when the data requested from AJAX will get successfully loaded in the Autocomplete widget. */ - actionSuccess? (e: ActionSuccessEventArgs): void; + actionSuccess?(e: ActionSuccessEventArgs): void; /** Triggers when the AJAX requests complete. The request may get failed or succeed. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggers when the data requested from AJAX get failed. */ - actionFailure? (e: ActionFailureEventArgs): void; + actionFailure?(e: ActionFailureEventArgs): void; /** Triggers when the text box value is changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Triggers after the suggestion popup is closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Triggers when Autocomplete widget is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggers after the Autocomplete widget is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggers after the autocomplete textbox is focused. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Triggers after the Autocomplete textbox gets out of the focus. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Triggers after the suggestion list is opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Triggers when an item has been selected from the suggestion list. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface ActionBeginEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionSuccessEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionCompleteEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionFailureEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ChangeEventArgs { @@ -2275,12 +2281,14 @@ export interface MultiColumnSettingsColumn { */ cssClass?: string; - /** Specifies the search data type. There are four types of data types available such as string, ‘number’, ‘boolean’ and ‘date’. + /** Specifies the search data type. There are four types of data types available such as string, ‘number’, ‘boolean’ and ‘date’. * @Default {ej.Type.String} */ type?: ej.Type|string; - /** Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’. + /** Specifies the search filter type. There are several types of search filter available such as ‘startswith’, + * ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, + * ‘greaterthanorequal’, ‘equal’, ‘notequal’. * @Default {ej.filterType.StartsWith} */ filterType?: ej.filterType|string; @@ -2293,7 +2301,7 @@ export interface MultiColumnSettingsColumn { /** Gets or sets a value that indicates to align the text within the column. See textAlign * @Default {ej.TextAlign.Left} */ - textAlign?: ej.TextAlign|string; + textAlign?: ej.TextAlign|string; } export interface MultiColumnSettings { @@ -2314,10 +2322,10 @@ export interface MultiColumnSettings { /** Field and Header Text collections can be defined and customized through columns field. */ - columns?: Array; + columns?: MultiColumnSettingsColumn[]; } -enum Animation{ +enum Animation { ///Supports to animation type with none type only. None, @@ -2330,7 +2338,7 @@ enum Animation{ } -enum MultiSelectMode{ +enum MultiSelectMode { ///Multiple values are separated using a given special character. Delimiter, @@ -2340,7 +2348,7 @@ enum MultiSelectMode{ } -enum SortOrder{ +enum SortOrder { ///Items to be displayed in the suggestion list in ascending order. Ascending, @@ -2353,11 +2361,10 @@ enum SortOrder{ class Button extends ej.Widget { static fn: Button; - constructor(element: JQuery, options?: Button.Model); - constructor(element: Element, options?: Button.Model); + constructor(element: JQuery | Element, options?: Button.Model); static Locale: any; - model:Button.Model; - defaults:Button.Model; + model: Button.Model; + defaults: Button.Model; /** destroy the button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -2374,7 +2381,7 @@ class Button extends ej.Widget { */ enable(): void; } -export module Button{ +export namespace Button { export interface Model { @@ -2407,7 +2414,9 @@ export interface Model { */ htmlAttributes?: any; - /** Specifies the image position of the Button. This image position is applicable only with the textandimage contentType property. The images can be positioned in both imageLeft and imageRight options. See below to know about available ImagePosition + /** Specifies the image position of the Button. This image position is applicable + * only with the textandimage contentType property. The images can be positioned in both + * imageLeft and imageRight options. See below to know about available ImagePosition * @Default {ej.ImagePosition.ImageLeft} */ imagePosition?: ej.ImagePosition|string; @@ -2457,14 +2466,17 @@ export interface Model { */ width?: string|number; - /** Fires when Button control is clicked successfully.Consider the scenario to perform any validation,modification of content or any other operations click on button,we can make use of this click event to achieve the scenario. */ - click? (e: ClickEventArgs): void; + /** Fires when Button control is clicked successfully.Consider the scenario to perform any validation, + * modification of content or any other operations click on button,we can make use of this click event + * to achieve the scenario. + */ + click?(e: ClickEventArgs): void; /** Fires after Button control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the button is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; } export interface ClickEventArgs { @@ -2520,8 +2532,7 @@ export interface DestroyEventArgs { type?: string; } } -enum ContentType -{ +enum ContentType { //To display the text content only in button TextOnly, //To display the image only in button @@ -2533,8 +2544,7 @@ TextAndImage, //Supports to display image with both ends of the text ImageTextImage, } -enum ImagePosition -{ +enum ImagePosition { //support for aligning text in left and image in right ImageRight, //support for aligning text in right and image in left @@ -2544,8 +2554,7 @@ ImageTop, //support for aligning text in top and image in bottom ImageBottom, } -enum ButtonSize -{ +enum ButtonSize { //Creates button with Built-in default size height, width specified Normal, //Creates button with Built-in mini size height, width specified @@ -2557,8 +2566,7 @@ Medium, //Creates button with Built-in large size height, width specified Large, } -enum ButtonType -{ +enum ButtonType { //Creates button with Built-in button type specified Button, //Creates button with Built-in reset type specified @@ -2569,13 +2577,12 @@ Submit, class Captcha extends ej.Widget { static fn: Captcha; - constructor(element: JQuery, options?: Captcha.Model); - constructor(element: Element, options?: Captcha.Model); + constructor(element: JQuery | Element, options?: Captcha.Model); static Locale: any; - model:Captcha.Model; - defaults:Captcha.Model; + model: Captcha.Model; + defaults: Captcha.Model; } -export module Captcha{ +export namespace Captcha { export interface Model { @@ -2648,16 +2655,16 @@ export interface Model { width?: number; /** Fires when captcha refresh begins. */ - refreshBegin? (e: RefreshBeginEventArgs): void; + refreshBegin?(e: RefreshBeginEventArgs): void; /** Fires after captcha refresh completed. */ - refreshComplete? (e: RefreshCompleteEventArgs): void; + refreshComplete?(e: RefreshCompleteEventArgs): void; /** Fires when captcha refresh fails to load. */ - refreshFailure? (e: RefreshFailureEventArgs): void; + refreshFailure?(e: RefreshFailureEventArgs): void; /** Fires after captcha refresh succeeded. */ - refreshSuccess? (e: RefreshSuccessEventArgs): void; + refreshSuccess?(e: RefreshSuccessEventArgs): void; } export interface RefreshBeginEventArgs { @@ -2720,8 +2727,7 @@ export interface RefreshSuccessEventArgs { type?: string; } } -enum HatchStyle -{ +enum HatchStyle { //Set background as None to Captcha None, //Set background as BackwardDiagonal to Captcha @@ -2800,14 +2806,14 @@ ZigZag, class ListBox extends ej.Widget { static fn: ListBox; - constructor(element: JQuery, options?: ListBox.Model); - constructor(element: Element, options?: ListBox.Model); + constructor(element: JQuery | Element, options?: ListBox.Model); static Locale: any; - model:ListBox.Model; - defaults:ListBox.Model; + model: ListBox.Model; + defaults: ListBox.Model; /** Adds a given list items in the ListBox widget at a specified index. It accepts two parameters. - * @param {any|string} This can be a list item object (for JSON binding) or a string (for UL and LI rendering). Also we can the specify this as an array of list item object or an array of strings to add multiple items. + * @param {any|string} This can be a list item object (for JSON binding) or a string (for UL and LI rendering). + * Also we can the specify this as an array of list item object or an array of strings to add multiple items. * @param {number} The index value to add the given items at the specified index. If index is not specified, the given items will be added at the end of the list. * @returns {void} */ @@ -2886,29 +2892,29 @@ class ListBox extends ej.Widget { */ getSelectedItems(): any; - /** Returns an item’s index based on the given text. + /** Returns an item’s index based on the given text. * @param {string} The list item text (label) * @returns {number} */ getIndexByText(text: string): number; - /** Returns an item’s index based on the value given. - * @param {string} The list item’s value + /** Returns an item’s index based on the value given. + * @param {string} The list item’s value * @returns {number} */ getIndexByValue(indices: string): number; - /** Returns an item’s text (label) based on the index given. + /** Returns an item’s text (label) based on the index given. * @returns {string} */ getTextByIndex(): string; - /** Returns a list item’s object using its index. + /** Returns a list item’s object using its index. * @returns {any} */ getItemByIndex(): any; - /** Returns a list item’s object based on the text given. + /** Returns a list item’s object based on the text given. * @param {string} The list item text. * @returns {any} */ @@ -2918,7 +2924,7 @@ class ListBox extends ej.Widget { * @param {Array} Data to merge in listbox. * @returns {void} */ - mergeData(data: Array): void; + mergeData(data: any[]): void; /** Selects the next item based on the current selection. * @returns {void} @@ -3054,13 +3060,13 @@ class ListBox extends ej.Widget { * @param {Array} Values of the listbox items to be shown. * @returns {void} */ - showItemsByValues(values: Array): void; + showItemsByValues(values: any[]): void; /** Hides the list item using its values. * @param {Array} Values of the listbox items to be hidden. * @returns {void} */ - hideItemsByValues(values: Array): void; + hideItemsByValues(values: any[]): void; /** Shows a hidden list item using its value. * @param {string} Value of the listbox item to be shown. @@ -3106,7 +3112,7 @@ class ListBox extends ej.Widget { */ showAllItems(): void; } -export module ListBox{ +export namespace ListBox { export interface Model { @@ -3125,7 +3131,7 @@ export interface Model { */ allowMultiSelection?: boolean; - /** Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property. + /** Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property. * @Default {false} */ allowVirtualScrolling?: boolean; @@ -3135,7 +3141,9 @@ export interface Model { */ caseSensitiveSearch?: boolean; - /** Dynamically populate data of a list box while selecting an item in another list box i.e. rendering child list box based on the item selection in parent list box. This property accepts the id of the child ListBox widget to populate the data. + /** Dynamically populate data of a list box while selecting an item in another list box i.e. + * rendering child list box based on the item selection in parent list box. + * This property accepts the id of the child ListBox widget to populate the data. * @Default {null} */ cascadeTo?: string; @@ -3143,10 +3151,10 @@ export interface Model { /** Set of list items to be checked by default using its index. It works only when the showCheckbox property is set to true. * @Default {null} */ - checkedIndices?: Array; + checkedIndices?: any[]; /** The root class for the ListBox widget to customize the existing theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -3170,7 +3178,7 @@ export interface Model { */ enablePersistence?: boolean; - /** Displays the ListBox widget’s content from right to left when enabled. + /** Displays the ListBox widget’s content from right to left when enabled. * @Default {false} */ enableRTL?: boolean; @@ -3227,7 +3235,7 @@ export interface Model { /** The list items to be selected by default using its indices. To use this property allowMultiSelection should be enabled. * @Default {[]} */ - selectedIndices?: Array; + selectedIndices?: any[]; /** Enables/Disables the multi selection option with the help of checkbox control. * @Default {false} @@ -3245,7 +3253,7 @@ export interface Model { template?: string; /** Holds the selected items values and used to bind value to the list item using AngularJS and KnockoutJS. - * @Default {“”} + * @Default {“”} */ value?: number; @@ -3263,67 +3271,79 @@ export interface Model { targetID?: string; /** Triggers before the AJAX request begins to load data in the ListBox widget. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggers after the data requested via AJAX is successfully loaded in the ListBox widget. */ - actionSuccess? (e: ActionSuccessEventArgs): void; + actionSuccess?(e: ActionSuccessEventArgs): void; /** Triggers when the AJAX requests complete. The request may get failed or succeed. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggers when the data requested from AJAX get failed. */ - actionFailure? (e: ActionFailureEventArgs): void; + actionFailure?(e: ActionFailureEventArgs): void; /** Event will be triggered before the requested data via AJAX once loaded in successfully. */ - actionBeforeSuccess? (e: ActionBeforeSuccessEventArgs): void; + actionBeforeSuccess?(e: ActionBeforeSuccessEventArgs): void; /** Triggers when the item selection is changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Triggers when the list item is checked or unchecked. */ - checkChange? (e: CheckChangeEventArgs): void; + checkChange?(e: CheckChangeEventArgs): void; /** Triggers when the ListBox widget is created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggers when the ListBox widget is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggers when focus the listbox items. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Triggers when focus out from listbox items. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Triggers when the list item is being dragged. */ - itemDrag? (e: ItemDragEventArgs): void; + itemDrag?(e: ItemDragEventArgs): void; /** Triggers when the list item is ready to be dragged. */ - itemDragStart? (e: ItemDragStartEventArgs): void; + itemDragStart?(e: ItemDragStartEventArgs): void; /** Triggers when the list item stops dragging. */ - itemDragStop? (e: ItemDragStopEventArgs): void; + itemDragStop?(e: ItemDragStopEventArgs): void; /** Triggers when the list item is dropped. */ - itemDrop? (e: ItemDropEventArgs): void; + itemDrop?(e: ItemDropEventArgs): void; /** Triggers when a list item gets selected. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; /** Triggers when a list item gets unselected. */ - unselect? (e: UnselectEventArgs): void; + unselect?(e: UnselectEventArgs): void; } export interface ActionBeginEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionSuccessEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionCompleteEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionFailureEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface ActionBeforeSuccessEventArgs { @@ -3350,7 +3370,7 @@ export interface ActionBeforeSuccessEventArgs { /** List of array object */ - result?: Array; + result?: any[]; /** ExecuteQuery object of DataManager */ @@ -3375,7 +3395,7 @@ export interface ChangeEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3395,11 +3415,11 @@ export interface ChangeEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3422,7 +3442,7 @@ export interface CheckChangeEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3442,11 +3462,11 @@ export interface CheckChangeEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3529,7 +3549,7 @@ export interface ItemDragEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3545,11 +3565,11 @@ export interface ItemDragEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3572,7 +3592,7 @@ export interface ItemDragStartEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3588,11 +3608,11 @@ export interface ItemDragStartEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3615,7 +3635,7 @@ export interface ItemDragStopEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3631,11 +3651,11 @@ export interface ItemDragStopEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3658,7 +3678,7 @@ export interface ItemDropEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3674,11 +3694,11 @@ export interface ItemDropEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3701,7 +3721,7 @@ export interface SelectEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3721,11 +3741,11 @@ export interface SelectEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3748,7 +3768,7 @@ export interface UnselectEventArgs { */ data?: any; - /** List item’s index. + /** List item’s index. */ index?: number; @@ -3768,11 +3788,11 @@ export interface UnselectEventArgs { */ isEnabled?: boolean; - /** List item’s text (label). + /** List item’s text (label). */ text?: string; - /** List item’s value. + /** List item’s value. */ value?: string; } @@ -3827,11 +3847,10 @@ export interface Fields { class Calculate { static fn: Calculate; - constructor(element: JQuery, options?: Calculate.Model); - constructor(element: Element, options?: Calculate.Model); + constructor(element: JQuery | Element, options?: Calculate.Model); static Locale: any; - model:Calculate.Model; - defaults:Calculate.Model; + model: Calculate.Model; + defaults: Calculate.Model; /** Add the custom formulas with function in CalcEngine library * @param {string} pass the formula name @@ -3882,19 +3901,21 @@ class Calculate { */ computeFormula(Formula: string): string; } -export module Calculate{ +export namespace Calculate { export interface Model { + /** Returns the cancel option value. + */ + cancel?: boolean; } } class CheckBox extends ej.Widget { static fn: CheckBox; - constructor(element: JQuery, options?: CheckBox.Model); - constructor(element: Element, options?: CheckBox.Model); + constructor(element: JQuery | Element, options?: CheckBox.Model); static Locale: any; - model:CheckBox.Model; - defaults:CheckBox.Model; + model: CheckBox.Model; + defaults: CheckBox.Model; /** Destroy the CheckBox widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -3916,11 +3937,15 @@ class CheckBox extends ej.Widget { */ isChecked(): boolean; } -export module CheckBox{ +export namespace CheckBox { export interface Model { - /** Specifies whether CheckBox has to be in checked or not. We can also specify array of string as value for this property. If any of the value in the specified array matches the value of the textbox, then it will be considered as checked. It will be useful in MVVM binding, specify array type to identify the values of the checked CheckBoxes. + /** Specifies whether CheckBox has to be in checked or not. + * We can also specify array of string as value for this property. + * If any of the value in the specified array matches the value of the textbox, + * then it will be considered as checked. It will be useful in MVVM binding, + * specify array type to identify the values of the checked CheckBoxes. * @Default {false} */ checked?: boolean|string[]; @@ -3939,7 +3964,9 @@ export interface Model { */ enabled?: boolean; - /** Specifies the persist property for CheckBox while initialization. The persist API save current model value to browser cookies for state maintains. While refreshing the CheckBox control page the model value apply from browser cookies. + /** Specifies the persist property for CheckBox while initialization. + * The persist API save current model value to browser cookies for state maintains. + * While refreshing the CheckBox control page the model value apply from browser cookies. * @Default {false} */ enablePersistence?: boolean; @@ -4004,16 +4031,16 @@ export interface Model { value?: string; /** Fires before the CheckBox is going to changed its state successfully */ - beforeChange? (e: BeforeChangeEventArgs): void; + beforeChange?(e: BeforeChangeEventArgs): void; /** Fires when the CheckBox state is changed successfully */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when the CheckBox state is created successfully */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the CheckBox state is destroyed successfully */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; } export interface BeforeChangeEventArgs { @@ -4096,8 +4123,7 @@ export interface DestroyEventArgs { type?: string; } } -enum CheckState -{ +enum CheckState { //string Uncheck, //string @@ -4105,8 +4131,7 @@ Check, //string Indeterminate, } -enum CheckboxSize -{ +enum CheckboxSize { //Displays the CheckBox in medium size Medium, //Displays the CheckBox in small size @@ -4115,11 +4140,10 @@ Small, class ColorPicker extends ej.Widget { static fn: ColorPicker; - constructor(element: JQuery, options?: ColorPicker.Model); - constructor(element: Element, options?: ColorPicker.Model); + constructor(element: JQuery | Element, options?: ColorPicker.Model); static Locale: any; - model:ColorPicker.Model; - defaults:ColorPicker.Model; + model: ColorPicker.Model; + defaults: ColorPicker.Model; /** Disables the color picker control * @returns {void} @@ -4156,26 +4180,26 @@ class ColorPicker extends ej.Widget { * @param {any} Specified HSV code converted to RGB * @returns {any} */ - HSVToRGB(hsv: any): any; + HSVToRGB(HSV: any): any; /** Convert color value from RGB to HEX * @param {any} Specified RGB code converted to HEX code * @returns {string} */ - RGBToHEX(rgb: any): string; + RGBToHEX(RGB: any): string; /** Convert color value from RGB to HSV * @param {any} Specified RGB code converted to HSV code * @returns {any} */ - RGBToHSV(rgb: any): any; + RGBToHSV(RGB: any): any; /** Open the ColorPicker popup. * @returns {void} */ show(): void; } -export module ColorPicker{ +export namespace ColorPicker { export interface Model { @@ -4201,7 +4225,7 @@ export interface Model { /** This property allows to define the custom colors in the palette model.Custom palettes are created by passing a comma delimited string of HEX values or an array of colors. * @Default {empty} */ - custom?: Array; + custom?: any[]; /** This property allows to embed the popup in the order of DOM element flow . When we set the value as true, the color picker popup is always in visible state. * @Default {false} @@ -4243,7 +4267,8 @@ export interface Model { */ palette?: ej.ColorPicker.Palette|string; - /** This property allows to define the preset model to be rendered initially in palette type.It consists of 12 different types of presets. Each presets have 50 colors. See below available Presets + /** This property allows to define the preset model to be rendered initially in palette type.It consists of 12 different types of presets. Each presets have 50 colors. + * See below available Presets * @Default {ej.ColorPicker.Presets.Basic} */ presetType?: ej.ColorPicker.Presets|string; @@ -4263,7 +4288,8 @@ export interface Model { */ showPreview?: boolean; - /** This property allows to store the color values in custom list.The ColorPicker will keep up to 11 colors in a custom list.By clicking the add button, the selected color from picker or palette will get added in the recent color list. + /** This property allows to store the color values in custom list.The ColorPicker will keep up to 11 colors in a custom list. + * By clicking the add button, the selected color from picker or palette will get added in the recent color list. * @Default {false} */ showRecentColors?: boolean; @@ -4284,7 +4310,9 @@ export interface Model { toolIcon?: string; /** This property allows to define the customized text or content to displayed when mouse over the following elements. This property also allows to use the culture values. - * @Default {{ switcher: Switcher, addbutton: Add Color, basic: Basic, monochrome: Mono Chrome, flatcolors: Flat Color, seawolf: Sea Wolf, webcolors: Web Colors, sandy: Sandy, pinkshades: Pink Shades, misty: Misty, citrus: Citrus, vintage: Vintage, moonlight: Moon Light, candycrush: Candy Crush, currentcolor: Current Color, selectedcolor: Selected Color }} + * @Default {{ switcher: Switcher, addbutton: Add Color, basic: Basic, monochrome: Mono Chrome, flatcolors: Flat Color, seawolf: Sea Wolf, webcolors: Web Colors, + * sandy: Sandy, pinkshades: Pink Shades, misty: Misty, citrus: Citrus, vintage: Vintage, moonlight: Moon Light, candycrush: Candy Crush, + * currentcolor: Current Color, selectedcolor: Selected Color }} */ tooltipText?: TooltipText; @@ -4294,22 +4322,22 @@ export interface Model { value?: string; /** Fires after Color value has been changed successfully.If the user want to perform any operation after the color value changed then the user can make use of this change event. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires after closing the color picker popup. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires after Color picker control is created. If the user want to perform any operation after the color picker control creation then the user can make use of this create event. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires after Color picker control is destroyed. If the user want to perform any operation after the color picker control destroyed then the user can make use of this destroy event. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires after opening the color picker popup */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Fires after Color value has been selected successfully. If the user want to perform any operation after the color value selected then the user can make use of this select event. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface ChangeEventArgs { @@ -4492,7 +4520,7 @@ export interface TooltipText { selectedcolor?: string; } -enum ModelType{ +enum ModelType { ///support palette type mode in color picker. Palette, @@ -4502,7 +4530,7 @@ enum ModelType{ } -enum Palette{ +enum Palette { ///used to show the basic palette BasicPalette, @@ -4512,7 +4540,7 @@ enum Palette{ } -enum Presets{ +enum Presets { ///used to show the basic presets Basic, @@ -4549,8 +4577,7 @@ enum Presets{ } } -enum ButtonMode -{ +enum ButtonMode { //Displays the button in split mode Split, //Displays the button in Dropdown mode @@ -4559,11 +4586,10 @@ Dropdown, class FileExplorer extends ej.Widget { static fn: FileExplorer; - constructor(element: JQuery, options?: FileExplorer.Model); - constructor(element: Element, options?: FileExplorer.Model); + constructor(element: JQuery | Element, options?: FileExplorer.Model); static Locale: any; - model:FileExplorer.Model; - defaults:FileExplorer.Model; + model: FileExplorer.Model; + defaults: FileExplorer.Model; /** Refresh the size of FileExplorer control. * @returns {void} @@ -4605,7 +4631,7 @@ class FileExplorer extends ej.Widget { */ removeToolbarItem(item: string|HTMLElement): void; } -export module FileExplorer{ +export namespace FileExplorer { export interface Model { @@ -4618,12 +4644,14 @@ export interface Model { */ ajaxDataType?: string; - /** By using ajaxSettings property, you can customize the AJAX configurations. Normally you can customize the following option in AJAX handling data, URL, type, async, contentType, dataType and success. For upload, download and getImage API, you can only customize URL. + /** By using ajaxSettings property, you can customize the AJAX configurations. Normally you can customize the following option in AJAX handling data, URL, type, async, contentType, dataType and + * success. For upload, download and getImage API, you can only customize URL. * @Default {{ read: {}, createFolder: {}, remove: {}, rename: {}, paste: {}, getDetails: {}, download: {}, upload: {}, getImage: {}, search: {}}} */ ajaxSettings?: any; - /** The FileExplorer allows to move the files from one folder to another folder of FileExplorer by using drag and drop option. Also it supports to upload a file by dragging it from windows explorer to the necessary folder of ejFileExplorer. + /** The FileExplorer allows to move the files from one folder to another folder of FileExplorer by using drag and drop option. Also it supports to upload a file by dragging it + * from windows explorer to the necessary folder of ejFileExplorer. * @Default {true} */ allowDragAndDrop?: boolean; @@ -4642,7 +4670,8 @@ export interface Model { */ contextMenuSettings?: ContextMenuSettings; - /** Sets the root class for FileExplorer theme. This cssClass API allows to use custom skinning option for File Explorer control. By defining the root class by using this API, you have to include this root class in CSS. + /** Sets the root class for FileExplorer theme. This cssClass API allows to use custom skinning option for File Explorer control. + * By defining the root class by using this API, you have to include this root class in CSS. */ cssClass?: string; @@ -4729,7 +4758,7 @@ export interface Model { /** The selectedItems is used to select the specified items (file, folder) of FileExplorer control. */ - selectedItems?: string|Array; + selectedItems?: string|any[]; /** Enables or disables the checkbox option in FileExplorer control. * @Default {true} @@ -4741,7 +4770,8 @@ export interface Model { */ showContextMenu?: boolean; - /** Enables or disables the footer in FileExplorer control. The footer element displays the details of the current selected files and folders. And also the footer having the switcher to change the layout view. + /** Enables or disables the footer in FileExplorer control. The footer element displays the details of the current selected files and folders. + * And also the footer having the switcher to change the layout view. * @Default {true} */ showFooter?: boolean; @@ -4761,20 +4791,22 @@ export interface Model { */ showToolbar?: boolean; - /** Enables or disables the navigation pane in FileExplorer control. The navigation pane contains a tree view element that displays all the folders from the filesystem in a hierarchical manner. This is useful to a quick navigation of any folder in the filesystem. + /** Enables or disables the navigation pane in FileExplorer control. The navigation pane contains a tree view element that displays all the folders from the filesystem in a hierarchical manner. + * This is useful to a quick navigation of any folder in the filesystem. * @Default {true} */ showNavigationPane?: boolean; /** The tools property is used to configure and group required toolbar items in FileExplorer control. - * @Default {{ creation: [NewFolder], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, Paste], getProperties: [Details], searchBar: [Searchbar], layout: [Layout], sortBy: [SortBy]}} + * @Default {{ creation: [NewFolder], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, Paste], + * getProperties: [Details], searchBar: [Searchbar], layout: [Layout], sortBy: [SortBy]}} */ tools?: any; /** The toolsList property is used to arrange the toolbar items in the FileExplorer control. * @Default {[layout, creation, navigation, addressBar, editing, copyPaste, sortBy, getProperties, searchBar]} */ - toolsList?: Array; + toolsList?: any[]; /** Gets or sets an object that indicates whether to customize the upload behavior in the FileExplorer. */ @@ -4786,55 +4818,93 @@ export interface Model { width?: string|number; /** Fires before the AJAX request is performed. */ - beforeAjaxRequest? (e: BeforeAjaxRequestEventArgs): void; + beforeAjaxRequest?(e: BeforeAjaxRequestEventArgs): void; /** Fires before downloading the files. */ - beforeDownload? (e: BeforeDownloadEventArgs): void; + beforeDownload?(e: BeforeDownloadEventArgs): void; - /** Fires before getting a requested image from server. Also this event will be triggered when you have enabled thumbnail image compression option in FileExplorer.Using this event, you can customize the image compression size. */ - beforeGetImage? (e: BeforeGetImageEventArgs): void; + /** Fires before getting a requested image from server. Also this event will be triggered when you have enabled thumbnail image compression option in FileExplorer. + * Using this event, you can customize the image compression size. + */ + beforeGetImage?(e: BeforeGetImageEventArgs): void; /** Fires before files or folders open. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires before uploading the files. */ - beforeUpload? (e: BeforeUploadEventArgs): void; + beforeUpload?(e: BeforeUploadEventArgs): void; /** Fires when FileExplorer control was created */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when file or folder is copied successfully. */ - copy? (e: CopyEventArgs): void; + copy?(e: CopyEventArgs): void; /** Fires when new folder is created successfully in file system. */ - createFolder? (e: CreateFolderEventArgs): void; + createFolder?(e: CreateFolderEventArgs): void; /** Fires when file or folder is cut successfully. */ - cut? (e: CutEventArgs): void; + cut?(e: CutEventArgs): void; /** Fires when the FileExplorer is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when the files or directory has been started to drag over on the FileExplorer */ - dragStart? (e: DragStartEventArgs): void; + dragStart?(e: DragStartEventArgs): void; /** Fires when the files or directory is dragging over on the FileExplorer. */ - drag? (e: DragEventArgs): void; + drag?(e: DragEventArgs): void; /** Fires when the files or directory has been stopped to drag over on FileExplorer */ - dragStop? (e: DragStopEventArgs): void; + dragStop?(e: DragStopEventArgs): void; /** Fires when the files or directory is dropped to the target folder of FileExplorer */ - drop? (e: DropEventArgs): void; + drop?(e: DropEventArgs): void; /** Fires after loading the requested image from server. Using this event, you can get the details of loaded image. */ - getImage? (e: GetImageEventArgs): void; + getImage?(e: GetImageEventArgs): void; /** Fires when keydown in FileExplorer control. */ - keydown? (e: KeydownEventArgs): void; + keydown?(e: KeydownEventArgs): void; /** Fires when the file view type is changed. */ - layoutChange? (e: LayoutChangeEventArgs): void; + layoutChange?(e: LayoutChangeEventArgs): void; + + /** Fires when before the ContextMenu opening. */ + menuBeforeOpen?(e: MenuBeforeOpenEventArgs): void; + + /** Fires when click the ContextMenu item. */ + menuClick?(e: MenuClickEventArgs): void; + + /** Fires when ContextMenu is successfully opened. */ + menuOpen?(e: MenuOpenEventArgs): void; + + /** Fires when files are successfully opened. */ + open?(e: OpenEventArgs): void; + + /** Fires when a file or folder is pasted successfully. */ + paste?(e: PasteEventArgs): void; + + /** Fires when file or folder is deleted successfully. */ + remove?(e: RemoveEventArgs): void; + + /** Fires when resizing is performed for FileExplorer. */ + resize?(e: ResizeEventArgs): void; + + /** Fires when resizing is started for FileExplorer. */ + resizeStart?(e: ResizeStartEventArgs): void; + + /** Fires this event when the resizing is stopped for FileExplorer. */ + resizeStop?(e: ResizeStopEventArgs): void; + + /** Fires when the items from grid view or tile view of FileExplorer control is selected. */ + select?(e: SelectEventArgs): void; + + /** Triggered when refresh the template column elements in the grid view of FileExplorer control. */ + templateRefresh?(e: TemplateRefreshEventArgs): void; + + /** Fires when the items from grid view or tile view or large icons view of FileExplorer control is unselected. */ + unselect?(e: UnselectEventArgs): void; } export interface BeforeAjaxRequestEventArgs { @@ -4955,6 +5025,10 @@ export interface BeforeUploadEventArgs { */ selectedItems?: any; + /** returns the upload item details. + */ + uploadItemDetails?: any; + /** returns the name of the event. */ type?: string; @@ -5267,6 +5341,223 @@ export interface LayoutChangeEventArgs { */ isInteraction?: boolean; + /** returns the current view type. + */ + layoutType?: string; + + /** returns the FileExplorer model. + */ + model?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface MenuBeforeOpenEventArgs { + + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the name of ContextMenu items group. + */ + contextMenu?: string; + + /** returns the dataSource of ContextMenu. + */ + dataSource?: any[]; + + /** returns the element of ContextMenu. + */ + element?: any; + + /** returns the event of ContextMenu. + */ + events?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the target element. + */ + target?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface MenuClickEventArgs { + + /** returns the ID of clicked ContextMenu item. + */ + ID?: string; + + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the name of ContextMenu items group. + */ + contextMenu?: string; + + /** returns the element of clicked ContextMenu item. + */ + element?: any; + + /** returns the event of ContextMenu. + */ + event?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the parent element ID of clicked ContextMenu item. + */ + parentId?: string; + + /** returns the parent element text of clicked ContextMenu item. + */ + parentText?: string; + + /** returns the text of clicked ContextMenu item. + */ + text?: string; + + /** returns the name of the event. + */ + type?: string; +} + +export interface MenuOpenEventArgs { + + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the name of ContextMenu items group. + */ + contextMenu?: string; + + /** returns the element of ContextMenu. + */ + element?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the target element. + */ + target?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface OpenEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the opened item type. + */ + itemType?: string; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the path of currently opened item. + */ + path?: string; + + /** returns the selected item details. + */ + selectedItems?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface PasteEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the name of moved/copied file or folder. + */ + name?: string[]; + + /** returns the selected item details. + */ + selectedItems?: any; + + /** returns the target folder item details. + */ + targetFolder?: any; + + /** returns the target path. + */ + targetPath?: string; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RemoveEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the AJAX response data. + */ + data?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the names of deleted items. + */ + name?: string; + + /** returns the path of deleted item. + */ + path?: string; + + /** returns the removed item details. + */ + selectedItems?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the mouse move event args. + */ + event?: any; + /** returns the FileExplorer model. */ model?: ej.FileExplorer.Model; @@ -5276,17 +5567,149 @@ export interface LayoutChangeEventArgs { type?: string; } +export interface ResizeStartEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the mouse down event args. + */ + event?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface ResizeStopEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the mouse leave event args. + */ + event?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface SelectEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the name of selected items. + */ + name?: string[]; + + /** returns the path of selected items. + */ + path?: string; + + /** returns the selected item details + */ + selectedItems?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface TemplateRefreshEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** Returns the cell object. + */ + cell?: ej.FileExplorer.Model; + + /** Returns the column object. + */ + column?: any; + + /** Returns the current row data. + */ + data?: any; + + /** Returns the grid model of FileExplorer. + */ + model?: any; + + /** Returns the current row index. + */ + rowIndex?: number; + + /** returns the name of the event. + */ + type?: string; +} + +export interface UnselectEventArgs { + + /** Returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** Returns the name of unselected item. + */ + name?: string; + + /** Returns the name of unselected items. + */ + names?: string[]; + + /** Returns the type of unselected item. + */ + nodeType?: string; + + /** Returns the path of unselected item. + */ + path?: string; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the unselected item details. + */ + unselectedItem?: any; + + /** Returns the unselected items details. + */ + unselectedItems?: any[]; +} + export interface ContextMenuSettings { /** The items property is used to configure and group the required ContextMenu items in FileExplorer control. - * @Default {{% highlight javascript %}{navbar: [NewFolder, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, Getinfo],cwd: [Refresh, Paste,|, SortBy, |, NewFolder, Upload, |, Getinfo],files: [Open, Download, |, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, OpenFolderLocation, Getinfo]}{% endhighlight %}} + * @Default {{% highlight javascript %}{navbar: [NewFolder, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, Getinfo],cwd: [Refresh, Paste,|, SortBy, |, NewFolder, Upload, |, + * Getinfo],files: [Open, Download, |, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, OpenFolderLocation, Getinfo]}{% endhighlight %}} */ items?: any; /** The customMenuFields property is used to define custom functionality for custom ContextMenu item's which are defined in items property. * @Default {[]} */ - customMenuFields?: Array; + customMenuFields?: any[]; } export interface FilterSettings { @@ -5320,9 +5743,10 @@ export interface GridSettings { allowSorting?: boolean; /** Gets or sets an object that indicates to render the grid with specified columns. You can use this property same as the column property in Grid control. - * @Default {[{ field: name, headerText: Name, width: 30% }, { field: dateModified, headerText: Date Modified, width: 30% }, { field: type, headerText: Type, width: 15% }, { field: size, headerText: Size, width: 12%, textAlign: right, headerTextAlign: left }]} + * @Default {[{ field: name, headerText: Name, width: 30% }, { field: dateModified, headerText: Date Modified, width: 30% }, { field: type, headerText: Type, width: 15% }, + * { field: size, headerText: Size, width: 12%, textAlign: right, headerTextAlign: left }]} */ - columns?: Array; + columns?: any[]; } export interface UploadSettings { @@ -5343,7 +5767,7 @@ export interface UploadSettings { autoUpload?: boolean; } -enum layoutType{ +enum layoutType { ///Supports to display files in tile view Tile, @@ -5359,11 +5783,10 @@ enum layoutType{ class DatePicker extends ej.Widget { static fn: DatePicker; - constructor(element: JQuery, options?: DatePicker.Model); - constructor(element: Element, options?: DatePicker.Model); + constructor(element: JQuery | Element, options?: DatePicker.Model); static Locale: any; - model:DatePicker.Model; - defaults:DatePicker.Model; + model: DatePicker.Model; + defaults: DatePicker.Model; /** Disables the DatePicker control. * @returns {void} @@ -5390,7 +5813,7 @@ class DatePicker extends ej.Widget { */ show(): void; } -export module DatePicker{ +export namespace DatePicker { export interface Model { @@ -5428,7 +5851,8 @@ export interface Model { */ dayHeaderFormat?: string | ej.DatePicker.Header; - /** Specifies the navigation depth level in DatePicker calendar. This option is not applied when start level view option is lower than depth level view. See below to know available levels in DatePicker Calendar + /** Specifies the navigation depth level in DatePicker calendar. This option is not applied when start level view option is lower than depth level view. + * See below to know available levels in DatePicker Calendar */ depthLevel?: string | ej.DatePicker.Level; @@ -5457,7 +5881,8 @@ export interface Model { */ enableRTL?: boolean; - /** Allows to enter valid or invalid date in input textbox and indicate as error if it is invalid value, when this API value is set to true. For false value, invalid date is not allowed to input field and corrected to valid date automatically, even if invalid date is given. + /** Allows to enter valid or invalid date in input textbox and indicate as error if it is invalid value, when this API value is set to true. For false value, invalid date is not allowed + * to input field and corrected to valid date automatically, even if invalid date is given. * @Default {false} */ enableStrictMode?: boolean; @@ -5593,40 +6018,40 @@ export interface Model { width?: string; /** Fires before closing the DatePicker popup. */ - beforeClose? (e: BeforeCloseEventArgs): void; + beforeClose?(e: BeforeCloseEventArgs): void; /** Fires when each date is created in the DatePicker popup calendar. */ - beforeDateCreate? (e: BeforeDateCreateEventArgs): void; + beforeDateCreate?(e: BeforeDateCreateEventArgs): void; /** Fires before opening the DatePicker popup. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires when the DatePicker input value is changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when DatePicker popup is closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires when the DatePicker is created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the DatePicker is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when DatePicker input gets focus. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Fires when DatePicker input loses the focus. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Fires when calender view navigates to month/year/decade/century. */ - navigate? (e: NavigateEventArgs): void; + navigate?(e: NavigateEventArgs): void; /** Fires when DatePicker popup is opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Fires when a date is selected from the DatePicker popup. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface BeforeCloseEventArgs { @@ -5932,7 +6357,7 @@ export interface Fields { cssClass?: string; } -enum Header{ +enum Header { ///Removes day header in DatePicker None, @@ -5945,7 +6370,7 @@ enum Header{ } -enum Level{ +enum Level { ///allow navigation upto year level in DatePicker Year, @@ -5958,7 +6383,7 @@ enum Level{ } -enum HighlightSection{ +enum HighlightSection { ///Highlight the week of the currently selected date in DatePicker popup calendar Week, @@ -5974,11 +6399,10 @@ enum HighlightSection{ class DateTimePicker extends ej.Widget { static fn: DateTimePicker; - constructor(element: JQuery, options?: DateTimePicker.Model); - constructor(element: Element, options?: DateTimePicker.Model); + constructor(element: JQuery | Element, options?: DateTimePicker.Model); static Locale: any; - model:DateTimePicker.Model; - defaults:DateTimePicker.Model; + model: DateTimePicker.Model; + defaults: DateTimePicker.Model; /** Disables the DateTimePicker control. * @returns {void} @@ -6010,10 +6434,15 @@ class DateTimePicker extends ej.Widget { */ show(): void; } -export module DateTimePicker{ +export namespace DateTimePicker { export interface Model { + /** Used to allow or restrict the editing in DateTimePicker input field directly. By setting false to this API, You can only pick the date and time values from DateTimePicker popup. + * @Default {true} + */ + allowEdit?: boolean; + /** Displays the custom text for the buttons inside the DateTimePicker popup. when the culture value changed, we can change the buttons text based on the culture. * @Default {{ today: Today, timeNow: Time Now, done: Done, timeTitle: Time }} */ @@ -6033,7 +6462,8 @@ export interface Model { */ dayHeaderFormat?: ej.DatePicker.Header|string; - /** Specifies the navigation depth level in DatePicker calendar inside DateTimePicker popup. This option is not applied when start level view option is lower than depth level view. See ej.DatePicker.Level + /** Specifies the navigation depth level in DatePicker calendar inside DateTimePicker popup. This option is not applied + * when start level view option is lower than depth level view. See ej.DatePicker.Level */ depthLevel?: ej.DatePicker.Level|string; @@ -6102,7 +6532,7 @@ export interface Model { */ popupPosition?: string | ej.popupPosition; - /** Indicates that the DateTimePicker value can only be read and can’t change. + /** Indicates that the DateTimePicker value can only be read and can’t change. * @Default {false} */ readOnly?: boolean; @@ -6177,31 +6607,31 @@ export interface Model { width?: string|number; /** Fires before the datetime popup closed in the DateTimePicker. */ - beforeClose? (e: BeforeCloseEventArgs): void; + beforeClose?(e: BeforeCloseEventArgs): void; /** Fires before the datetime popup open in the DateTimePicker. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires when the datetime value changed in the DateTimePicker textbox. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when DateTimePicker popup closes. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires after DateTimePicker control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the DateTimePicker is destroyed successfully */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when the focus-in happens in the DateTimePicker textbox. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Fires when the focus-out happens in the DateTimePicker textbox. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Fires when DateTimePicker popup opens. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; } export interface BeforeCloseEventArgs { @@ -6433,8 +6863,7 @@ export interface TimeDrillDown { autoClose?: boolean; } } -enum popupPosition -{ +enum popupPosition { //Opens the DateTimePicker popup below to the DateTimePicker input box Bottom, //Opens the DateTimePicker popup above to the DateTimePicker input box @@ -6443,18 +6872,17 @@ Top, class DateRangePicker extends ej.Widget { static fn: DateRangePicker; - constructor(element: JQuery, options?: DateRangePicker.Model); - constructor(element: Element, options?: DateRangePicker.Model); + constructor(element: JQuery | Element, options?: DateRangePicker.Model); static Locale: any; - model:DateRangePicker.Model; - defaults:DateRangePicker.Model; + model: DateRangePicker.Model; + defaults: DateRangePicker.Model; /** Add the preset ranges to DateRangePicker popup. * @param {string} Display name * @param {Array} StartDate and endDate of range. * @returns {void} */ - addRanges(label: string, range: Array): void; + addRanges(label: string, range: any[]): void; /** Clears the all ranges selections in DateRangePicker popup * @returns {void} @@ -6491,7 +6919,7 @@ class DateRangePicker extends ej.Widget { */ setRange(): void; } -export module DateRangePicker{ +export namespace DateRangePicker { export interface Model { @@ -6514,7 +6942,7 @@ export interface Model { */ dateFormat?: string; - /** Allows to embed the Timepicker aling with the calendars in the page, two timepicker will be render, for selecting start and end date. + /** Allows to embed the Timepicker align with the calendars in the page, two timepicker will be render, for selecting start and end date. * @Default {false} */ enableTimePicker?: boolean; @@ -6585,28 +7013,28 @@ export interface Model { width?: string|number; /** Fires before closing the DateRangePicker popup. */ - beforeClose? (e: BeforeCloseEventArgs): void; + beforeClose?(e: BeforeCloseEventArgs): void; /** Fires before opening the DateRangePicker popup. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires when the DateRangePicker values get changed. */ - onChange? (e: OnChangeEventArgs): void; + onChange?(e: OnChangeEventArgs): void; /** Fires when DateRangePicker popup is closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires when the DateRangePicker is created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the DateRangePicker is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when DateRangePicker popup is opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Fires when a date ranges is selected from the DateRangePicker popup. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface BeforeCloseEventArgs { @@ -6784,11 +7212,10 @@ export interface SelectEventArgs { class Dialog extends ej.Widget { static fn: Dialog; - constructor(element: JQuery, options?: Dialog.Model); - constructor(element: Element, options?: Dialog.Model); + constructor(element: JQuery | Element, options?: Dialog.Model); static Locale: any; - model:Dialog.Model; - defaults:Dialog.Model; + model: Dialog.Model; + defaults: Dialog.Model; /** Closes the dialog widget dynamically. * @returns {any} @@ -6867,7 +7294,7 @@ class Dialog extends ej.Widget { */ focus(): any; } -export module Dialog{ +export namespace Dialog { export interface Model { @@ -6888,7 +7315,8 @@ export interface Model { */ allowKeyboardNavigation?: boolean; - /** Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. In order to customize animation effects, you need to set “enableAnimation” as true. It contains the following sub properties. + /** Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. + * In order to customize animation effects, you need to set “enableAnimation” as true. It contains the following sub properties. */ animation?: any; @@ -6900,11 +7328,12 @@ export interface Model { */ containment?: string; - /** The content type to load the dialog content at run time. The possible values are null, AJAX, iframe and image. When it is null (default value), the content inside dialog element will be displayed as content and when it is not null, the content will be loaded from the URL specified in the contentUrl property. + /** The content type to load the dialog content at run time. The possible values are null, AJAX, iframe and image. When it is null (default value), + * the content inside dialog element will be displayed as content and when it is not null, the content will be loaded from the URL specified in the contentUrl property. */ contentType?: string; - /** The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’. + /** The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’. */ contentUrl?: string; @@ -6936,11 +7365,12 @@ export interface Model { */ enableRTL?: boolean; - /** The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true since the favicon will be displayed in the dialog header. + /** The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set� showHeader� as true since the favicon will be displayed in the dialog header. */ faviconCSS?: string; - /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. + /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type + * and “100”, “500” as integer type. */ height?: string|number; @@ -6953,7 +7383,7 @@ export interface Model { */ isResponsive?: boolean; - /** Default Value:{:.param}“en-US” + /** Default Value:{:.param}“en-US” */ locale?: number; @@ -7001,7 +7431,8 @@ export interface Model { */ tooltip?: any; - /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. + /** Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, + * “100px” as string type and “100”, “500” as integer type. */ width?: string|number; @@ -7018,58 +7449,58 @@ export interface Model { footerTemplateId?: string; /** This event is triggered before the dialog widgets gets open. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** This event is triggered whenever the AJAX request fails to retrieve the dialog content. */ - ajaxError? (e: AjaxErrorEventArgs): void; + ajaxError?(e: AjaxErrorEventArgs): void; /** This event is triggered whenever the AJAX request to retrieve the dialog content, gets succeed. */ - ajaxSuccess? (e: AjaxSuccessEventArgs): void; + ajaxSuccess?(e: AjaxSuccessEventArgs): void; /** This event is triggered before the dialog widgets get closed. */ - beforeClose? (e: BeforeCloseEventArgs): void; + beforeClose?(e: BeforeCloseEventArgs): void; /** This event is triggered after the dialog widget is closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Triggered after the dialog content is loaded in DOM. */ - contentLoad? (e: ContentLoadEventArgs): void; + contentLoad?(e: ContentLoadEventArgs): void; /** Triggered after the dialog is created successfully */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered after the dialog widget is destroyed successfully */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered while the dialog is dragged. */ - drag? (e: DragEventArgs): void; + drag?(e: DragEventArgs): void; /** Triggered when the user starts dragging the dialog. */ - dragStart? (e: DragStartEventArgs): void; + dragStart?(e: DragStartEventArgs): void; /** Triggered when the user stops dragging the dialog. */ - dragStop? (e: DragStopEventArgs): void; + dragStop?(e: DragStopEventArgs): void; /** Triggered after the dialog is opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Triggered while the dialog is resized. */ - resize? (e: ResizeEventArgs): void; + resize?(e: ResizeEventArgs): void; /** Triggered when the user starts resizing the dialog. */ - resizeStart? (e: ResizeStartEventArgs): void; + resizeStart?(e: ResizeStartEventArgs): void; /** Triggered when the user stops resizing the dialog. */ - resizeStop? (e: ResizeStopEventArgs): void; + resizeStop?(e: ResizeStopEventArgs): void; /** Triggered when the dialog content is expanded. */ - expand? (e: ExpandEventArgs): void; + expand?(e: ExpandEventArgs): void; /** Triggered when the dialog content is collapsed. */ - collapse? (e: CollapseEventArgs): void; + collapse?(e: CollapseEventArgs): void; /** Triggered when the custom action button clicked. */ - actionButtonClick? (e: ActionButtonClickEventArgs): void; + actionButtonClick?(e: ActionButtonClickEventArgs): void; } export interface BeforeOpenEventArgs { @@ -7442,163 +7873,18 @@ export interface AjaxSettings { } } -class DocumentEditor extends ej.Widget { - static fn: DocumentEditor; - constructor(element: JQuery, options?: DocumentEditor.Model); - constructor(element: Element, options?: DocumentEditor.Model); - static Locale: any; - model:DocumentEditor.Model; - defaults:DocumentEditor.Model; - - /** Loads the document from specified path using web API provided by importUrl. - * @param {string} Specifies the file path. - * @returns {void} - */ - load(path: string): void; - - /** Gets the page number of current selection in the document. - * @returns {number} - */ - getCurrentPageNumber(): number; - - /** Gets the total number of pages in the document. - * @returns {number} - */ - getPageCount(): number; - - /** Gets the text of current selection in the document. - * @returns {string} - */ - getSelectedText(): string; - - /** Gets the current zoom factor value of the document editor. - * @returns {number} - */ - getZoomFactor(): number; - - /** Scales the document editor with the specified zoom factor. The range of zoom factor should be 0.10 to 5.00 (10 - 500 %). - * @param {number} Specifies the factor for zooming. - * @returns {void} - */ - setZoomFactor(factor: number): void; - - /** Prints the document content as page by page. - * @returns {void} - */ - print(): void; - - /** Finds the first occurrence of specified text from current selection and highlights the result. If the document end is reached, find operation will occur from the document start position. - * @param {string} Specifies the text to search in a document. - * @returns {void} - */ - find(text: string): void; -} -export module DocumentEditor{ - -export interface Model { - - /** Gets or sets an object that indicates initialization of importing and exporting documents in document editor. - */ - importExportSettings?: ImportExportSettings; - - /** Triggers when the document changes. */ - onDocumentChange? (e: OnDocumentChangeEventArgs): void; - - /** Triggers when the selection changes. */ - onSelectionChange? (e: OnSelectionChangeEventArgs): void; - - /** Triggers when the zoom factor changes. */ - onZoomFactorChange? (e: OnZoomFactorChangeEventArgs): void; - - /** Triggers when the hyperlink is clicked. */ - onRequestNavigate? (e: OnRequestNavigateEventArgs): void; -} - -export interface OnDocumentChangeEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; -} - -export interface OnSelectionChangeEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; -} - -export interface OnZoomFactorChangeEventArgs { - - /** True, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the name of the event. - */ - type?: string; -} - -export interface OnRequestNavigateEventArgs { - - /** true, if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - - /** Returns the document editor model. - */ - model?: any; - - /** Returns the link type and navigation link. - */ - hyperlink?: any; - - /** Returns the name of the event. - */ - type?: string; -} - -export interface ImportExportSettings { - - /** Gets or sets URL of Web API that should be used to parse the document while loading. - */ - importUrl?: string; -} -} - class DropDownList extends ej.Widget { static fn: DropDownList; - constructor(element: JQuery, options?: DropDownList.Model); - constructor(element: Element, options?: DropDownList.Model); + constructor(element: JQuery | Element, options?: DropDownList.Model); static Locale: any; - model:DropDownList.Model; - defaults:DropDownList.Model; + model: DropDownList.Model; + defaults: DropDownList.Model; /** Adding a single item or an array of items into the DropDownList allows you to specify all the field attributes such as value, template, image URL, and HTML attributes for those items. * @param {any|Array} this parameter should have field attributes with respect to mapped field attributes and it's corresponding values to fields * @returns {void} */ - addItem(data: any|Array): void; + addItem(data: any|any[]): void; /** This method is used to select all the items in the DropDownList. * @returns {void} @@ -7624,7 +7910,7 @@ class DropDownList extends ej.Widget { * @param {string|number|Array} disable the given index list items * @returns {void} */ - disableItemsByIndices(index: string|number|Array): void; + disableItemsByIndices(index: string|number|any[]): void; /** This property enables the DropDownList control. * @returns {void} @@ -7635,13 +7921,13 @@ class DropDownList extends ej.Widget { * @param {string|number|Array} enable the given index list items if it's disabled * @returns {void} */ - enableItemsByIndices(index: string|number|Array): void; + enableItemsByIndices(index: string|number|any[]): void; /** This method retrieves the items using given value. * @param {string|number|any} Return the whole object of data based on given value * @returns {Array} */ - getItemDataByValue(value: string|number|any): Array; + getItemDataByValue(value: string|number|any): any[]; /** This method is used to retrieve the items that are bound with the DropDownList. * @returns {any} @@ -7651,7 +7937,7 @@ class DropDownList extends ej.Widget { /** This method is used to get the selected items in the DropDownList. * @returns {Array} */ - getSelectedItem(): Array; + getSelectedItem(): any[]; /** This method is used to retrieve the items value that are selected in the DropDownList. * @returns {string} @@ -7667,19 +7953,19 @@ class DropDownList extends ej.Widget { * @param {string|number|Array} select the given index list items * @returns {void} */ - selectItemsByIndices(index: string|number|Array): void; + selectItemsByIndices(index: string|number|any[]): void; /** This method is used to select an item in the DropDownList by using the given text value. * @param {string|number|Array} select the list items relates to given text * @returns {void} */ - selectItemByText(index: string|number|Array): void; + selectItemByText(index: string|number|any[]): void; /** This method is used to select an item in the DropDownList by using the given value. * @param {string|number|Array} select the list items relates to given values * @returns {void} */ - selectItemByValue(index: string|number|Array): void; + selectItemByValue(index: string|number|any[]): void; /** This method shows the DropDownList control with the suggestion popup. * @returns {void} @@ -7695,30 +7981,31 @@ class DropDownList extends ej.Widget { * @param {string|number|Array} unselect the given index list items * @returns {void} */ - unselectItemsByIndices(index: string|number|Array): void; + unselectItemsByIndices(index: string|number|any[]): void; /** This method is used to unselect an item in the DropDownList by using the given text value. * @param {string|number|Array} unselect the list items relates to given text * @returns {void} */ - unselectItemByText(index: string|number|Array): void; + unselectItemByText(index: string|number|any[]): void; /** This method is used to unselect an item in the DropDownList by using the given value. * @param {string|number|Array} unselect the list items relates to given values * @returns {void} */ - unselectItemByValue(index: string|number|Array): void; + unselectItemByValue(index: string|number|any[]): void; } -export module DropDownList{ +export namespace DropDownList { export interface Model { - /** The Virtual Scrolling(lazy loading) feature is used to display a large amount of data that you require without buffering the entire load of a huge database records in the DropDownList, that is, when scrolling, an AJAX request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. + /** The Virtual Scrolling(lazy loading) feature is used to display a large amount of data that you require without buffering the entire load of a huge database records in the DropDownList, + * that is, when scrolling, an AJAX request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. * @Default {false} */ allowVirtualScrolling?: boolean; - /** The cascading DropDownLists is a series of two or more DropDownLists in which each DropDownList is filtered according to the previous DropDownList’s value. + /** The cascading DropDownLists is a series of two or more DropDownLists in which each DropDownList is filtered according to the previous DropDownList’s value. * @Default {null} */ cascadeTo?: string; @@ -7728,16 +8015,19 @@ export interface Model { */ caseSensitiveSearch?: boolean; - /** Dropdown widget's style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass property. You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied. + /** Dropdown widget's style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass property. + * You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied. */ cssClass?: string; - /** This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the instance of the ej.DataManager. + /** This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, + * the dataSource property is assigned with the instance of the ej.DataManager. * @Default {null} */ dataSource?: any; - /** Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled with the dropdown. When you enter the delimiter value, the texts after the delimiter are considered as a separate word or query. The delimiter string is a single character and must be a symbol. Mostly, the delimiter symbol is used as comma (,) or semi-colon (;) or any other special character. + /** Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled with the dropdown. When you enter the delimiter value,the texts after the delimiter are considered + * as a separate word or query. The delimiter string is a single character and must be a symbol. Mostly, the delimiter symbol is used as comma (,) or semi-colon (;) or any other special character. * @Default {','} */ delimiterChar?: string; @@ -7747,7 +8037,8 @@ export interface Model { */ enableAnimation?: boolean; - /** This property is used to indicate whether the DropDownList control responds to the user interaction or not. By default, the control is in the enabled mode and you can disable it by setting it to false. + /** This property is used to indicate whether the DropDownList control responds to the user interaction or not. By default, the control is in the enabled mode + * and you can disable it by setting it to false. * @Default {true} */ enabled?: boolean; @@ -7762,7 +8053,8 @@ export interface Model { */ enableFilterSearch?: boolean; - /** Saves the current model value to the browser cookies for state maintenance. While refreshing the DropDownList control page, it retains the model value and it is applied from the browser cookies. + /** Saves the current model value to the browser cookies for state maintenance. While refreshing the DropDownList control page, it retains the model value and + * it is applied from the browser cookies. * @Default {false} */ enablePersistence?: boolean; @@ -7837,7 +8129,9 @@ export interface Model { */ minPopupWidth?: string|number; - /** With the help of this property, you can make a single or multi selection with the DropDownList and display the text in two modes, delimiter and visual mode. In delimiter mode, you can separate the items by using the delimiter character such as comma (,) or semi-colon (;) or any other special character. In the visual mode, the items are showcased like boxes with close icon in the textbox. + /** With the help of this property, you can make a single or multi selection with the DropDownList and display the text in two modes, delimiter and visual mode. + * In delimiter mode, you can separate the items by using the delimiter character such as comma (,) or semi-colon (;) or any other special character. + * In the visual mode, the items are showcased like boxes with close icon in the textbox. * @Default {ej.MultiSelectMode.None} */ multiSelectMode?: ej.MultiSelectMode|string; @@ -7870,7 +8164,7 @@ export interface Model { /** Specifies the selectedItems for the DropDownList. * @Default {[]} */ - selectedIndices?: Array; + selectedIndices?: any[]; /** Selects multiple items in the DropDownList with the help of the checkbox control. To achieve this, enable the showCheckbox option to true. * @Default {false} @@ -7892,7 +8186,7 @@ export interface Model { */ sortOrder?: ej.SortOrder|string; - /** Specifies the targetID for the DropDownList’s items. + /** Specifies the targetID for the DropDownList’s items. * @Default {null} */ targetID?: string; @@ -7932,73 +8226,75 @@ export interface Model { */ width?: string|number; - /** The Virtual Scrolling feature is used to display a large amount of records in the DropDownList, that is, when scrolling, an AJAX request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. You can set the itemsCount property that represents the number of items to be fetched from the server on every AJAX request. + /** The Virtual Scrolling feature is used to display a large amount of records in the DropDownList, that is, when scrolling, an AJAX request is sent to fetch some amount of data from + * the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. + * You can set the itemsCount property that represents the number of items to be fetched from the server on every AJAX request. * @Default {normal} */ virtualScrollMode?: ej.VirtualScrollMode|string; /** Fires the action before the XHR request. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Fires the action when the list of items is bound to the DropDownList by xhr post calling */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Fires the action when the xhr post calling failed on remote data binding with the DropDownList control. */ - actionFailure? (e: ActionFailureEventArgs): void; + actionFailure?(e: ActionFailureEventArgs): void; /** Fires the action when the xhr post calling succeed on remote data binding with the DropDownList control */ - actionSuccess? (e: ActionSuccessEventArgs): void; + actionSuccess?(e: ActionSuccessEventArgs): void; /** Fires the action before the popup is ready to hide. */ - beforePopupHide? (e: BeforePopupHideEventArgs): void; + beforePopupHide?(e: BeforePopupHideEventArgs): void; /** Fires the action before the popup is ready to be displayed. */ - beforePopupShown? (e: BeforePopupShownEventArgs): void; + beforePopupShown?(e: BeforePopupShownEventArgs): void; /** Fires when the cascading happens between two DropDownList exactly after the value changes in the first dropdown and before filtering in the second Dropdown. */ - cascade? (e: CascadeEventArgs): void; + cascade?(e: CascadeEventArgs): void; - /** Fires the action when the DropDownList control’s value is changed. */ - change? (e: ChangeEventArgs): void; + /** Fires the action when the DropDownList control’s value is changed. */ + change?(e: ChangeEventArgs): void; /** Fires the action when the list item checkbox value is changed. */ - checkChange? (e: CheckChangeEventArgs): void; + checkChange?(e: CheckChangeEventArgs): void; /** Fires the action once the DropDownList is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires the action when the list items is bound to the DropDownList. */ - dataBound? (e: DataBoundEventArgs): void; + dataBound?(e: DataBoundEventArgs): void; /** Fires the action when the DropDownList is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires the action when the DropDownList is focused. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Fires the action when the DropDownList is about to lose focus. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Fires the action, once the popup is closed */ - popupHide? (e: PopupHideEventArgs): void; + popupHide?(e: PopupHideEventArgs): void; /** Fires the action, when the popup is resized. */ - popupResize? (e: PopupResizeEventArgs): void; + popupResize?(e: PopupResizeEventArgs): void; /** Fires the action, once the popup is opened. */ - popupShown? (e: PopupShownEventArgs): void; + popupShown?(e: PopupShownEventArgs): void; /** Fires the action, when resizing a popup starts. */ - popupResizeStart? (e: PopupResizeStartEventArgs): void; + popupResizeStart?(e: PopupResizeStartEventArgs): void; /** Fires the action, when the popup resizing is stopped. */ - popupResizeStop? (e: PopupResizeStopEventArgs): void; + popupResizeStop?(e: PopupResizeStopEventArgs): void; /** Fires the action before filtering the list items that starts in the DropDownList when the enableFilterSearch is enabled. */ - search? (e: SearchEventArgs): void; + search?(e: SearchEventArgs): void; /** Fires the action, when the list of item is selected. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface ActionBeginEventArgs { @@ -8044,7 +8340,7 @@ export interface ActionCompleteEventArgs { /** Returns the number of items fetched from remote data */ - result?: Array; + result?: any[]; /** Returns the requested data */ @@ -8102,7 +8398,7 @@ export interface ActionSuccessEventArgs { /** Returns the number of items fetched from remote data */ - result?: Array; + result?: any[]; /** Returns the requested data */ @@ -8539,15 +8835,13 @@ export interface Fields { value?: string; } } -enum FilterType -{ +enum FilterType { //filter the data wherever contains search key Contains, //filter the data based on search key present at start position StartsWith, } -enum MultiSelectMode -{ +enum MultiSelectMode { // can select only single item in DropDownList None, //can select multiple items and it's separated by delimiterChar @@ -8555,8 +8849,7 @@ Delimiter, // can select multiple items and it's show's like visual box in textbox VisualMode, } -enum VirtualScrollMode -{ +enum VirtualScrollMode { // The data is loaded only to the corresponding page (display items). When scrolling some other position, it enables the load on demand with the DropDownList. Normal, //The data items are loaded from the remote when scroll handle reaches the end of the scrollbar like infinity scrolling. @@ -8565,11 +8858,10 @@ Continuous, class Tooltip extends ej.Widget { static fn: Tooltip; - constructor(element: JQuery, options?: Tooltip.Model); - constructor(element: Element, options?: Tooltip.Model); + constructor(element: JQuery | Element, options?: Tooltip.Model); static Locale: any; - model:Tooltip.Model; - defaults:Tooltip.Model; + model: Tooltip.Model; + defaults: Tooltip.Model; /** Destroys the Tooltip control. * @returns {void} @@ -8591,7 +8883,7 @@ class Tooltip extends ej.Widget { * @param {Function} optional custom effect takes place when hiding the tooltip. * @returns {void} */ - hide(effect?: string, func?: Function): void; + hide(effect?: string, func?: any): void; /** Shows the Tooltip popup for the given target element with the specified effect. * @param {string} optional Determines the type of effect that takes place when showing the tooltip. @@ -8599,9 +8891,9 @@ class Tooltip extends ej.Widget { * @param {JQuery} optional Tooltip will be shown for the given element * @returns {void} */ - show(effect?: string, func?: Function, target?: JQuery): void; + show(effect?: string, func?: any, target?: JQuery): void; } -export module Tooltip{ +export namespace Tooltip { export interface Model { @@ -8704,31 +8996,31 @@ export interface Model { width?: string|number; /** This event is triggered before the Tooltip widget get closed. */ - beforeClose? (e: BeforeCloseEventArgs): void; + beforeClose?(e: BeforeCloseEventArgs): void; /** This event is triggered before the Tooltip widget gets open. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires on clicking to the target element. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** This event is triggered after the Tooltip widget is closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** This event is triggered after the Tooltip is created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** This event is triggered after the Tooltip widget is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** This event is triggered while hovering the target element, when tooltip positioning relates to target element. */ - hover? (e: HoverEventArgs): void; + hover?(e: HoverEventArgs): void; /** This event is triggered after the Tooltip is opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** This event is triggered while hover the target element, when the tooltip positioning is relates to the mouse. */ - tracking? (e: TrackingEventArgs): void; + tracking?(e: TrackingEventArgs): void; } export interface BeforeCloseEventArgs { @@ -8944,7 +9236,7 @@ export interface Position { stem?: PositionStem; } -enum effect{ +enum effect { ///No animation takes place when showing/hiding the Tooltip None, @@ -8957,7 +9249,7 @@ enum effect{ } -enum Associate{ +enum Associate { ///Sets the position related to target element. Target, @@ -8976,7 +9268,7 @@ enum Associate{ } -enum CloseMode{ +enum CloseMode { ///Enables close button in Tooltip. Sticky, @@ -8989,7 +9281,7 @@ enum CloseMode{ } -enum Collision{ +enum Collision { ///Flips the Tooltip to the opposite side of the target, if collision is occurs. Flip, @@ -9005,7 +9297,7 @@ enum Collision{ } -enum Trigger{ +enum Trigger { ///The Tooltip to be shown when the target element is clicked. Click, @@ -9021,11 +9313,10 @@ enum Trigger{ class Editor extends ej.Widget { static fn: Editor; - constructor(element: JQuery, options?: Editor.Model); - constructor(element: Element, options?: Editor.Model); + constructor(element: JQuery | Element, options?: Editor.Model); static Locale: any; - model:Editor.Model; - defaults:Editor.Model; + model: Editor.Model; + defaults: Editor.Model; /** destroy the editor widgets all events are unbind automatically and bring the control to pre-init state. * @returns {void} @@ -9048,18 +9339,23 @@ class Editor extends ej.Widget { getValue(): number; } - class NumericTextbox extends Editor{ + class NumericTextbox extends Editor { } - class CurrencyTextbox extends Editor{ + class CurrencyTextbox extends Editor { } - class PercentageTextbox extends Editor{ + class PercentageTextbox extends Editor { } -export module Editor{ +export namespace Editor { export interface Model { + /** Specifies the currency symbol of currency textbox, used when the user wants to overwrite the currency symbol commonly instead of the current culture symbol. + * @Default {Based on the culture} + */ + currencySymbol?: string; + /** Sets the root CSS class for Editors which allow us to customize the appearance. */ cssClass?: string; @@ -9134,12 +9430,14 @@ export interface Model { */ name?: string; - /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the negative pattern. you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. + /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the negative pattern. + * you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. * @Default {Based on the culture} */ negativePattern?: string; - /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the positive pattern. you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. + /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the positive pattern. + * you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. * @Default {Based on the culture} */ positivePattern?: string; @@ -9190,19 +9488,19 @@ export interface Model { width?: string; /** Fires after Editor control value is changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires after Editor control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the Editor is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires after Editor control is focused. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Fires after Editor control is loss the focus. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; } export interface ChangeEventArgs { @@ -9299,11 +9597,10 @@ export interface FocusOutEventArgs { class ListView extends ej.Widget { static fn: ListView; - constructor(element: JQuery, options?: ListView.Model); - constructor(element: Element, options?: ListView.Model); + constructor(element: JQuery | Element, options?: ListView.Model); static Locale: any; - model:ListView.Model; - defaults:ListView.Model; + model: ListView.Model; + defaults: ListView.Model; /** To add item in the given index. If you have enabled grouping in ListView then you need to pass the corresponding group list title to add item in it. * @param {any} Specifies the item to be added in ListView @@ -9360,12 +9657,12 @@ class ListView extends ej.Widget { /** To get all the checked items. * @returns {Array} */ - getCheckedItems(): Array; + getCheckedItems(): any[]; /** To get the text of all the checked items. * @returns {Array} */ - getCheckedItemsText(): Array; + getCheckedItemsText(): any[]; /** To get the total item count. * @returns {number} @@ -9452,7 +9749,7 @@ class ListView extends ej.Widget { */ unCheckItem(index: number): void; } -export module ListView{ +export namespace ListView { export interface Model { @@ -9461,19 +9758,20 @@ export interface Model { */ ajaxSettings?: AjaxSettings; - /** Set the index values to be selected on intial loading. This works only when enableCheckMark is set true. + /** Set the index values to be selected on initial loading. This works only when enableCheckMark is set true. * @Default {[]} */ - checkedIndices?: Array; + checkedIndices?: any[]; - /** Sets the root class for ListView theme. This cssClass API helps to use custom skinning option for ListView control. By defining the root class using this API, we need to include this root class in CSS. + /** Sets the root class for ListView theme. This cssClass API helps to use custom skinning option for ListView control. By defining the root class using this API, + * we need to include this root class in CSS. */ cssClass?: string; /** Contains the list of data for generating the ListView items. * @Default {[]} */ - dataSource?: Array; + dataSource?: any[]; /** Specifies whether to load AJAX content while selecting item. * @Default {false} @@ -9512,7 +9810,7 @@ export interface Model { /** Contains the array of items to be added in ListView. * @Default {[]} */ - items?: Array; + items?: any[]; /** Specifies the text of the back button in the header. * @Default {null} @@ -9579,28 +9877,28 @@ export interface Model { width?: string|number; /** Event triggers before the AJAX request happens. */ - ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; /** Event triggers after the AJAX content loaded completely. */ - ajaxComplete? (e: AjaxCompleteEventArgs): void; + ajaxComplete?(e: AjaxCompleteEventArgs): void; /** Event triggers when the AJAX request failed. */ - ajaxError? (e: AjaxErrorEventArgs): void; + ajaxError?(e: AjaxErrorEventArgs): void; /** Event triggers after the AJAX content loaded successfully. */ - ajaxSuccess? (e: AjaxSuccessEventArgs): void; + ajaxSuccess?(e: AjaxSuccessEventArgs): void; /** Event triggers before the items loaded. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Event triggers after the items loaded. */ - loadComplete? (e: LoadCompleteEventArgs): void; + loadComplete?(e: LoadCompleteEventArgs): void; /** Event triggers when mouse down happens on the item. */ - mouseDown? (e: MouseDownEventArgs): void; + mouseDown?(e: MouseDownEventArgs): void; /** Event triggers when mouse up happens on the item. */ - mouseUp? (e: MouseUpEventArgs): void; + mouseUp?(e: MouseUpEventArgs): void; } export interface AjaxBeforeLoadEventArgs { @@ -9853,11 +10151,10 @@ export interface AjaxSettings { class MaskEdit extends ej.Widget { static fn: MaskEdit; - constructor(element: JQuery, options?: MaskEdit.Model); - constructor(element: Element, options?: MaskEdit.Model); + constructor(element: JQuery | Element, options?: MaskEdit.Model); static Locale: any; - model:MaskEdit.Model; - defaults:MaskEdit.Model; + model: MaskEdit.Model; + defaults: MaskEdit.Model; /** To clear the text in mask edit textbox control. * @returns {void} @@ -9884,7 +10181,7 @@ class MaskEdit extends ej.Widget { */ get_UnstrippedValue(): string; } -export module MaskEdit{ +export namespace MaskEdit { export interface Model { @@ -9988,34 +10285,34 @@ export interface Model { width?: string; /** Fires when value changed in mask edit textbox control. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires after MaskEdit control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the MaskEdit is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when focused in mask edit textbox control. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Fires when focused out in mask edit textbox control. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Fires when keydown in mask edit textbox control. */ - keydown? (e: KeydownEventArgs): void; + keydown?(e: KeydownEventArgs): void; /** Fires when key press in mask edit textbox control. */ - keyPress? (e: KeyPressEventArgs): void; + keyPress?(e: KeyPressEventArgs): void; /** Fires when keyup in mask edit textbox control. */ - keyup? (e: KeyupEventArgs): void; + keyup?(e: KeyupEventArgs): void; /** Fires when mouse out in mask edit textbox control. */ - mouseOut? (e: MouseOutEventArgs): void; + mouseOut?(e: MouseOutEventArgs): void; /** Fires when mouse over in mask edit textbox control. */ - mouseOver? (e: MouseOverEventArgs): void; + mouseOver?(e: MouseOverEventArgs): void; } export interface ChangeEventArgs { @@ -10232,15 +10529,13 @@ export interface MouseOverEventArgs { unmaskedValue?: string; } } -enum InputMode -{ +enum InputMode { //string Password, //string Text, } -enum TextAlign -{ +enum TextAlign { //string Center, //string @@ -10253,11 +10548,10 @@ Right, class Menu extends ej.Widget { static fn: Menu; - constructor(element: JQuery, options?: Menu.Model); - constructor(element: Element, options?: Menu.Model); + constructor(element: JQuery | Element, options?: Menu.Model); static Locale: any; - model:Menu.Model; - defaults:Menu.Model; + model: Menu.Model; + defaults: Menu.Model; /** Disables the Menu control. * @returns {void} @@ -10328,7 +10622,7 @@ class Menu extends ej.Widget { * @param {any|Array} Selector of target node or Object of target node. * @returns {void} */ - remove(target: any|Array): void; + remove(target: any|any[]): void; /** To show the Menu control. * @param {number} x co-ordinate position of context menu. @@ -10344,7 +10638,7 @@ class Menu extends ej.Widget { */ showItems(): void; } -export module Menu{ +export namespace Menu { export interface Model { @@ -10452,32 +10746,48 @@ export interface Model { */ width?: string|number; + /** Specifies the popup menu height. + * @Default {auto} + */ + overflowHeight?: string|number; + + /** Specifies the popup menu width. + * @Default {auto} + */ + overflowWidth?: string|number; + /** Fires before context menu gets open. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires when mouse click on menu items. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Fire when context menu on close. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires when context menu on open. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Fires to create menu items. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires to destroy menu items. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when key down on menu items. */ - keydown? (e: KeydownEventArgs): void; + keydown?(e: KeydownEventArgs): void; /** Fires when mouse out from menu items. */ - mouseout? (e: MouseoutEventArgs): void; + mouseout?(e: MouseoutEventArgs): void; /** Fires when mouse over the Menu items. */ - mouseover? (e: MouseoverEventArgs): void; + mouseover?(e: MouseoverEventArgs): void; + + /** Fires when overflow popup menu opens. */ + overflowOpen?(e: OverflowOpenEventArgs): void; + + /** Fires when overflow popup menu closes. */ + overflowClose?(e: OverflowCloseEventArgs): void; } export interface BeforeOpenEventArgs { @@ -10647,6 +10957,44 @@ export interface MouseoverEventArgs { event?: any; } +export interface OverflowOpenEventArgs { + + /** returns the menu model + */ + model?: ej.Menu.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + e?: any; + + /** if the event should be cancelled ; otherwise ,false + */ + cancel?: boolean; +} + +export interface OverflowCloseEventArgs { + + /** returns the menu model + */ + model?: ej.Menu.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + e?: any; + + /** if the event should be cancelled ; otherwise ,false + */ + cancel?: boolean; +} + export interface Fields { /** It receives the child data for the inner level. @@ -10657,7 +11005,7 @@ export interface Fields { */ dataSource?: any; - /** Specifies the HTML attributes to “LI” item list. + /** Specifies the HTML attributes to “LI” item list. */ htmlAttribute?: string; @@ -10665,11 +11013,11 @@ export interface Fields { */ id?: string; - /** Specifies the image attribute to “img” tag inside items list. + /** Specifies the image attribute to “img” tag inside items list. */ imageAttribute?: string; - /** Specifies the image URL to “img” tag inside item list. + /** Specifies the image URL to “img” tag inside item list. */ imageUrl?: string; @@ -10685,7 +11033,7 @@ export interface Fields { */ query?: any; - /** Specifies the sprite CSS class to “LI” item list. + /** Specifies the sprite CSS class to “LI” item list. */ spriteCssClass?: string; @@ -10702,22 +11050,19 @@ export interface Fields { url?: string; } } -enum AnimationType -{ +enum AnimationType { //string Default, //string None, } -enum MenuType -{ +enum MenuType { //string ContextMenu, //string NormalMenu, } -enum Direction -{ +enum Direction { //string Left, //string @@ -10728,11 +11073,10 @@ Right, class Pager extends ej.Widget { static fn: Pager; - constructor(element: JQuery, options?: Pager.Model); - constructor(element: Element, options?: Pager.Model); + constructor(element: JQuery | Element, options?: Pager.Model); static Locale: any; - model:Pager.Model; - defaults:Pager.Model; + model: Pager.Model; + defaults: Pager.Model; /** Send a paging request to specified page through the pager control. * @param {number} Specifies the index to be navigated @@ -10745,7 +11089,7 @@ class Pager extends ej.Widget { */ refreshPager(): void; } -export module Pager{ +export namespace Pager { export interface Model { @@ -10777,7 +11121,8 @@ export interface Model { */ externalMessage?: string; - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. + * in a language and culture specific to a particular country or region. * @Default {en-US} */ locale?: string; @@ -10808,7 +11153,7 @@ export interface Model { showPageInfo?: boolean; /** Triggered when pager numeric item is clicked in pager control. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; } export interface ClickEventArgs { @@ -10837,11 +11182,10 @@ export interface ClickEventArgs { class ProgressBar extends ej.Widget { static fn: ProgressBar; - constructor(element: JQuery, options?: ProgressBar.Model); - constructor(element: Element, options?: ProgressBar.Model); + constructor(element: JQuery | Element, options?: ProgressBar.Model); static Locale: any; - model:ProgressBar.Model; - defaults:ProgressBar.Model; + model: ProgressBar.Model; + defaults: ProgressBar.Model; /** Destroy the progressbar widget * @returns {void} @@ -10868,7 +11212,7 @@ class ProgressBar extends ej.Widget { */ getValue(): number; } -export module ProgressBar{ +export namespace ProgressBar { export interface Model { @@ -10938,19 +11282,19 @@ export interface Model { width?: number|string; /** Event triggers when the progress value changed */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Event triggers when the process completes (at 100%) */ - complete? (e: CompleteEventArgs): void; + complete?(e: CompleteEventArgs): void; /** Event triggers when the progressbar are created */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Event triggers when the progressbar are destroyed */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Event triggers when the process starts (from 0%) */ - start? (e: StartEventArgs): void; + start?(e: StartEventArgs): void; } export interface ChangeEventArgs { @@ -11055,11 +11399,10 @@ export interface StartEventArgs { class RadioButton extends ej.Widget { static fn: RadioButton; - constructor(element: JQuery, options?: RadioButton.Model); - constructor(element: Element, options?: RadioButton.Model); + constructor(element: JQuery | Element, options?: RadioButton.Model); static Locale: any; - model:RadioButton.Model; - defaults:RadioButton.Model; + model: RadioButton.Model; + defaults: RadioButton.Model; /** To disable the RadioButton * @returns {void} @@ -11071,7 +11414,7 @@ class RadioButton extends ej.Widget { */ enable(): void; } -export module RadioButton{ +export namespace RadioButton { export interface Model { @@ -11089,7 +11432,8 @@ export interface Model { */ enabled?: boolean; - /** Specifies the enablePersistence property for RadioButton while initialization. The enablePersistence API save current model value to browser cookies for state maintains. While refreshing the radio button control page the model value apply from browser cookies. + /** Specifies the enablePersistence property for RadioButton while initialization. The enablePersistence API save current model value to browser cookies for state maintains. + * While refreshing the radio button control page the model value apply from browser cookies. * @Default {false} */ enablePersistence?: boolean; @@ -11144,16 +11488,16 @@ export interface Model { value?: string; /** Fires before the RadioButton is going to changed its state successfully */ - beforeChange? (e: BeforeChangeEventArgs): void; + beforeChange?(e: BeforeChangeEventArgs): void; /** Fires when the RadioButton state is changed successfully */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when the RadioButton created successfully */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the RadioButton destroyed successfully */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; } export interface BeforeChangeEventArgs { @@ -11232,8 +11576,7 @@ export interface DestroyEventArgs { type?: string; } } -enum RadioButtonSize -{ +enum RadioButtonSize { //Shows small size radio button Small, //Shows medium size radio button @@ -11242,11 +11585,10 @@ Medium, class Rating extends ej.Widget { static fn: Rating; - constructor(element: JQuery, options?: Rating.Model); - constructor(element: Element, options?: Rating.Model); + constructor(element: JQuery | Element, options?: Rating.Model); static Locale: any; - model:Rating.Model; - defaults:Rating.Model; + model: Rating.Model; + defaults: Rating.Model; /** Destroy the Rating widget all events bound will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -11284,7 +11626,7 @@ class Rating extends ej.Widget { */ show(): void; } -export module Rating{ +export namespace Rating { export interface Model { @@ -11373,22 +11715,22 @@ export interface Model { width?: string; /** Fires when Rating value changes. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when Rating control is clicked successfully. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Fires when Rating control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when Rating control is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when mouse hover is removed from Rating control. */ - mouseout? (e: MouseoutEventArgs): void; + mouseout?(e: MouseoutEventArgs): void; /** Fires when mouse hovered over the Rating control. */ - mouseover? (e: MouseoverEventArgs): void; + mouseover?(e: MouseoverEventArgs): void; } export interface ChangeEventArgs { @@ -11517,7 +11859,7 @@ export interface MouseoverEventArgs { index?: any; } -enum Precision{ +enum Precision { ///string Exact, @@ -11533,13 +11875,13 @@ enum Precision{ class Ribbon extends ej.Widget { static fn: Ribbon; - constructor(element: JQuery, options?: Ribbon.Model); - constructor(element: Element, options?: Ribbon.Model); + constructor(element: JQuery | Element, options?: Ribbon.Model); static Locale: any; - model:Ribbon.Model; - defaults:Ribbon.Model; + model: Ribbon.Model; + defaults: Ribbon.Model; - /** Adds contextual tab or contextual tab set dynamically in the ribbon control with contextual tabs object and index position. When index is null, ribbon contextual tab or contextual tab set is added at the last index. + /** Adds contextual tab or contextual tab set dynamically in the ribbon control with contextual tabs object and index position. + * When index is null, ribbon contextual tab or contextual tab set is added at the last index. * @param {any} contextual tab or contextual tab set object. * @param {number} index of the contextual tab or contextual tab set, this is optional. * @returns {void} @@ -11559,7 +11901,7 @@ class Ribbon extends ej.Widget { * @param {number} index of the ribbon tab,this is optional. * @returns {void} */ - addTab(tabText: string, ribbonGroups: Array, index?: number): void; + addTab(tabText: string, ribbonGroups: any[], index?: number): void; /** Adds tab group dynamically in the ribbon control with given tab index, tab group object and group index position. When group index is null, ribbon group is added at the last index. * @param {number} ribbon tab index. @@ -11569,7 +11911,8 @@ class Ribbon extends ej.Widget { */ addTabGroup(tabIndex: number, tabGroup: any, groupIndex?: number): void; - /** Adds group content dynamically in the ribbon control with given tab index, group index, sub group index, content and content index position. When content index is null, content is added at the last index. + /** Adds group content dynamically in the ribbon control with given tab index, group index, sub group index, content and content index position. + * When content index is null, content is added at the last index. * @param {number} ribbon tab index. * @param {number} ribbon group index. * @param {number} sub group index in the ribbon group, @@ -11603,7 +11946,7 @@ class Ribbon extends ej.Widget { * @param {number} index of the tab item. * @returns {String} */ - getTabText(index: number): String; + getTabText(index: number): string; /** Hides the given text tab in the ribbon control. * @param {string} text of the tab item. @@ -11615,13 +11958,13 @@ class Ribbon extends ej.Widget { * @param {string} text of the tab item. * @returns {Boolean} */ - isEnable(text: string): Boolean; + isEnable(text: string): boolean; /** Checks whether the given text tab in the ribbon control is visible or not. * @param {string} text of the tab item. * @returns {Boolean} */ - isVisible(text: string): Boolean; + isVisible(text: string): boolean; /** Removes the given index tab item from the ribbon control. * @param {number} index of tab item. @@ -11676,7 +12019,7 @@ class Ribbon extends ej.Widget { */ removeBackStageItem(index: number): void; } -export module Ribbon{ +export namespace Ribbon { export interface Model { @@ -11690,7 +12033,8 @@ export interface Model { */ isResponsive?: boolean; - /** Specifies the height, width, enableRTL, showRoundedCorner,enabled,cssClass property to the controls in the ribbon commonly andit will work only when those properties are not defined in buttonSettings and content defaults. + /** Specifies the height, width, enableRTL, showRoundedCorner,enabled,cssClass property to the controls in the ribbon commonly andit will work only when those properties + * are not defined in buttonSettings and content defaults. * @Default {Object} */ buttonDefaults?: any; @@ -11730,20 +12074,21 @@ export interface Model { */ applicationTab?: ApplicationTab; - /** Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs into the contextual tab and contextual tab set. + /** Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs + * into the contextual tab and contextual tab set. * @Default {Array} */ - contextualTabs?: Array; + contextualTabs?: ContextualTab[]; /** Specifies the index or indexes to disable the given index tab or indexes tabs in the ribbon control. * @Default {0} */ - disabledItemIndex?: Array; + disabledItemIndex?: any[]; /** Specifies the index or indexes to enable the given index tab or indexes tabs in the ribbon control. * @Default {null} */ - enabledItemIndex?: Array; + enabledItemIndex?: any[]; /** Specifies the index of the ribbon tab to select the given index tab item in the ribbon control. * @Default {1} @@ -11753,9 +12098,10 @@ export interface Model { /** Specifies the tabs and its groups. Also specifies the control details that has to be placed in the tab area in the ribbon control. * @Default {Array} */ - tabs?: Array; + tabs?: Tab[]; - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region and it will need to use the user's preference. + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific + * to a particular country or region and it will need to use the user's preference. * @Default {en-US} */ locale?: string; @@ -11766,55 +12112,55 @@ export interface Model { width?: string|number; /** Triggered before the ribbon tab item is removed. */ - beforeTabRemove? (e: BeforeTabRemoveEventArgs): void; + beforeTabRemove?(e: BeforeTabRemoveEventArgs): void; /** Triggered before the ribbon control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered before the ribbon control is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered when the control in the group is clicked successfully. */ - groupClick? (e: GroupClickEventArgs): void; + groupClick?(e: GroupClickEventArgs): void; /** Triggered when the group expander in the group is clicked successfully. */ - groupExpand? (e: GroupExpandEventArgs): void; + groupExpand?(e: GroupExpandEventArgs): void; /** Triggered when an item in the Gallery control is clicked successfully. */ - galleryItemClick? (e: GalleryItemClickEventArgs): void; + galleryItemClick?(e: GalleryItemClickEventArgs): void; /** Triggered when a tab or button in the backstage page is clicked successfully. */ - backstageItemClick? (e: BackstageItemClickEventArgs): void; + backstageItemClick?(e: BackstageItemClickEventArgs): void; /** Triggered when the ribbon control is collapsed. */ - collapse? (e: CollapseEventArgs): void; + collapse?(e: CollapseEventArgs): void; /** Triggered when the ribbon control is expanded. */ - expand? (e: ExpandEventArgs): void; + expand?(e: ExpandEventArgs): void; /** Triggered before the ribbon control is load. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggered after adding the new ribbon tab item. */ - tabAdd? (e: TabAddEventArgs): void; + tabAdd?(e: TabAddEventArgs): void; /** Triggered when tab is clicked successfully in the ribbon control. */ - tabClick? (e: TabClickEventArgs): void; + tabClick?(e: TabClickEventArgs): void; /** Triggered before the ribbon tab is created. */ - tabCreate? (e: TabCreateEventArgs): void; + tabCreate?(e: TabCreateEventArgs): void; /** Triggered after the tab item is removed from the ribbon control. */ - tabRemove? (e: TabRemoveEventArgs): void; + tabRemove?(e: TabRemoveEventArgs): void; /** Triggered after the ribbon tab item is selected in the ribbon control. */ - tabSelect? (e: TabSelectEventArgs): void; + tabSelect?(e: TabSelectEventArgs): void; /** Triggered when the expand/collapse button is clicked successfully . */ - toggleButtonClick? (e: ToggleButtonClickEventArgs): void; + toggleButtonClick?(e: ToggleButtonClickEventArgs): void; /** Triggered when the QAT menu item is clicked successfully . */ - qatMenuItemClick? (e: QatMenuItemClickEventArgs): void; + qatMenuItemClick?(e: QatMenuItemClickEventArgs): void; } export interface BeforeTabRemoveEventArgs { @@ -12202,7 +12548,8 @@ export interface ApplicationTabBackstageSettingsPage { */ text?: string; - /** Specifies the type for ribbon backstage page's contents. Set "ej.Ribbon.BackStageItemType.Tab" to render the tab or "ej.Ribbon.BackStageItemType.Button" to render the button. + /** Specifies the type for ribbon backstage page's contents. Set "ej.Ribbon.BackStageItemType.Tab" to render the tab or " + * ej.Ribbon.BackStageItemType.Button" to render the button. * @Default {ej.Ribbon.ItemType.Tab} */ itemType?: ej.Ribbon.ItemType|string; @@ -12238,7 +12585,7 @@ export interface ApplicationTabBackstageSettings { /** Specifies the ribbon backstage page with its tab and button elements. * @Default {Array} */ - pages?: Array; + pages?: ApplicationTabBackstageSettingsPage[]; /** Specifies the width of backstage page header that contains tabs and buttons. * @Default {null} @@ -12263,7 +12610,8 @@ export interface ApplicationTab { */ menuSettings?: any; - /** Specifies the application menu or backstage page. Specify the type of application tab as "ej.Ribbon.ApplicationTabType.Menu" to render the application menu or "ej.Ribbon.ApplicationTabType.Backstage" to render backstage page in the ribbon control. + /** Specifies the application menu or backstage page. Specify the type of application tab as "ej.Ribbon.ApplicationTabType.Menu" to render the application menu or + * "ej.Ribbon.ApplicationTabType.Backstage" to render backstage page in the ribbon control. * @Default {ej.Ribbon.ApplicationTabType.Menu} */ type?: ej.Ribbon.ApplicationTabType|string; @@ -12284,7 +12632,7 @@ export interface ContextualTab { /** Specifies the tabs to present in the contextual tabs and tab set. Refer to the tabs section for adding tabs into the contextual tabs and tab set. * @Default {Array} */ - tabs?: Array; + tabs?: any[]; } export interface TabsGroupsContentDefaults { @@ -12419,7 +12767,7 @@ export interface TabsGroupsContentGroup { /** Specifies the Syncfusion button and menu as gallery extra items. * @Default {Array} */ - customGalleryItems?: Array; + customGalleryItems?: TabsGroupsContentGroupsCustomGalleryItem[]; /** Provides custom tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. Text and HTML support are also provided for title and content. * @Default {Object} @@ -12444,7 +12792,7 @@ export interface TabsGroupsContentGroup { /** Defines each gallery content. * @Default {Array} */ - galleryItems?: Array; + galleryItems?: TabsGroupsContentGroupsGalleryItem[]; /** Specifies the Id for button, split button, dropdown list, toggle button, gallery, custom controls in the sub groups. * @Default {null} @@ -12491,7 +12839,8 @@ export interface TabsGroupsContentGroup { */ quickAccessMode?: ej.Ribbon.QuickAccessMode|string; - /** Specifies the type as "ej.Ribbon.Type.Button" or "ej.Ribbon.Type.SplitButton" or "ej.Ribbon.Type.DropDownList" or "ej.Ribbon.Type.ToggleButton" or "ej.Ribbon.Type.Custom" or "ej.Ribbon.Type.Gallery" to render button, split, dropdown, toggle button, gallery, custom controls. + /** Specifies the type as "ej.Ribbon.Type.Button" or "ej.Ribbon.Type.SplitButton" or "ej.Ribbon.Type.DropDownList" or "ej.Ribbon.Type.ToggleButton" + * or "ej.Ribbon.Type.Custom" or "ej.Ribbon.Type.Gallery" to render button, split, dropdown, toggle button, gallery, custom controls. * @Default {ej.Ribbon.Type.Button} */ type?: ej.Ribbon.Type|string; @@ -12507,7 +12856,7 @@ export interface TabsGroupsContent { /** Specifies the controls such as Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls in the subgroup of the ribbon tab . * @Default {Array} */ - groups?: Array; + groups?: TabsGroupsContentGroup[]; } export interface TabsGroupsGroupExpanderSettings { @@ -12525,7 +12874,8 @@ export interface TabsGroupsGroupExpanderSettings { export interface TabsGroup { - /** Specifies the alignment of controls in the groups in 'row' type or 'column' type. Value for row type is "ej.Ribbon.AlignType.Rows" and for column type is "ej.Ribbon.alignType.columns". + /** Specifies the alignment of controls in the groups in 'row' type or 'column' type. Value for row type is "ej.Ribbon.AlignType.Rows" + * and for column type is "ej.Ribbon.alignType.columns". * @Default {ej.Ribbon.AlignType.Rows} */ alignType?: ej.Ribbon.AlignType|string; @@ -12533,7 +12883,7 @@ export interface TabsGroup { /** Specifies the Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls to the groups in the ribbon control. * @Default {Array} */ - content?: Array; + content?: TabsGroupsContent[]; /** Specifies the ID of custom items to be placed in the groups. * @Default {null} @@ -12571,7 +12921,7 @@ export interface Tab { /** Specifies single group or multiple groups and its contents to each tab in the ribbon control. * @Default {Array} */ - groups?: Array; + groups?: TabsGroup[]; /** Specifies the ID for each tab's content panel. * @Default {null} @@ -12584,17 +12934,17 @@ export interface Tab { text?: string; } -enum ItemType{ +enum ItemType { - ///To render the button for ribbon backstage page’s contents + ///To render the button for ribbon backstage page’s contents Button, - ///To render the tab for ribbon backstage page’s contents + ///To render the tab for ribbon backstage page’s contents Tab } -enum ApplicationTabType{ +enum ApplicationTabType { ///applicationTab display as menu Menu, @@ -12604,7 +12954,7 @@ enum ApplicationTabType{ } -enum AlignType{ +enum AlignType { ///To align the group content's in row Rows, @@ -12614,7 +12964,7 @@ enum AlignType{ } -enum CustomItemType{ +enum CustomItemType { ///Specifies the button type in customGalleryItems Button, @@ -12624,7 +12974,7 @@ enum CustomItemType{ } -enum QuickAccessMode{ +enum QuickAccessMode { ///Controls are hidden in Quick Access toolbar None, @@ -12637,7 +12987,7 @@ enum QuickAccessMode{ } -enum Type{ +enum Type { ///Specifies the button control Button, @@ -12662,11 +13012,10 @@ enum Type{ class Kanban extends ej.Widget { static fn: Kanban; - constructor(element: JQuery, options?: Kanban.Model); - constructor(element: Element, options?: Kanban.Model); + constructor(element: JQuery | Element, options?: Kanban.Model); static Locale: any; - model:Kanban.Model; - defaults:Kanban.Model; + model: Kanban.Model; + defaults: Kanban.Model; /** Add or remove columns in Kanban columns collections.Default action is add. * @param {Array|string} Pass array of columns or string of headerText to add/remove the column in Kanban @@ -12674,7 +13023,7 @@ class Kanban extends ej.Widget { * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform * @returns {void} */ - columns(columndetails: Array|string, keyvalue: Array|string, action?: string): void; + columns(columndetails: any[]|string, keyvalue: any[]|string, action?: string): void; /** Destroy the Kanban widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -12685,7 +13034,7 @@ class Kanban extends ej.Widget { * @param {Array} Pass new data source to the Kanban * @returns {void} */ - dataSource(datasource: Array): void; + dataSource(datasource: any[]): void; /** toggleColumn based on the headerText in Kanban. * @param {any} Pass the header text of the column to get the corresponding column object @@ -12702,7 +13051,7 @@ class Kanban extends ej.Widget { /** Used for get the names of all the visible column name collections in Kanban. * @returns {Array} */ - getVisibleColumnNames(): Array; + getVisibleColumnNames(): any[]; /** Get the scroller object of Kanban. * @returns {ej.Scroller} @@ -12713,18 +13062,18 @@ class Kanban extends ej.Widget { * @param {string} Pass the header text of the column to get the corresponding column object * @returns {String} */ - getColumnByHeaderText(headerText: string): String; + getColumnByHeaderText(headerText: string): string; /** Get the table details based on the given header table in Kanban. * @returns {String} */ - getHeaderTable(): String; + getHeaderTable(): string; /** Hide columns from the Kanban based on the header text * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide * @returns {void} */ - hideColumns(headerText: Array|string): void; + hideColumns(headerText: any[]|string): void; /** Print the Kanban Board * @returns {void} @@ -12746,14 +13095,14 @@ class Kanban extends ej.Widget { * @param {Array|string} You can pass either array of header text of various columns or a header text of a column to show * @returns {void} */ - showColumns(headerText: Array|string): void; + showColumns(headerText: any[]|string): void; /** Update a card in Kanban control based on key and JSON data given. * @param {string} Pass the key field Name of the column * @param {Array} Pass the edited JSON data of card need to be update. * @returns {void} */ - updateCard(key: string, data: Array): void; + updateCard(key: string, data: any[]): void; KanbanSelection: Kanban.KanbanSelection; @@ -12763,7 +13112,7 @@ class Kanban extends ej.Widget { KanbanEdit: Kanban.KanbanEdit; } -export module Kanban{ +export namespace Kanban { export interface KanbanSelection { @@ -12823,7 +13172,7 @@ export interface KanbanEdit { * @param {Array} Pass the edited JSON data of card need to be add. * @returns {void} */ - addCard(primaryKey: string,card: Array): void; + addCard(primaryKey: string, card: any[]): void; /** Send a cancel request of add/edit card in Kanban when allowEditing/allowAdding is set as true. * @returns {void} @@ -12852,7 +13201,7 @@ export interface KanbanEdit { * @param {any} Specify the validation rules for the field * @returns {void} */ - setValidationToField(name: string,rules: any): void; + setValidationToField(name: string, rules: any): void; } export interface Model { @@ -12920,7 +13269,7 @@ export interface Model { /** Gets or sets an object that indicates to render the Kanban with specified columns. * @Default {Array} */ - columns?: Array; + columns?: Column[]; /** Gets or sets an object that indicates whether to Customize the card settings. * @Default {Object} @@ -12930,7 +13279,7 @@ export interface Model { /** Gets or sets a value that indicates whether to add customToolbarItems within the toolbar to perform any action in the Kanban. * @Default {[]} */ - customToolbarItems?: Array; + customToolbarItems?: CustomToolbarItem[]; /** Gets or sets a value that indicates to render the Kanban with custom theme. */ @@ -12984,7 +13333,7 @@ export interface Model { /** To customize the filtering behavior based on queries given. * @Default {Array} */ - filterSettings?: Array; + filterSettings?: FilterSetting[]; /** ej Query to query database of Kanban. * @Default {null} @@ -13014,7 +13363,7 @@ export interface Model { /** Gets or sets an object that indicates to managing the collection of stacked header rows for the Kanban. * @Default {Array} */ - stackedHeaderRows?: Array; + stackedHeaderRows?: StackedHeaderRow[]; /** The tooltip allows to display card details in a tooltip while hovering on it. */ @@ -13023,87 +13372,88 @@ export interface Model { /** Gets or sets an object that indicates to render the Kanban with specified workflows. * @Default {Array} */ - workflows?: Array; + workflows?: Workflow[]; - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific + * to a particular country or region. * @Default {en-US} */ locale?: string; /** Triggered for every Kanban action before its starts. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggered for every Kanban action success event. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggered for every Kanban action server failure event. */ - actionFailure? (e: ActionFailureEventArgs): void; + actionFailure?(e: ActionFailureEventArgs): void; /** Triggered before the task is going to be edited. */ - beginEdit? (e: BeginEditEventArgs): void; + beginEdit?(e: BeginEditEventArgs): void; /** Triggered before the card is going to be added */ - beginAdd? (e: BeginAddEventArgs): void; + beginAdd?(e: BeginAddEventArgs): void; /** Triggered before the card is selected. */ - beforeCardSelect? (e: BeforeCardSelectEventArgs): void; + beforeCardSelect?(e: BeforeCardSelectEventArgs): void; /** Trigger after the card is clicked. */ - cardClick? (e: CardClickEventArgs): void; + cardClick?(e: CardClickEventArgs): void; /** Triggered when the card is being dragged. */ - cardDrag? (e: CardDragEventArgs): void; + cardDrag?(e: CardDragEventArgs): void; /** Triggered when card dragging start. */ - cardDragStart? (e: CardDragStartEventArgs): void; + cardDragStart?(e: CardDragStartEventArgs): void; /** Triggered when card dragging stops. */ - cardDragStop? (e: CardDragStopEventArgs): void; + cardDragStop?(e: CardDragStopEventArgs): void; /** Triggered when the card is Dropped. */ - cardDrop? (e: CardDropEventArgs): void; + cardDrop?(e: CardDropEventArgs): void; /** Triggered after the card is selected. */ - cardSelect? (e: CardSelectEventArgs): void; + cardSelect?(e: CardSelectEventArgs): void; /** Triggered when card is double clicked. */ - cardDoubleClick? (e: CardDoubleClickEventArgs): void; + cardDoubleClick?(e: CardDoubleClickEventArgs): void; /** Triggered before the card is selected. */ - cardSelecting? (e: CardSelectingEventArgs): void; + cardSelecting?(e: CardSelectingEventArgs): void; /** Triggered when the Kanban is rendered completely */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggers after the cell is clicked. */ - cellClick? (e: CellClickEventArgs): void; + cellClick?(e: CellClickEventArgs): void; /** Triggered the Kanban is bound with data during initial rendering. */ - dataBound? (e: DataBoundEventArgs): void; + dataBound?(e: DataBoundEventArgs): void; /** Triggered when Kanban going to destroy. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered after the card is deleted. */ - endDelete? (e: EndDeleteEventArgs): void; + endDelete?(e: EndDeleteEventArgs): void; /** Triggered after the card is edited. */ - endEdit? (e: EndEditEventArgs): void; + endEdit?(e: EndEditEventArgs): void; /** Triggers after the header is clicked. */ - headerClick? (e: HeaderClickEventArgs): void; + headerClick?(e: HeaderClickEventArgs): void; /** Triggered initial load. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggered when toolbar item is clicked in Kanban. */ - toolbarClick? (e: ToolbarClickEventArgs): void; + toolbarClick?(e: ToolbarClickEventArgs): void; /** Triggered every time a single card rendered request is made to access particular card information. */ - queryCellInfo? (e: QueryCellInfoEventArgs): void; + queryCellInfo?(e: QueryCellInfoEventArgs): void; /** Triggered before the context menu is opened. */ - contextOpen? (e: ContextOpenEventArgs): void; + contextOpen?(e: ContextOpenEventArgs): void; } export interface ActionBeginEventArgs { @@ -13313,7 +13663,7 @@ export interface BeforeCardSelectEventArgs { /** Returns the previously select card indexes */ - previousRowcellindex?: Array; + previousRowcellindex?: any[]; /** Returns the Target item. */ @@ -13499,7 +13849,7 @@ export interface CardSelectEventArgs { /** Returns the previously select card indexes */ - previousRowcellindex?: Array; + previousRowcellindex?: any[]; /** Returns the current item. */ @@ -13561,7 +13911,7 @@ export interface CardSelectingEventArgs { /** Returns the previously rowcell is selecting card indexes */ - previousRowcellindex?: Array; + previousRowcellindex?: any[]; /** Returns the current item. */ @@ -13847,7 +14197,7 @@ export interface SwimlaneSettingsUnassignedGroup { /** To set the user defined values which are need to categorized as unassigned category swim lane groups. * @Default {[null,undefined,]} */ - keys?: Array; + keys?: any[]; } export interface SwimlaneSettings { @@ -13896,17 +14246,25 @@ export interface ContextMenuSettings { /** Gets or sets a value that indicates the list of items needs to be disable from default context menu items. * @Default {Array} */ - disableDefaultItems?: Array; + disableDefaultItems?: any[]; /** Its used to add specific default context menu items. * @Default {Array} */ - menuItems?: Array; + menuItems?: any[]; /** Gets or sets a value that indicates whether to add custom contextMenu items. * @Default {Array} */ - customMenuItems?: Array; + customMenuItems?: ContextMenuSettingsCustomMenuItem[]; +} + +export interface ColumnsTotalCount { + + /** To customize the totalCount text properties. + * @Default {null} + */ + text?: string; } export interface ColumnsConstraints { @@ -13935,9 +14293,9 @@ export interface Column { headerText?: string; /** To customize the totalCount properties. - * @Default {false} + * @Default {Object} */ - totalCount?: string; + totalCount?: ColumnsTotalCount; /** Gets or sets an object that indicates to render the Kanban with specified columns key. * @Default {null} @@ -13945,12 +14303,12 @@ export interface Column { key?: string|number; /** To enable/disable allowDrop for specific column wise. - * @Default {false} + * @Default {true} */ allowDrop?: boolean; /** To enable/disable allowDrag for specific column wise. - * @Default {false} + * @Default {true} */ allowDrag?: boolean; @@ -14059,7 +14417,7 @@ export interface EditSettings { /** Get or sets an object that indicates whether to customize the editing fields of Kanban card. * @Default {Array} */ - editItems?: Array; + editItems?: EditSettingsEditItem[]; /** This specifies the id of the template which is require to be edited using the External edit form. * @Default {null} @@ -14156,7 +14514,7 @@ export interface SearchSettings { /** To customize the fields the searching operation can be perform. * @Default {Array} */ - fields?: Array; + fields?: any[]; /** To customize the searching string. */ @@ -14191,7 +14549,7 @@ export interface StackedHeaderRow { /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows. * @Default {Array} */ - stackedHeaderColumns?: Array; + stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; } export interface TooltipSettings { @@ -14220,7 +14578,7 @@ export interface Workflow { allowedTransitions?: string; } -enum Target{ +enum Target { ///Sets context menu to Kanban header Header, @@ -14236,7 +14594,7 @@ enum Target{ } -enum EditMode{ +enum EditMode { ///Creates Kanban with editMode as Dialog Dialog, @@ -14252,7 +14610,7 @@ enum EditMode{ } -enum EditingType{ +enum EditingType { ///Allows to set edit type as string edit type String, @@ -14277,7 +14635,7 @@ enum EditingType{ } -enum FormPosition{ +enum FormPosition { ///Form position is bottom. Bottom, @@ -14287,7 +14645,7 @@ enum FormPosition{ } -enum SelectionType{ +enum SelectionType { ///Support for Single selection in Kanban Single, @@ -14300,11 +14658,10 @@ enum SelectionType{ class Rotator extends ej.Widget { static fn: Rotator; - constructor(element: JQuery, options?: Rotator.Model); - constructor(element: Element, options?: Rotator.Model); + constructor(element: JQuery | Element, options?: Rotator.Model); static Locale: any; - model:Rotator.Model; - defaults:Rotator.Model; + model: Rotator.Model; + defaults: Rotator.Model; /** Disables the Rotator control. * @returns {void} @@ -14354,7 +14711,7 @@ class Rotator extends ej.Widget { */ updateTemplateById(index: number, id: string): void; } -export module Rotator{ +export namespace Rotator { export interface Model { @@ -14426,7 +14783,8 @@ export interface Model { */ isResponsive?: boolean; - /** Specifies the number of Rotator Items to navigate on a single click (next/previous/play buttons). The navigateSteps property value must be less than or equal to the displayItemsCount property value. + /** Specifies the number of Rotator Items to navigate on a single click (next/previous/play buttons). + * The navigateSteps property value must be less than or equal to the displayItemsCount property value. * @Default {1} */ navigateSteps?: string|number; @@ -14446,7 +14804,8 @@ export interface Model { */ query?: string; - /** If the Rotator Item is an image, you can specify a caption for the Rotator Item. The caption text for each Rotator Item must be set by using the title attribute of the respective tag. The caption cannot be displayed if multiple Rotator Items are present. + /** If the Rotator Item is an image, you can specify a caption for the Rotator Item. The caption text for each Rotator Item must be set by using the title attribute of the respective tag. + * The caption cannot be displayed if multiple Rotator Items are present. * @Default {false} */ showCaption?: boolean; @@ -14466,7 +14825,8 @@ export interface Model { */ showPlayButton?: boolean; - /** Turns on or off thumbnail support in the Rotator control. Thumbnail is used to navigate between slides. Thumbnail supports only single slide transition You must specify the source for thumbnail elements through the thumbnailSourceID property. + /** Turns on or off thumbnail support in the Rotator control. Thumbnail is used to navigate between slides. Thumbnail supports only single slide transition + * You must specify the source for thumbnail elements through the thumbnailSourceID property. * @Default {false} */ showThumbnail?: boolean; @@ -14497,7 +14857,7 @@ export interface Model { /** The templateId enables to bind multiple customized template items in Rotator. * @Default {null} */ - templateId?: Array; + templateId?: any[]; /** Specifies the source for thumbnail elements. * @Default {null} @@ -14505,25 +14865,25 @@ export interface Model { thumbnailSourceID?: any; /** This event is fired when the Rotator slides are changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** This event is fired when the Rotator control is initialized. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** This event is fired when the Rotator control is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** This event is fired when a pager is clicked. */ - pagerClick? (e: PagerClickEventArgs): void; + pagerClick?(e: PagerClickEventArgs): void; /** This event is fired when enableAutoPlay is started. */ - start? (e: StartEventArgs): void; + start?(e: StartEventArgs): void; /** This event is fired when autoplay is stopped or paused. */ - stop? (e: StopEventArgs): void; + stop?(e: StopEventArgs): void; /** This event is fired when a thumbnail pager is clicked. */ - thumbItemClick? (e: ThumbItemClickEventArgs): void; + thumbItemClick?(e: ThumbItemClickEventArgs): void; } export interface ChangeEventArgs { @@ -14698,7 +15058,7 @@ export interface Fields { url?: string; } -enum PagerPosition{ +enum PagerPosition { ///string BottomLeft, @@ -14723,11 +15083,10 @@ enum PagerPosition{ class RTE extends ej.Widget { static fn: RTE; - constructor(element: JQuery, options?: RTE.Model); - constructor(element: Element, options?: RTE.Model); + constructor(element: JQuery | Element, options?: RTE.Model); static Locale: any; - model:RTE.Model; - defaults:RTE.Model; + model: RTE.Model; + defaults: RTE.Model; /** Returns the range object. * @returns {any} @@ -14800,20 +15159,21 @@ class RTE extends ej.Widget { insertMenuOption(): void; /** Add a table column at the right or left of the specified cell - * @param {boolean} If it’s true, add a column at the left of the cell, otherwise add a column at the right of the cell + * @param {boolean} If it’s true, add a column at the left of the cell, otherwise add a column at the right of the cell * @param {JQuery} Column will be added based on the given cell element * @returns {HTMLElement} */ insertColumn(before?: boolean, cell?: JQuery): HTMLElement; /** To add a table row below or above the specified cell. - * @param {boolean} If it’s true, add a row before the cell, otherwise add a row after the cell + * @param {boolean} If it’s true, add a row before the cell, otherwise add a row after the cell * @param {JQuery} Row will be added based on the given cell element * @returns {HTMLElement} */ insertRow(before?: boolean, cell?: JQuery): HTMLElement; - /** This method helps to insert/paste the content at the current cursor (caret) position or the selected content to be replaced with our text by passing the value as parameter to the pasteContent method in the Editor. + /** This method helps to insert/paste the content at the current cursor (caret) position or the selected content to be replaced with our text by passing the value as parameter to the + * pasteContent method in the Editor. * @returns {void} */ pasteContent(): void; @@ -14876,7 +15236,7 @@ class RTE extends ej.Widget { */ show(): void; } -export module RTE{ +export namespace RTE { export interface Model { @@ -14901,7 +15261,8 @@ export interface Model { autoHeight?: boolean; /** Sets the colorCode to display the color of the fontColor and backgroundColor in the font tools of the RTE. - * @Default {[000000, FFFFFF, C4C4C4, ADADAD, 595959, 262626, 4f81bd, dbe5f1, b8cce4, 95b3d7, 366092, 244061, c0504d, f2dcdb, e5b9b7, d99694, 953734,632423, 9bbb59, ebf1dd, d7e3bc, c3d69b, 76923c, 4f6128, 8064a2, e5e0ec, ccc1d9, b2a2c7, 5f497a, 3f3151, f79646, fdeada, fbd5b5, fac08f,e36c09, 974806]} + * @Default {[000000, FFFFFF, C4C4C4, ADADAD, 595959, 262626, 4f81bd, dbe5f1, b8cce4, 95b3d7, 366092, 244061, c0504d, f2dcdb, e5b9b7, d99694, 953734,632423, 9bbb59, + ebf1dd, d7e3bc, c3d69b, 76923c, 4f6128, 8064a2, e5e0ec, ccc1d9, b2a2c7, 5f497a, 3f3151, f79646, fdeada, fbd5b5, fac08f,e36c09, 974806]} */ colorCode?: any; @@ -14919,7 +15280,7 @@ export interface Model { */ cssClass?: string; - /** Enables/disables the RTE control’s accessibility or interaction. + /** Enables/disables the RTE control’s accessibility or interaction. * @Default {True} */ enabled?: boolean; @@ -14954,6 +15315,16 @@ export interface Model { */ enableTabKeyNavigation?: boolean; + /** This API allows to enable url and fileName for pdf export. + * @Default {null} + */ + exportToPdfSettings?: ExportToPdfSettings; + + /** This API allows to enable url and fileName for word export. + * @Default {null} + */ + exportToWordSettings?: ExportToWordSettings; + /** Load the external CSS file inside Iframe. * @Default {null} */ @@ -14965,17 +15336,23 @@ export interface Model { fileBrowser?: FileBrowser; /** Sets the fontName in the RTE. - * @Default {{text: Segoe UI, value: Segoe UI },{text: Arial, value: Arial,Helvetica,sans-serif },{text: Courier New, value: Courier New,Courier,Monospace },{text: Georgia, value: Georgia,serif },{text: Impact, value: Impact,Charcoal,sans-serif },{text: Lucida Console, value: Lucida Console,Monaco,Monospace },{text: Tahoma, value: Tahoma,Geneva,sans-serif },{text: Times New Roman, value: Times New Roman },{text: Trebuchet MS, value: Trebuchet MS,Helvetica,sans-serif },{text: Verdana, value: Verdana,Geneva,sans-serif}} + * @Default {{text: Segoe UI, value: Segoe UI },{text: Arial, value: Arial,Helvetica,sans-serif },{text: Courier New, value: Courier New,Courier,Monospace }, + * {text: Georgia, value: Georgia,serif },{text: Impact, value: Impact,Charcoal,sans-serif },{text: Lucida Console, value: Lucida Console,Monaco,Monospace }, + * {text: Tahoma, value: Tahoma,Geneva,sans-serif },{text: Times New Roman, value: Times New Roman },{text: Trebuchet MS, value: Trebuchet MS,Helvetica,sans-serif }, + * {text: Verdana, value: Verdana,Geneva,sans-serif}} */ fontName?: any; /** Sets the fontSize in the RTE. - * @Default {{ text: 1, value: 1 },{ text: 2 (10pt), value: 2 },{ text: 3 (12pt), value: 3 },{ text: 4 (14pt), value: 4 },{ text: 5 (18pt), value: 5 },{ text: 6 (24pt), value: 6 },{ text: 7 (36pt), value: 7 }} + * @Default {{ text: 1, value: 1 },{ text: 2 (10pt), value: 2 },{ text: 3 (12pt), value: 3 },{ text: 4 (14pt), value: 4 },{ text: 5 (18pt), value: 5 }, + * { text: 6 (24pt), value: 6 },{ text: 7 (36pt), value: 7 }} */ fontSize?: any; /** Sets the format in the RTE. - * @Default {{ text: Paragraph, value: <p>, spriteCssClass: e-paragraph },{ text: Quotation, value: <blockquote>, spriteCssClass: e-quotation },{ text: Heading 1, value: <h1>, spriteCssClass: e-h1 },{ text: Heading 2, value: <h2>, spriteCssClass: e-h2 },{ text: Heading 3, value: <h3>, spriteCssClass: e-h3 },{ text: Heading 4, value: <h4>, spriteCssClass: e-h4 },{ text: Heading 5, value: <h5>, spriteCssClass: e-h5 },{ text: Heading 6, value: <h6>, spriteCssClass: e-h6}} + * @Default {{ text: Paragraph, value: <p>, spriteCssClass: e-paragraph },{ text: Quotation, value: <blockquote>, spriteCssClass: e-quotation }, + * { text: Heading 1, value: <h1>, spriteCssClass: e-h1 },{ text: Heading 2, value: <h2>, spriteCssClass: e-h2 },{ text: Heading 3, value: <h3>, spriteCssClass: e-h3 }, + * { text: Heading 4, value: <h4>, spriteCssClass: e-h4 },{ text: Heading 5, value: <h5>, spriteCssClass: e-h5 },{ text: Heading 6, value: <h6>, spriteCssClass: e-h6}} */ format?: string; @@ -14999,6 +15376,11 @@ export interface Model { */ imageBrowser?: ImageBrowser; + /** This API allows to enable the url for connecting to RTE import. + * @Default {null} + */ + importSettings?: ImportSettings; + /** Enables/disables responsive support for the RTE control toolbar items during the window resizing time. * @Default {false} */ @@ -15114,14 +15496,17 @@ export interface Model { tableRows?: number; /** Sets the tools in the RTE and gets the inner display order of the corresponding group element. Tools are dependent on the toolsList property. - * @Default {formatStyle: [format],style: [bold, italic, underline, strikethrough],alignment: [justifyLeft, justifyCenter, justifyRight, justifyFull],lists: [unorderedList, orderedList],indenting: [outdent, indent],doAction: [undo, redo],links: [createLink,removeLink],images: [image],media: [video],tables: [createTable, addRowAbove, addRowBelow, addColumnLeft, addColumnRight, deleteRow, deleteColumn, deleteTable]],view:[“fullScreen”,zoomIn,zoomOut],print:[print]} + * @Default {formatStyle: [format],style: [bold, italic, underline, strikethrough],alignment: [justifyLeft, justifyCenter, justifyRight, justifyFull],lists: [unorderedList, orderedList], + * indenting: [outdent, indent],doAction: [undo, redo],links: [createLink,removeLink],images: [image],media: [video],tables: [createTable, addRowAbove, addRowBelow, + * addColumnLeft, addColumnRight, deleteRow, deleteColumn, deleteTable]],view:[“fullScreen”,zoomIn,zoomOut],print:[print]} */ tools?: Tools; - /** Specifies the list of groups and order of those groups displayed in the RTE toolbar. The toolsList property is used to get the root group order and tools property is used to get the inner order of the corresponding groups displayed. When the value is not specified, it gets its default display order and tools. + /** Specifies the list of groups and order of those groups displayed in the RTE toolbar. The toolsList property is used to get the root group order and tools property is used to get the + * inner order of the corresponding groups displayed. When the value is not specified, it gets its default display order and tools. * @Default {[formatStyle, font, style, effects, alignment, lists, indenting, clipboard, doAction, clear, links, images, media, tables, casing,view, customTools,print,edit]} */ - toolsList?: Array; + toolsList?: any[]; /** Display the hints for the tools in the Toolbar. * @Default {{ associate: mouseenter, showShadow: true, position: { stem: { horizontal: left, vertical: top } }, tip: { size: { width: 5, height: 5 }, isBalloon: false }} @@ -15159,31 +15544,31 @@ export interface Model { zoomStep?: string|number; /** Fires when changed successfully. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when the RTE is created successfully */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when mouse click on menu items. */ - contextMenuClick? (e: ContextMenuClickEventArgs): void; + contextMenuClick?(e: ContextMenuClickEventArgs): void; /** Fires before the RTE is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when the commands are executed successfully. */ - execute? (e: ExecuteEventArgs): void; + execute?(e: ExecuteEventArgs): void; /** Fires when the keydown action is successful. */ - keydown? (e: KeydownEventArgs): void; + keydown?(e: KeydownEventArgs): void; /** Fires when the keyup action is successful. */ - keyup? (e: KeyupEventArgs): void; + keyup?(e: KeyupEventArgs): void; /** Fires before the RTE Edit area is rendered and after the toolbar is rendered. */ - preRender? (e: PreRenderEventArgs): void; + preRender?(e: PreRenderEventArgs): void; /** Fires when the text is selected in the text area */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface ChangeEventArgs { @@ -15325,6 +15710,28 @@ export interface SelectEventArgs { event?: any; } +export interface ExportToPdfSettings { + + /** This API is used to receive the server-side handler for export related operations. + */ + url?: string; + + /** Specifies the file name for the exported pdf file. + */ + fileName?: string; +} + +export interface ExportToWordSettings { + + /** This API is used to receive the server-side handler for export related operations. + */ + url?: string; + + /** Specifies the file name for the exported word file. + */ + fileName?: string; +} + export interface FileBrowser { /** This API is used to receive the server-side handler for file related operations. @@ -15355,6 +15762,13 @@ export interface ImageBrowser { filePath?: string; } +export interface ImportSettings { + + /** This API is used to receive the server-side handler for import operations. + */ + url?: string; +} + export interface ToolsCustomOrderedList { /** Specifies the name for customOrderedList item. @@ -15417,89 +15831,92 @@ export interface Tools { /** Specifies the casing tools and the display order of this tool in the RTE toolbar. */ - casing?: Array; + casing?: any[]; /** Specifies the clear tools and the display order of this tool in the RTE toolbar. */ - clear?: Array; + clear?: any[]; /** Specifies the clipboard tools and the display order of this tool in the RTE toolbar. */ - clipboard?: Array; + clipboard?: any[]; /** Specifies the edit tools and the displays tool in the RTE toolbar. */ - edit?: Array; + edit?: any[]; /** Specifies the doAction tools and the display order of this tool in the RTE toolbar. */ - doAction?: Array; + doAction?: any[]; /** Specifies the effect of tools and the display order of this tool in RTE toolbar. */ - effects?: Array; + effects?: any[]; /** Specifies the font tools and the display order of this tool in the RTE toolbar. */ - font?: Array; + font?: any[]; /** Specifies the formatStyle tools and the display order of this tool in the RTE toolbar. */ - formatStyle?: Array; + formatStyle?: any[]; /** Specifies the image tools and the display order of this tool in the RTE toolbar. */ - images?: Array; + images?: any[]; /** Specifies the indent tools and the display order of this tool in the RTE toolbar. */ - indenting?: Array; + indenting?: any[]; /** Specifies the link tools and the display order of this tool in the RTE toolbar. */ - links?: Array; + links?: any[]; /** Specifies the list tools and the display order of this tool in the RTE toolbar. */ - lists?: Array; + lists?: any[]; /** Specifies the media tools and the display order of this tool in the RTE toolbar. */ - media?: Array; + media?: any[]; /** Specifies the style tools and the display order of this tool in the RTE toolbar. */ - style?: Array; + style?: any[]; /** Specifies the table tools and the display order of this tool in the RTE toolbar. */ - tables?: Array; + tables?: any[]; /** Specifies the view tools and the display order of this tool in the RTE toolbar. */ - view?: Array; + view?: any[]; /** Specifies the print tools and the display order of this tool in the RTE toolbar. */ - print?: Array; + print?: any[]; + + /** Specifies the importExport tools and the display order of this tool in the RTE toolbar. + */ + importExport?: any[]; /** Specifies the customOrderedList tools and the display order of this tool in the RTE toolbar. */ - customOrderedList?: Array; + customOrderedList?: ToolsCustomOrderedList[]; /** Specifies the customUnOrderedList tools and the display order of this tool in the RTE toolbar. */ - customUnorderedList?: Array; + customUnorderedList?: ToolsCustomUnorderedList[]; } } class Slider extends ej.Widget { static fn: Slider; - constructor(element: JQuery, options?: Slider.Model); - constructor(element: Element, options?: Slider.Model); + constructor(element: JQuery | Element, options?: Slider.Model); static Locale: any; - model:Slider.Model; - defaults:Slider.Model; + model: Slider.Model; + defaults: Slider.Model; /** To disable the slider * @returns {void} @@ -15521,7 +15938,7 @@ class Slider extends ej.Widget { */ setValue(): void; } -export module Slider{ +export namespace Slider { export interface Model { @@ -15637,7 +16054,7 @@ export interface Model { /** Specifies the values of the range slider. But it's not applicable for default and minRange sliders. we can use value property for default and minRange sliders. * @Default {[minValue,maxValue]} */ - values?: Array; + values?: any[]; /** Specifies the width of the slider. * @Default {100%} @@ -15645,25 +16062,25 @@ export interface Model { width?: string; /** Fires once Slider control value is changed successfully. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires once Slider control has been created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when Slider control has been destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires once Slider control is sliding successfully. */ - slide? (e: SlideEventArgs): void; + slide?(e: SlideEventArgs): void; /** Fires once Slider control is started successfully. */ - start? (e: StartEventArgs): void; + start?(e: StartEventArgs): void; /** Fires when Slider control is stopped successfully. */ - stop? (e: StopEventArgs): void; + stop?(e: StopEventArgs): void; /** Fires when display the custom tooltip */ - tooltipChange? (e: TooltipChangeEventArgs): void; + tooltipChange?(e: TooltipChangeEventArgs): void; } export interface ChangeEventArgs { @@ -15809,12 +16226,13 @@ export interface StopEventArgs { } export interface TooltipChangeEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } } -module slider -{ -enum sliderType -{ +namespace slider { +enum sliderType { //Shows default slider Default, //Shows minRange slider @@ -15826,11 +16244,10 @@ Range, class SplitButton extends ej.Widget { static fn: SplitButton; - constructor(element: JQuery, options?: SplitButton.Model); - constructor(element: Element, options?: SplitButton.Model); + constructor(element: JQuery | Element, options?: SplitButton.Model); static Locale: any; - model:SplitButton.Model; - defaults:SplitButton.Model; + model: SplitButton.Model; + defaults: SplitButton.Model; /** Destroy the split button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -15857,7 +16274,7 @@ class SplitButton extends ej.Widget { */ show(): void; } -export module SplitButton{ +export namespace SplitButton { export interface Model { @@ -15891,7 +16308,7 @@ export interface Model { enableRTL?: boolean; /** Specifies the height of the Split Button. - * @Default {“”} + * @Default {“”} */ height?: string|number; @@ -15932,36 +16349,36 @@ export interface Model { text?: string; /** Specifies the width of the Split Button. - * @Default {“”} + * @Default {“”} */ width?: string|number; /** Fires before menu of the split button control is opened. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires when Button control is clicked successfully */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Fires before the list content of Button control is closed */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires after Split Button control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the Split Button is destroyed successfully */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when a menu item is Hovered out successfully */ - itemMouseOut? (e: ItemMouseOutEventArgs): void; + itemMouseOut?(e: ItemMouseOutEventArgs): void; /** Fires when a menu item is Hovered in successfully */ - itemMouseOver? (e: ItemMouseOverEventArgs): void; + itemMouseOver?(e: ItemMouseOverEventArgs): void; /** Fires when a menu item is clicked successfully */ - itemSelected? (e: ItemSelectedEventArgs): void; + itemSelected?(e: ItemSelectedEventArgs): void; /** Fires before the list content of Button control is opened */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; } export interface BeforeOpenEventArgs { @@ -16147,8 +16564,7 @@ export interface OpenEventArgs { type?: string; } } -enum ArrowPosition -{ +enum ArrowPosition { //To set Left arrowPosition of the split button Left, //To set Right arrowPosition of the split button @@ -16161,11 +16577,10 @@ Bottom, class Splitter extends ej.Widget { static fn: Splitter; - constructor(element: JQuery, options?: Splitter.Model); - constructor(element: Element, options?: Splitter.Model); + constructor(element: JQuery | Element, options?: Splitter.Model); static Locale: any; - model:Splitter.Model; - defaults:Splitter.Model; + model: Splitter.Model; + defaults: Splitter.Model; /** To add a new pane to splitter control. * @param {string} content of pane. @@ -16198,7 +16613,7 @@ class Splitter extends ej.Widget { */ removeItem(index: number): void; } -export module Splitter{ +export namespace Splitter { export interface Model { @@ -16213,7 +16628,7 @@ export interface Model { animationSpeed?: number; /** Specify the CSS class to splitter control to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -16243,14 +16658,14 @@ export interface Model { isResponsive?: boolean; /** Specify the orientation for splitter control. See orientation - * @Default {ej.orientation.Horizontal or “horizontal”} + * @Default {ej.orientation.Horizontal or “horizontal”} */ orientation?: ej.Orientation|string; /** Specify properties for each pane like paneSize, minSize, maxSize, collapsible, expandable, resizable. * @Default {[]} */ - properties?: Array; + properties?: any[]; /** Specify width for splitter control. * @Default {null} @@ -16258,19 +16673,19 @@ export interface Model { width?: string; /** Fires before expanding / collapsing the split pane of splitter control. */ - beforeExpandCollapse? (e: BeforeExpandCollapseEventArgs): void; + beforeExpandCollapse?(e: BeforeExpandCollapseEventArgs): void; /** Fires when splitter control pane has been created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when splitter control pane has been destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when expand / collapse operation in splitter control pane has been performed successfully. */ - expandCollapse? (e: ExpandCollapseEventArgs): void; + expandCollapse?(e: ExpandCollapseEventArgs): void; /** Fires when resize in splitter control pane. */ - resize? (e: ResizeEventArgs): void; + resize?(e: ResizeEventArgs): void; } export interface BeforeExpandCollapseEventArgs { @@ -16387,13 +16802,12 @@ export interface ResizeEventArgs { class Tab extends ej.Widget { static fn: Tab; - constructor(element: JQuery, options?: Tab.Model); - constructor(element: Element, options?: Tab.Model); + constructor(element: JQuery | Element, options?: Tab.Model); static Locale: any; - model:Tab.Model; - defaults:Tab.Model; + model: Tab.Model; + defaults: Tab.Model; - /** Add new tab items with given name, URL and given index position, if index null it’s add last item. + /** Add new tab items with given name, URL and given index position, if index null it’s add last item. * @param {string} URL name / tab id. * @param {string} Tab Display name. * @param {number} Index position to placed , this is optional. @@ -16446,7 +16860,7 @@ class Tab extends ej.Widget { */ showItem(index: number): void; } -export module Tab{ +export namespace Tab { export interface Model { @@ -16531,14 +16945,14 @@ export interface Model { /** Specifies to hide a pane of Tab control. * @Default {[]} */ - hiddenItemIndex?: Array; + hiddenItemIndex?: any[]; /** Specifies the HTML Attributes of the Tab. * @Default {{}} */ htmlAttributes?: any; - /** The idPrefix property appends the given string on the added tab item id’s in runtime. + /** The idPrefix property appends the given string on the added tab item id’s in runtime. * @Default {ej-tab-} */ idPrefix?: string; @@ -16563,43 +16977,43 @@ export interface Model { */ showRoundedCorner?: boolean; - /** Set the width for outer panel element, if not it’s take parent width. + /** Set the width for outer panel element, if not it’s take parent width. * @Default {null} */ width?: string|number; /** Triggered after a tab item activated. */ - itemActive? (e: ItemActiveEventArgs): void; + itemActive?(e: ItemActiveEventArgs): void; /** Triggered before AJAX content has been loaded. */ - ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; /** Triggered if error occurs in AJAX request. */ - ajaxError? (e: AjaxErrorEventArgs): void; + ajaxError?(e: AjaxErrorEventArgs): void; /** Triggered after AJAX content load action. */ - ajaxLoad? (e: AjaxLoadEventArgs): void; + ajaxLoad?(e: AjaxLoadEventArgs): void; /** Triggered after a tab item activated. */ - ajaxSuccess? (e: AjaxSuccessEventArgs): void; + ajaxSuccess?(e: AjaxSuccessEventArgs): void; /** Triggered before a tab item activated. */ - beforeActive? (e: BeforeActiveEventArgs): void; + beforeActive?(e: BeforeActiveEventArgs): void; /** Triggered before a tab item remove. */ - beforeItemRemove? (e: BeforeItemRemoveEventArgs): void; + beforeItemRemove?(e: BeforeItemRemoveEventArgs): void; /** Triggered before a tab item Create. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered before a tab item destroy. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered after new tab item add */ - itemAdd? (e: ItemAddEventArgs): void; + itemAdd?(e: ItemAddEventArgs): void; /** Triggered after tab item removed. */ - itemRemove? (e: ItemRemoveEventArgs): void; + itemRemove?(e: ItemRemoveEventArgs): void; } export interface ItemActiveEventArgs { @@ -16924,7 +17338,7 @@ export interface AjaxSettings { type?: string; } -enum Position{ +enum Position { ///Tab headers display to top position Top, @@ -16940,7 +17354,7 @@ enum Position{ } -enum HeightAdjustMode{ +enum HeightAdjustMode { ///string None, @@ -16959,11 +17373,10 @@ enum HeightAdjustMode{ class TagCloud extends ej.Widget { static fn: TagCloud; - constructor(element: JQuery, options?: TagCloud.Model); - constructor(element: Element, options?: TagCloud.Model); + constructor(element: JQuery | Element, options?: TagCloud.Model); static Locale: any; - model:TagCloud.Model; - defaults:TagCloud.Model; + model: TagCloud.Model; + defaults: TagCloud.Model; /** Inserts a new item into the TagCloud * @param {string} Insert new item into the TagCloud @@ -16990,7 +17403,7 @@ class TagCloud extends ej.Widget { */ removeAt(position: number): void; } -export module TagCloud{ +export namespace TagCloud { export interface Model { @@ -17054,19 +17467,19 @@ export interface Model { titleText?: string; /** Event triggers when the TagCloud items are clicked */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Event triggers when the TagCloud are created */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Event triggers when the TagCloud are destroyed */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Event triggers when the cursor leaves out from a tag item */ - mouseout? (e: MouseoutEventArgs): void; + mouseout?(e: MouseoutEventArgs): void; /** Event triggers when the cursor hovers on a tag item */ - mouseover? (e: MouseoverEventArgs): void; + mouseover?(e: MouseoverEventArgs): void; } export interface ClickEventArgs { @@ -17187,8 +17600,7 @@ export interface Fields { url?: string; } } -enum Format -{ +enum Format { //To render the TagCloud items in cloud format Cloud, //To render the TagCloud items in list format @@ -17197,11 +17609,10 @@ List, class TimePicker extends ej.Widget { static fn: TimePicker; - constructor(element: JQuery, options?: TimePicker.Model); - constructor(element: Element, options?: TimePicker.Model); + constructor(element: JQuery | Element, options?: TimePicker.Model); static Locale: any; - model:TimePicker.Model; - defaults:TimePicker.Model; + model: TimePicker.Model; + defaults: TimePicker.Model; /** Allows you to disable the TimePicker. * @returns {void} @@ -17233,7 +17644,7 @@ class TimePicker extends ej.Widget { */ show(): void; } -export module TimePicker{ +export namespace TimePicker { export interface Model { @@ -17266,7 +17677,8 @@ export interface Model { */ enableRTL?: boolean; - /** When the enableStrictMode is set as true it allows the value outside of the range and also indicate with red color border, otherwise it internally changed to the min or max range value based an input value. + /** When the enableStrictMode is set as true it allows the value outside of the range and also indicate with red color border, + * otherwise it internally changed to the min or max range value based an input value. * @Default {false} */ enableStrictMode?: boolean; @@ -17355,34 +17767,34 @@ export interface Model { width?: string|number; /** Fires when the time value changed in the TimePicker. */ - beforeChange? (e: BeforeChangeEventArgs): void; + beforeChange?(e: BeforeChangeEventArgs): void; /** Fires when the TimePicker popup before opened. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Fires when the time value changed in the TimePicker. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when the TimePicker popup closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; /** Fires when create TimePicker successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the TimePicker is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when the TimePicker control gets focus. */ - focusIn? (e: FocusInEventArgs): void; + focusIn?(e: FocusInEventArgs): void; /** Fires when the TimePicker control get lost focus. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Fires when the TimePicker popup opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Fires when the value is selected from the TimePicker dropdown list. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface BeforeChangeEventArgs { @@ -17602,11 +18014,10 @@ export interface SelectEventArgs { class ToggleButton extends ej.Widget { static fn: ToggleButton; - constructor(element: JQuery, options?: ToggleButton.Model); - constructor(element: Element, options?: ToggleButton.Model); + constructor(element: JQuery | Element, options?: ToggleButton.Model); static Locale: any; - model:ToggleButton.Model; - defaults:ToggleButton.Model; + model: ToggleButton.Model; + defaults: ToggleButton.Model; /** Allows you to destroy the ToggleButton widget. * @returns {void} @@ -17623,7 +18034,7 @@ class ToggleButton extends ej.Widget { */ enable(): void; } -export module ToggleButton{ +export namespace ToggleButton { export interface Model { @@ -17723,16 +18134,16 @@ export interface Model { width?: number|string; /** Fires when ToggleButton control state is changed successfully. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Fires when ToggleButton control is clicked successfully. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Fires when ToggleButton control is created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when ToggleButton control is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; } export interface ChangeEventArgs { @@ -17810,11 +18221,10 @@ export interface DestroyEventArgs { class Toolbar extends ej.Widget { static fn: Toolbar; - constructor(element: JQuery, options?: Toolbar.Model); - constructor(element: Element, options?: Toolbar.Model); + constructor(element: JQuery | Element, options?: Toolbar.Model); static Locale: any; - model:Toolbar.Model; - defaults:Toolbar.Model; + model: Toolbar.Model; + defaults: Toolbar.Model; /** Deselect the specified Toolbar item. * @param {any} The element need to be deselected @@ -17901,7 +18311,7 @@ class Toolbar extends ej.Widget { */ show(): void; } -export module Toolbar{ +export namespace Toolbar { export interface Model { @@ -17917,7 +18327,7 @@ export interface Model { /** Disables an Item or set of Items that are enabled in the Toolbar * @Default {[]} */ - disabledItemIndices?: Array; + disabledItemIndices?: any[]; /** Specifies the Toolbar control state. * @Default {true} @@ -17927,7 +18337,7 @@ export interface Model { /** Enables an Item or set of Items that are disabled in the Toolbar * @Default {[]} */ - enabledItemIndices?: Array; + enabledItemIndices?: any[]; /** Specifies enableRTL property to align the Toolbar control from right to left direction. * @Default {false} @@ -17964,6 +18374,11 @@ export interface Model { */ isResponsive?: boolean; + /** Specifies the items of Toolbar + * @Default {null} + */ + Items?: Items; + /** Specifies the Toolbar orientation. See orientation * @Default {Horizontal} */ @@ -17974,6 +18389,11 @@ export interface Model { */ query?: any; + /** Specifies the Toolbar responsive type. + * @Default {Popup} + */ + responsiveType?: ej.Toolbar.ResponsiveType|string; + /** Displays the Toolbar with rounded corners. * @Default {false} */ @@ -17984,22 +18404,28 @@ export interface Model { width?: number|string; /** Fires after Toolbar control is clicked. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Fires after Toolbar control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires after Toolbar control is focused. */ - focusOut? (e: FocusOutEventArgs): void; + focusOut?(e: FocusOutEventArgs): void; /** Fires when the Toolbar is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires after Toolbar control item is hovered. */ - itemHover? (e: ItemHoverEventArgs): void; + itemHover?(e: ItemHoverEventArgs): void; /** Fires after mouse leave from Toolbar control item. */ - itemLeave? (e: ItemLeaveEventArgs): void; + itemLeave?(e: ItemLeaveEventArgs): void; + + /** Fires when the overflow popup of toolbar is opened. */ + overflowOpen?(e: OverflowOpenEventArgs): void; + + /** Fires when the overflow popup of toolbar is closed. */ + overflowClose?(e: OverflowCloseEventArgs): void; } export interface ClickEventArgs { @@ -18128,6 +18554,60 @@ export interface ItemLeaveEventArgs { status?: boolean; } +export interface OverflowOpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /** returns the name of the event + */ + type?: string; + + /** Returns the current X position of the target . + */ + clientX?: number; + + /** Returns the current Y position of the target . + */ + clientY?: number; + + /** returns the target of the current object. + */ + currentTarget?: any; +} + +export interface OverflowCloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /** returns the name of the event + */ + type?: string; + + /** Returns the current X position of the target . + */ + clientX?: number; + + /** Returns the current Y position of the target . + */ + clientY?: number; + + /** returns the target of the current object. + */ + currentTarget?: any; +} + export interface Fields { /** Defines the group name for the item. @@ -18161,16 +18641,68 @@ export interface Fields { /** Defines the tooltip text for the tag. */ tooltipText?: string; + + /** Allows you to add template as toolbar item + */ + template?: string; } + +export interface Items { + + /** Defines the group name for the item. + */ + group?: string; + + /** Defines the HTML attributes such as id, class, styles for the item . + */ + htmlAttributes?: any; + + /** Defines id for the tag. + */ + id?: string; + + /** Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; + + /** Defines the imageURL for the image location. + */ + imageUrl?: string; + + /** Defines the sprite CSS for the image tag. + */ + spriteCssClass?: string; + + /** Defines the text content for the tag. + */ + text?: string; + + /** Defines the tooltip text for the tag. + */ + tooltipText?: string; + + /** Allows to add template as toolbar item. + */ + template?: string; +} + +enum ResponsiveType { + + ///To display the toolbar overflow items as popup + Popup, + + ///To display the toolbar overflow items as inline toolbar + Inline +} + } class TreeView extends ej.Widget { static fn: TreeView; - constructor(element: JQuery, options?: TreeView.Model); - constructor(element: Element, options?: TreeView.Model); + constructor(element: JQuery | Element, options?: TreeView.Model); static Locale: any; - model:TreeView.Model; - defaults:TreeView.Model; + model: TreeView.Model; + defaults: TreeView.Model; /** To add a Node or collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. * @param {string|any} New node text or JSON object @@ -18184,7 +18716,7 @@ class TreeView extends ej.Widget { * @param {string|any} ID of TreeView node/object of TreeView node * @returns {void} */ - addNodes(collection: any|Array, target: string|any): void; + addNodes(collection: any|any[], target: string|any): void; /** To check all the nodes in TreeView. * @returns {void} @@ -18192,12 +18724,13 @@ class TreeView extends ej.Widget { checkAll(): void; /** To check a node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - checkNode(element: string|any): void; + checkNode(element: string|any|any[]): void; - /** This method is used to collapse all nodes in TreeView control. If you want to collapse all nodes up to the specific level in TreeView control then we need to pass levelUntil as argument to this method. + /** This method is used to collapse all nodes in TreeView control. If you want to collapse all nodes up to the specific level in + * TreeView control then we need to pass levelUntil as argument to this method. * @param {number} TreeView nodes will collapse until the given level * @param {boolean} Weather exclude the hidden nodes of TreeView while collapse all nodes * @returns {void} @@ -18205,22 +18738,22 @@ class TreeView extends ej.Widget { collapseAll(levelUntil?: number, excludeHiddenNodes?: boolean): void; /** To collapse a particular node in TreeView. - * @param {string|any} ID of TreeView node|object of TreeView node + * @param {string|any|Array} ID of TreeView node|object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - collapseNode(element: string|any): void; + collapseNode(element: string|any|any[]): void; /** To disable the node in the TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - disableNode(element: string|any): void; + disableNode(element: string|any|any[]): void; /** To enable the node in the TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - enableNode(element: string|any): void; + enableNode(element: string|any|any[]): void; /** To ensure that the TreeView node is visible in the TreeView. This method is useful if we need select a TreeView node dynamically. * @param {string|any} ID of TreeView node/object of TreeView node @@ -18228,7 +18761,8 @@ class TreeView extends ej.Widget { */ ensureVisible(element: string|any): boolean; - /** This method is used to expand all nodes in TreeView control. If you want to expand all nodes up to the specific level in TreeView control then we need to pass levelUntil as argument to this method. + /** This method is used to expand all nodes in TreeView control. If you want to expand all nodes up to the specific level in TreeView control + * then we need to pass levelUntil as argument to this method. * @param {number} TreeView nodes will expand until the given level * @param {boolean} Weather exclude the hidden nodes of TreeView while expand all nodes * @returns {void} @@ -18236,10 +18770,10 @@ class TreeView extends ej.Widget { expandAll(levelUntil?: number, excludeHiddenNodes?: boolean): void; /** To expandNode particular node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - expandNode(element: string|any): void; + expandNode(element: string|any|any[]): void; /** To get currently checked nodes in TreeView. * @returns {any} @@ -18249,14 +18783,15 @@ class TreeView extends ej.Widget { /** To get currently checked nodes indexes in TreeView. * @returns {Array} */ - getCheckedNodesIndex(): Array; + getCheckedNodesIndex(): any[]; - /** This method is used to get immediate child nodes of a node in TreeView control. If you want to get the all child nodes include nested child nodes then we need to pass includeNestedChild as true along with element arguments to this method. + /** This method is used to get immediate child nodes of a node in TreeView control. If you want to get the all child nodes include nested + * child nodes then we need to pass includeNestedChild as true along with element arguments to this method. * @param {string|any} ID of TreeView node/object of TreeView node * @param {boolean} Weather include nested child nodes of TreeView node * @returns {Array} */ - getChildren(element: string|any, includeNestedChild?: boolean): Array; + getChildren(element: string|any, includeNestedChild?: boolean): any[]; /** To get number of nodes in TreeView. * @returns {number} @@ -18271,7 +18806,7 @@ class TreeView extends ej.Widget { /** To get currently expanded nodes indexes in TreeView. * @returns {Array} */ - getExpandedNodesIndex(): Array; + getExpandedNodesIndex(): any[]; /** To get TreeView node by using index position in TreeView. * @param {number} Index position of TreeView node @@ -18305,7 +18840,7 @@ class TreeView extends ej.Widget { /** To get the currently selected nodes in TreeView. * @returns {Array} */ - getSelectedNodes(): Array; + getSelectedNodes(): any[]; /** To get the index position of currently selected node in TreeView. * @returns {number} @@ -18315,7 +18850,7 @@ class TreeView extends ej.Widget { /** To get the index positions of currently selected nodes in TreeView. * @returns {Array} */ - getSelectedNodesIndex(): Array; + getSelectedNodesIndex(): any[]; /** To get the text of a node in TreeView. * @param {string|any} ID of TreeView node/object of TreeView node @@ -18327,7 +18862,7 @@ class TreeView extends ej.Widget { * @param {string|number} ID of TreeView node * @returns {Array} */ - getTreeData(id?: string|number): Array; + getTreeData(id?: string|number): any[]; /** To get currently visible nodes in TreeView. * @returns {any} @@ -18346,10 +18881,10 @@ class TreeView extends ej.Widget { hide(): void; /** To hide particular node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - hideNode(element: string|any): void; + hideNode(element: string|any|any[]): void; /** To add a Node or collection of nodes after the particular TreeView node. * @param {string|any} New node text or JSON object @@ -18433,10 +18968,10 @@ class TreeView extends ej.Widget { removeAll(): void; /** To remove a node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - removeNode(element: string|any): void; + removeNode(element: string|any|any[]): void; /** To select all the TreeView nodes when enable allowMultiSelection property. * @returns {void} @@ -18447,7 +18982,7 @@ class TreeView extends ej.Widget { * @param {string|any|Array} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes * @returns {void} */ - selectNode(element: string|any|Array): void; + selectNode(element: string|any|any[]): void; /** To show nodes in TreeView. * @returns {void} @@ -18455,10 +18990,10 @@ class TreeView extends ej.Widget { show(): void; /** To show a node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - showNode(element: string|any): void; + showNode(element: string|any|any[]): void; /** To uncheck all the nodes in TreeView. * @returns {void} @@ -18466,10 +19001,10 @@ class TreeView extends ej.Widget { unCheckAll(): void; /** To uncheck a node in TreeView. - * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any|Array} ID of TreeView node/object of TreeView node/collection of ID/object of TreeView nodes * @returns {void} */ - uncheckNode(element: string|any): void; + uncheckNode(element: string|any|any[]): void; /** To unselect all the TreeView nodes when enable allowMultiSelection property. * @returns {void} @@ -18480,7 +19015,7 @@ class TreeView extends ej.Widget { * @param {string|any|Array} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes * @returns {void} */ - unselectNode(element: string|any|Array): void; + unselectNode(element: string|any|any[]): void; /** To edit or update the text of the TreeView node. * @param {string|any} ID of TreeView node/object of TreeView node @@ -18489,7 +19024,7 @@ class TreeView extends ej.Widget { */ updateText(target: string|any, newText: string): void; } -export module TreeView{ +export namespace TreeView { export interface Model { @@ -18541,7 +19076,7 @@ export interface Model { /** Gets or sets a value that indicates the checkedNodes index collection as an array. The given array index position denotes the nodes, that are checked while rendering TreeView. * @Default {[]} */ - checkedNodes?: Array; + checkedNodes?: any[]; /** Sets the root CSS class for TreeView which allow us to customize the appearance. */ @@ -18575,7 +19110,7 @@ export interface Model { /** Gets or sets a array of value that indicates the expandedNodes index collection as an array. The given array index position denotes the nodes, that are expanded while rendering TreeView. * @Default {[]} */ - expandedNodes?: Array; + expandedNodes?: any[]; /** Gets or sets a value that indicates the TreeView node can be expand or collapse by using the specified action. * @Default {dblclick} @@ -18615,7 +19150,7 @@ export interface Model { /** Gets or sets a value that indicates the selectedNodes index collection as an array. The given array index position denotes the nodes, that are selected while rendering TreeView. * @Default {[]} */ - selectedNodes?: Array; + selectedNodes?: any[]; /** Gets or sets a value that indicates whether to display or hide checkbox for all TreeView nodes. * @Default {false} @@ -18637,100 +19172,100 @@ export interface Model { width?: string|number; /** Fires before adding node to TreeView. */ - beforeAdd? (e: BeforeAddEventArgs): void; + beforeAdd?(e: BeforeAddEventArgs): void; /** Fires before collapse a node. */ - beforeCollapse? (e: BeforeCollapseEventArgs): void; + beforeCollapse?(e: BeforeCollapseEventArgs): void; /** Fires before cut node in TreeView. */ - beforeCut? (e: BeforeCutEventArgs): void; + beforeCut?(e: BeforeCutEventArgs): void; /** Fires before deleting node in TreeView. */ - beforeDelete? (e: BeforeDeleteEventArgs): void; + beforeDelete?(e: BeforeDeleteEventArgs): void; /** Fires before editing the node in TreeView. */ - beforeEdit? (e: BeforeEditEventArgs): void; + beforeEdit?(e: BeforeEditEventArgs): void; /** Fires before expanding the node. */ - beforeExpand? (e: BeforeExpandEventArgs): void; + beforeExpand?(e: BeforeExpandEventArgs): void; /** Fires before loading nodes to TreeView. */ - beforeLoad? (e: BeforeLoadEventArgs): void; + beforeLoad?(e: BeforeLoadEventArgs): void; /** Fires before paste node in TreeView. */ - beforePaste? (e: BeforePasteEventArgs): void; + beforePaste?(e: BeforePasteEventArgs): void; /** Fires before selecting node in TreeView. */ - beforeSelect? (e: BeforeSelectEventArgs): void; + beforeSelect?(e: BeforeSelectEventArgs): void; /** Fires when TreeView created successfully. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when TreeView destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires before nodeEdit Successful. */ - inlineEditValidation? (e: InlineEditValidationEventArgs): void; + inlineEditValidation?(e: InlineEditValidationEventArgs): void; /** Fires when key pressed successfully. */ - keyPress? (e: KeyPressEventArgs): void; + keyPress?(e: KeyPressEventArgs): void; /** Fires when data load fails. */ - loadError? (e: LoadErrorEventArgs): void; + loadError?(e: LoadErrorEventArgs): void; /** Fires when data loaded successfully. */ - loadSuccess? (e: LoadSuccessEventArgs): void; + loadSuccess?(e: LoadSuccessEventArgs): void; /** Fires once node added successfully. */ - nodeAdd? (e: NodeAddEventArgs): void; + nodeAdd?(e: NodeAddEventArgs): void; /** Fires once node checked successfully. */ - nodeCheck? (e: NodeCheckEventArgs): void; + nodeCheck?(e: NodeCheckEventArgs): void; /** Fires when node clicked successfully. */ - nodeClick? (e: NodeClickEventArgs): void; + nodeClick?(e: NodeClickEventArgs): void; /** Fires when node collapsed successfully. */ - nodeCollapse? (e: NodeCollapseEventArgs): void; + nodeCollapse?(e: NodeCollapseEventArgs): void; /** Fires when node cut successfully. */ - nodeCut? (e: NodeCutEventArgs): void; + nodeCut?(e: NodeCutEventArgs): void; /** Fires when node deleted successfully. */ - nodeDelete? (e: NodeDeleteEventArgs): void; + nodeDelete?(e: NodeDeleteEventArgs): void; /** Fires when node dragging. */ - nodeDrag? (e: NodeDragEventArgs): void; + nodeDrag?(e: NodeDragEventArgs): void; /** Fires once node drag start successfully. */ - nodeDragStart? (e: NodeDragStartEventArgs): void; + nodeDragStart?(e: NodeDragStartEventArgs): void; /** Fires before the dragged node to be dropped. */ - nodeDragStop? (e: NodeDragStopEventArgs): void; + nodeDragStop?(e: NodeDragStopEventArgs): void; /** Fires once node dropped successfully. */ - nodeDropped? (e: NodeDroppedEventArgs): void; + nodeDropped?(e: NodeDroppedEventArgs): void; /** Fires once node edited successfully. */ - nodeEdit? (e: NodeEditEventArgs): void; + nodeEdit?(e: NodeEditEventArgs): void; /** Fires once node expanded successfully. */ - nodeExpand? (e: NodeExpandEventArgs): void; + nodeExpand?(e: NodeExpandEventArgs): void; /** Fires once node pasted successfully. */ - nodePaste? (e: NodePasteEventArgs): void; + nodePaste?(e: NodePasteEventArgs): void; /** Fires when node selected successfully. */ - nodeSelect? (e: NodeSelectEventArgs): void; + nodeSelect?(e: NodeSelectEventArgs): void; /** Fires once node unchecked successfully. */ - nodeUncheck? (e: NodeUncheckEventArgs): void; + nodeUncheck?(e: NodeUncheckEventArgs): void; /** Fires once node unselected successfully. */ - nodeUnselect? (e: NodeUnselectEventArgs): void; + nodeUnselect?(e: NodeUnselectEventArgs): void; /** Fires when TreeView nodes are loaded successfully */ - ready? (e: ReadyEventArgs): void; + ready?(e: ReadyEventArgs): void; } export interface BeforeAddEventArgs { @@ -18866,7 +19401,7 @@ export interface BeforeDeleteEventArgs { /** returns the currently removed nodes */ - removedNodes?: Array; + removedNodes?: any[]; } export interface BeforeEditEventArgs { @@ -19221,11 +19756,11 @@ export interface NodeCheckEventArgs { /** it returns the currently checked node name */ - currentNode?: Array; + currentNode?: any[]; /** it returns the currently checked and its child node details */ - currentCheckedNodes?: Array; + currentCheckedNodes?: any[]; } export interface NodeClickEventArgs { @@ -19357,7 +19892,7 @@ export interface NodeDeleteEventArgs { /** returns the currently removed nodes */ - removedNodes?: Array; + removedNodes?: any[]; } export interface NodeDragEventArgs { @@ -19657,7 +20192,7 @@ export interface NodeSelectEventArgs { /** returns the current selected nodes index of TreeView */ - selectedNodes?: Array; + selectedNodes?: any[]; /** returns the value of the node */ @@ -19712,7 +20247,7 @@ export interface NodeUncheckEventArgs { /** it returns currently unchecked node and its child node details. */ - currentUncheckedNodes?: Array; + currentUncheckedNodes?: any[]; } export interface NodeUnselectEventArgs { @@ -19739,7 +20274,7 @@ export interface NodeUnselectEventArgs { /** returns the current selected nodes index of TreeView */ - selectedNodes?: Array; + selectedNodes?: any[]; /** returns the name of the event */ @@ -19791,7 +20326,7 @@ export interface Fields { */ id?: string; - /** Specifies the image attribute to “img” tag inside items list + /** Specifies the image attribute to “img” tag inside items list */ imageAttribute?: any; @@ -19803,7 +20338,7 @@ export interface Fields { */ isChecked?: string; - /** Specifies the link attribute to “a” tag in item list. + /** Specifies the link attribute to “a” tag in item list. */ linkAttribute?: any; @@ -19845,8 +20380,7 @@ export interface SortSettings { sortOrder?: ej.sortOrder|string; } } -enum sortOrder -{ +enum sortOrder { //Enum for Ascending sort order Ascending, //Enum for Descending sort order @@ -19855,11 +20389,10 @@ Descending, class Uploadbox extends ej.Widget { static fn: Uploadbox; - constructor(element: JQuery, options?: Uploadbox.Model); - constructor(element: Element, options?: Uploadbox.Model); + constructor(element: JQuery | Element, options?: Uploadbox.Model); static Locale: any; - model:Uploadbox.Model; - defaults:Uploadbox.Model; + model: Uploadbox.Model; + defaults: Uploadbox.Model; /** The destroy method destroys the control and brings the control to a pre-init state. All the events of the Upload control is bound by using this._on unbinds automatically. * @returns {void} @@ -19881,7 +20414,7 @@ class Uploadbox extends ej.Widget { */ refresh(): void; } -export module Uploadbox{ +export namespace Uploadbox { export interface Model { @@ -20025,37 +20558,37 @@ export interface Model { width?: string; /** Fires when the upload progress beforeSend. */ - beforeSend? (e: BeforeSendEventArgs): void; + beforeSend?(e: BeforeSendEventArgs): void; /** Fires when the upload progress begins. */ - begin? (e: BeginEventArgs): void; + begin?(e: BeginEventArgs): void; /** Fires when the upload progress is cancelled. */ - cancel? (e: CancelEventArgs): void; + cancel?(e: CancelEventArgs): void; /** Fires when the file upload progress is completed. */ - complete? (e: CompleteEventArgs): void; + complete?(e: CompleteEventArgs): void; /** Fires when the file upload progress is succeeded. */ - success? (e: SuccessEventArgs): void; + success?(e: SuccessEventArgs): void; /** Fires when the Uploadbox control is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the Uploadbox control is destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires when the Upload process ends in Error. */ - error? (e: ErrorEventArgs): void; + error?(e: ErrorEventArgs): void; /** Fires when the file is selected for upload successfully. */ - fileSelect? (e: FileSelectEventArgs): void; + fileSelect?(e: FileSelectEventArgs): void; /** Fires when the file is uploading. */ - inProgress? (e: InProgressEventArgs): void; + inProgress?(e: InProgressEventArgs): void; /** Fires when the uploaded file is removed successfully. */ - remove? (e: RemoveEventArgs): void; + remove?(e: RemoveEventArgs): void; } export interface BeforeSendEventArgs { @@ -20331,14 +20864,14 @@ export interface DialogAction { */ drag?: boolean; - /** Enables or disables the Uploadbox dialog’s modal property to the dialog popup. + /** Enables or disables the Uploadbox dialog’s modal property to the dialog popup. */ modal?: boolean; } export interface DialogText { - /** Sets the uploaded file’s Name (header text) to the Dialog popup. + /** Sets the uploaded file’s Name (header text) to the Dialog popup. */ name?: string; @@ -20358,11 +20891,10 @@ export interface DialogText { class WaitingPopup extends ej.Widget { static fn: WaitingPopup; - constructor(element: JQuery, options?: WaitingPopup.Model); - constructor(element: Element, options?: WaitingPopup.Model); + constructor(element: JQuery | Element, options?: WaitingPopup.Model); static Locale: any; - model:WaitingPopup.Model; - defaults:WaitingPopup.Model; + model: WaitingPopup.Model; + defaults: WaitingPopup.Model; /** To hide the waiting popup * @returns {void} @@ -20379,7 +20911,7 @@ class WaitingPopup extends ej.Widget { */ show(): void; } -export module WaitingPopup{ +export namespace WaitingPopup { export interface Model { @@ -20424,10 +20956,10 @@ export interface Model { text?: string; /** Fires after Create WaitingPopup successfully */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires after Destroy WaitingPopup successfully */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; } export interface CreateEventArgs { @@ -20463,29 +20995,28 @@ export interface DestroyEventArgs { class Grid extends ej.Widget { static fn: Grid; - constructor(element: JQuery, options?: Grid.Model); - constructor(element: Element, options?: Grid.Model); + constructor(element: JQuery | Element, options?: Grid.Model); static Locale: any; - model:Grid.Model; - defaults:Grid.Model; + model: Grid.Model; + defaults: Grid.Model; /** Adds a grid model property which is to be ignored upon exporting. * @param {Array} Pass the array of parameters which need to be ignored on exporting * @returns {void} */ - addIgnoreOnExport(propertyNames: Array): void; + addIgnoreOnExport(propertyNames: any[]): void; /** Add a new record in grid control when allowAdding is set as true. * @returns {void} */ - addRecord(): void; + //addRecord(): void; /** Add a new record in grid control when allowAdding is set as true. * @param {Array} Pass the array of added Records * @param {Array} optionalIf we pass serverChange as true, send post to server side for server action. * @returns {void} */ - addRecord(data: Array, serverChange?: Array): void; + addRecord(data: any[], serverChange?: any[]): void; /** Cancel the modified changes in grid control when edit mode is "batch". * @returns {void} @@ -20510,20 +21041,20 @@ class Grid extends ej.Widget { /** It is used to clear all the cell selection. * @returns {Boolean} */ - clearCellSelection(): Boolean; + clearCellSelection(): boolean; /** It is used to clear specified cell selection based on the rowIndex and columnIndex provided. * @param {number} It is used to pass the row index of the cell * @param {number} It is used to pass the column index of the cell. * @returns {Boolean} */ - clearCellSelection(rowIndex: number, columnIndex: number): Boolean; + clearCellSelection(rowIndex: number, columnIndex: number): boolean; /** It is used to clear all the row selection or at specific row selection based on the index provided. * @param {number} optional If index of the column is specified then it will remove the selection from the particular column else it will clears all of the column selection * @returns {Boolean} */ - clearColumnSelection(index?: number): Boolean; + clearColumnSelection(index?: number): boolean; /** It is used to clear all the filtering done. * @param {string} If field of the column is specified then it will clear the particular filtering column @@ -20540,7 +21071,7 @@ class Grid extends ej.Widget { * @param {number} optional If index of the row is specified then it will remove the selection from the particular row else it will clears all of the row selection * @returns {Boolean} */ - clearSelection(index?: number): Boolean; + clearSelection(index?: number): boolean; /** Clear the sorting from columns in the grid * @returns {void} @@ -20562,21 +21093,27 @@ class Grid extends ej.Widget { * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform * @returns {void} */ - columns(columnDetails: Array|string, action?: string): void; + columns(columnDetails: any[]|string, action?: string): void; /** Refresh the grid with new data source * @param {Array} Pass new data source to the grid * @param {boolean} optional When templateRefresh is set true, both header and contents get refreshed * @returns {void} */ - dataSource(datasource: Array, templateRefresh?: boolean): void; + dataSource(datasource: any[], templateRefresh?: boolean): void; /** Delete a record in grid control when allowDeleting is set as true * @param {string} Pass the primary key field Name of the column * @param {Array} Pass the JSON data of record need to be delete. * @returns {void} */ - deleteRecord(fieldName: string, data: Array): void; + deleteRecord(fieldName: string, data: any[]): void; + + /** Delete the row based on the given tr element in grid. + * @param {JQuery} Pass the tr element in grid content to get its row index + * @returns {HTMLElement} + */ + deleteRow($tr: JQuery): HTMLElement; /** Destroy the grid widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -20590,6 +21127,11 @@ class Grid extends ej.Widget { */ editCell(index: number, fieldName: string): void; + /** It returns a value and if the input field values of edit form is not based on the validation rules then it will show the validation message. + * @returns {Boolean} + */ + editFormValidate(): boolean; + /** Send a save request in grid. * @returns {void} */ @@ -20618,15 +21160,7 @@ class Grid extends ej.Widget { * @param {Array} optionalPass the array of the gridIds to be filtered * @returns {void} */ - export(action: string, serverEvent?: string, multipleExport?: boolean, gridIds?: Array): void; - - /** Export the grid content to excel, word or PDF document. - * @param {string} Pass the controller action name corresponding to exporting - * @param {string} optionalASP server event name corresponding to exporting - * @param {boolean} optionalPass the multiple exporting value as true/false - * @returns {void} - */ - export(action: string, serverEvent?: string, multipleExport?: boolean): void; + export(action: string, serverEvent?: string, multipleExport?: boolean, gridIds?: any[]): void; /** Send a filtering request to filter one column in grid. * @param {Array} Pass the field name of the column @@ -20637,13 +21171,13 @@ class Grid extends ej.Widget { * @param {any} optionalactualFilterValue denote the filter object of current filtered columns.Pass the value to filtered in a column * @returns {void} */ - filterColumn(fieldName: Array, filterOperator: string, filterValue: string, predicate: string, matchcase?: boolean, actualFilterValue?: any): void; + filterColumn(fieldName: any[], filterOperator: string, filterValue: string, predicate: string, matchcase?: boolean, actualFilterValue?: any): void; /** Send a filtering request to filter single or multiple column in grid. * @param {Array} Pass array of filterColumn query for performing filter operation * @returns {void} */ - filterColumn(filterQueries: Array): void; + filterColumn(filterQueries: any[]): void; /** Get the batch changes of edit, delete and add operations of grid. * @returns {any} @@ -20676,7 +21210,7 @@ class Grid extends ej.Widget { /** Get the list of field names from column collection in grid. * @returns {Array} */ - getColumnFieldNames(): Array; + getColumnFieldNames(): any[]; /** Get the column index of the given field in grid. * @param {string} Pass the field name of the column to get the corresponding column index @@ -20684,6 +21218,13 @@ class Grid extends ej.Widget { */ getColumnIndexByField(fieldName: string): number; + /** Get the column index of the given headerText of column in grid. + * @param {string} Pass the headerText of the column to get that column index + * @param {string} optionalOptional Pass the field name of the column. + * @returns {number} + */ + getColumnIndexByHeaderText(headerText: string, field?: string): number; + /** Get the content div element of grid. * @returns {HTMLElement} */ @@ -20692,7 +21233,7 @@ class Grid extends ej.Widget { /** Get the content table element of grid * @returns {Array} */ - getContentTable(): Array; + getContentTable(): HTMLTableElement[]; /** Get the data of currently edited cell value in "batch" edit mode * @returns {any} @@ -20707,13 +21248,18 @@ class Grid extends ej.Widget { /** Get the current page data source of grid. * @returns {Array} */ - getCurrentViewData(): Array; + getCurrentViewData(): any[]; + + /** Get the data of given row index in grid. + * @returns {any} + */ + getDataByIndex(): any; /** Get the column field name from the given header text in grid. * @param {string} Pass header text of the column to get its corresponding field name * @returns {String} */ - getFieldNameByHeaderText(headerText: string): String; + getFieldNameByHeaderText(headerText: string): string; /** Get the filter bar of grid * @returns {HTMLElement} @@ -20723,7 +21269,7 @@ class Grid extends ej.Widget { /** Get the records filtered or searched in Grid * @returns {Array} */ - getFilteredRecords(): Array; + getFilteredRecords(): any[]; /** Get the footer content of grid. * @returns {HTMLElement} @@ -20749,12 +21295,12 @@ class Grid extends ej.Widget { * @param {string} Pass field name of the column to get its corresponding header text * @returns {String} */ - getHeaderTextByFieldName(field: string): String; + getHeaderTextByFieldName(field: string): string; /** Get the names of all the hidden column collections in grid. * @returns {Array} */ - getHiddenColumnNames(): Array; + getHiddenColumnNames(): any[]; /** Get the row index based on the given tr element in grid. * @param {JQuery} Pass the tr element in grid content to get its row index @@ -20770,7 +21316,7 @@ class Grid extends ej.Widget { /** Get the names of primary key columns in Grid * @returns {Array} */ - getPrimaryKeyFieldNames(): Array; + getPrimaryKeyFieldNames(): any[]; /** Get the rows(tr element) from the given from and to row index in grid * @param {number} Pass the from index from which the rows to be returned @@ -20797,19 +21343,30 @@ class Grid extends ej.Widget { /** Get the selected records details in grid. * @returns {Array} */ - getSelectedRecords(): Array; + getSelectedRecords(): any[]; + + /** Get the selected row element details in grid. + * @returns {Array} + */ + getSelectedRows(): any[]; + + /** It accepts the string value and returns the field and sorted direction of the column in grid. + * @param {string} Pass the field of the column to get the sorted direction of the corresponding column in Grid. + * @returns {number} + */ + getsortColumnByField(field: string): number; /** Get the calculated summary values of JSON data passed to it * @param {any} Pass Summary Column details * @param {any} Pass JSON Array for which its field values to be calculated * @returns {Number} */ - getSummaryValues(summaryCol: any, summaryData: any): Number; + getSummaryValues(summaryCol: any, summaryData: any): number; /** Get the names of all the visible column collections in grid * @returns {Array} */ - getVisibleColumnNames(): Array; + getVisibleColumnNames(): any[]; /** Send a paging request to specified page in grid * @param {number} Pass the page index to perform paging at specified page index @@ -20827,7 +21384,7 @@ class Grid extends ej.Widget { * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide * @returns {void} */ - hideColumns(headerText: Array|string): void; + hideColumns(headerText: any[]|string): void; /** Print the grid control * @returns {void} @@ -20839,6 +21396,11 @@ class Grid extends ej.Widget { */ refreshBatchEditChanges(): void; + /** It is used to refresh the grid header. + * @returns {void} + */ + refreshHeader(): void; + /** Refresh the grid contents. The template refreshment is based on the argument passed along with this method * @param {boolean} optional When templateRefresh is set true, template and grid contents both are refreshed in grid else only grid content is refreshed * @returns {void} @@ -20859,7 +21421,7 @@ class Grid extends ej.Widget { * @param {Array|string} Pass array of field names of the columns to remove a collection of sorted columns or pass a string of field name to remove a column from sorted column collections * @returns {void} */ - removeSortedColumns(fieldName: Array|string): void; + removeSortedColumns(fieldName: any[]|string): void; /** Creates a grid control * @returns {void} @@ -20873,6 +21435,13 @@ class Grid extends ej.Widget { */ reorderColumns(fromFieldName: string, toFieldName: string): void; + /** Re-order the row in grid + * @param {Array} Pass the indexes of the rows needs to reorder. + * @param {number} Pass the index of a row where to be reorderd. + * @returns {void} + */ + reorderRows(indexes: any[], toindex: number): void; + /** Reset the model collections like pageSettings, groupSettings, filterSettings, sortSettings and summaryRows. * @returns {void} */ @@ -20893,7 +21462,7 @@ class Grid extends ej.Widget { /** Save the particular edited cell in grid. * @returns {void} */ - saveCell(): void; + //saveCell(): void; /** We can prevent the client side cellSave event triggering by passing the preventSaveEvent argument as true. * @param {boolean} optionalIf we pass preventSaveEvent as true, it prevents the client side cellSave event triggering @@ -20936,7 +21505,7 @@ class Grid extends ej.Widget { * @param {number} optionalIt is used to set the ending index of column for selecting columns. * @returns {Boolean} */ - selectColumns(columnIndex: number, toIndex?: number): Boolean; + selectColumns(columnIndex: number, toIndex?: number): boolean; /** Select rows in grid. * @param {number} It is used to set the starting index of row for selecting rows. @@ -20951,13 +21520,13 @@ class Grid extends ej.Widget { * @param {any} optionalTarget element which is clicked. * @returns {void} */ - selectRows(from: Array|number, to: number, target?: any): void; + selectRows(from: any[]|number, to: number, target?: any): void; /** Select rows in grid. * @param {Array} Pass array of rowIndexes for selecting rows * @returns {void} */ - selectRows(rowIndexes: Array): void; + selectRows(rowIndexes: any[]): void; /** Used to update a particular cell value. * @returns {void} @@ -20972,6 +21541,11 @@ class Grid extends ej.Widget { */ setCellValue(Index: number, fieldName: string, value: any): void; + /** It sets the default data to the column in grid during adding record in batch edit mode. + * @returns {void} + */ + setDefaultData(): void; + /** The grid rows has to be rendered as detail view in mobile mode based on given value. * @param {number} It is used to render grid rows as details view in mobile mode. * @returns {void} @@ -20989,7 +21563,7 @@ class Grid extends ej.Widget { * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to show * @returns {void} */ - showColumns(headerText: Array|string): void; + showColumns(headerText: any[]|string): void; /** Send a sorting request in grid. * @param {string} Pass the field name of the column as columnName for which sorting have to be performed @@ -21015,100 +21589,105 @@ class Grid extends ej.Widget { * @param {Array} Pass the edited JSON data of record need to be update. * @returns {void} */ - updateRecord(fieldName: string, data: Array): void; + updateRecord(fieldName: string, data: any[]): void; /** It adapts grid to its parent element or to the browsers window. * @returns {void} */ windowonresize(): void; } -export module Grid{ +export namespace Grid { export interface Model { /** Gets or sets a value that indicates whether to customizing cell based on our needs. * @Default {false} */ - allowCellMerging?: Boolean; + allowCellMerging?: boolean; - /** Gets or sets a value that indicates whether to enable dynamic grouping behavior. Grouping can be done by drag on drop desired columns to grid’s GroupDropArea. This can be further customized through “groupSettings” property. + /** Gets or sets a value that indicates whether to enable dynamic grouping behavior. Grouping can be done by drag on drop desired columns to grid’s GroupDropArea. + * This can be further customized through “groupSettings” property. * @Default {false} */ - allowGrouping?: Boolean; + allowGrouping?: boolean; - /** Gets or sets a value that indicates whether to enable keyboard support for performing grid actions. selectionType – Gets or sets a value that indicates whether to enable single row or multiple rows selection behavior in grid. Multiple selection can be done through by holding CTRL and clicking the grid rows + /** Gets or sets a value that indicates whether to enable keyboard support for performing grid actions. selectionType – Gets or sets a value that indicates whether to enable single + * row or multiple rows selection behavior in grid. Multiple selection can be done through by holding CTRL and clicking the grid rows * @Default {true} */ - allowKeyboardNavigation?: Boolean; + allowKeyboardNavigation?: boolean; - /** Gets or sets a value that indicates whether to enable dynamic filtering behavior on grid. Filtering can be used to limit the records displayed using required criteria and this can be further customized through “filterSettings” property + /** Gets or sets a value that indicates whether to enable dynamic filtering behavior on grid. Filtering can be used to limit the records displayed using required criteria and + * this can be further customized through “filterSettings” property * @Default {false} */ - allowFiltering?: Boolean; + allowFiltering?: boolean; /** Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. * @Default {false} */ - allowSorting?: Boolean; + allowSorting?: boolean; /** Gets or sets a value that indicates whether to enable multi columns sorting behavior in grid. Sort multiple columns by holding CTRL and click on the corresponding column header. * @Default {false} */ - allowMultiSorting?: Boolean; + allowMultiSorting?: boolean; - /** This specifies the grid to show the paginated data. Also enables pager control at the bottom of grid for dynamic navigation through data source. Paging can be further customized through “pageSettings” property. + /** This specifies the grid to show the paginated data. Also enables pager control at the bottom of grid for dynamic navigation through data source. + * Paging can be further customized through “pageSettings” property. * @Default {false} */ - allowPaging?: Boolean; + allowPaging?: boolean; - /** Gets or sets a value that indicates whether to enable the columns reordering behavior in the grid. Reordering can be done through by drag and drop the particular column from one index to another index within the grid. + /** Gets or sets a value that indicates whether to enable the columns reordering behavior in the grid. Reordering can be done through by drag and drop the particular column + * from one index to another index within the grid. * @Default {false} */ - allowReordering?: Boolean; + allowReordering?: boolean; /** Gets or sets a value that indicates whether the column is non resizable. Column width is set automatically based on the content or header text which is large. * @Default {false} */ - allowResizeToFit?: Boolean; + allowResizeToFit?: boolean; /** Gets or sets a value that indicates whether to enable dynamic resizable of columns. Resize the width of the columns by simply click and move the particular column header line * @Default {false} */ - allowResizing?: Boolean; + allowResizing?: boolean; /** Gets or sets a value that indicates whether to enable the rows reordering in Grid and drag & drop rows between multiple Grid. * @Default {false} */ - allowRowDragAndDrop?: Boolean; + allowRowDragAndDrop?: boolean; /** Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually * @Default {false} */ - allowScrolling?: Boolean; + allowScrolling?: boolean; - /** Gets or sets a value that indicates whether to enable dynamic searching behavior in grid. Currently search box can be enabled through “toolbarSettings” + /** Gets or sets a value that indicates whether to enable dynamic searching behavior in grid. Currently search box can be enabled through “toolbarSettings” * @Default {false} */ - allowSearching?: Boolean; + allowSearching?: boolean; /** Gets or sets a value that indicates whether user can select rows on grid. On enabling feature, selected row will be highlighted. * @Default {true} */ - allowSelection?: Boolean; + allowSelection?: boolean; /** Gets or sets a value that indicates whether the Content will wrap to the next line if the content exceeds the boundary of the Column Cells. * @Default {false} */ - allowTextWrap?: Boolean; + allowTextWrap?: boolean; /** Gets or sets a value that indicates whether to enable the multiple exporting behavior on grid data. * @Default {false} */ - allowMultipleExporting?: Boolean; + allowMultipleExporting?: boolean; /** Gets or sets a value that indicates to define common width for all the columns in the grid. */ - commonWidth?: Number; + commonWidth?: number; /** Gets or sets a value that indicates to enable the visibility of the grid lines. * @Default {ej.Grid.GridLines.Both} @@ -21128,7 +21707,7 @@ export interface Model { /** Gets or sets an object that indicates to render the grid with specified columns * @Default {[]} */ - columns?: Array; + columns?: Column[]; /** Gets or sets an object that indicates whether to customize the context menu behavior of the grid. */ @@ -21136,7 +21715,7 @@ export interface Model { /** Gets or sets a value that indicates to render the grid with custom theme. */ - cssClass?: String; + cssClass?: string; /** Gets or sets the data to render the grid with records * @Default {null} @@ -21146,7 +21725,7 @@ export interface Model { /** Default Value: * @Default {null} */ - detailsTemplate?: String; + detailsTemplate?: string; /** Gets or sets an object that indicates whether to customize the editing behavior of the grid. */ @@ -21155,42 +21734,62 @@ export interface Model { /** Gets or sets a value that indicates whether to enable the alternative rows differentiation in the grid records based on corresponding theme. * @Default {true} */ - enableAltRow?: Boolean; + enableAltRow?: boolean; /** Gets or sets a value that indicates whether to enable the save action in the grid through row selection * @Default {true} */ - enableAutoSaveOnSelectionChange?: Boolean; + enableAutoSaveOnSelectionChange?: boolean; /** Gets or sets a value that indicates whether to enable mouse over effect on the corresponding column header cell of the grid * @Default {false} */ - enableHeaderHover?: Boolean; + enableHeaderHover?: boolean; /** Gets or sets a value that indicates whether to persist the grid model state in page using applicable medium i.e., HTML5 localStorage or cookies * @Default {false} */ - enablePersistence?: Boolean; + enablePersistence?: boolean; /** Gets or sets a value that indicates whether the grid rows has to be rendered as detail view in mobile mode * @Default {false} */ - enableResponsiveRow?: Boolean; + enableResponsiveRow?: boolean; /** Gets or sets a value that indicates whether to enable mouse over effect on corresponding grid row. * @Default {true} */ - enableRowHover?: Boolean; + enableRowHover?: boolean; /** Align content in the grid control from right to left by setting the property as true. * @Default {false} */ - enableRTL?: Boolean; + enableRTL?: boolean; /** To Disable the mouse swipe property as false. * @Default {true} */ - enableTouch?: Boolean; + enableTouch?: boolean; + + /** It sets a value that indicates whether to enable toolbar items, when allowEditing, allowAdding and allowDeleting property set as false in the grid. + * @Default {false} + */ + enableToolbarItems?: boolean; + + /** Act as mapper for the excel exporting URL. + * @Default {ExportToExcel} + */ + exportToExcelAction?: string; + + /** Act as mapper for the PDF exporting URL. + * @Default {ExportToPdf} + */ + exportToPdfAction?: string; + + /** Act as mapper for the Word exporting URL. + * @Default {ExportToWord} + */ + exportToWordAction?: string; /** Gets or sets an object that indicates whether to customize the filtering behavior of the grid */ @@ -21203,22 +21802,23 @@ export interface Model { /** Gets or sets a value that indicates whether the grid design has be to made responsive. * @Default {false} */ - isResponsive?: Boolean; + isResponsive?: boolean; /** This specifies to change the key in keyboard interaction to grid control * @Default {null} */ keySettings?: any; - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and + * culture specific to a particular country or region. * @Default {en-US} */ - locale?: String; + locale?: string; /** Gets or sets a value that indicates whether to set the minimum width of the responsive grid while isResponsive property is true and enableResponsiveRow property is set as false. * @Default {0} */ - minWidth?: Number; + minWidth?: number; /** Gets or sets an object that indicates whether to modify the pager default configuration. */ @@ -21233,10 +21833,11 @@ export interface Model { */ resizeSettings?: ResizeSettings; - /** Gets or sets a value that indicates to render the grid with template rows. The template row must be a table row. That table row must have the JavaScript render binding format ({{:columnName}}) then the grid data source binds the data to the corresponding table row of the template. + /** Gets or sets a value that indicates to render the grid with template rows. The template row must be a table row. That table row must have the JavaScript render binding format ({{:columnName}}) + * then the grid data source binds the data to the corresponding table row of the template. * @Default {null} */ - rowTemplate?: String; + rowTemplate?: string; /** Gets or sets an object that indicates whether to customize the drag and drop behavior of the grid rows */ @@ -21246,20 +21847,21 @@ export interface Model { */ searchSettings?: SearchSettings; - /** Gets a value that indicates whether the grid model to hold multiple selected records . selectedRecords can be used to displayed hold the single or multiple selected records using “selectedRecords” property + /** Gets a value that indicates whether the grid model to hold multiple selected records . selectedRecords can be used to displayed hold the single + * or multiple selected records using “selectedRecords” property * @Default {null} */ - selectedRecords?: Array; + selectedRecords?: any[]; /** Gets or sets a value that indicates to select the row while initializing the grid * @Default {-1} */ - selectedRowIndex?: Number; + selectedRowIndex?: number; /** Gets or sets a value that indicates the selected rows in grid * @Default {[]} */ - selectedRowIndices?: Array; + selectedRowIndices?: any[]; /** This property is used to configure the selection behavior of the grid. */ @@ -21277,17 +21879,17 @@ export interface Model { /** Default Value: * @Default {false} */ - showColumnChooser?: Boolean; + showColumnChooser?: boolean; - /** Gets or sets a value that indicates stacked header should be shown on grid layout when the property “stackedHeaderRows” is set. + /** Gets or sets a value that indicates stacked header should be shown on grid layout when the property “stackedHeaderRows” is set. * @Default {false} */ - showStackedHeader?: Boolean; + showStackedHeader?: boolean; - /** Gets or sets a value that indicates summary rows should be shown on grid layout when the property “summaryRows” is set + /** Gets or sets a value that indicates summary rows should be shown on grid layout when the property “summaryRows” is set * @Default {false} */ - showSummary?: Boolean; + showSummary?: boolean; /** Gets or sets a value that indicates whether to customize the sorting behavior of the grid. */ @@ -21296,12 +21898,12 @@ export interface Model { /** Gets or sets an object that indicates to managing the collection of stacked header rows for the grid. * @Default {[]} */ - stackedHeaderRows?: Array; + stackedHeaderRows?: StackedHeaderRow[]; /** Gets or sets an object that indicates to managing the collection of summary rows for the grid. * @Default {[]} */ - summaryRows?: Array; + summaryRows?: SummaryRow[]; /** Gets or sets an object that indicates whether to auto wrap the grid header or content or both */ @@ -21312,142 +21914,166 @@ export interface Model { toolbarSettings?: ToolbarSettings; /** Triggered for every grid action before its starts. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggered for every grid action success event. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggered for every grid action server failure event. */ - actionFailure? (e: ActionFailureEventArgs): void; + actionFailure?(e: ActionFailureEventArgs): void; /** Triggered when record batch add. */ - batchAdd? (e: BatchAddEventArgs): void; + batchAdd?(e: BatchAddEventArgs): void; /** Triggered when record batch delete. */ - batchDelete? (e: BatchDeleteEventArgs): void; + batchDelete?(e: BatchDeleteEventArgs): void; /** Triggered before the batch add. */ - beforeBatchAdd? (e: BeforeBatchAddEventArgs): void; + beforeBatchAdd?(e: BeforeBatchAddEventArgs): void; /** Triggered before the batch delete. */ - beforeBatchDelete? (e: BeforeBatchDeleteEventArgs): void; + beforeBatchDelete?(e: BeforeBatchDeleteEventArgs): void; /** Triggered before the batch save. */ - beforeBatchSave? (e: BeforeBatchSaveEventArgs): void; + beforeBatchSave?(e: BeforeBatchSaveEventArgs): void; + + /** Triggered before the print. */ + beforePrint?(e: BeforePrintEventArgs): void; + + /** Triggered before row drop in the grid */ + beforeRowDrop?(e: BeforeRowDropEventArgs): void; /** Triggered before the record is going to be edited. */ - beginEdit? (e: BeginEditEventArgs): void; + beginEdit?(e: BeginEditEventArgs): void; /** Triggered when record cell edit. */ - cellEdit? (e: CellEditEventArgs): void; + cellEdit?(e: CellEditEventArgs): void; /** Triggered when record cell save. */ - cellSave? (e: CellSaveEventArgs): void; + cellSave?(e: CellSaveEventArgs): void; /** Triggered after the cell is selected. */ - cellSelected? (e: CellSelectedEventArgs): void; + cellSelected?(e: CellSelectedEventArgs): void; /** Triggered before the cell is going to be selected. */ - cellSelecting? (e: CellSelectingEventArgs): void; + cellSelecting?(e: CellSelectingEventArgs): void; + + /** Triggered after the cell is deselected. */ + cellDeselected?(e: CellDeselectedEventArgs): void; + + /** Triggered before the cell is going to be deselected. */ + cellDeselecting?(e: CellDeselectingEventArgs): void; /** Triggered when the column is being dragged. */ - columnDrag? (e: ColumnDragEventArgs): void; + columnDrag?(e: ColumnDragEventArgs): void; /** Triggered when column dragging begins. */ - columnDragStart? (e: ColumnDragStartEventArgs): void; + columnDragStart?(e: ColumnDragStartEventArgs): void; /** Triggered when the column is dropped. */ - columnDrop? (e: ColumnDropEventArgs): void; + columnDrop?(e: ColumnDropEventArgs): void; /** Triggered when the row is being dragged. */ - rowDrag? (e: RowDragEventArgs): void; + rowDrag?(e: RowDragEventArgs): void; /** Triggered when row dragging begins. */ - rowDragStart? (e: RowDragStartEventArgs): void; + rowDragStart?(e: RowDragStartEventArgs): void; /** Triggered when the row is dropped. */ - rowDrop? (e: RowDropEventArgs): void; + rowDrop?(e: RowDropEventArgs): void; /** Triggered after the column is selected. */ - columnSelected? (e: ColumnSelectedEventArgs): void; + columnSelected?(e: ColumnSelectedEventArgs): void; /** Triggered before the column is going to be selected. */ - columnSelecting? (e: ColumnSelectingEventArgs): void; + columnSelecting?(e: ColumnSelectingEventArgs): void; + + /** Triggered after the column is deselected. */ + columnDeselected?(e: ColumnDeselectedEventArgs): void; + + /** Triggered before the column is going to be deselected. */ + columnDeselecting?(e: ColumnDeselectingEventArgs): void; /** Triggered when context menu item is clicked */ - contextClick? (e: ContextClickEventArgs): void; + contextClick?(e: ContextClickEventArgs): void; /** Triggered before the context menu is opened. */ - contextOpen? (e: ContextOpenEventArgs): void; + contextOpen?(e: ContextOpenEventArgs): void; /** Triggered when the grid is rendered completely. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered when the grid is bound with data during initial rendering. */ - dataBound? (e: DataBoundEventArgs): void; + dataBound?(e: DataBoundEventArgs): void; /** Triggered when grid going to destroy. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered when detail template row is clicked to collapse. */ - detailsCollapse? (e: DetailsCollapseEventArgs): void; + detailsCollapse?(e: DetailsCollapseEventArgs): void; /** Triggered detail template row is initialized. */ - detailsDataBound? (e: DetailsDataBoundEventArgs): void; + detailsDataBound?(e: DetailsDataBoundEventArgs): void; /** Triggered when detail template row is clicked to expand. */ - detailsExpand? (e: DetailsExpandEventArgs): void; + detailsExpand?(e: DetailsExpandEventArgs): void; /** Triggered after the record is added. */ - endAdd? (e: EndAddEventArgs): void; + endAdd?(e: EndAddEventArgs): void; /** Triggered after the record is deleted. */ - endDelete? (e: EndDeleteEventArgs): void; + endDelete?(e: EndDeleteEventArgs): void; /** Triggered after the record is edited. */ - endEdit? (e: EndEditEventArgs): void; + endEdit?(e: EndEditEventArgs): void; /** Triggered initial load. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggered every time a request is made to access particular cell information, element and data. */ - mergeCellInfo? (e: MergeCellInfoEventArgs): void; + mergeCellInfo?(e: MergeCellInfoEventArgs): void; /** Triggered every time a request is made to access particular cell information, element and data. */ - queryCellInfo? (e: QueryCellInfoEventArgs): void; + queryCellInfo?(e: QueryCellInfoEventArgs): void; /** Triggered when record is clicked. */ - recordClick? (e: RecordClickEventArgs): void; + recordClick?(e: RecordClickEventArgs): void; /** Triggered when record is double clicked. */ - recordDoubleClick? (e: RecordDoubleClickEventArgs): void; + recordDoubleClick?(e: RecordDoubleClickEventArgs): void; /** Triggered after column resized. */ - resized? (e: ResizedEventArgs): void; + resized?(e: ResizedEventArgs): void; /** Triggered when column resize end. */ - resizeEnd? (e: ResizeEndEventArgs): void; + resizeEnd?(e: ResizeEndEventArgs): void; /** Triggered when column resize start. */ - resizeStart? (e: ResizeStartEventArgs): void; + resizeStart?(e: ResizeStartEventArgs): void; /** Triggered when right clicked on grid element. */ - rightClick? (e: RightClickEventArgs): void; + rightClick?(e: RightClickEventArgs): void; /** Triggered every time a request is made to access row information, element and data. */ - rowDataBound? (e: RowDataBoundEventArgs): void; + rowDataBound?(e: RowDataBoundEventArgs): void; /** Triggered after the row is selected. */ - rowSelected? (e: RowSelectedEventArgs): void; + rowSelected?(e: RowSelectedEventArgs): void; /** Triggered before the row is going to be selected. */ - rowSelecting? (e: RowSelectingEventArgs): void; + rowSelecting?(e: RowSelectingEventArgs): void; + + /** Triggered after the row is deselected. */ + rowDeselected?(e: RowDeselectedEventArgs): void; + + /** Triggered before the row is going to be deselected. */ + rowDeselecting?(e: RowDeselectingEventArgs): void; /** Triggered when refresh the template column elements in the Grid. */ - templateRefresh? (e: TemplateRefreshEventArgs): void; + templateRefresh?(e: TemplateRefreshEventArgs): void; /** Triggered when toolbar item is clicked in grid. */ - toolbarClick? (e: ToolbarClickEventArgs): void; + toolbarClick?(e: ToolbarClickEventArgs): void; } export interface ActionBeginEventArgs { @@ -21914,6 +22540,48 @@ export interface BeforeBatchSaveEventArgs { batchChanges?: any; } +export interface BeforePrintEventArgs { + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the Grid element. + */ + element?: any; + + /** Returns the selected records. + */ + selectedRows?: any; +} + +export interface BeforeRowDropEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the targeted row. + */ + target?: any; + + /** Returns the targeted row index. + */ + targetIndex?: any; + + /** Returns the dragged record details + */ + draggedRecords?: any; + + /** Returns the drop details + */ + dropDetails?: any; +} + export interface BeginEditEventArgs { /** Returns the cancel option value. @@ -22059,7 +22727,7 @@ export interface CellSelectedEventArgs { /** Returns the selected row cell index values. */ - selectedRowCellIndex?: Array; + selectedRowCellIndex?: any[]; /** Returns the cancel option value. */ @@ -22113,6 +22781,60 @@ export interface CellSelectingEventArgs { type?: string; } +export interface CellDeselectedEventArgs { + + /** Returns the deselected cell index value. + */ + cellIndex?: number; + + /** Returns the deselected cell element. + */ + currentCell?: any; + + /** Returns current record object (JSON). + */ + data?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface CellDeselectingEventArgs { + + /** Returns the deselecting cell index value. + */ + cellIndex?: number; + + /** Returns the deselecting cell element. + */ + currentCell?: any; + + /** Returns current record object (JSON). + */ + data?: any; + + /** Returns whether the ctrl key is pressed while deselecting cell + */ + isCtrlKeyPressed?: boolean; + + /** Returns whether the shift key is pressed while deselecting cell + */ + isShiftKeyPressed?: boolean; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + export interface ColumnDragEventArgs { /** Returns the cancel option value. @@ -22311,7 +23033,7 @@ export interface ColumnSelectedEventArgs { /** Returns the selected columns values. */ - selectedColumnsIndex?: Array; + selectedColumnsIndex?: any[]; /** Returns the cancel option value. */ @@ -22365,6 +23087,60 @@ export interface ColumnSelectingEventArgs { type?: string; } +export interface ColumnDeselectedEventArgs { + + /** Returns the Deselected column index value. + */ + columnIndex?: number; + + /** Returns the Deselected column header element. + */ + headerCell?: any; + + /** Returns corresponding column object (JSON). + */ + column?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDeselectingEventArgs { + + /** Returns the deselecting column index value. + */ + columnIndex?: number; + + /** Returns the deselecting column header element. + */ + headerCell?: any; + + /** Returns corresponding column object (JSON). + */ + column?: any; + + /** Returns whether the ctrl key is pressed while deselecting column + */ + isCtrlKeyPressed?: boolean; + + /** Returns whether the shift key is pressed while deselecting column + */ + isShiftKeyPressed?: boolean; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + export interface ContextClickEventArgs { /** Returns the cancel option value. @@ -22637,15 +23413,15 @@ export interface MergeCellInfoEventArgs { /** Method to merge Grid rows. */ - rowMerge?: void; + rowMerge?: any; /** Method to merge Grid columns. */ - colMerge?: void; + colMerge?: any; /** Method to merge Grid rows and columns. */ - merge?: void; + merge?: any; /** Returns the grid model. */ @@ -23030,6 +23806,60 @@ export interface RowSelectingEventArgs { type?: string; } +export interface RowDeselectedEventArgs { + + /** Returns current record object (JSON). + */ + data?: any; + + /** Returns the row index of the deselected row. + */ + rowIndex?: number; + + /** Returns the current deselected row element. + */ + row?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface RowDeselectingEventArgs { + + /** Returns the deselecting row index value. + */ + rowIndex?: number; + + /** Returns the deselecting row element. + */ + row?: any; + + /** Returns current record object (JSON). + */ + data?: any; + + /** Returns whether the ctrl key is pressed while deselecting row + */ + isCtrlKeyPressed?: boolean; + + /** Returns whether the shift key is pressed while deselecting row + */ + isShiftKeyPressed?: boolean; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + export interface TemplateRefreshEventArgs { /** Returns the cancel option value. @@ -23129,59 +23959,60 @@ export interface Column { /** Gets or sets a value that indicates whether to enable editing behavior for particular column. * @Default {true} */ - allowEditing?: Boolean; + allowEditing?: boolean; /** Gets or sets a value that indicates whether to enable dynamic filtering behavior for particular column. * @Default {true} */ - allowFiltering?: Boolean; + allowFiltering?: boolean; /** Gets or sets a value that indicates whether to enable dynamic grouping behavior for particular column. * @Default {true} */ - allowGrouping?: Boolean; + allowGrouping?: boolean; /** Gets or sets a value that indicates whether to enable dynamic sorting behavior for particular column. * @Default {true} */ - allowSorting?: Boolean; + allowSorting?: boolean; /** Gets or sets a value that indicates whether to enable dynamic resizable for particular column. * @Default {true} */ - allowResizing?: Boolean; + allowResizing?: boolean; /** Gets or sets an object that indicates to define a command column in the grid. * @Default {[]} */ - commands?: Array; + commands?: ColumnsCommand[]; /** Gets or sets a value that indicates to provide custom CSS for an individual column. */ - cssClass?: String; + cssClass?: string; /** Gets or sets a value that indicates the attribute values to the td element of a particular column */ customAttributes?: any; - /** Gets or sets a value that indicates to bind the external datasource to the particular column when column editType as dropdownedit and also it is used to bind the datasource to the foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column. + /** Gets or sets a value that indicates to bind the external datasource to the particular column when column editType as dropdownedit and also it is used to bind the datasource + * to the foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column. * @Default {null} */ - dataSource?: Array; + dataSource?: any[]; /** Gets or sets a value that indicates to display the specified default value while adding a new record to the grid */ - defaultValue?: String|Number|Boolean|Date; + defaultValue?: string|number|boolean|Date; /** Gets or sets a value that indicates to render the grid content and header with an HTML elements * @Default {false} */ - disableHtmlEncode?: Boolean; + disableHtmlEncode?: boolean; /** Gets or sets a value that indicates to display a column value as checkbox or string * @Default {true} */ - displayAsCheckBox?: Boolean; + displayAsCheckBox?: boolean; /** Gets or sets a value that indicates to customize ejNumericTextbox of an editable column. See editingType */ @@ -23200,79 +24031,89 @@ export interface Column { /** Gets or sets a value that indicates to groups the column based on its column format. * @Default {false} */ - enableGroupByFormat?: Boolean; + enableGroupByFormat?: boolean; /** Gets or sets a value that indicates to display the columns in the grid mapping with column name of the dataSource. */ - field?: String; + field?: string; /** Gets or sets a template that customize the filter control from default . See filterBarTemplate * @Default {null} */ filterBarTemplate?: any; + /** Gets or sets a value that indicates to render the excel or menu filter dialog to the grid columns. See filterType + * @Default {null} + */ + filterType?: ej.Grid.FilterType|string; + /** Gets or sets a value that indicates to define foreign key field name of the grid datasource. * @Default {null} */ - foreignKeyField?: String; + foreignKeyField?: string; /** Gets or sets a value that indicates to bind the field which is in foreign column datasource based on the foreignKeyField * @Default {null} */ - foreignKeyValue?: String; + foreignKeyValue?: string; /** Gets or sets a value that indicates the format for the text applied on the column */ - format?: String; + format?: string; /** Gets or sets a value that indicates to add the template within the header element of the particular column. * @Default {null} */ - headerTemplateID?: String; + headerTemplateID?: string; /** Gets or sets a value that indicates to display the title of that particular column. */ - headerText?: String; + headerText?: string; /** This defines the text alignment of a particular column header cell value. See headerTextAlign * @Default {null} */ headerTextAlign?: ej.TextAlign|string; + /** It accepts the string value and shows the tooltip for the Grid column header. + * @Default {null} + */ + headerTooltip?: string; + /** You can use this property to freeze selected columns in grid at the time of scrolling. * @Default {false} */ - isFrozen?: Boolean; + isFrozen?: boolean; /** Gets or sets a value that indicates the column has an identity in the database. * @Default {false} */ - isIdentity?: Boolean; + isIdentity?: boolean; /** Gets or sets a value that indicates the column is act as a primary key(read-only) of the grid. The editing is performed based on the primary key column * @Default {false} */ - isPrimaryKey?: Boolean; + isPrimaryKey?: boolean; /** Gets or sets a value that indicates the order of Column that are to be hidden or visible when Grid element is in responsive mode and could not occupy all columns. - * @Default {null} + * @Default {-1} */ - priority?: Number; + priority?: number; /** Used to hide the particular column in column chooser by giving value as false. * @Default {true} */ - showInColumnChooser?: Boolean; + showInColumnChooser?: boolean; /** Gets or sets a value that indicates whether to enables column template for a particular column. * @Default {false} */ - template?: Boolean|String; + template?: boolean|string; /** Gets or sets a value that indicates to align the text within the column. See textAlign * @Default {ej.TextAlign.Left} */ - textAlign?: ej.TextAlign|string; + textAlign?: ej.TextAlign|string; /** Sets the template for Tooltip in Grid Columns(both header and content) */ @@ -23280,7 +24121,7 @@ export interface Column { /** Gets or sets a value that indicates to specify the data type of the specified columns. */ - type?: String; + type?: string; /** Gets or sets a value that indicates to define constraints for saving data to the database. */ @@ -23289,11 +24130,11 @@ export interface Column { /** Gets or sets a value that indicates whether this column is visible in the grid. * @Default {true} */ - visible?: Boolean; + visible?: boolean; /** Gets or sets a value that indicates to define the width for a particular column in the grid. */ - width?: Number; + width?: number; } export interface ContextMenuSettingsSubContextMenu { @@ -23306,34 +24147,35 @@ export interface ContextMenuSettingsSubContextMenu { /** Used to get or set the sub menu items to the custom context menu item. * @Default {[]} */ - subMenu?: Array; + subMenu?: any[]; } export interface ContextMenuSettings { - /** Gets or sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, if you want selected items from contextmenu you have to mention in the contextMenuItems + /** Gets or sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, + * if you want selected items from contextmenu you have to mention in the contextMenuItems * @Default {[]} */ - contextMenuItems?: Array; + contextMenuItems?: any[]; /** Gets or sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid * @Default {[]} */ - customContextMenuItems?: Array; + customContextMenuItems?: any[]; /** Gets or sets a value that indicates whether to enable the context menu action in the grid. * @Default {false} */ - enableContextMenu?: Boolean; + enableContextMenu?: boolean; /** Used to get or set the subMenu to the corresponding custom context menu item. */ - subContextMenu?: Array; + subContextMenu?: ContextMenuSettingsSubContextMenu[]; /** Gets or sets a value that indicates whether to disable the default context menu items in the grid. * @Default {false} */ - disableDefaultItems?: Boolean; + disableDefaultItems?: boolean; } export interface EditSettings { @@ -23341,27 +24183,27 @@ export interface EditSettings { /** Gets or sets a value that indicates whether to enable insert action in the editing mode. * @Default {false} */ - allowAdding?: Boolean; + allowAdding?: boolean; /** Gets or sets a value that indicates whether to enable the delete action in the editing mode. * @Default {false} */ - allowDeleting?: Boolean; + allowDeleting?: boolean; /** Gets or sets a value that indicates whether to enable the edit action in the editing mode. * @Default {false} */ - allowEditing?: Boolean; + allowEditing?: boolean; /** Gets or sets a value that indicates whether to enable the editing action while double click on the record * @Default {true} */ - allowEditOnDblClick?: Boolean; + allowEditOnDblClick?: boolean; /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the Dialog Box * @Default {null} */ - dialogEditorTemplateID?: String; + dialogEditorTemplateID?: string; /** Gets or sets a value that indicates whether to define the mode of editing See editMode * @Default {ej.Grid.EditMode.Normal} @@ -23371,7 +24213,7 @@ export interface EditSettings { /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the External edit form * @Default {null} */ - externalFormTemplateID?: String; + externalFormTemplateID?: string; /** This specifies to set the position of an External edit form either in the top-right or bottom-left of the grid * @Default {ej.Grid.FormPosition.BottomLeft} @@ -23381,7 +24223,7 @@ export interface EditSettings { /** This specifies the id of the template. This template can be used to display the data that you require to be edited using the Inline edit form * @Default {null} */ - inlineFormTemplateID?: String; + inlineFormTemplateID?: string; /** This specifies to set the position of an adding new row either in the top or bottom of the grid * @Default {ej.Grid.RowPosition.Top} @@ -23391,22 +24233,22 @@ export interface EditSettings { /** Gets or sets a value that indicates whether the confirm dialog has to be shown while saving or discarding the batch changes * @Default {true} */ - showConfirmDialog?: Boolean; + showConfirmDialog?: boolean; /** Gets or sets a value that indicates whether the confirm dialog has to be shown while deleting record * @Default {false} */ - showDeleteConfirmDialog?: Boolean; + showDeleteConfirmDialog?: boolean; /** Gets or sets a value that indicates whether the title for edit form is different from the primarykey column. * @Default {null} */ - titleColumn?: String; + titleColumn?: string; /** Gets or sets a value that indicates whether to display the add new form by default in the grid. * @Default {false} */ - showAddNewRow?: Boolean; + showAddNewRow?: boolean; } export interface FilterSettingsFilteredColumn { @@ -23415,7 +24257,11 @@ export interface FilterSettingsFilteredColumn { */ field?: string; - /** Gets or sets a value that indicates whether to define the filter condition to filtered column. + /** Gets or sets a value that indicates whether to define the matchCase of given value to be filter. + */ + matchCase?: boolean; + + /** Gets or sets a value that indicates whether to define the filter condition to filtered column. See operator */ operator?: ej.FilterOperators|string; @@ -23433,9 +24279,14 @@ export interface FilterSettings { /** Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode * @Default {false} */ - enableCaseSensitivity?: Boolean; + enableCaseSensitivity?: boolean; - /** This specifies the grid to starts the filter action while typing in the filterBar or after pressing the enter key. based on the filterBarMode. See filterBarMode + /** Gets or sets a value that indicates to define the interDeterminateState of checkbox in excel filter dialog. + * @Default {true} + */ + enableInterDeterminateState?: boolean; + + /** This specifies the grid to starts the filter action while typing in the filterBar or after pressing the enter key. based on the filterBarMode. See filterBarMode. * @Default {ej.Grid.FilterBarMode.Immediate} */ filterBarMode?: ej.Grid.FilterBarMode|string; @@ -23443,27 +24294,32 @@ export interface FilterSettings { /** Gets or sets a value that indicates whether to define the filtered columns details programmatically at initial load * @Default {[]} */ - filteredColumns?: Array; + filteredColumns?: FilterSettingsFilteredColumn[]; /** This specifies the grid to show the filterBar or filterMenu to the grid records. See filterType * @Default {ej.Grid.FilterType.FilterBar} */ filterType?: ej.Grid.FilterType|string; + /** This specifies the grid to delay the filter action while typing in the filterBar. + * @Default {1500} + */ + immediateModeDelay?: number; + /** Gets or sets a value that indicates the maximum number of filter choices that can be showed in the excel styled filter menu. * @Default {1000} */ - maxFilterChoices?: Number; + maxFilterChoices?: number; /** This specifies the grid to show the filter text within the grid pager itself. * @Default {true} */ - showFilterBarMessage?: Boolean; + showFilterBarMessage?: boolean; /** Gets or sets a value that indicates whether to enable the predicate options in the filtering menu * @Default {false} */ - showPredicate?: Boolean; + showPredicate?: boolean; } export interface GroupSettings { @@ -23471,37 +24327,38 @@ export interface GroupSettings { /** Gets or sets a value that customize the group caption format. * @Default {null} */ - captionFormat?: String; + captionFormat?: string; /** Gets or sets a value that indicates whether to enable animation button option in the group drop area of the grid. * @Default {false} */ - enableDropAreaAutoSizing?: Boolean; + enableDropAreaAutoSizing?: boolean; /** Gets or sets a value that indicates whether to add grouped columns programmatically at initial load * @Default {[]} */ - groupedColumns?: Array; + groupedColumns?: any[]; /** Gets or sets a value that indicates whether to show the group drop area just above the column header. It can be used to avoid ungrouping the already grouped column using groupSettings. * @Default {true} */ - showDropArea?: Boolean; + showDropArea?: boolean; /** Gets or sets a value that indicates whether to hide the grouped columns from the grid * @Default {false} */ - showGroupedColumn?: Boolean; + showGroupedColumn?: boolean; - /** Gets or sets a value that indicates whether to show the group button image(toggle button)in the column header and also in the grouped column in the group drop area . It can be used to group/ungroup the columns by click on the toggle button. + /** Gets or sets a value that indicates whether to show the group button image(toggle button)in the column header and also in the grouped column in the group drop area. + * It can be used to group/ungroup the columns by click on the toggle button. * @Default {false} */ - showToggleButton?: Boolean; + showToggleButton?: boolean; /** Gets or sets a value that indicates whether to enable the close button in the grouped column which is in the group drop area to ungroup the grouped column * @Default {false} */ - showUngroupButton?: Boolean; + showUngroupButton?: boolean; } export interface PageSettings { @@ -23509,47 +24366,47 @@ export interface PageSettings { /** Gets or sets a value that indicates whether to define which page to display currently in the grid * @Default {1} */ - currentPage?: Number; + currentPage?: number; /** Gets or sets a value that indicates whether to pass the current page information as a query string along with the URL while navigating to other page. * @Default {false} */ - enableQueryString?: Boolean; + enableQueryString?: boolean; /** Gets or sets a value that indicates whether to enables pager template for the grid. * @Default {false} */ - enableTemplates?: Boolean; + enableTemplates?: boolean; /** Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation * @Default {8} */ - pageCount?: Number; + pageCount?: number; /** Gets or sets a value that indicates whether to define the number of records displayed per page * @Default {12} */ - pageSize?: Number; + pageSize?: number; /** Gets or sets a value that indicates whether to enables default pager for the grid. * @Default {false} */ - showDefaults?: Boolean; + showDefaults?: boolean; /** Gets or sets a value that indicates to add the template as a pager template for grid. * @Default {null} */ - template?: String; + template?: string; /** Get the value of total number of pages in the grid. The totalPages value is calculated based on page size and total records of grid * @Default {null} */ - totalPages?: Number; + totalPages?: number; /** Get the value of total number of records which is bound to the grid. The totalRecordsCount value is calculated based on dataSource bound to the grid. * @Default {null} */ - totalRecordsCount?: Number; + totalRecordsCount?: number; /** Gets or sets a value that indicates whether to define the number of pages to print * @Default {ej.Grid.PrintMode.AllPages} @@ -23607,15 +24464,20 @@ export interface SearchSettings { export interface SelectionSettings { + /** Gets or sets a value that indicates the cell selection actions based on the cell selection mode. + * @Default {flow} + */ + cellSelectionMode?: string; + /** Gets or sets a value that indicates whether to enable the toggle selection behavior for row, cell and column. * @Default {false} */ - enableToggle?: Boolean; + enableToggle?: boolean; /** Gets or sets a value that indicates whether to add the default selection actions as a selection mode.See selectionMode * @Default {[row]} */ - selectionMode?: Array; + selectionMode?: any[]; } export interface ScrollSettings { @@ -23623,27 +24485,42 @@ export interface ScrollSettings { /** This specify the grid to to view data that you require without buffering the entire load of a huge database * @Default {false} */ - allowVirtualScrolling?: Boolean; + allowVirtualScrolling?: boolean; + + /** It accepts the boolean value and shows or hides the scrollbar while focus in or focus out of the Grid. + * @Default {false} + */ + autoHide?: boolean; + + /** Specifies the height and width of button in the scrollbar. + * @Default {18} + */ + buttonSize?: number; /** This specify the grid to enable/disable touch control for scrolling. * @Default {true} */ - enableTouchScroll?: Boolean; + enableTouchScroll?: boolean; /** This specify the grid to freeze particular columns at the time of scrolling. * @Default {0} */ - frozenColumns?: Number; + frozenColumns?: number; /** This specify the grid to freeze particular rows at the time of scrolling. * @Default {0} */ - frozenRows?: Number; + frozenRows?: number; /** This specify the grid to show the vertical scroll bar, to scroll and view the grid contents. * @Default {0} */ - height?: String|Number; + height?: string|number; + + /** It accepts the integer value and sets the width of scrollbar. + * @Default {18} + */ + scrollerSize?: number; /** This is used to define the mode of virtual scrolling in grid. See virtualScrollMode * @Default {ej.Grid.VirtualScrollMode.Normal} @@ -23653,35 +24530,35 @@ export interface ScrollSettings { /** This is used to enable the enhanced virtual scrolling in Grid. * @Default {false} */ - enableVirtualization?: Boolean; + enableVirtualization?: boolean; /** This specify the grid to show the horizontal scroll bar, to scroll and view the grid contents * @Default {250} */ - width?: String|Number; + width?: string|number; /** This specify the scroll down pixel of mouse wheel, to scroll mouse wheel and view the grid contents. * @Default {57} */ - scrollOneStepBy?: Number; + scrollOneStepBy?: number; } export interface SortSettingsSortedColumn { /** Gets or sets a value that indicates whether to define the direction to sort the column. */ - direction?: String; + direction?: string; /** Gets or sets a value that indicates whether to define the field name of the column to be sort */ - field?: String; + field?: string; } export interface SortSettings { /** Gets or sets a value that indicates whether to define the direction and field to sort the column. */ - sortedColumns?: Array; + sortedColumns?: SortSettingsSortedColumn[]; } export interface StackedHeaderRowsStackedHeaderColumn { @@ -23694,17 +24571,22 @@ export interface StackedHeaderRowsStackedHeaderColumn { /** Gets or sets a value that indicates class to the corresponding stackedHeaderColumn. * @Default {null} */ - cssClass?: String; + cssClass?: string; /** Gets or sets a value that indicates the header text for the particular stacked header column. * @Default {null} */ - headerText?: String; + headerText?: string; /** Gets or sets a value that indicates the text alignment of the corresponding headerText. * @Default {ej.TextAlign.Left} */ - textAlign?: String; + textAlign?: string; + + /** Sets the template for tooltip for the Grid stackedHeaderColumns. + * @Default {null} + */ + tooltip?: string; } export interface StackedHeaderRow { @@ -23712,7 +24594,7 @@ export interface StackedHeaderRow { /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows * @Default {[]} */ - stackedHeaderColumns?: Array; + stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; } export interface SummaryRowsSummaryColumn { @@ -23720,32 +24602,32 @@ export interface SummaryRowsSummaryColumn { /** Gets or sets a value that indicates the text displayed in the summary column as a value * @Default {null} */ - customSummaryValue?: String; + customSummaryValue?: string; /** This specifies summary column used to perform the summary calculation * @Default {null} */ - dataMember?: String; + dataMember?: string; /** Gets or sets a value that indicates to define the target column at which to display the summary. * @Default {null} */ - displayColumn?: String; + displayColumn?: string; /** Gets or sets a value that indicates the format for the text applied on the column * @Default {null} */ - format?: String; + format?: string; /** Gets or sets a value that indicates the text displayed before the summary column value * @Default {null} */ - prefix?: String; + prefix?: string; /** Gets or sets a value that indicates the text displayed after the summary column value * @Default {null} */ - suffix?: String; + suffix?: string; /** Gets or sets a value that indicates the type of calculations to be performed for the corresponding summary column * @Default {[]} @@ -23755,7 +24637,7 @@ export interface SummaryRowsSummaryColumn { /** Gets or sets a value that indicates to add the template for the summary value of dataMember given. * @Default {null} */ - template?: String; + template?: string; } export interface SummaryRow { @@ -23763,31 +24645,31 @@ export interface SummaryRow { /** Gets or sets a value that indicates whether to show the summary value within the group caption area for the corresponding summary column while grouping the column * @Default {false} */ - showCaptionSummary?: Boolean; + showCaptionSummary?: boolean; /** Gets or sets a value that indicates whether to show the group summary value for the corresponding summary column while grouping a column * @Default {false} */ - showGroupSummary?: Boolean; + showGroupSummary?: boolean; /** Gets or sets a value that indicates whether to show the total summary value the for the corresponding summary column. The summary row is added after the grid content. * @Default {true} */ - showTotalSummary?: Boolean; + showTotalSummary?: boolean; /** Gets or sets a value that indicates whether to add summary columns into the summary rows. * @Default {[]} */ - summaryColumns?: Array; + summaryColumns?: SummaryRowsSummaryColumn[]; /** This specifies the grid to show the title for the summary rows. */ - title?: String; + title?: string; /** This specifies the grid to show the title of summary row in the specified column. * @Default {null} */ - titleColumn?: String; + titleColumn?: string; } export interface TextWrapSettings { @@ -23803,12 +24685,12 @@ export interface ToolbarSettings { /** Gets or sets a value that indicates whether to add custom toolbar items within the toolbar to perform any action in the grid * @Default {[]} */ - customToolbarItems?: Array; + customToolbarItems?: any[]; /** Gets or sets a value that indicates whether to enable toolbar in the grid. * @Default {false} */ - showToolbar?: Boolean; + showToolbar?: boolean; /** Gets or sets a value that indicates whether to add the default editing actions as a toolbar items * @Default {[]} @@ -23816,7 +24698,7 @@ export interface ToolbarSettings { toolbarItems?: Array; } -enum GridLines{ +enum GridLines { ///Displays both the horizontal and vertical grid lines. Both, @@ -23832,7 +24714,7 @@ enum GridLines{ } -enum ClipMode{ +enum ClipMode { ///Shows ellipsis for the overflown cell. Ellipsis, @@ -23845,7 +24727,7 @@ enum ClipMode{ } -enum ColumnLayout{ +enum ColumnLayout { ///Column layout is auto(based on width). Auto, @@ -23855,7 +24737,7 @@ enum ColumnLayout{ } -enum UnboundType{ +enum UnboundType { ///Unbound type is edit. Edit, @@ -23871,7 +24753,7 @@ enum UnboundType{ } -enum EditingType{ +enum EditingType { ///Specifies editing type as string edit. String, @@ -23893,7 +24775,17 @@ enum EditingType{ } -enum EditMode{ +enum FilterType { + + ///Specifies the filter type as menu. + Menu, + + ///Specifies the filter type as excel. + Excel +} + + +enum EditMode { ///Edit mode is normal. Normal, @@ -23921,7 +24813,7 @@ enum EditMode{ } -enum FormPosition{ +enum FormPosition { ///Form position is bottomleft. BottomLeft, @@ -23931,7 +24823,7 @@ enum FormPosition{ } -enum RowPosition{ +enum RowPosition { ///Specifies position of add new row as top. Top, @@ -23941,7 +24833,7 @@ enum RowPosition{ } -enum FilterBarMode{ +enum FilterBarMode { ///Initiate filter operation on typing the filter query. Immediate, @@ -23951,20 +24843,7 @@ enum FilterBarMode{ } -enum FilterType{ - - ///Specifies the filter type as menu. - Menu, - - ///Specifies the filter type as excel. - Excel, - - ///Specifies the filter type as filterbar. - FilterBar -} - - -enum PrintMode{ +enum PrintMode { ///Prints all pages. AllPages, @@ -23974,7 +24853,7 @@ enum PrintMode{ } -enum ResizeMode{ +enum ResizeMode { ///New column size will be adjusted by all other Columns Normal, @@ -23987,7 +24866,7 @@ enum ResizeMode{ } -enum SelectionType{ +enum SelectionType { ///Specifies the selection type as single. Single, @@ -23997,7 +24876,7 @@ enum SelectionType{ } -enum VirtualScrollMode{ +enum VirtualScrollMode { ///virtual scroll mode is normal. Normal, @@ -24007,7 +24886,7 @@ enum VirtualScrollMode{ } -enum SummaryType{ +enum SummaryType { ///Summary type is average. Average, @@ -24035,7 +24914,7 @@ enum SummaryType{ } -enum WrapMode{ +enum WrapMode { ///Auto wrap is applied for both content and header. Both, @@ -24048,7 +24927,7 @@ enum WrapMode{ } -enum ToolBarItems{ +enum ToolBarItems { ///Toolbar item is add. Add, @@ -24082,18 +24961,17 @@ enum ToolBarItems{ class Sparkline extends ej.Widget { static fn: Sparkline; - constructor(element: JQuery, options?: Sparkline.Model); - constructor(element: Element, options?: Sparkline.Model); + constructor(element: JQuery | Element, options?: Sparkline.Model); static Locale: any; - model:Sparkline.Model; - defaults:Sparkline.Model; + model: Sparkline.Model; + defaults: Sparkline.Model; /** Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. * @returns {void} */ redraw(): void; } -export module Sparkline{ +export namespace Sparkline { export interface Model { @@ -24216,28 +25094,28 @@ export interface Model { axisLineSettings?: AxisLineSettings; /** Fires before loading the sparkline. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Fires after loaded the sparkline. */ - loaded? (e: LoadedEventArgs): void; + loaded?(e: LoadedEventArgs): void; /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. */ - tooltipInitialize? (e: TooltipInitializeEventArgs): void; + tooltipInitialize?(e: TooltipInitializeEventArgs): void; /** Fires before rendering a series. This event is fired for each series in Sparkline. */ - seriesRendering? (e: SeriesRenderingEventArgs): void; + seriesRendering?(e: SeriesRenderingEventArgs): void; /** Fires when mouse is moved over a point. */ - pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. */ - pointRegionMouseClick? (e: PointRegionMouseClickEventArgs): void; + pointRegionMouseClick?(e: PointRegionMouseClickEventArgs): void; /** Fires on moving mouse over the sparkline. */ - sparklineMouseMove? (e: SparklineMouseMoveEventArgs): void; + sparklineMouseMove?(e: SparklineMouseMoveEventArgs): void; /** Fires on moving mouse outside the sparkline. */ - sparklineMouseLeave? (e: SparklineMouseLeaveEventArgs): void; + sparklineMouseLeave?(e: SparklineMouseLeaveEventArgs): void; } export interface LoadEventArgs { @@ -24612,10 +25490,8 @@ export interface AxisLineSettings { dashArray?: number; } } -module Sparkline -{ -enum Type -{ +namespace Sparkline { +enum Type { //string Area, //string @@ -24628,10 +25504,8 @@ Pie, WinLoss, } } -module Sparkline -{ -enum Theme -{ +namespace Sparkline { +enum Theme { //string Azure, //string @@ -24654,20 +25528,16 @@ GradientLight, GradientDark, } } -module Sparkline -{ -enum FontStyle -{ +namespace Sparkline { +enum FontStyle { //string Normal, //string Italic, } } -module Sparkline -{ -enum FontWeight -{ +namespace Sparkline { +enum FontWeight { //string Regular, //string @@ -24677,13 +25547,1169 @@ Lighter, } } +class SunburstChart extends ej.Widget { + static fn: SunburstChart; + constructor(element: JQuery | Element, options?: SunburstChart.Model); + static Locale: any; + model: SunburstChart.Model; + defaults: SunburstChart.Model; + + /** Redraws the entire sunburst. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + + /** destroy the sunburst + * @returns {void} + */ + _destroy(): void; +} +export namespace SunburstChart { + +export interface Model { + + /** Background color of the plot area. + * @Default {null} + */ + background?: string; + + /** Bind the data field from the data source. + * @Default {null} + */ + valueMemberPath?: string; + + /** Options for customizing the sunburst border. + */ + border?: Border; + + /** Options for customizing the sunburst segment border. + */ + segmentBorder?: SegmentBorder; + + /** Specifies the dataSource to the sunburst. + * @Default {null} + */ + dataSource?: any; + + /** Palette color for the data points. + * @Default {null} + */ + palette?: string; + + /** Parent node of the data points. + * @Default {null} + */ + parentNode?: string; + + /** Name of the property in the datasource that contains x values. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y values. + * @Default {null} + */ + yName?: string; + + /** Controls whether sunburst has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Options to customize the Sunburst size. + */ + size?: Size; + + /** Controls the visibility of sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options to customize the Sunburst tooltip. + */ + tooltip?: Tooltip; + + /** Options for customizing sunburst points. + */ + points?: Points; + + /** Sunburst rendering will start from the specified value + * @Default {null} + */ + startAngle?: number; + + /** Sunburst rendering will end at the specified value + * @Default {null} + */ + endAngle?: number; + + /** Sunburst outer radius value + * @Default {1} + */ + radius?: number; + + /** Sunburst inner radius value + * @Default {0.4} + */ + innerRadius?: number; + + /** Options to customize the Sunburst dataLabel. + */ + dataLabelSettings?: DataLabelSettings; + + /** Options for customizing the title and subtitle of sunburst. + */ + title?: Title; + + /** Options for customizing the appearance of the levels or point while highlighting. + */ + highlightSettings?: HighlightSettings; + + /** Options for customizing the appearance of the levels or data point while selection. + */ + selectionSettings?: SelectionSettings; + + /** Specify levels of sunburst for grouped visualization of data + * @Default {[]} + */ + levels?: Level[]; + + /** Options to customize the legend items and legend title. + */ + legend?: Legend; + + /** Specifies the theme for Sunburst. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sunburst.SunburstTheme|string; + + /** Options to customize the left, right, top and bottom margins of sunburst area. + */ + margin?: Margin; + + /** Enable/disable the animation for all the levels. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Opacity of the levels. + * @Default {1} + */ + opacity?: number; + + /** Options for enable zooming feature of chart. + */ + zoomSettings?: ZoomSettings; + + /** Animation type of sunburst + * @Default {rotation. See Alignment} + */ + animationType?: ej.datavisualization.Sunburst.Animation|string; + + /** Fires before loading. */ + load?(e: LoadEventArgs): void; + + /** Fires before rendering sunburst. */ + preRender?(e: PreRenderEventArgs): void; + + /** Fires after rendering sunburst. */ + loaded?(e: LoadedEventArgs): void; + + /** Fires before rendering the datalabel */ + dataLabelRendering?(e: DataLabelRenderingEventArgs): void; + + /** Fires before rendering each segment */ + segmentRendering?(e: SegmentRenderingEventArgs): void; + + /** Fires before rendering sunburst title. */ + titleRendering?(e: TitleRenderingEventArgs): void; + + /** Fires during initialization of tooltip. */ + tooltipInitialize?(e: TooltipInitializeEventArgs): void; + + /** Fires after clicking the point in sunburst */ + pointRegionClick?(e: PointRegionClickEventArgs): void; + + /** Fires while moving the mouse over sunburst points */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + + /** Fires when clicking the point to perform drilldown. */ + drillDownClick?(e: DrillDownClickEventArgs): void; + + /** Fires when resetting drilldown points. */ + drillDownBack?(e: DrillDownBackEventArgs): void; + + /** Fires after resetting the sunburst points */ + drillDownReset?(e: DrillDownResetEventArgs): void; +} + +export interface LoadEventArgs { + + /** Load event data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface PreRenderEventArgs { + + /** PreRender event data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /** Loaded event data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DataLabelRenderingEventArgs { + + /** Sunburst datalabel data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface SegmentRenderingEventArgs { + + /** Sunburst datalabel data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface TitleRenderingEventArgs { + + /** Sunburst title data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface TooltipInitializeEventArgs { + + /** Sunburst tooltip data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface PointRegionClickEventArgs { + + /** Includes clicked points region data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface PointRegionMouseMoveEventArgs { + + /** Includes data of mouse moved region + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DrillDownClickEventArgs { + + /** Clicked point data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DrillDownBackEventArgs { + + /** Drill down data of points + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DrillDownResetEventArgs { + + /** Drill down reset data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface Border { + + /** Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst border. + * @Default {2} + */ + width?: number; +} + +export interface SegmentBorder { + + /** Segment Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst segment border. + * @Default {2} + */ + width?: number; +} + +export interface Size { + + /** Height of the Sunburst. + * @Default {''} + */ + height?: string; + + /** Width of the Sunburst. + * @Default {''} + */ + width?: string; +} + +export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {5} + */ + width?: number; +} + +export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {null} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {12px} + */ + size?: string; +} + +export interface Tooltip { + + /** tooltip visibility of the Sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options for customizing the border of the sunburst tooltip. + */ + border?: TooltipBorder; + + /** Fill color for the sunburst tooltip. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; + + /** Custom template to the tooltip. + * @Default {null} + */ + template?: string; +} + +export interface Points { + + /** Points x value of the sunburst. + * @Default {null} + */ + x?: string; + + /** Points y value of the sunburst. + * @Default {null} + */ + y?: number; + + /** Points text of the sunburst. + * @Default {null} + */ + text?: string; + + /** Points fill color of the sunburst. + * @Default {null} + */ + fill?: string; +} + +export interface DataLabelSettingsFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font color of the data label text. + * @Default {null} + */ + color?: string; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface DataLabelSettings { + + /** Datalabel visibility of the Sunburst. + * @Default {false} + */ + visible?: boolean; + + /** Alignment of sunburst datalabel + * @Default {Angle. See DatalabelAlignment} + */ + labelRotationMode?: ej.datavisualization.Sunburst.SunburstLabelRotationMode|string; + + /** Options for customizing the data label font. + */ + font?: DataLabelSettingsFont; + + /** Custom template for datalabel + * @Default {null} + */ + template?: string; + + /** Fill color for the datalabel + * @Default {null} + */ + fill?: string; + + /** Datalabel overflow mode + * @Default {Trim. See LabelOverflowMode} + */ + labelOverflowMode?: ej.datavisualization.Sunburst.SunburstLabelOverflowMode|string; +} + +export interface TitleFont { + + /** Font family for Sunburst title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for Sunburst title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for Sunburst title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the Sunburst title. + * @Default {1} + */ + opacity?: number; + + /** Font size for Sunburst title. + * @Default {20px} + */ + size?: string; +} + +export interface TitleSubtitleFont { + + /** Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /** Font size for sub title. + * @Default {12px} + */ + size?: string; +} + +export interface TitleSubtitle { + + /** Subtitle text for sunburst + */ + text?: string; + + /** Sub title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Sub title text alignment + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sub title. + */ + font?: TitleSubtitleFont; +} + +export interface Title { + + /** Title text for sunburst + */ + text?: string; + + /** Title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Title text alignment + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sunburst title. + */ + font?: TitleFont; + + /** Options to customize the sub title of Sunburst. + */ + subtitle?: TitleSubtitle; +} + +export interface HighlightSettings { + + /** Enables/disables the ability to highlight the levels or point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or point has to be highlighted. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on highlight. + * @Default {red} + */ + color?: string; + + /** Opacity of the levels/point on highlight. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be highlighted. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; +} + +export interface SelectionSettings { + + /** Enables/disables the ability to select the levels or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or data point has to be selected. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on selection. + * @Default {green} + */ + color?: string; + + /** Opacity of the levels/point on selection. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be selected. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; +} + +export interface Level { + + /** Specifies the group member path + * @Default {null} + */ + groupMemberPath?: string; +} + +export interface LegendBorder { + + /** Border color of the legend. + * @Default {null} + */ + color?: string; + + /** Border width of the legend. + * @Default {1} + */ + width?: number; +} + +export interface LegendFont { + + /** Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend item text. + * @Default {12px} + */ + size?: string; +} + +export interface LegendItemStyle { + + /** Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /** Width of the shape in legend items. + * @Default {10} + */ + width?: number; +} + +export interface LegendLocation { + + /** X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; +} + +export interface LegendSize { + + /** Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /** Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; +} + +export interface LegendTitleFont { + + /** Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend title. + * @Default {12px} + */ + size?: string; +} + +export interface LegendTitle { + + /** Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /** Enables or disables the legend title. + * @Default {true} + */ + visible?: string; + + /** Text to be displayed in legend title. + */ + text?: string; + + /** Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; +} + +export interface Legend { + + /** Visibility of the legend. + * @Default {false} + */ + visible?: boolean; + + /** Interactive action of legend items. + * @Default {toggleSegmentVisibility. See Alignment} + */ + clickAction?: ej.datavisualization.Sunburst.SunburstClickAction|string; + + /** Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the legend border. + */ + border?: LegendBorder; + + /** Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /** Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /** Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /** Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /** Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /** Options to customize the location of sunburst legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /** Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Sunburst.SunburstLegendPosition|string; + + /** Shape of the legend items. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Sunburst.SunburstLegendShape|string; + + /** Options to customize the size of the legend. + */ + size?: LegendSize; + + /** Options to customize the legend title. + */ + title?: LegendTitle; +} + +export interface Margin { + + /** Spacing for the left margin of chart area. Setting positive value decreases the width of the chart area from left side. + * @Default {10} + */ + left?: number; + + /** Spacing for the right margin of chart area. Setting positive value decreases the width of the chart area from right side. + * @Default {10} + */ + right?: number; + + /** Spacing for the top margin of chart area. Setting positive value decreases the height of the chart area from the top. + * @Default {10} + */ + top?: number; + + /** Spacing for the bottom margin of the chart area. Setting positive value decreases the height of the chart area from the bottom. + * @Default {10} + */ + bottom?: number; +} + +export interface ZoomSettings { + + /** Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /** Toolbar horizontal alignment + * @Default {right. See Alignment} + */ + toolbarHorizontalAlignment?: ej.datavisualization.Sunburst.SunburstHorizontalAlignment|string; + + /** Toolbar vertical alignment + * @Default {top. See Alignment} + */ + toolbarVerticalAlignment?: ej.datavisualization.Sunburst.SunburstVerticalAlignment|string; +} +} +namespace Sunburst { +enum FontStyle { +//string +Normal, +//string +Italic, +} +} +namespace Sunburst { +enum FontWeight { +//string +Regular, +//string +Bold, +//string +Lighter, +} +} +namespace Sunburst { +enum SunburstLabelRotationMode { +//string +Angle, +//string +Normal, +} +} +namespace Sunburst { +enum SunburstLabelOverflowMode { +//string +Trim, +//string +Hide, +//string +None, +} +} +namespace Sunburst { +enum SunburstAlignment { +//string +Center, +//string +Near, +//string +Far, +} +} +namespace Sunburst { +enum SunburstHighlightMode { +//string +Point, +//string +Parent, +//string +Child, +//string +All, +} +} +namespace Sunburst { +enum SunburstHighlightType { +//string +Opacity, +//string +Color, +} +} +namespace Sunburst { +enum SunburstClickAction { +//string +None, +//string +ToggleSegmentVisibility, +//string +ToggleSegmentSelection, +} +} +namespace Sunburst { +enum SunburstLegendPosition { +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +namespace Sunburst { +enum SunburstLegendShape { +//string +Diamond, +//string +Pentagon, +//string +Rectangle, +//string +Circle, +//string +Cross, +//string +Triangle, +} +} +namespace Sunburst { +enum SunburstTheme { +//string +FlatLight, +//string +FlatDark, +} +} +namespace Sunburst { +enum SunburstHorizontalAlignment { +//string +Center, +//string +Left, +//string +Right, +} +} +namespace Sunburst { +enum SunburstVerticalAlignment { +//string +Top, +//string +Bottom, +//string +Middle, +} +} +namespace Sunburst { +enum Animation { +//string +Rotation, +//string +FadeIn, +} +} + class PivotGrid extends ej.Widget { static fn: PivotGrid; - constructor(element: JQuery, options?: PivotGrid.Model); - constructor(element: Element, options?: PivotGrid.Model); + constructor(element: JQuery | Element, options?: PivotGrid.Model); static Locale: any; - model:PivotGrid.Model; - defaults:PivotGrid.Model; + model: PivotGrid.Model; + defaults: PivotGrid.Model; /** Performs an asynchronous HTTP (AJAX) request. * @returns {void} @@ -24753,7 +26779,7 @@ class PivotGrid extends ej.Widget { /** Returns the JSON records formed to render the control. * @returns {Array} */ - getJSONRecords(): Array; + getJSONRecords(): any[]; /** Sets the JSON records formed to render the control. * @returns {void} @@ -24770,7 +26796,7 @@ class PivotGrid extends ej.Widget { */ renderControlFromJSON(): void; } -export module PivotGrid{ +export namespace PivotGrid { export interface Model { @@ -24780,12 +26806,12 @@ export interface Model { analysisMode?: ej.Pivot.AnalysisMode|string; /** Specifies the CSS class to PivotGrid to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; /** Connects the PivotSchemaDesigner with the specified ID to the PivotGrid Control. - * @Default {“”} + * @Default {“”} */ pivotTableFieldListID?: string; @@ -24794,6 +26820,11 @@ export interface Model { */ dataSource?: DataSource; + /** Holds the neccessary properties for value sorting. + * @Default {{}} + */ + valueSortSettings?: ValueSortSettings; + /** Object that holds the settings of frozen headers. * @Default {{}} */ @@ -24819,7 +26850,7 @@ export interface Model { */ enableCellSelection?: boolean; - /** Enables the Drill-Through feature which retrieves the raw items that are used to create the specific cell in PivotGrid. This is only applicable in server mode component. + /** Enables the Drill-Through feature which retrieves the raw items that are used to create the specific cell in PivotGrid. * @Default {false} */ enableDrillThrough?: boolean; @@ -24849,6 +26880,11 @@ export interface Model { */ enableConditionalFormatting?: boolean; + /** Enables the advanced filtering options Value Filtering, Label Filtering and Sorting for each fields in server mode. + * @Default {false} + */ + enableAdvancedFilter?: boolean; + /** Allows the user to refresh the control on-demand and not during every UI operation. * @Default {false} */ @@ -24914,7 +26950,7 @@ export interface Model { */ hyperlinkSettings?: HyperlinkSettings; - /** Allows the user to enable PivotGrid’s responsiveness in the browser layout. + /** Allows the user to enable PivotGrid’s responsiveness in the browser layout. * @Default {false} */ isResponsive?: boolean; @@ -24944,69 +26980,69 @@ export interface Model { serviceMethodSettings?: ServiceMethodSettings; /** Connects the service using the specified URL for any server updates. - * @Default {“”} + * @Default {“”} */ url?: string; /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; /** Triggers before any AJAX request is passed from PivotGrid to service methods. */ - beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; /** Triggers before Pivot Engine starts to populate. */ - beforePivotEnginePopulate? (e: BeforePivotEnginePopulateEventArgs): void; + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; /** Triggers when double click action is performed over a cell. */ - cellDoubleClick? (e: CellDoubleClickEventArgs): void; + cellDoubleClick?(e: CellDoubleClickEventArgs): void; /** Triggers when right-click action is performed on a cell. */ - cellContext? (e: CellContextEventArgs): void; + cellContext?(e: CellContextEventArgs): void; /** Triggers when a specific range of value cells are selected. */ - cellSelection? (e: CellSelectionEventArgs): void; + cellSelection?(e: CellSelectionEventArgs): void; /** Triggers when the hyperlink of column header is clicked. */ - columnHeaderHyperlinkClick? (e: ColumnHeaderHyperlinkClickEventArgs): void; + columnHeaderHyperlinkClick?(e: ColumnHeaderHyperlinkClickEventArgs): void; /** Triggers after performing drill operation in PivotGrid. */ - drillSuccess? (e: DrillSuccessEventArgs): void; + drillSuccess?(e: DrillSuccessEventArgs): void; /** Triggers while clicking "OK" button in the drill-through dialog. */ - drillThrough? (e: DrillThroughEventArgs): void; + drillThrough?(e: DrillThroughEventArgs): void; /** Triggers when PivotGrid loading is initiated. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when PivotGrid widget completes all operations at client-side after any AJAX request. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; /** Triggers when any error occurred during AJAX request. */ - renderFailure? (e: RenderFailureEventArgs): void; + renderFailure?(e: RenderFailureEventArgs): void; /** Triggers when PivotGrid successfully reaches client-side after any AJAX request. */ - renderSuccess? (e: RenderSuccessEventArgs): void; + renderSuccess?(e: RenderSuccessEventArgs): void; /** Triggers when the hyperlink of row header is clicked. */ - rowHeaderHyperlinkClick? (e: RowHeaderHyperlinkClickEventArgs): void; + rowHeaderHyperlinkClick?(e: RowHeaderHyperlinkClickEventArgs): void; /** Triggers when the hyperlink of summary cell is clicked. */ - summaryCellHyperlinkClick? (e: SummaryCellHyperlinkClickEventArgs): void; + summaryCellHyperlinkClick?(e: SummaryCellHyperlinkClickEventArgs): void; /** Triggers when the hyperlink of value cell is clicked. */ - valueCellHyperlinkClick? (e: ValueCellHyperlinkClickEventArgs): void; + valueCellHyperlinkClick?(e: ValueCellHyperlinkClickEventArgs): void; /** Triggers before saving the current report to database. */ - saveReport? (e: SaveReportEventArgs): void; + saveReport?(e: SaveReportEventArgs): void; /** Triggers before loading a report from database. */ - loadReport? (e: LoadReportEventArgs): void; + loadReport?(e: LoadReportEventArgs): void; /** Triggers before performing exporting in pivot grid. */ - beforeExport? (e: BeforeExportEventArgs): void; + beforeExport?(e: BeforeExportEventArgs): void; /** Triggers before editing the cells. */ - cellEdit? (e: CellEditEventArgs): void; + cellEdit?(e: CellEditEventArgs): void; } export interface AfterServiceInvokeEventArgs { @@ -25050,7 +27086,7 @@ export interface CellDoubleClickEventArgs { /** returns the JSON details of the double clicked cell. */ - selectedData?: Array; + selectedData?: any[]; /** returns the custom object bound with PivotGrid control. */ @@ -25282,7 +27318,7 @@ export interface CellEditEventArgs { /** contains the array of cells selected for editing. */ - editCellsInfo?: Array; + editCellsInfo?: any[]; } export interface DataSourceColumnsAdvancedFilter { @@ -25311,7 +27347,7 @@ export interface DataSourceColumnsAdvancedFilter { /** Allows the user to hold the filter operand values in advanced filtering. */ - values?: Array; + values?: any[]; } export interface DataSourceColumnsFilterItems { @@ -25324,7 +27360,7 @@ export interface DataSourceColumnsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceColumn { @@ -25340,7 +27376,7 @@ export interface DataSourceColumn { /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. * @Default {[]} */ - advancedFilter?: Array; + advancedFilter?: DataSourceColumnsAdvancedFilter[]; /** Allows the user to indicate whether the added item is a named set or not. * @Default {false} @@ -25360,7 +27396,7 @@ export interface DataSourceColumn { /** Contains the list of members need to be drilled down by default in the field. * @Default {[]} */ - drilledItems?: Array; + drilledItems?: any[]; /** Applies filter to the field members. * @Default {null} @@ -25394,7 +27430,7 @@ export interface DataSourceRowsAdvancedFilter { /** Allows the user to hold the filter operand values in advanced filtering. */ - values?: Array; + values?: any[]; } export interface DataSourceRowsFilterItems { @@ -25407,7 +27443,7 @@ export interface DataSourceRowsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceRow { @@ -25423,7 +27459,7 @@ export interface DataSourceRow { /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. * @Default {[]} */ - advancedFilter?: Array; + advancedFilter?: DataSourceRowsAdvancedFilter[]; /** Allows the user to indicate whether the added item is a named set or not. * @Default {false} @@ -25443,7 +27479,7 @@ export interface DataSourceRow { /** Contains the list of members need to be drilled down by default in the field. * @Default {[]} */ - drilledItems?: Array; + drilledItems?: any[]; /** Applies filter to the field members. * @Default {null} @@ -25471,7 +27507,7 @@ export interface DataSourceValue { /** This holds the list of unique names of measures to bind them from the OLAP cube. * @Default {[]} */ - measures?: Array; + measures?: DataSourceValuesMeasure[]; /** Allows to set the axis name to place the measures items. * @Default {rows} @@ -25511,7 +27547,7 @@ export interface DataSourceFiltersFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceFilter { @@ -25558,25 +27594,25 @@ export interface DataSource { /** Lists out the items to be arranged in columns section of PivotGrid. * @Default {[]} */ - columns?: Array; + columns?: DataSourceColumn[]; /** Lists out the items to be arranged in rows section of PivotGrid. * @Default {[]} */ - rows?: Array; + rows?: DataSourceRow[]; /** Lists out the items which supports calculation in PivotGrid. * @Default {[]} */ - values?: Array; + values?: DataSourceValue[]; /** Lists out the items which supports filtering of values without displaying the members in UI in PivotGrid. * @Default {[]} */ - filters?: Array; + filters?: DataSourceFilter[]; /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} + * @Default {“”} */ cube?: string; @@ -25586,7 +27622,7 @@ export interface DataSource { data?: any; /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} + * @Default {“”} */ catalog?: string; @@ -25605,6 +27641,22 @@ export interface DataSource { pagerOptions?: DataSourcePagerOptions; } +export interface ValueSortSettings { + + /** Contains the headers of the specific column to which value sorting is applied. + */ + headerText?: string; + + /** Allows the user to set the string for separating column headers provided in the above property headerText. + */ + headerDelimiters?: string; + + /** Allows the user to set the sorting order of the values of the field. + * @Default {ej.PivotAnalysis.SortOrder.Ascending} + */ + sortOrder?: ej.PivotAnalysis.SortOrder|string; +} + export interface FrozenHeaderSettings { /** Allows the user to freeze the row headers alone on scrolling the horizontal scroll bar. @@ -25739,7 +27791,7 @@ export interface ServiceMethodSettings { writeBack?: string; } -enum Layout{ +enum Layout { ///To set normal summary layout in PivotGrid. Normal, @@ -25755,20 +27807,16 @@ enum Layout{ } } -module Pivot -{ -enum AnalysisMode -{ +namespace Pivot { +enum AnalysisMode { //To bind an OLAP data source to PivotGrid. OLAP, //To bind a relational data source to PivotGrid. Pivot, } } -module PivotAnalysis -{ -enum SortOrder -{ +namespace PivotAnalysis { +enum SortOrder { //Sorts the members of the field in ascending order. Ascending, //Sorts the members of the field in descending order. @@ -25777,20 +27825,16 @@ Descending, None, } } -module PivotAnalysis -{ -enum FilterType -{ +namespace PivotAnalysis { +enum FilterType { //Excludes the specified values among the members of the field. Exclude, //Includes the specified values alone among the members of the field. Include, } } -module PivotAnalysis -{ -enum SummaryType -{ +namespace PivotAnalysis { +enum SummaryType { //Calculates the summary as the total of all values. Sum, //Displays the average of all values as the summaries. @@ -25803,10 +27847,8 @@ Min, Max, } } -module Pivot -{ -enum OperationalMode -{ +namespace Pivot { +enum OperationalMode { //To bind data source completely from client-side. ClientMode, //To bind data source completely from server-side. @@ -25816,11 +27858,10 @@ ServerMode, class PivotSchemaDesigner extends ej.Widget { static fn: PivotSchemaDesigner; - constructor(element: JQuery, options?: PivotSchemaDesigner.Model); - constructor(element: Element, options?: PivotSchemaDesigner.Model); + constructor(element: JQuery | Element, options?: PivotSchemaDesigner.Model); static Locale: any; - model:PivotSchemaDesigner.Model; - defaults:PivotSchemaDesigner.Model; + model: PivotSchemaDesigner.Model; + defaults: PivotSchemaDesigner.Model; /** Performs an asynchronous HTTP (AJAX) request. * @returns {void} @@ -25832,12 +27873,12 @@ class PivotSchemaDesigner extends ej.Widget { */ refreshControl(): void; } -export module PivotSchemaDesigner{ +export namespace PivotSchemaDesigner { export interface Model { /** Specifies the CSS class to PivotSchemaDesigner to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -25846,7 +27887,8 @@ export interface Model { */ customObject?: any; - /** For ASP.NET and MVC Wrapper, PivotSchemaDesigner will be initialized and rendered empty initially. Once the connected pivot control widget is rendered completely, PivotSchemaDesigner will just be populated with data source by setting this property to “true”. + /** For ASP.NET and MVC Wrapper, PivotSchemaDesigner will be initialized and rendered empty initially. Once the connected pivot control widget is rendered completely, + * PivotSchemaDesigner will just be populated with data source by setting this property to “true”. * @Default {false} */ enableWrapper?: boolean; @@ -25867,7 +27909,7 @@ export interface Model { enableDragDrop?: boolean; /** Sets the height for PivotSchemaDesigner. - * @Default {“”} + * @Default {“”} */ height?: string; @@ -25887,12 +27929,12 @@ export interface Model { serviceMethod?: ServiceMethod; /** Connects the service using the specified URL for any server updates. - * @Default {“”} + * @Default {“”} */ url?: string; /** Sets the width for PivotSchemaDesigner. - * @Default {“”} + * @Default {“”} */ width?: string; @@ -25902,13 +27944,13 @@ export interface Model { layout?: ej.PivotSchemaDesigner.Layouts|string; /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; /** Triggers before any AJAX request is passed from PivotSchemaDesigner to service methods. */ - beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; /** Triggers when we start dragging any field from PivotSchemaDesigner. */ - dragMove? (e: DragMoveEventArgs): void; + dragMove?(e: DragMoveEventArgs): void; } export interface AfterServiceInvokeEventArgs { @@ -26006,7 +28048,7 @@ export interface ServiceMethod { removeButton?: string; } -enum Layouts{ +enum Layouts { ///To set the layout as same in the Excel. Excel, @@ -26022,18 +28064,17 @@ enum Layouts{ class PivotPager extends ej.Widget { static fn: PivotPager; - constructor(element: JQuery, options?: PivotPager.Model); - constructor(element: Element, options?: PivotPager.Model); + constructor(element: JQuery | Element, options?: PivotPager.Model); static Locale: any; - model:PivotPager.Model; - defaults:PivotPager.Model; + model: PivotPager.Model; + defaults: PivotPager.Model; /** This function initializes the page counts and page numbers for the PivotPager. * @returns {void} */ initPagerProperties(): void; } -export module PivotPager{ +export namespace PivotPager { export interface Model { @@ -26068,12 +28109,12 @@ export interface Model { seriesPageCount?: number; /** Contains the ID of the target element for which paging needs to be done. - * @Default {“”} + * @Default {“”} */ targetControlID?: string; } -enum Mode{ +enum Mode { ///To set both categorical and series pager for paging. Both, @@ -26089,11 +28130,10 @@ enum Mode{ class PivotChart extends ej.Widget { static fn: PivotChart; - constructor(element: JQuery, options?: PivotChart.Model); - constructor(element: Element, options?: PivotChart.Model); + constructor(element: JQuery | Element, options?: PivotChart.Model); static Locale: any; - model:PivotChart.Model; - defaults:PivotChart.Model; + model: PivotChart.Model; + defaults: PivotChart.Model; /** Performs an asynchronous HTTP (AJAX) request. * @returns {void} @@ -26133,7 +28173,7 @@ class PivotChart extends ej.Widget { /** Returns the JSON records formed to render the control. * @returns {Array} */ - getJSONRecords(): Array; + getJSONRecords(): any[]; /** Sets the JSON records to render the control. * @returns {void} @@ -26143,7 +28183,7 @@ class PivotChart extends ej.Widget { /** Returns the PivotEngine formed to render the control. * @returns {Array} */ - getPivotEngine(): Array; + getPivotEngine(): any[]; /** Sets the PivotEngine required to render the control. * @returns {void} @@ -26165,7 +28205,7 @@ class PivotChart extends ej.Widget { */ refreshPagedPivotChart(): void; } -export module PivotChart{ +export namespace PivotChart { export interface Model { @@ -26175,7 +28215,7 @@ export interface Model { analysisMode?: ej.Pivot.AnalysisMode|string; /** Specifies the CSS class to PivotChart to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -26209,7 +28249,7 @@ export interface Model { */ enableRTL?: boolean; - /** Allows the user to enable PivotChart’s responsiveness in the browser layout. + /** Allows the user to enable PivotChart’s responsiveness in the browser layout. * @Default {false} */ isResponsive?: boolean; @@ -26229,12 +28269,16 @@ export interface Model { */ operationalMode?: ej.Pivot.OperationalMode|string; - /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. + * To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. + * Then, assign the name to the series’s xAxisName property to link both axis and series. * @Default {{}} */ primaryXAxis?: any; - /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. + * To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. + * Then, assign the name to the series’s yAxisName property to link both axis and series. * @Default {{}} */ primaryYAxis?: any; @@ -26255,33 +28299,33 @@ export interface Model { size?: any; /** Connects the service using the specified URL for any server updates on operating the control in server mode. - * @Default {“”} + * @Default {“”} */ url?: string; /** Triggers when PivotChart starts to render. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; /** Triggers before any AJAX request is passed from PivotChart to service methods. */ - beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; /** Triggers on performing drill up/down in PivotChart control. */ - drillSuccess? (e: DrillSuccessEventArgs): void; + drillSuccess?(e: DrillSuccessEventArgs): void; /** Triggers when PivotChart widget completes all operations at client-side after any AJAX request. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; /** Triggers when any error occurred during AJAX request. */ - renderFailure? (e: RenderFailureEventArgs): void; + renderFailure?(e: RenderFailureEventArgs): void; /** Triggers when PivotChart successfully reaches client-side after any AJAX request. */ - renderSuccess? (e: RenderSuccessEventArgs): void; + renderSuccess?(e: RenderSuccessEventArgs): void; /** Triggers before performing exporting in pivot chart. */ - beforeExport? (e: BeforeExportEventArgs): void; + beforeExport?(e: BeforeExportEventArgs): void; } export interface LoadEventArgs { @@ -26426,7 +28470,7 @@ export interface DataSourceColumnsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceColumn { @@ -26465,7 +28509,7 @@ export interface DataSourceRowsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceRow { @@ -26514,7 +28558,7 @@ export interface DataSourceValue { /** This holds the list of unique names of measures to bind them from the OLAP cube. * @Default {[]} */ - measures?: Array; + measures?: DataSourceValuesMeasure[]; /** Allows to set the axis name to place the measures items. * @Default {rows} @@ -26541,7 +28585,7 @@ export interface DataSourceFiltersFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceFilter { @@ -26559,7 +28603,7 @@ export interface DataSourceFilter { export interface DataSource { /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} + * @Default {“”} */ cube?: string; @@ -26569,29 +28613,29 @@ export interface DataSource { data?: any; /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} + * @Default {“”} */ catalog?: string; /** Lists out the items to be displayed as series of PivotChart. * @Default {[]} */ - columns?: Array; + columns?: DataSourceColumn[]; /** Lists out the items to be displayed as segments of PivotChart. * @Default {[]} */ - rows?: Array; + rows?: DataSourceRow[]; /** Lists out the items supports calculation in PivotChart. * @Default {[]} */ - values?: Array; + values?: DataSourceValue[]; /** Lists out the items which supports filtering of values without displaying the members in UI in PivotChart. * @Default {[]} */ - filters?: Array; + filters?: DataSourceFilter[]; } export interface ServiceMethodSettings { @@ -26617,7 +28661,7 @@ export interface ServiceMethodSettings { paging?: string; } -enum ChartTypes{ +enum ChartTypes { ///To render a Line type PivotChart. Line, @@ -26675,11 +28719,10 @@ enum ChartTypes{ class PivotClient extends ej.Widget { static fn: PivotClient; - constructor(element: JQuery, options?: PivotClient.Model); - constructor(element: Element, options?: PivotClient.Model); + constructor(element: JQuery | Element, options?: PivotClient.Model); static Locale: any; - model:PivotClient.Model; - defaults:PivotClient.Model; + model: PivotClient.Model; + defaults: PivotClient.Model; /** Performs an asynchronous HTTP (AJAX) request. * @returns {void} @@ -26724,14 +28767,14 @@ class PivotClient extends ej.Widget { /** Returns the JSON records formed to render the control. * @returns {Array} */ - getJSONRecords(): Array; + getJSONRecords(): any[]; /** Sets the JSON records formed to render the control to a property. * @returns {void} */ setJSONRecords(): void; } -export module PivotClient{ +export namespace PivotClient { export interface Model { @@ -26751,7 +28794,7 @@ export interface Model { clientExportMode?: ej.PivotClient.ClientExportMode|string; /** Specifies the CSS class to PivotClient to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -26770,6 +28813,11 @@ export interface Model { */ displaySettings?: DisplaySettings; + /** Enables the splitter option for resizing the elements inside the control. + * @Default {false} + */ + enableSplitter?: boolean; + /** Enables the advanced filtering options Value Filtering, Label Filtering and Sorting for each dimensions on binding OLAP data in server mode. * @Default {false} */ @@ -26849,40 +28897,40 @@ export interface Model { url?: string; /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; /** Triggers before any AJAX request is passed from client-side to service methods. */ - beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; /** Triggers before saving the current collection of reports. */ - saveReport? (e: SaveReportEventArgs): void; + saveReport?(e: SaveReportEventArgs): void; /** Triggers before loading a saved collection of reports. */ - loadReport? (e: LoadReportEventArgs): void; + loadReport?(e: LoadReportEventArgs): void; /** Triggers before fetching the report collection from storage. */ - fetchReport? (e: FetchReportEventArgs): void; + fetchReport?(e: FetchReportEventArgs): void; /** Triggers before exporting the control. */ - beforeExport? (e: BeforeExportEventArgs): void; + beforeExport?(e: BeforeExportEventArgs): void; /** Triggers before rendering the PivotChart. */ - chartLoad? (e: ChartLoadEventArgs): void; + chartLoad?(e: ChartLoadEventArgs): void; /** Triggers before rendering the PivotTreeMap. */ - treeMapLoad? (e: TreeMapLoadEventArgs): void; + treeMapLoad?(e: TreeMapLoadEventArgs): void; /** Triggers while we initiate loading of the widget. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when PivotClient widget completes all operations at client-end after any AJAX request. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; /** Triggers when any error occurred during AJAX request. */ - renderFailure? (e: RenderFailureEventArgs): void; + renderFailure?(e: RenderFailureEventArgs): void; /** Triggers when PivotClient successfully completes rendering. */ - renderSuccess? (e: RenderSuccessEventArgs): void; + renderSuccess?(e: RenderSuccessEventArgs): void; } export interface AfterServiceInvokeEventArgs { @@ -27059,7 +29107,7 @@ export interface DataSourceColumnsAdvancedFilter { /** Allows the user to hold the filter operand values in advanced filtering. */ - values?: Array; + values?: any[]; } export interface DataSourceColumnsFilterItems { @@ -27072,7 +29120,7 @@ export interface DataSourceColumnsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceColumn { @@ -27088,7 +29136,7 @@ export interface DataSourceColumn { /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. * @Default {[]} */ - advancedFilter?: Array; + advancedFilter?: DataSourceColumnsAdvancedFilter[]; /** Allows the user to indicate whether the added item is a named set or not. * @Default {false} @@ -27108,7 +29156,7 @@ export interface DataSourceColumn { /** Contains the list of members need to be drilled down by default in the field. * @Default {[]} */ - drilledItems?: Array; + drilledItems?: any[]; /** Applies filter to the field members. * @Default {null} @@ -27142,7 +29190,7 @@ export interface DataSourceRowsAdvancedFilter { /** Allows the user to hold the filter operand values in advanced filtering. */ - values?: Array; + values?: any[]; } export interface DataSourceRowsFilterItems { @@ -27155,7 +29203,7 @@ export interface DataSourceRowsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceRow { @@ -27171,7 +29219,7 @@ export interface DataSourceRow { /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. * @Default {[]} */ - advancedFilter?: Array; + advancedFilter?: DataSourceRowsAdvancedFilter[]; /** Allows the user to indicate whether the added item is a named set or not. * @Default {false} @@ -27191,7 +29239,7 @@ export interface DataSourceRow { /** Contains the list of members need to be drilled down by default in the field. * @Default {[]} */ - drilledItems?: Array; + drilledItems?: any[]; /** Applies filter to the field members. * @Default {null} @@ -27219,7 +29267,7 @@ export interface DataSourceValue { /** This holds the list of unique names of measures to bind them from the OLAP cube. * @Default {[]} */ - measures?: Array; + measures?: DataSourceValuesMeasure[]; /** Allows to set the axis name to place the measures items. * @Default {rows} @@ -27259,7 +29307,7 @@ export interface DataSourceFiltersFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceFilter { @@ -27306,25 +29354,25 @@ export interface DataSource { /** Lists out the items to be arranged in columns section of PivotClient. * @Default {[]} */ - columns?: Array; + columns?: DataSourceColumn[]; /** Lists out the items to be arranged in rows section of PivotClient. * @Default {[]} */ - rows?: Array; + rows?: DataSourceRow[]; /** Lists out the items which supports calculation in PivotClient. * @Default {[]} */ - values?: Array; + values?: DataSourceValue[]; /** Lists out the items which supports filtering of values without displaying the members in UI in PivotClient. * @Default {[]} */ - filters?: Array; + filters?: DataSourceFilter[]; /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} + * @Default {“”} */ cube?: string; @@ -27334,11 +29382,11 @@ export interface DataSource { data?: any; /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} + * @Default {“”} */ catalog?: string; - /** Allows user to filter the members (by its name and values) through advanced filtering (excel-like) option for OLAP data source in client-mode. + /** Allows user to filter the members (by its name and values) through advanced filtering (excel-like) option in client-mode. * @Default {false} */ enableAdvancedFilter?: boolean; @@ -27375,7 +29423,7 @@ export interface DisplaySettings { */ enableTogglePanel?: boolean; - /** Allows the user to enable PivotClient’s responsiveness in the browser layout. + /** Allows the user to enable PivotClient’s responsiveness in the browser layout. * @Default {false} */ isResponsive?: boolean; @@ -27474,7 +29522,7 @@ export interface ServiceMethodSettings { paging?: string; } -enum ClientExportMode{ +enum ClientExportMode { ///Exports both the PivotChart and PivotGrid on exporting. ChartAndGrid, @@ -27487,7 +29535,7 @@ enum ClientExportMode{ } -enum ControlPlacement{ +enum ControlPlacement { ///Displays PivotChart and PivotGrid widgets in separate tabs. Tab, @@ -27497,7 +29545,7 @@ enum ControlPlacement{ } -enum DefaultView{ +enum DefaultView { ///To set PivotChart as a default control in view. Chart, @@ -27507,7 +29555,7 @@ enum DefaultView{ } -enum DisplayMode{ +enum DisplayMode { ///To display only PivotChart widget. ChartOnly, @@ -27523,11 +29571,10 @@ enum DisplayMode{ class PivotGauge extends ej.Widget { static fn: PivotGauge; - constructor(element: JQuery, options?: PivotGauge.Model); - constructor(element: Element, options?: PivotGauge.Model); + constructor(element: JQuery | Element, options?: PivotGauge.Model); static Locale: any; - model:PivotGauge.Model; - defaults:PivotGauge.Model; + model: PivotGauge.Model; + defaults: PivotGauge.Model; /** Performs an asynchronous HTTP (AJAX) request. * @returns {void} @@ -27562,7 +29609,7 @@ class PivotGauge extends ej.Widget { /** Returns the JSON records formed to render the control. * @returns {Array} */ - getJSONRecords(): Array; + getJSONRecords(): any[]; /** Sets the JSON records to render the control. * @returns {void} @@ -27574,7 +29621,7 @@ class PivotGauge extends ej.Widget { */ getJSONData(): void; } -export module PivotGauge{ +export namespace PivotGauge { export interface Model { @@ -27584,7 +29631,7 @@ export interface Model { columnsCount?: number; /** Specifies the CSS class to PivotGauge to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -27613,7 +29660,7 @@ export interface Model { */ enableRTL?: boolean; - /** Allows the user to enable PivotGauge’s responsiveness in the browser layout. + /** Allows the user to enable PivotGauge’s responsiveness in the browser layout. * @Default {false} */ isResponsive?: boolean; @@ -27649,7 +29696,7 @@ export interface Model { showHeaderLabel?: boolean; /** Connects the service using the specified URL for any server updates on server mode operation. - * @Default {“”} + * @Default {“”} */ url?: string; @@ -27664,25 +29711,25 @@ export interface Model { operationalMode?: ej.Pivot.OperationalMode|string; /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; /** Triggers before any AJAX request is passed from PivotGauge to service methods. */ - beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; /** Triggers before populating the pivot engine on operating in client mode. */ - beforePivotEnginePopulate? (e: BeforePivotEnginePopulateEventArgs): void; + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; /** Triggers when PivotGauge started loading at client-side. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when PivotGauge widget completes all operations at client-side after any AJAX request. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; /** Triggers when any error occurred during AJAX request. */ - renderFailure? (e: RenderFailureEventArgs): void; + renderFailure?(e: RenderFailureEventArgs): void; /** Triggers when PivotGauge successfully reaches client-side after any AJAX request. */ - renderSuccess? (e: RenderSuccessEventArgs): void; + renderSuccess?(e: RenderSuccessEventArgs): void; } export interface AfterServiceInvokeEventArgs { @@ -27780,7 +29827,7 @@ export interface DataSourceColumnsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceColumn { @@ -27805,7 +29852,7 @@ export interface DataSourceRowsFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceRow { @@ -27840,7 +29887,7 @@ export interface DataSourceValue { /** This holds the list of unique names of measures to bind them from the OLAP cube. * @Default {[]} */ - measures?: Array; + measures?: DataSourceValuesMeasure[]; /** Allows to set the axis name to place the measures items. * @Default {rows} @@ -27867,7 +29914,7 @@ export interface DataSourceFiltersFilterItems { /** Contains the collection of items to be included/excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceFilter { @@ -27885,7 +29932,7 @@ export interface DataSourceFilter { export interface DataSource { /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} + * @Default {“”} */ cube?: string; @@ -27895,29 +29942,29 @@ export interface DataSource { data?: any; /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} + * @Default {“”} */ catalog?: string; /** Lists out the items to bind in columns section. * @Default {[]} */ - columns?: Array; + columns?: DataSourceColumn[]; /** Lists out the items to bind in rows section. * @Default {[]} */ - rows?: Array; + rows?: DataSourceRow[]; /** Lists out the items supports calculation in PivotGauge. * @Default {[]} */ - values?: Array; + values?: DataSourceValue[]; /** Lists out the items which supports filtering of values without displaying the members in UI in PivotGauge. * @Default {[]} */ - filters?: Array; + filters?: DataSourceFilter[]; } export interface LabelFormatSettings { @@ -27949,7 +29996,7 @@ export interface ServiceMethodSettings { initialize?: string; } -enum NumberFormat{ +enum NumberFormat { ///To set default format for label values. Default, @@ -27977,11 +30024,10 @@ enum NumberFormat{ class PivotTreeMap extends ej.Widget { static fn: PivotTreeMap; - constructor(element: JQuery, options?: PivotTreeMap.Model); - constructor(element: Element, options?: PivotTreeMap.Model); + constructor(element: JQuery | Element, options?: PivotTreeMap.Model); static Locale: any; - model:PivotTreeMap.Model; - defaults:PivotTreeMap.Model; + model: PivotTreeMap.Model; + defaults: PivotTreeMap.Model; /** Performs an asynchronous HTTP (AJAX) request. * @returns {void} @@ -28001,7 +30047,7 @@ class PivotTreeMap extends ej.Widget { /** Returns the JSON records formed to render the control. * @returns {Array} */ - getJSONRecords(): Array; + getJSONRecords(): any[]; /** Sets the JSON records to render the control. * @returns {void} @@ -28023,12 +30069,12 @@ class PivotTreeMap extends ej.Widget { */ renderControlSuccess(): void; } -export module PivotTreeMap{ +export namespace PivotTreeMap { export interface Model { /** Specifies the CSS class to PivotTreeMap to achieve custom theme. - * @Default {“”} + * @Default {“”} */ cssClass?: string; @@ -28042,7 +30088,7 @@ export interface Model { */ customObject?: any; - /** Allows the user to enable PivotTreeMap’s responsiveness in the browser layout. + /** Allows the user to enable PivotTreeMap’s responsiveness in the browser layout. * @Default {false} */ isResponsive?: boolean; @@ -28063,33 +30109,33 @@ export interface Model { serviceMethodSettings?: ServiceMethodSettings; /** Connects the service using the specified URL for any server updates. - * @Default {“”} + * @Default {“”} */ url?: string; /** Triggers when it reaches client-side after any AJAX request. */ - afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + afterServiceInvoke?(e: AfterServiceInvokeEventArgs): void; /** Triggers before any AJAX request is passed from PivotTreeMap to service methods. */ - beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; /** Triggers when PivotTreeMap starts to render. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers before populating the pivot engine from datasource. */ - beforePivotEnginePopulate? (e: BeforePivotEnginePopulateEventArgs): void; + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; /** Triggers when drill up/down happens in PivotTreeMap control. And it returns the outer HTML of PivotTreeMap control. */ - drillSuccess? (e: DrillSuccessEventArgs): void; + drillSuccess?(e: DrillSuccessEventArgs): void; /** Triggers when PivotTreeMap widget completes all operations at client-side after any AJAX request. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; /** Triggers when any error occurred during AJAX request. */ - renderFailure? (e: RenderFailureEventArgs): void; + renderFailure?(e: RenderFailureEventArgs): void; /** Triggers when PivotTreeMap successfully reaches client-side after any AJAX request. */ - renderSuccess? (e: RenderSuccessEventArgs): void; + renderSuccess?(e: RenderSuccessEventArgs): void; } export interface AfterServiceInvokeEventArgs { @@ -28205,7 +30251,7 @@ export interface DataSourceColumnsFilterItems { /** Contains the collection of items to be excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceColumn { @@ -28230,7 +30276,7 @@ export interface DataSourceRowsFilterItems { /** Contains the collection of items to be excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceRow { @@ -28262,7 +30308,7 @@ export interface DataSourceValue { /** This holds the list of unique names of measures to bind them from the OLAP cube. * @Default {[]} */ - measures?: Array; + measures?: DataSourceValuesMeasure[]; /** Allows to set the axis name to place the measures items. * @Default {rows} @@ -28275,7 +30321,7 @@ export interface DataSourceFiltersFilterItems { /** Contains the collection of items to be excluded among the field members. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface DataSourceFilter { @@ -28298,34 +30344,34 @@ export interface DataSource { data?: any; /** Contains the respective cube name from OLAP database as string type. - * @Default {“”} + * @Default {“”} */ cube?: string; /** In connection with an OLAP database, this property contains the database name as string to fetch the data from the given connection string. - * @Default {“”} + * @Default {“”} */ catalog?: string; /** Lists out the items to be displayed as series of PivotTreeMap. * @Default {[]} */ - columns?: Array; + columns?: DataSourceColumn[]; /** Lists out the items to be displayed as segments of PivotTreeMap. * @Default {[]} */ - rows?: Array; + rows?: DataSourceRow[]; /** Lists out the items supports calculation in PivotTreeMap. * @Default {[]} */ - values?: Array; + values?: DataSourceValue[]; /** Lists out the items which supports filtering of values without displaying the members in UI in PivotTreeMap. * @Default {[]} */ - filters?: Array; + filters?: DataSourceFilter[]; } export interface ServiceMethodSettings { @@ -28344,11 +30390,10 @@ export interface ServiceMethodSettings { class Schedule extends ej.Widget { static fn: Schedule; - constructor(element: JQuery, options?: Schedule.Model); - constructor(element: Element, options?: Schedule.Model); + constructor(element: JQuery | Element, options?: Schedule.Model); static Locale: any; - model:Schedule.Model; - defaults:Schedule.Model; + model: Schedule.Model; + defaults: Schedule.Model; /** This method is used to delete the appointment based on the guid value or the appointment data passed to it. * @param {string|any} GUID value of an appointment element or an appointment object @@ -28373,14 +30418,15 @@ class Schedule extends ej.Widget { * @param {Array} Holds array of one or more conditional objects for filtering the appointments based on it. * @returns {Array} */ - filterAppointments(filterConditions: Array): Array; + filterAppointments(filterConditions: any[]): any[]; /** Gets the complete appointment list of Schedule control. * @returns {Array} */ - getAppointments(): Array; + getAppointments(): any[]; - /** Prints the entire Scheduler or a single appointment based on the appointment data passed as an argument to it. Simply calling the print() method, without passing any argument will print the entire Scheduler. + /** Prints the entire Scheduler or a single appointment based on the appointment data passed as an argument to it. Simply calling the print() method, + * without passing any argument will print the entire Scheduler. * @param {any} Either accepts no arguments at all or else accepts an appointment object. * @returns {void} */ @@ -28402,7 +30448,9 @@ class Schedule extends ej.Widget { */ getRecurrenceRule(): string; - /** Retrieves the time slot information (start/end time and resource details) of the given element. The parameter is optional - as when no element is passed to it, the currently selected cell information will be retrieved. When multiple cells are selected in the Scheduler, it is not necessary to provide the parameter. + /** Retrieves the time slot information (start/end time and resource details) of the given element. + * The parameter is optional - as when no element is passed to it, the currently selected cell information will be retrieved. When multiple cells are selected in the Scheduler, + * it is not necessary to provide the parameter. * @param {any} TD element object rendered as Scheduler work cell * @returns {any} */ @@ -28415,7 +30463,7 @@ class Schedule extends ej.Widget { * @param {boolean} Defines the ignoreCase value for performing the search operation. * @returns {Array} */ - searchAppointments(searchString: any|string, field: string, operator: ej.FilterOperators|string, ignoreCase: boolean): Array; + searchAppointments(searchString: any|string, field: string, operator: ej.FilterOperators|string, ignoreCase: boolean): any[]; /** Refreshes the entire Schedule control. * @returns {void} @@ -28432,7 +30480,7 @@ class Schedule extends ej.Widget { */ notifyChanges(): void; } -export module Schedule{ +export namespace Schedule { export interface Model { @@ -28446,11 +30494,13 @@ export interface Model { */ allowKeyboardNavigation?: boolean; - /** It includes the dataSource option and the fields related to Schedule appointments. The appointment fields within the appointmentSettings can accept both string and object type values. To apply validation rules on the appointment window fields, then the appointment fields needs to be defined with object type values. + /** It includes the dataSource option and the fields related to Schedule appointments. The appointment fields within the appointmentSettings can accept both string and object type values. + * To apply validation rules on the appointment window fields, then the appointment fields needs to be defined with object type values. */ appointmentSettings?: AppointmentSettings; - /** Template design that applies on the Schedule appointments. All the field names that are mapped from dataSource to the appropriate field properties within the appointmentSettings can be used within the template. + /** Template design that applies on the Schedule appointments. All the field names that are mapped from dataSource + * to the appropriate field properties within the appointmentSettings can be used within the template. * @Default {null} */ appointmentTemplateId?: string; @@ -28481,7 +30531,9 @@ export interface Model { */ currentDate?: any; - /** Sets current view of the Schedule. Schedule renders initially with the view that is specified here. The available views are day, week, workweek, month, agenda and custom view - from which any one of the required view can be set to the Schedule. It accepts both string or enum values. The enum values that are accepted by currentView(ej.Schedule.CurrentView) are as follows, + /** Sets current view of the Schedule. Schedule renders initially with the view that is specified here. The available views are day, week, workweek, month, agenda and + * custom view - from which any one of the required view can be set to the Schedule. It accepts both string or enum values. The enum values that are accepted + * by currentView(ej.Schedule.CurrentView) are as follows, * @Default {ej.Schedule.CurrentView.Week} */ currentView?: string|ej.Schedule.CurrentView; @@ -28558,7 +30610,8 @@ export interface Model { */ minDate?: any; - /** Sets the mode of Schedule rendering either in a vertical or horizontal direction. It accepts either string("vertical" or "horizontal") or enum values. The enum values that are accepted by orientation(ej.Schedule.Orientation) are as follows, + /** Sets the mode of Schedule rendering either in a vertical or horizontal direction. It accepts either string("vertical" or "horizontal") or enum values. + * The enum values that are accepted by orientation(ej.Schedule.Orientation) are as follows, * @Default {ej.Schedule.Orientation.Vertical} */ orientation?: string|ej.Schedule.Orientation; @@ -28576,7 +30629,8 @@ export interface Model { */ reminderSettings?: ReminderSettings; - /** Defines the specific start and end dates to be rendered in the Schedule control. To render such user-specified custom date ranges in the Schedule control, set the currentView property to ej.Schedule.CurrentView.CustomView. + /** Defines the specific start and end dates to be rendered in the Schedule control. To render such user-specified custom date ranges in the Schedule control, + * set the currentView property to ej.Schedule.CurrentView.CustomView. * @Default {null} */ renderDates?: RenderDates; @@ -28586,10 +30640,11 @@ export interface Model { */ resourceHeaderTemplateId?: string; - /** Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the Schedule based on the order of the resource data provided within this collection. + /** Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the Schedule + * based on the order of the resource data provided within this collection. * @Default {null} */ - resources?: Array; + resources?: Resource[]; /** When set to true, displays the all-day row cells on the Schedule. * @Default {true} @@ -28626,7 +30681,8 @@ export interface Model { */ startHour?: number; - /** Sets either 12 or 24 hour time mode on the Schedule. It accepts either the string value("12" or "24") or the below mentioned enum values. The enum values that are accepted by timeMode(ej.Schedule.TimeMode) are as follows, + /** Sets either 12 or 24 hour time mode on the Schedule. It accepts either the string value("12" or "24") or the below mentioned enum values. + * The enum values that are accepted by timeMode(ej.Schedule.TimeMode) are as follows, * @Default {null} */ timeMode?: string|ej.Schedule.TimeMode; @@ -28643,14 +30699,15 @@ export interface Model { /** Defines the view collection to be displayed on the Schedule. By default, it displays all the views namely, Day, Week, WorkWeek and Month. * @Default {[Day, Week, WorkWeek, Month, Agenda]} */ - views?: Array; + views?: any[]; /** Sets the width of the Schedule. Accepts both pixel and percentage values. * @Default {100%} */ width?: string; - /** When set to true, Schedule allows the validation of recurrence pattern to take place before it is being assigned to the appointments. For example, when one of the instance of recurrence appointment is dragged beyond the next or previous instance of the same recurrence appointment, a pop-up is displayed with the validation message disallowing the drag functionality. + /** When set to true, Schedule allows the validation of recurrence pattern to take place before it is being assigned to the appointments. For example, when one of the instance of + * recurrence appointment is dragged beyond the next or previous instance of the same recurrence appointment, a pop-up is displayed with the validation message disallowing the drag functionality. * @Default {true} */ enableRecurrenceValidation?: boolean; @@ -28667,7 +30724,7 @@ export interface Model { /** Sets different day collection within workWeek view. * @Default {[Monday, Tuesday, Wednesday, Thursday, Friday]} */ - workWeek?: Array; + workWeek?: any[]; /** Allows to pop-up appointment details in a tooltip while hovering over the appointments. */ @@ -28711,99 +30768,100 @@ export interface Model { */ showNextPrevMonth?: boolean; - /** Blocks the user-specific time interval on the Scheduler, so that no appointments can be created on that particular time slots. It includes the dataSource option and also the fields related to block intervals. + /** Blocks the user-specific time interval on the Scheduler, so that no appointments can be created on that particular time slots. + * It includes the dataSource option and also the fields related to block intervals. */ blockoutSettings?: BlockoutSettings; /** Triggers on the beginning of every action that starts within the Schedule. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggers after the completion of every action within the Schedule. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggers after an appointment is clicked. */ - appointmentClick? (e: AppointmentClickEventArgs): void; + appointmentClick?(e: AppointmentClickEventArgs): void; /** Triggers before the appointment is being removed from the Scheduler. */ - beforeAppointmentRemove? (e: BeforeAppointmentRemoveEventArgs): void; + beforeAppointmentRemove?(e: BeforeAppointmentRemoveEventArgs): void; /** Triggers before the edited appointment is being saved. */ - beforeAppointmentChange? (e: BeforeAppointmentChangeEventArgs): void; + beforeAppointmentChange?(e: BeforeAppointmentChangeEventArgs): void; /** Triggers on hovering the mouse over the appointments. */ - appointmentHover? (e: AppointmentHoverEventArgs): void; + appointmentHover?(e: AppointmentHoverEventArgs): void; /** Triggers before the new appointment gets saved. */ - beforeAppointmentCreate? (e: BeforeAppointmentCreateEventArgs): void; + beforeAppointmentCreate?(e: BeforeAppointmentCreateEventArgs): void; /** Triggers before the appointment window opens. */ - appointmentWindowOpen? (e: AppointmentWindowOpenEventArgs): void; + appointmentWindowOpen?(e: AppointmentWindowOpenEventArgs): void; /** Triggers before the context menu opens. */ - beforeContextMenuOpen? (e: BeforeContextMenuOpenEventArgs): void; + beforeContextMenuOpen?(e: BeforeContextMenuOpenEventArgs): void; /** Triggers after the cell is clicked. */ - cellClick? (e: CellClickEventArgs): void; + cellClick?(e: CellClickEventArgs): void; /** Triggers after the cell is clicked twice. */ - cellDoubleClick? (e: CellDoubleClickEventArgs): void; + cellDoubleClick?(e: CellDoubleClickEventArgs): void; /** Triggers on hovering the mouse overs the cells. */ - cellHover? (e: CellHoverEventArgs): void; + cellHover?(e: CellHoverEventArgs): void; /** Triggers when the Scheduler completely renders on the page. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggers when the Scheduler and all its sub-components gets destroyed. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggers while the appointment is being dragged over the work cells. */ - drag? (e: DragEventArgs): void; + drag?(e: DragEventArgs): void; /** Triggers when the appointment dragging begins. */ - dragStart? (e: DragStartEventArgs): void; + dragStart?(e: DragStartEventArgs): void; /** Triggers when the appointment is dropped. */ - dragStop? (e: DragStopEventArgs): void; + dragStop?(e: DragStopEventArgs): void; /** Triggers after the menu/sub-menu items within the context menu is clicked. */ - menuItemClick? (e: MenuItemClickEventArgs): void; + menuItemClick?(e: MenuItemClickEventArgs): void; /** Triggers after the Schedule view or date is navigated. */ - navigation? (e: NavigationEventArgs): void; + navigation?(e: NavigationEventArgs): void; /** Triggers every time before the elements of the scheduler such as work cells, time cells or header cells and so on renders or re-renders on a page. */ - queryCellInfo? (e: QueryCellInfoEventArgs): void; + queryCellInfo?(e: QueryCellInfoEventArgs): void; /** Triggers when the reminder is raised for an appointment based on the alertBefore value. */ - reminder? (e: ReminderEventArgs): void; + reminder?(e: ReminderEventArgs): void; /** Triggers while resizing the appointment. */ - resize? (e: ResizeEventArgs): void; + resize?(e: ResizeEventArgs): void; /** Triggers when the appointment resizing begins. */ - resizeStart? (e: ResizeStartEventArgs): void; + resizeStart?(e: ResizeStartEventArgs): void; /** Triggers when an appointment resizing stops. */ - resizeStop? (e: ResizeStopEventArgs): void; + resizeStop?(e: ResizeStopEventArgs): void; /** Triggers when the overflow button is clicked. */ - overflowButtonClick? (e: OverflowButtonClickEventArgs): void; + overflowButtonClick?(e: OverflowButtonClickEventArgs): void; /** Triggers while mouse hovering on the overflow button. */ - overflowButtonHover? (e: OverflowButtonHoverEventArgs): void; + overflowButtonHover?(e: OverflowButtonHoverEventArgs): void; /** Triggers when any of the keyboard keys are pressed. */ - keyDown? (e: KeyDownEventArgs): void; + keyDown?(e: KeyDownEventArgs): void; /** Triggers after the new appointment is saved. */ - appointmentCreated? (e: AppointmentCreatedEventArgs): void; + appointmentCreated?(e: AppointmentCreatedEventArgs): void; /** Triggers after an existing appointment is edited. */ - appointmentChanged? (e: AppointmentChangedEventArgs): void; + appointmentChanged?(e: AppointmentChangedEventArgs): void; /** Triggers after the appointment is deleted. */ - appointmentRemoved? (e: AppointmentRemovedEventArgs): void; + appointmentRemoved?(e: AppointmentRemovedEventArgs): void; } export interface ActionBeginEventArgs { @@ -29569,7 +31627,7 @@ export interface AppointmentSettings { /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule appointments. * @Default {[]} */ - dataSource?: any|Array; + dataSource?: any|any[]; /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. * @Default {null} @@ -29646,12 +31704,14 @@ export interface AppointmentSettings { */ priority?: string; - /** Binds the name of start timezone field in dataSource. It indicates the timezone of appointment start date. When startTimeZone field is not mentioned, the appointment uses the Schedule timeZone or System timeZone. + /** Binds the name of start timezone field in dataSource. It indicates the timezone of appointment start date. When startTimeZone field is not mentioned, + * the appointment uses the Schedule timeZone or System timeZone. * @Default {null} */ startTimeZone?: string; - /** Binds the name of end timezone field in dataSource. It indicates the timezone of appointment end date. When the endTimeZone field is not mentioned, the appointment uses the Schedule timeZone or System timeZone. + /** Binds the name of end timezone field in dataSource. It indicates the timezone of appointment end date. When the endTimeZone field is not mentioned, + * the appointment uses the Schedule timeZone or System timeZone. * @Default {null} */ endTimeZone?: string; @@ -29671,7 +31731,7 @@ export interface CategorizeSettings { /** The dataSource option accepts either the JSON object collection or DataManager [ej.DataManager] instance that contains the categorize data. */ - dataSource?: Array|any; + dataSource?: any[]|any; /** Binds id field name in the dataSource to id of category data. * @Default {id} @@ -29698,11 +31758,11 @@ export interface ContextMenuSettingsMenuItems { /** All the appointment related context menu items are grouped under this appointment menu collection. */ - appointment?: Array; + appointment?: any[]; /** All the Scheduler cell related context menu items are grouped under this cells menu item collection. */ - cells?: Array; + cells?: any[]; } export interface ContextMenuSettings { @@ -29721,7 +31781,7 @@ export interface Group { /** Holds the array of resource names to be grouped on the Schedule. */ - resources?: Array; + resources?: any[]; } export interface WorkHours { @@ -29752,7 +31812,7 @@ export interface PrioritySettings { /** The dataSource option can accept the JSON object collection that contains the priority related data. * @Default {{% highlight js%}[{ text: None, value: none },{ text: High, value: high },{ text: Medium, value: medium },{ text: Low, value: low }]{% endhighlight %}} */ - dataSource?: any|Array; + dataSource?: any|any[]; /** Binds text field name in the dataSource to prioritySettings text. These text gets listed out in priority field of the appointment window. * @Default {text} @@ -29801,7 +31861,7 @@ export interface ResourcesResourceSettings { /** The dataSource option accepts either JSON object collection or DataManager (ejDataManager) instance that contains the resources related data. * @Default {[]} */ - dataSource?: any|Array; + dataSource?: any|any[]; /** Binds text field name in the dataSource to resourceSettings text. These text gets listed out in resources field of the appointment window. * @Default {null} @@ -29833,7 +31893,8 @@ export interface ResourcesResourceSettings { */ end?: string; - /** Binds the resources working days field name in the dataSource. It's optional, and accepts the array of strings (week day names). When provided with specific collection of days (array of day names), only those days will render for the specific resources. + /** Binds the resources working days field name in the dataSource. It's optional, and accepts the array of strings (week day names). When provided with specific collection of + * days (array of day names), only those days will render for the specific resources. * @Default {null} */ workWeek?: string; @@ -29918,7 +31979,8 @@ export interface TooltipSettings { */ enable?: boolean; - /** Template design that customizes the tooltip. All the field names that are mapped from dataSource to the appropriate field properties within the appointmentSettings can be accessed within the template. + /** Template design that customizes the tooltip. All the field names that are mapped from dataSource to the appropriate field properties within + * the appointmentSettings can be accessed within the template. * @Default {null} */ templateId?: string; @@ -29959,7 +32021,8 @@ export interface BlockoutSettings { */ enable?: boolean; - /** Template design that applies on the Schedule block intervals. All the field names that are mapped from dataSource to the appropriate field properties within the blockoutSettings can be used within the template. + /** Template design that applies on the Schedule block intervals. All the field names that are mapped from dataSource to the appropriate field + * properties within the blockoutSettings can be used within the template. * @Default {null} */ templateId?: string; @@ -29967,7 +32030,7 @@ export interface BlockoutSettings { /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule block intervals. * @Default {[]} */ - dataSource?: any|Array; + dataSource?: any|any[]; /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. * @Default {null} @@ -30020,7 +32083,7 @@ export interface BlockoutSettings { customStyle?: string; } -enum CurrentView{ +enum CurrentView { ///Sets currentView of the Scheduler as Day Day, @@ -30042,7 +32105,7 @@ enum CurrentView{ } -enum Orientation{ +enum Orientation { ///Set orientation as vertical to Scheduler Vertical, @@ -30052,7 +32115,7 @@ enum Orientation{ } -enum TimeMode{ +enum TimeMode { ///Sets 12 hour time mode to Scheduler Hour12, @@ -30065,16 +32128,15 @@ enum TimeMode{ class RecurrenceEditor extends ej.Widget { static fn: RecurrenceEditor; - constructor(element: JQuery, options?: RecurrenceEditor.Model); - constructor(element: Element, options?: RecurrenceEditor.Model); + constructor(element: JQuery | Element, options?: RecurrenceEditor.Model); static Locale: any; - model:RecurrenceEditor.Model; - defaults:RecurrenceEditor.Model; + model: RecurrenceEditor.Model; + defaults: RecurrenceEditor.Model; /** Generates the recurrence rule with the options selected within the Recurrence Editor. * @returns {String} */ - getRecurrenceRule(): String; + getRecurrenceRule(): string; /** Generates the collection of date, that lies within the selected recurrence start and end date for which the recurrence pattern applies. * @param {string} It refers the recurrence rule. @@ -30090,14 +32152,14 @@ class RecurrenceEditor extends ej.Widget { */ recurrenceRuleSplit(recurrenceRule: string, exDate: any): any; } -export module RecurrenceEditor{ +export namespace RecurrenceEditor { export interface Model { /** Defines the collection of recurrence frequencies within Recurrence Editor such as Never, Daily, Weekly, Monthly, Yearly and Every Weekday. * @Default {[never, daily, weekly, monthly, yearly, everyweekday]} */ - frequencies?: Array; + frequencies?: any[]; /** Sets the starting day of the week. * @Default {null} @@ -30128,17 +32190,20 @@ export interface Model { */ enableRTL?: boolean; - /** Sets the active/current repeat type(frequency) on Recurrence Editor based on the index value provided. For example, setting the value 1 will initially set the repeat type as Daily and display its related options. + /** Sets the active/current repeat type(frequency) on Recurrence Editor based on the index value provided. For example, setting the value 1 will initially set the repeat type + * as Daily and display its related options. * @Default {0} */ selectedRecurrenceType?: number; - /** Sets the minimum date limit to display on the datepickers defined within the Recurrence Editor. Setting minDate with specific date value disallows the datepickers within Recurrence Editor to navigate beyond that date. + /** Sets the minimum date limit to display on the datepickers defined within the Recurrence Editor. Setting minDate with specific date value disallows the datepickers within + * Recurrence Editor to navigate beyond that date. * @Default {new Date(1900, 01, 01)} */ minDate?: any; - /** Sets the maximum date limit to display on the datepickers used within the Recurrence Editor. Setting maxDate with specific date value disallows the datepickers within the Recurrence Editor to navigate beyond that date. + /** Sets the maximum date limit to display on the datepickers used within the Recurrence Editor. Setting maxDate with specific date value disallows the + * datepickers within the Recurrence Editor to navigate beyond that date. * @Default {new Date(2099, 12, 31)} */ maxDate?: any; @@ -30148,7 +32213,7 @@ export interface Model { cssClass?: string; /** Triggers whenever any of the Recurrence Editor's value is changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; } export interface ChangeEventArgs { @@ -30173,11 +32238,10 @@ export interface ChangeEventArgs { class Gantt extends ej.Widget { static fn: Gantt; - constructor(element: JQuery, options?: Gantt.Model); - constructor(element: Element, options?: Gantt.Model); + constructor(element: JQuery | Element, options?: Gantt.Model); static Locale: any; - model:Gantt.Model; - defaults:Gantt.Model; + model: Gantt.Model; + defaults: Gantt.Model; /** To add a new item in Gantt * @param {any} Item to add in Gantt row. @@ -30191,7 +32255,7 @@ class Gantt extends ej.Widget { * @param {boolean} Defines that we need to preserve the previously selected cells of not * @returns {void} */ - selectCells(Indexes: Array, preservePreviousSelectedCell: boolean): void; + selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; /** Positions the splitter by the specified column index. * @param {number} Set the splitter position based on column index. @@ -30279,14 +32343,14 @@ class Gantt extends ej.Widget { */ showColumn(headerText: string): void; } -export module Gantt{ +export namespace Gantt { export interface Model { /** Specifies the fields to be included in the add dialog in Gantt * @Default {[]} */ - addDialogFields?: Array; + addDialogFields?: any[]; /** Enables or disables the ability to resize column. * @Default {false} @@ -30353,7 +32417,7 @@ export interface Model { /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. * @Default {[]} */ - columnDialogFields?: Array; + columnDialogFields?: any[]; /** Specifies the background of connector lines in Gantt */ @@ -30380,7 +32444,7 @@ export interface Model { /** Collection of data or hierarchical data to represent in Gantt * @Default {null} */ - dataSource?: Array; + dataSource?: any[]; /** Specifies the dateFormat for Gantt , given format is displayed in tooltip , Grid . * @Default {MM/dd/yyyy} @@ -30399,7 +32463,7 @@ export interface Model { /** Specifies the fields to be included in the edit dialog in Gantt * @Default {[]} */ - editDialogFields?: Array; + editDialogFields?: any[]; /** Enables or disables the responsiveness of Gantt * @Default {false} @@ -30492,7 +32556,7 @@ export interface Model { /** Collection of holidays with date, background and label information to be displayed in Gantt. * @Default {[]} */ - holidays?: Array; + holidays?: any[]; /** Specifies whether to include weekends while calculating the duration of a task. * @Default {true} @@ -30623,7 +32687,7 @@ export interface Model { /** Collection of data regarding resources involved in entire project * @Default {[]} */ - resources?: Array; + resources?: any[]; /** Specifies whether rounding off the day working time edits * @Default {true} @@ -30690,7 +32754,7 @@ export interface Model { /** Specifies the selected cell information on rendering Gantt. */ - selectedCellIndexes?: Array; + selectedCellIndexes?: SelectedCellIndex[]; /** Specifies the sorting options for Gantt. */ @@ -30708,7 +32772,7 @@ export interface Model { /** Specifies the options for striplines * @Default {[]} */ - stripLines?: Array; + stripLines?: any[]; /** Specifies the background of the taskbar in Gantt */ @@ -30776,79 +32840,79 @@ export interface Model { workingTimeScale?: ej.Gantt.workingTimeScale|string; /** Triggered for every Gantt action before its starts. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggered for every Gantt action success event. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggered while enter the edit mode in the TreeGrid cell */ - beginEdit? (e: BeginEditEventArgs): void; + beginEdit?(e: BeginEditEventArgs): void; /** Triggered before selecting a cell */ - cellSelecting? (e: CellSelectingEventArgs): void; + cellSelecting?(e: CellSelectingEventArgs): void; /** Triggered after selected a cell */ - cellSelected? (e: CellSelectedEventArgs): void; + cellSelected?(e: CellSelectedEventArgs): void; /** Triggered while dragging a row in Gantt control */ - rowDrag? (e: RowDragEventArgs): void; + rowDrag?(e: RowDragEventArgs): void; /** Triggered while start to drag row in Gantt control */ - rowDragStart? (e: RowDragStartEventArgs): void; + rowDragStart?(e: RowDragStartEventArgs): void; /** Triggered while drop a row in Gantt control */ - rowDragStop? (e: RowDragStopEventArgs): void; + rowDragStop?(e: RowDragStopEventArgs): void; /** Triggered after collapsed the Gantt record */ - collapsed? (e: CollapsedEventArgs): void; + collapsed?(e: CollapsedEventArgs): void; /** Triggered while collapsing the Gantt record */ - collapsing? (e: CollapsingEventArgs): void; + collapsing?(e: CollapsingEventArgs): void; /** Triggered while Context Menu is rendered in Gantt control */ - contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + contextMenuOpen?(e: ContextMenuOpenEventArgs): void; /** Triggered when Gantt is rendered completely. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered after save the modified cellValue in Gantt. */ - endEdit? (e: EndEditEventArgs): void; + endEdit?(e: EndEditEventArgs): void; /** Triggered after expand the record */ - expanded? (e: ExpandedEventArgs): void; + expanded?(e: ExpandedEventArgs): void; /** Triggered while expanding the Gantt record */ - expanding? (e: ExpandingEventArgs): void; + expanding?(e: ExpandingEventArgs): void; /** Triggered while Gantt is loaded */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggered while rendering each cell in the TreeGrid */ - queryCellInfo? (e: QueryCellInfoEventArgs): void; + queryCellInfo?(e: QueryCellInfoEventArgs): void; /** Triggered while rendering each taskbar in the Gantt */ - queryTaskbarInfo? (e: QueryTaskbarInfoEventArgs): void; + queryTaskbarInfo?(e: QueryTaskbarInfoEventArgs): void; /** Triggered while rendering each row */ - rowDataBound? (e: RowDataBoundEventArgs): void; + rowDataBound?(e: RowDataBoundEventArgs): void; /** Triggered after the row is selected. */ - rowSelected? (e: RowSelectedEventArgs): void; + rowSelected?(e: RowSelectedEventArgs): void; /** Triggered before the row is going to be selected. */ - rowSelecting? (e: RowSelectingEventArgs): void; + rowSelecting?(e: RowSelectingEventArgs): void; /** Triggered after completing the editing operation in taskbar */ - taskbarEdited? (e: TaskbarEditedEventArgs): void; + taskbarEdited?(e: TaskbarEditedEventArgs): void; /** Triggered while editing the Gantt chart (dragging, resizing the taskbar ) */ - taskbarEditing? (e: TaskbarEditingEventArgs): void; + taskbarEditing?(e: TaskbarEditingEventArgs): void; /** Triggered when taskbar item is clicked in Gantt. */ - taskbarClick? (e: TaskbarClickEventArgs): void; + taskbarClick?(e: TaskbarClickEventArgs): void; /** Triggered when toolbar item is clicked in Gantt. */ - toolbarClick? (e: ToolbarClickEventArgs): void; + toolbarClick?(e: ToolbarClickEventArgs): void; } export interface ActionBeginEventArgs { @@ -31185,7 +33249,7 @@ export interface ContextMenuOpenEventArgs { /** Returns the default context menu items to which we add custom items. */ - contextMenuItems?: Array; + contextMenuItems?: any[]; /** Returns the Gantt model. */ @@ -31544,7 +33608,7 @@ export interface DragTooltip { /** Specifies the data source fields to be displayed in the drag tooltip. * @Default {[]} */ - tooltipItems?: Array; + tooltipItems?: any[]; /** Specifies the custom template for drag tooltip. * @Default {null} @@ -31599,6 +33663,11 @@ export interface EditSettings { * @Default {normal} */ editMode?: string; + + /** Specifies the position where the new row has to be added. + * @Default {ej.Gantt.RowPosition.BelowSelectedRow} + */ + rowPosition?: ej.Gantt.RowPosition|string; } export interface ScheduleHeaderSettings { @@ -31647,6 +33716,16 @@ export interface ScheduleHeaderSettings { * @Default {yyyy} */ yearHeaderFormat?: string; + + /** Specifies the size of the lowest time unit along the timescale, with minimum value as "50%" and maximum value as "500%". It is also possible to set the value in pixels. + * @Default {100%} + */ + timescaleUnitSize?: string; + + /** Specifies the start day of the week in week timescale mode + * @Default {0} + */ + weekStartDay?: number; } export interface SizeSettings { @@ -31679,7 +33758,7 @@ export interface SortSettings { /** Specifies the sorted columns for Gantt * @Default {[]} */ - sortedColumns?: Array; + sortedColumns?: any[]; } export interface ToolbarSettings { @@ -31692,10 +33771,10 @@ export interface ToolbarSettings { /** Specifies the list of toolbar items to be rendered in Gantt toolbar * @Default {[]} */ - toolbarItems?: Array; + toolbarItems?: any[]; } -enum DurationUnit{ +enum DurationUnit { ///Sets the Duration Unit as day. Day, @@ -31708,7 +33787,7 @@ enum DurationUnit{ } -enum BeginEditAction{ +enum BeginEditAction { ///you can begin the editing at double click DblClick, @@ -31718,7 +33797,26 @@ enum BeginEditAction{ } -enum TaskType{ +enum RowPosition { + + ///you can add a new row at top. + Top, + + ///you can add a new row at bottom. + Bottom, + + ///you can add a new row to above selected row. + AboveSelectedRow, + + ///you can add a new row to below selected row. + BelowSelectedRow, + + ///you can add a new row as a child for selected row. + Child +} + + +enum TaskType { ///Resource unit remains constant while editing the work and duration values. FixedUnit, @@ -31731,7 +33829,7 @@ enum TaskType{ } -enum WorkUnit{ +enum WorkUnit { ///Displays the work involved in a task in days. Day, @@ -31744,7 +33842,7 @@ enum WorkUnit{ } -enum TaskSchedulingMode{ +enum TaskSchedulingMode { ///All the tasks in the project will be displayed in auto scheduled mode, where the tasks are scheduled automatically over non-working days and holidays. Auto, @@ -31757,7 +33855,7 @@ enum TaskSchedulingMode{ } -enum SelectionType{ +enum SelectionType { ///you can select a single row. Single, @@ -31767,7 +33865,7 @@ enum SelectionType{ } -enum minutesPerInterval{ +enum minutesPerInterval { ///Sets the interval automatically according with schedule start and end date. Auto, @@ -31786,7 +33884,7 @@ enum minutesPerInterval{ } -enum ScheduleHeaderType{ +enum ScheduleHeaderType { ///Sets year Schedule Mode. Year, @@ -31805,7 +33903,7 @@ enum ScheduleHeaderType{ } -enum TimescaleRoundMode{ +enum TimescaleRoundMode { ///The round-off value will be automatically calculated based on the data source values. Auto, @@ -31821,7 +33919,7 @@ enum TimescaleRoundMode{ } -enum SelectionMode{ +enum SelectionMode { ///you can select a row. Row, @@ -31831,7 +33929,7 @@ enum SelectionMode{ } -enum workingTimeScale{ +enum workingTimeScale { ///Sets eight hour timescale. TimeScale8Hours, @@ -31844,11 +33942,10 @@ enum workingTimeScale{ class ReportViewer extends ej.Widget { static fn: ReportViewer; - constructor(element: JQuery, options?: ReportViewer.Model); - constructor(element: Element, options?: ReportViewer.Model); + constructor(element: JQuery | Element, options?: ReportViewer.Model); static Locale: any; - model:ReportViewer.Model; - defaults:ReportViewer.Model; + model: ReportViewer.Model; + defaults: ReportViewer.Model; /** Export the report to the specified format. * @returns {void} @@ -31920,19 +34017,19 @@ class ReportViewer extends ej.Widget { */ refresh(): void; } -export module ReportViewer{ +export namespace ReportViewer { export interface Model { /** Gets or sets the list of data sources for the RDLC report. * @Default {[]} */ - dataSources?: Array; + dataSources?: DataSource[]; /** Enables or disables the page cache of report. * @Default {false} */ - enablePageCache?: Boolean; + enablePageCache?: boolean; /** Specifies the export settings. */ @@ -31941,12 +34038,12 @@ export interface Model { /** When set to true, adapts the report layout to fit the screen size of devices on which it renders. * @Default {true} */ - isResponsive?: Boolean; + isResponsive?: boolean; /** Specifies the locale for report viewer. * @Default {en-US} */ - locale?: String; + locale?: string; /** Specifies the page settings. */ @@ -31955,12 +34052,12 @@ export interface Model { /** Gets or sets the list of parameters associated with the report. * @Default {[]} */ - parameters?: Array; + parameters?: Parameter[]; /** Enables and disables the print mode. * @Default {false} */ - printMode?: Boolean; + printMode?: boolean; /** Specifies the print option of the report. * @Default {ej.ReportViewer.PrintOptions.Default} @@ -31980,17 +34077,17 @@ export interface Model { /** Gets or sets the path of the report file. * @Default {empty} */ - reportPath?: String; + reportPath?: string; /** Gets or sets the reports server URL. * @Default {empty} */ - reportServerUrl?: String; + reportServerUrl?: string; /** Specifies the report Web API service URL. * @Default {empty} */ - reportServiceUrl?: String; + reportServiceUrl?: string; /** Specifies the toolbar settings. */ @@ -31999,31 +34096,31 @@ export interface Model { /** Gets or sets the zoom factor for report viewer. * @Default {1} */ - zoomFactor?: Number; + zoomFactor?: number; /** Fires when the report viewer is destroyed successfully.If you want to perform any operation after destroying the reportviewer control,you can make use of the destroy event. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires during drill through action done in report.If you want to perform any operation when a drill through action is performed, you can make use of the drillThrough event. */ - drillThrough? (e: DrillThroughEventArgs): void; + drillThrough?(e: DrillThroughEventArgs): void; /** Fires before report rendering is completed.If you want to perform any operation before the rendering of report,you can make use of the renderingBegin event. */ - renderingBegin? (e: RenderingBeginEventArgs): void; + renderingBegin?(e: RenderingBeginEventArgs): void; /** Fires after report rendering completed.If you want to perform any operation after the rendering of report,you can make use of this renderingComplete event. */ - renderingComplete? (e: RenderingCompleteEventArgs): void; + renderingComplete?(e: RenderingCompleteEventArgs): void; /** Fires when any error occurred while rendering the report.If you want to perform any operation when an error occurs in the report, you can make use of the reportError event. */ - reportError? (e: ReportErrorEventArgs): void; + reportError?(e: ReportErrorEventArgs): void; /** Fires when the report is being exported.If you want to perform any operation before exporting of report, you can make use of the reportExport event. */ - reportExport? (e: ReportExportEventArgs): void; + reportExport?(e: ReportExportEventArgs): void; /** Fires when the report is loaded.If you want to perform any operation after the successful loading of report, you can make use of the reportLoaded event. */ - reportLoaded? (e: ReportLoadedEventArgs): void; + reportLoaded?(e: ReportLoadedEventArgs): void; /** Fires when click the View Report Button. */ - viewReportClick? (e: ViewReportClickEventArgs): void; + viewReportClick?(e: ViewReportClickEventArgs): void; } export interface DestroyEventArgs { @@ -32167,12 +34264,12 @@ export interface DataSource { /** Gets or sets the name of the data source. * @Default {empty} */ - name?: String; + name?: string; /** Gets or sets the values of data source. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface ExportSettings { @@ -32211,27 +34308,27 @@ export interface Parameter { /** Gets or sets the parameter labels. * @Default {null} */ - labels?: Array; + labels?: any[]; /** Gets or sets the name of the parameter. * @Default {empty} */ - name?: String; + name?: string; /** Gets or sets whether the parameter allows nullable value or not. * @Default {false} */ - nullable?: Boolean; + nullable?: boolean; /** Gets or sets the prompt message associated with the specified parameter. * @Default {empty} */ - prompt?: String; + prompt?: string; /** Gets or sets the parameter values. * @Default {[]} */ - values?: Array; + values?: any[]; } export interface ToolbarSettings { @@ -32239,7 +34336,7 @@ export interface ToolbarSettings { /** Fires when user click on toolbar item in the toolbar. * @Default {empty} */ - click?: String; + click?: string; /** Specifies the toolbar items. * @Default {ej.ReportViewer.ToolbarItems.All} @@ -32249,20 +34346,20 @@ export interface ToolbarSettings { /** Shows or hides the toolbar. * @Default {true} */ - showToolbar?: Boolean; + showToolbar?: boolean; /** Shows or hides the tooltip of toolbar items. * @Default {true} */ - showTooltip?: Boolean; + showTooltip?: boolean; /** Specifies the toolbar template ID. * @Default {empty} */ - templateId?: String; + templateId?: string; } -enum ExportOptions{ +enum ExportOptions { ///Specifies the All property in ExportOptions to get all available options. All, @@ -32281,7 +34378,7 @@ enum ExportOptions{ } -enum ExcelFormats{ +enum ExcelFormats { ///Specifies the Excel97to2003 property in ExcelFormats to get specified version of exported format. Excel97to2003, @@ -32297,7 +34394,7 @@ enum ExcelFormats{ } -enum WordFormats{ +enum WordFormats { ///Specifies the Doc property in WordFormats to get specified version of exported format. Doc, @@ -32364,7 +34461,7 @@ enum WordFormats{ } -enum Orientation{ +enum Orientation { ///Specifies the Landscape property in pageSettings.orientation to get specified layout. Landscape, @@ -32374,7 +34471,7 @@ enum Orientation{ } -enum PaperSize{ +enum PaperSize { ///Specifies the A3 as value in pageSettings.paperSize to get specified size. A3, @@ -32411,7 +34508,7 @@ enum PaperSize{ } -enum PrintOptions{ +enum PrintOptions { ///Specifies the Default property in printOptions. Default, @@ -32424,7 +34521,7 @@ enum PrintOptions{ } -enum ProcessingMode{ +enum ProcessingMode { ///Specifies the Remote property in processingMode. Remote, @@ -32434,7 +34531,7 @@ enum ProcessingMode{ } -enum RenderMode{ +enum RenderMode { ///Specifies the Default property in RenderMode to get default output. Default, @@ -32447,7 +34544,7 @@ enum RenderMode{ } -enum ToolbarItems{ +enum ToolbarItems { ///Specifies the Print as value in ToolbarItems to get specified item. Print, @@ -32481,11 +34578,10 @@ enum ToolbarItems{ class TreeGrid extends ej.Widget { static fn: TreeGrid; - constructor(element: JQuery, options?: TreeGrid.Model); - constructor(element: Element, options?: TreeGrid.Model); + constructor(element: JQuery | Element, options?: TreeGrid.Model); static Locale: any; - model:TreeGrid.Model; - defaults:TreeGrid.Model; + model: TreeGrid.Model; + defaults: TreeGrid.Model; /** Add a new row in TreeGrid, while allowAdding is set to true * @param {any} Item to add in TreeGrid row. @@ -32505,7 +34601,7 @@ class TreeGrid extends ej.Widget { * @param {boolean} Defines that we need to preserve the previously selected cells or not * @returns {void} */ - selectCells(Indexes: Array, preservePreviousSelectedCell: boolean): void; + selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; /** To rename a column with the specified name * @param {number} Index of the column to be renamed @@ -32548,7 +34644,7 @@ class TreeGrid extends ej.Widget { * @param {any} Pass which data you want to show in tree grid * @returns {void} */ - refresh(dataSource: Array, query: any): void; + refresh(dataSource: any[], query: any): void; /** Freeze all the columns preceding to the column specified by the field name. * @param {string} Freeze all Columns before this field column. @@ -32594,7 +34690,7 @@ class TreeGrid extends ej.Widget { */ reorderColumn(fieldName: string, targetIndex: string): void; } -export module TreeGrid{ +export namespace TreeGrid { export interface Model { @@ -32613,7 +34709,8 @@ export interface Model { */ allowDragAndDrop?: boolean; - /** Enables or disables the ability to filter the data on all the columns. Enabling this property will display a row with editor controls corresponding to each column. You can restrict filtering on particular column by disabling this property directly on that column instance itself. + /** Enables or disables the ability to filter the data on all the columns. Enabling this property will display a row with editor controls corresponding to each column. + * You can restrict filtering on particular column by disabling this property directly on that column instance itself. * @Default {false} */ allowFiltering?: boolean; @@ -32653,12 +34750,12 @@ export interface Model { /** Option for adding columns; each column has the option to bind to a field in the dataSource. */ - columns?: Array; + columns?: Column[]; /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. * @Default {[]} */ - columnDialogFields?: Array; + columnDialogFields?: any[]; /** Options for displaying and customizing context menu items. */ @@ -32671,7 +34768,7 @@ export interface Model { /** Specifies hierarchical or self-referential data to populate the TreeGrid. * @Default {null} */ - dataSource?: Array; + dataSource?: any[]; /** Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. * @Default {none} @@ -32719,6 +34816,11 @@ export interface Model { */ locale?: string; + /** Enables or disables internal parsing of a row. When disabled this property, row will be displayed using the defined template without any internal event bindings. + * @Default {true} + */ + parseRowTemplate?: boolean; + /** Specifies the name of the field in the dataSource, which contains the id of that row. */ idMapping?: string; @@ -32769,7 +34871,8 @@ export interface Model { */ showColumnOptions?: boolean; - /** Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose Columns item from this popup, a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. + /** Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose Columns item from this popup, + * a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. * @Default {false} */ showColumnChooser?: boolean; @@ -32806,7 +34909,7 @@ export interface Model { /** Specifies the summary row collection object to be displayed * @Default {[]} */ - summaryRows?: Array; + summaryRows?: any[]; /** Specifies whether to show tooltip when mouse is hovered on the cell. * @Default {true} @@ -32836,85 +34939,88 @@ export interface Model { treeColumnIndex?: number; /** Triggered before every success event of TreeGrid action. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggered for every TreeGrid action success event. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggered while enter the edit mode in the TreeGrid cell */ - beginEdit? (e: BeginEditEventArgs): void; + beginEdit?(e: BeginEditEventArgs): void; /** Triggered after collapsed the TreeGrid record */ - collapsed? (e: CollapsedEventArgs): void; + collapsed?(e: CollapsedEventArgs): void; /** Triggered while collapsing the TreeGrid record */ - collapsing? (e: CollapsingEventArgs): void; + collapsing?(e: CollapsingEventArgs): void; + + /** Triggered while clicking a row, even when allowSelection property is disabled. */ + recordClick?(e: RecordClickEventArgs): void; /** Triggered when you start to drag a column */ - columnDragStart? (e: ColumnDragStartEventArgs): void; + columnDragStart?(e: ColumnDragStartEventArgs): void; /** Triggered while dragging a column */ - columnDrag? (e: ColumnDragEventArgs): void; + columnDrag?(e: ColumnDragEventArgs): void; /** Triggered when a column is dropped */ - columnDrop? (e: ColumnDropEventArgs): void; + columnDrop?(e: ColumnDropEventArgs): void; /** Triggered after a column resized */ - columnResized? (e: ColumnResizedEventArgs): void; + columnResized?(e: ColumnResizedEventArgs): void; /** Triggered while start to resize a column */ - columnResizeStart? (e: ColumnResizeStartEventArgs): void; + columnResizeStart?(e: ColumnResizeStartEventArgs): void; /** Triggered when a column has been resized */ - columnResizeEnd? (e: ColumnResizeEndEventArgs): void; + columnResizeEnd?(e: ColumnResizeEndEventArgs): void; /** Triggered while Context Menu is rendered in TreeGrid control */ - contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + contextMenuOpen?(e: ContextMenuOpenEventArgs): void; /** Triggered when TreeGrid is rendered completely */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Triggered after saved the modified cellValue in TreeGrid */ - endEdit? (e: EndEditEventArgs): void; + endEdit?(e: EndEditEventArgs): void; /** Triggered after expand the record */ - expanded? (e: ExpandedEventArgs): void; + expanded?(e: ExpandedEventArgs): void; /** Triggered while expanding the TreeGrid record */ - expanding? (e: ExpandingEventArgs): void; + expanding?(e: ExpandingEventArgs): void; /** Triggered while Treegrid is loaded */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggered while rendering each cell in the TreeGrid */ - queryCellInfo? (e: QueryCellInfoEventArgs): void; + queryCellInfo?(e: QueryCellInfoEventArgs): void; /** Triggered while rendering each row */ - rowDataBound? (e: RowDataBoundEventArgs): void; + rowDataBound?(e: RowDataBoundEventArgs): void; /** Triggered while dragging a row in TreeGrid control */ - rowDrag? (e: RowDragEventArgs): void; + rowDrag?(e: RowDragEventArgs): void; /** Triggered while start to drag row in TreeGrid control */ - rowDragStart? (e: RowDragStartEventArgs): void; + rowDragStart?(e: RowDragStartEventArgs): void; /** Triggered while drop a row in TreeGrid control */ - rowDragStop? (e: RowDragStopEventArgs): void; + rowDragStop?(e: RowDragStopEventArgs): void; /** Triggered before selecting a cell */ - cellSelecting? (e: CellSelectingEventArgs): void; + cellSelecting?(e: CellSelectingEventArgs): void; /** Triggered after selected a cell */ - cellSelected? (e: CellSelectedEventArgs): void; + cellSelected?(e: CellSelectedEventArgs): void; /** Triggered after the row is selected. */ - rowSelected? (e: RowSelectedEventArgs): void; + rowSelected?(e: RowSelectedEventArgs): void; /** Triggered before the row is going to be selected. */ - rowSelecting? (e: RowSelectingEventArgs): void; + rowSelecting?(e: RowSelectingEventArgs): void; /** Triggered when toolbar item is clicked in TreeGrid. */ - toolbarClick? (e: ToolbarClickEventArgs): void; + toolbarClick?(e: ToolbarClickEventArgs): void; } export interface ActionBeginEventArgs { @@ -33064,6 +35170,37 @@ export interface CollapsingEventArgs { expanded?: boolean; } +export interface RecordClickEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the element of clicked cell. + */ + cell?: any; + + /** Returns the index of the clicked cell. + */ + cellIndex?: number; + + /** Returns the data of clicked cell. + */ + cellValue?: any; + + /** Returns the element of the clicked row. + */ + row?: any; + + /** Returns the index of the clicked row. + */ + rowIndex?: number; + + /** Returns the column name of the clicked cell. + */ + columnName?: string; +} + export interface ColumnDragStartEventArgs { /** Returns the cancel option value. @@ -33262,7 +35399,7 @@ export interface ContextMenuOpenEventArgs { /** Returns the default context menu items to which we add custom items. */ - contextMenuItems?: Array; + contextMenuItems?: any[]; /** Returns the TreeGrid model. */ @@ -33728,9 +35865,13 @@ export interface Column { */ visible?: boolean; + /** Gets or sets a value for treegrid column width + */ + width?: number; + /** Specifies the header template value for the column header */ - headerTemplateID?: String; + headerTemplateID?: string; /** Specifies the display format of a column * @Default {null} @@ -33759,7 +35900,7 @@ export interface Column { /** Specifies the template for the TreeGrid column */ - templateID?: String; + templateID?: string; /** Enables or disables the ability to edit a row or cell. * @Default {false} @@ -33777,7 +35918,7 @@ export interface ContextMenuSettings { /** Option for adding items to context menu. * @Default {[]} */ - contextMenuItems?: Array; + contextMenuItems?: any[]; /** Shows/hides the context menu. * @Default {false} @@ -33795,7 +35936,7 @@ export interface DragTooltip { /** Option to add field names whose corresponding values in the dragged row needs to be shown in the preview tooltip. * @Default {[]} */ - tooltipItems?: Array; + tooltipItems?: any[]; /** Custom template for that tooltip that is shown while dragging a row. * @Default {null} @@ -33859,7 +36000,7 @@ export interface FilterSettings { /** Specifies the column collection for filtering the TreeGrid content on initial load * @Default {[]} */ - filteredColumns?: Array; + filteredColumns?: any[]; } export interface PageSettings { @@ -33936,7 +36077,7 @@ export interface SortSettings { /** Option to add columns based on which the rows have to be sorted recursively. * @Default {[]} */ - sortedColumns?: Array; + sortedColumns?: any[]; } export interface ToolbarSettings { @@ -33949,10 +36090,10 @@ export interface ToolbarSettings { /** Specifies the list of toolbar items to be rendered in TreeGrid toolbar * @Default {[]} */ - toolbarItems?: Array; + toolbarItems?: any[]; } -enum EditingType{ +enum EditingType { ///It Specifies String edit type. String, @@ -33977,7 +36118,7 @@ enum EditingType{ } -enum BeginEditAction{ +enum BeginEditAction { ///you can begin the editing at double click DblClick, @@ -33987,7 +36128,7 @@ enum BeginEditAction{ } -enum EditMode{ +enum EditMode { ///you can edit a cell. CellEditing, @@ -33997,7 +36138,7 @@ enum EditMode{ } -enum RowPosition{ +enum RowPosition { ///you can add a new row at top. Top, @@ -34016,7 +36157,7 @@ enum RowPosition{ } -enum PageSizeMode{ +enum PageSizeMode { ///To count all the parent and child records. All, @@ -34026,7 +36167,7 @@ enum PageSizeMode{ } -enum SelectionMode{ +enum SelectionMode { ///you can select a row. Row, @@ -34036,7 +36177,7 @@ enum SelectionMode{ } -enum SelectionType{ +enum SelectionType { ///you can select a single row. Single, @@ -34052,11 +36193,10 @@ enum SelectionType{ class GroupButton extends ej.Widget { static fn: GroupButton; - constructor(element: JQuery, options?: GroupButton.Model); - constructor(element: Element, options?: GroupButton.Model); + constructor(element: JQuery | Element, options?: GroupButton.Model); static Locale: any; - model:GroupButton.Model; - defaults:GroupButton.Model; + model: GroupButton.Model; + defaults: GroupButton.Model; /** Remove the selection state of the specified the button element from the GroupButton * @param {JQuery} Specific button element @@ -34140,7 +36280,7 @@ class GroupButton extends ej.Widget { */ showItem(element: JQuery): void; } -export module GroupButton{ +export namespace GroupButton { export interface Model { @@ -34193,7 +36333,7 @@ export interface Model { */ query?: any; - /** Sets the list of button elements to be selected. To enable this option groupButtonMode should be in “checkbox” mode. + /** Sets the list of button elements to be selected. To enable this option groupButtonMode should be in “checkbox” mode. * @Default {[]} */ selectedItemIndex?: number[]|string[]; @@ -34213,19 +36353,19 @@ export interface Model { width?: string|number; /** Triggered before any button element in the GroupButton get selected. */ - beforeSelect? (e: BeforeSelectEventArgs): void; + beforeSelect?(e: BeforeSelectEventArgs): void; /** Fires after GroupButton control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when the GroupButton is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Triggered once the key is pressed, when the control is in focused state. */ - keyPress? (e: KeyPressEventArgs): void; + keyPress?(e: KeyPressEventArgs): void; /** Triggered when the button element get selected. */ - select? (e: SelectEventArgs): void; + select?(e: SelectEventArgs): void; } export interface BeforeSelectEventArgs { @@ -34375,8 +36515,7 @@ export interface SelectEventArgs { status?: boolean; } } -enum GroupButtonMode -{ +enum GroupButtonMode { //Sets the GroupButton to work as checkbox mode CheckBox, //Sets the RadioButton to work as radio button mode @@ -34385,11 +36524,10 @@ RadioButton, class NavigationDrawer extends ej.Widget { static fn: NavigationDrawer; - constructor(element: JQuery, options?: NavigationDrawer.Model); - constructor(element: Element, options?: NavigationDrawer.Model); + constructor(element: JQuery | Element, options?: NavigationDrawer.Model); static Locale: any; - model:NavigationDrawer.Model; - defaults:NavigationDrawer.Model; + model: NavigationDrawer.Model; + defaults: NavigationDrawer.Model; /** To close the navigation drawer control * @returns {void} @@ -34411,7 +36549,7 @@ class NavigationDrawer extends ej.Widget { */ toggle(): void; } -export module NavigationDrawer{ +export namespace NavigationDrawer { export interface Model { @@ -34425,7 +36563,8 @@ export interface Model { */ contentId?: string; - /** Sets the root class for NavigationDrawer theme. This cssClass API helps to use custom skinning option for NavigationDrawer control. By defining the root class using this API, we need to include this root class in CSS. + /** Sets the root class for NavigationDrawer theme. This cssClass API helps to use custom skinning option for NavigationDrawer control. + * By defining the root class using this API, we need to include this root class in CSS. */ cssClass?: string; @@ -34442,7 +36581,7 @@ export interface Model { /** Specifies the listview items as an array of object. * @Default {[]} */ - items?: Array; + items?: any[]; /** Sets all the properties of listview to render in navigation drawer */ @@ -34473,22 +36612,22 @@ export interface Model { isPaneOpen?: boolean; /** Event triggers after the AJAX content loaded completely. */ - ajaxComplete? (e: AjaxCompleteEventArgs): void; + ajaxComplete?(e: AjaxCompleteEventArgs): void; /** Event triggers when the AJAX request failed. */ - ajaxError? (e: AjaxErrorEventArgs): void; + ajaxError?(e: AjaxErrorEventArgs): void; /** Event triggers after the AJAX content loaded successfully. */ - ajaxSuccess? (e: AjaxSuccessEventArgs): void; + ajaxSuccess?(e: AjaxSuccessEventArgs): void; /** Event triggers before the control gets closed. */ - beforeClose? (e: BeforeCloseEventArgs): void; + beforeClose?(e: BeforeCloseEventArgs): void; /** Event triggers when the control open. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Event triggers when the Swipe happens. */ - swipe? (e: SwipeEventArgs): void; + swipe?(e: SwipeEventArgs): void; } export interface AjaxCompleteEventArgs { @@ -34627,11 +36766,10 @@ export interface AjaxSettings { class RadialMenu extends ej.Widget { static fn: RadialMenu; - constructor(element: JQuery, options?: RadialMenu.Model); - constructor(element: Element, options?: RadialMenu.Model); + constructor(element: JQuery | Element, options?: RadialMenu.Model); static Locale: any; - model:RadialMenu.Model; - defaults:RadialMenu.Model; + model: RadialMenu.Model; + defaults: RadialMenu.Model; /** To hide the radialmenu * @returns {void} @@ -34663,7 +36801,7 @@ class RadialMenu extends ej.Widget { * @param {Array} Index of the Radialmenu to be enabled. * @returns {void} */ - enableItemsByIndices(itemIndices: Array): void; + enableItemsByIndices(itemIndices: any[]): void; /** To disable menu item using index * @param {number} Index of the Radialmenu to be disabled. @@ -34675,7 +36813,7 @@ class RadialMenu extends ej.Widget { * @param {Array} items of the Radialmenu to disable. * @returns {void} */ - disableItemsByIndices(itemIndices: Array): void; + disableItemsByIndices(itemIndices: any[]): void; /** To enable menu item using item text * @param {string} item of the Radialmenu item to enable. @@ -34693,13 +36831,13 @@ class RadialMenu extends ej.Widget { * @param {Array} items of the Radialmenu item to enable. * @returns {void} */ - enableItems(items: Array): void; + enableItems(items: any[]): void; /** To disable menu items using item texts * @param {Array} items of the Radialmenu item to disable. * @returns {void} */ - disableItems(items: Array): void; + disableItems(items: any[]): void; /** To update menu item badge value * @param {number} The index value to add the given items at the specified index. If index is not specified, the given value will not be updated. @@ -34720,7 +36858,7 @@ class RadialMenu extends ej.Widget { */ hideBadge(index: number): void; } -export module RadialMenu{ +export namespace RadialMenu { export interface Model { @@ -34732,7 +36870,8 @@ export interface Model { */ backImageClass?: string; - /** Sets the root class for RadialMenu theme. This cssClass API helps to use custom skinning option for RadialMenu control. By defining the root class using this API, we need to include this root class in CSS. + /** Sets the root class for RadialMenu theme. This cssClass API helps to use custom skinning option for RadialMenu control. By defining the root class using this API, + * we need to include this root class in CSS. */ cssClass?: string; @@ -34746,7 +36885,7 @@ export interface Model { /** Specify the items of radial menu */ - items?: Array; + items?: Item[]; /** Specifies the radius of radial menu */ @@ -34761,13 +36900,13 @@ export interface Model { position?: any; /** Event triggers when we click an item. */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Event triggers when the menu is opened. */ - open? (e: OpenEventArgs): void; + open?(e: OpenEventArgs): void; /** Event triggers when the menu is closed. */ - close? (e: CloseEventArgs): void; + close?(e: CloseEventArgs): void; } export interface ClickEventArgs { @@ -34838,7 +36977,7 @@ export interface ItemsSliderSettings { /** Specifies the sliderSettings ticks values of nested radial menu items. */ - ticks?: Array; + ticks?: any[]; /** Specifies the sliderSettings stroke Width value. */ @@ -34881,17 +37020,16 @@ export interface Item { /** Specifies to add sub level items . */ - items?: Array; + items?: any[]; } } class Tile extends ej.Widget { static fn: Tile; - constructor(element: JQuery, options?: Tile.Model); - constructor(element: Element, options?: Tile.Model); + constructor(element: JQuery | Element, options?: Tile.Model); static Locale: any; - model:Tile.Model; - defaults:Tile.Model; + model: Tile.Model; + defaults: Tile.Model; /** Update the image template of tile item to another one. * @param {string} UpdateTemplate by using id @@ -34900,7 +37038,7 @@ class Tile extends ej.Widget { */ updateTemplate(id: string, index: number): void; } -export module Tile{ +export namespace Tile { export interface Model { @@ -34948,7 +37086,7 @@ export interface Model { /** Set the localization culture for Tile Widget. */ - locale?: String; + locale?: string; /** Section for liveTile specific functionalities. */ @@ -34980,10 +37118,10 @@ export interface Model { backgroundColor?: string; /** Event triggers when the mouseDown happens in the tile */ - mouseDown? (e: MouseDownEventArgs): void; + mouseDown?(e: MouseDownEventArgs): void; /** Event triggers when the mouseUp happens in the tile */ - mouseUp? (e: MouseUpEventArgs): void; + mouseUp?(e: MouseUpEventArgs): void; } export interface MouseDownEventArgs { @@ -35060,7 +37198,7 @@ export interface Badge { value?: number; /** Sets position for tile badge. - * @Default {“bottomright”} + * @Default {“bottomright”} */ position?: ej.Tile.BadgePosition|string; } @@ -35103,17 +37241,17 @@ export interface LiveTile { /** Specifies liveTile images in CSS classes. * @Default {null} */ - imageClass?: Array; + imageClass?: any[]; /** Specifies liveTile images in templates. * @Default {null} */ - imageTemplateId?: Array; + imageTemplateId?: any[]; /** Specifies liveTile images in CSS classes. * @Default {null} */ - imageUrl?: Array; + imageUrl?: any[]; /** Specifies liveTile type for Tile. See orientation * @Default {flip} @@ -35128,10 +37266,10 @@ export interface LiveTile { /** Sets the text to each living tile * @Default {Null} */ - text?: Array; + text?: any[]; } -enum BadgePosition{ +enum BadgePosition { ///To set the topright position of tile badge Topright, @@ -35141,7 +37279,7 @@ enum BadgePosition{ } -enum CaptionAlignment{ +enum CaptionAlignment { ///To set the normal alignment of text in tile control Normal, @@ -35157,7 +37295,7 @@ enum CaptionAlignment{ } -enum CaptionPosition{ +enum CaptionPosition { ///To set the inner top position of the tile text Innertop, @@ -35170,7 +37308,7 @@ enum CaptionPosition{ } -enum ImagePosition{ +enum ImagePosition { ///To set the center position of tile image Center, @@ -35204,7 +37342,7 @@ enum ImagePosition{ } -enum liveTileType{ +enum liveTileType { ///To set flip type of liveTile for tile control Flip, @@ -35217,7 +37355,7 @@ enum liveTileType{ } -enum TileSize{ +enum TileSize { ///To set the medium size for tile control Medium, @@ -35236,11 +37374,10 @@ enum TileSize{ class Signature extends ej.Widget { static fn: Signature; - constructor(element: JQuery, options?: Signature.Model); - constructor(element: Element, options?: Signature.Model); + constructor(element: JQuery | Element, options?: Signature.Model); static Locale: any; - model:Signature.Model; - defaults:Signature.Model; + model: Signature.Model; + defaults: Signature.Model; /** Clears the strokes in the signature. * @returns {void} @@ -35287,7 +37424,7 @@ class Signature extends ej.Widget { */ undo(): void; } -export module Signature{ +export namespace Signature { export interface Model { @@ -35345,16 +37482,16 @@ export interface Model { width?: string; /** Triggers when the stroke is changed. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Triggered when the pointer is clicked or touched in the signature canvas. */ - mouseDown? (e: MouseDownEventArgs): void; + mouseDown?(e: MouseDownEventArgs): void; /** Triggered when the pointer is moved in the signature canvas. */ - mouseMove? (e: MouseMoveEventArgs): void; + mouseMove?(e: MouseMoveEventArgs): void; /** Triggered when the pointer is released after click or touch in the signature canvas. */ - mouseUp? (e: MouseUpEventArgs): void; + mouseUp?(e: MouseUpEventArgs): void; } export interface ChangeEventArgs { @@ -35433,7 +37570,7 @@ export interface MouseUpEventArgs { value?: any; } -enum SaveImageFormat{ +enum SaveImageFormat { ///To save the signature image with PNG format only. PNG, @@ -35452,11 +37589,10 @@ enum SaveImageFormat{ class RadialSlider extends ej.Widget { static fn: RadialSlider; - constructor(element: JQuery, options?: RadialSlider.Model); - constructor(element: Element, options?: RadialSlider.Model); + constructor(element: JQuery | Element, options?: RadialSlider.Model); static Locale: any; - model:RadialSlider.Model; - defaults:RadialSlider.Model; + model: RadialSlider.Model; + defaults: RadialSlider.Model; /** To show the radialslider * @returns {void} @@ -35468,7 +37604,7 @@ class RadialSlider extends ej.Widget { */ hide(): void; } -export module RadialSlider{ +export namespace RadialSlider { export interface Model { @@ -35477,7 +37613,8 @@ export interface Model { */ autoOpen?: boolean; - /** Sets the root class for RadialSlider theme. This cssClass API helps to use custom skinning option for RadialSlider control. By defining the root class using this API, we need to include this root class in CSS. + /** Sets the root class for RadialSlider theme. This cssClass API helps to use custom skinning option for RadialSlider control. + * By defining the root class using this API, we need to include this root class in CSS. */ cssClass?: string; @@ -35538,7 +37675,7 @@ export interface Model { /** Specifies the ticks value of radial slider */ - ticks?: Array; + ticks?: any[]; /** Specifies the value of radial slider * @Default {10} @@ -35546,22 +37683,22 @@ export interface Model { value?: number; /** Event triggers when the change occurs. */ - change? (e: ChangeEventArgs): void; + change?(e: ChangeEventArgs): void; /** Event triggers when the radial slider is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Event triggers when the mouse pointer is dragged over the radial slider. */ - mouseover? (e: MouseoverEventArgs): void; + mouseover?(e: MouseoverEventArgs): void; /** Event triggers when the Radial slider slides. */ - slide? (e: SlideEventArgs): void; + slide?(e: SlideEventArgs): void; /** Event triggers when the radial slider starts. */ - start? (e: StartEventArgs): void; + start?(e: StartEventArgs): void; /** Event triggers when the radial slider stops. */ - stop? (e: StopEventArgs): void; + stop?(e: StopEventArgs): void; } export interface ChangeEventArgs { @@ -35593,7 +37730,7 @@ export interface CreateEventArgs { */ cancel?: boolean; - /** returns the Radialslider model /td> + /** returns the Radialslider model */ model?: any; @@ -35689,11 +37826,10 @@ export interface StopEventArgs { class Spreadsheet extends ej.Widget { static fn: Spreadsheet; - constructor(element: JQuery, options?: Spreadsheet.Model); - constructor(element: Element, options?: Spreadsheet.Model); + constructor(element: JQuery | Element, options?: Spreadsheet.Model); static Locale: any; - model:Spreadsheet.Model; - defaults:Spreadsheet.Model; + model: Spreadsheet.Model; + defaults: Spreadsheet.Model; /** This method is used to add custom formulas in Spreadsheet. * @param {string} Pass the name of the formula. @@ -35711,25 +37847,25 @@ class Spreadsheet extends ej.Widget { * @param {string|Array} Optional. If range is specified, then it will clear all content in the specified range else it will use the current selected range. * @returns {void} */ - clearAll(range?: string|Array): void; + clearAll(range?: string|any[]): void; /** This property is used to clear all the formats applied in the specified range in Spreadsheet. * @param {string|Array} Optional. If range is specified, then it will clear all format in the specified range else it will use the current selected range. * @returns {void} */ - clearAllFormat(range?: string|Array): void; + clearAllFormat(range?: string|any[]): void; /** Used to clear the applied border in the specified range in Spreadsheet. * @param {string|Array} Optional. If range is specified, then it will clear border in the specified range else it will use the current selected range. * @returns {void} */ - clearBorder(range?: string|Array): void; + clearBorder(range?: string|any[]): void; /** This property is used to clear the contents in the specified range in Spreadsheet. * @param {string|Array} Optional. If the range is specified, then it will clear the content in the specified range else it will use the current selected range. * @returns {void} */ - clearContents(range?: string|Array): void; + clearContents(range?: string|any[]): void; /** This method is used to remove only the data in the range denoted by the specified range name. * @param {string} Pass the defined rangeSettings property name. @@ -35741,17 +37877,22 @@ class Spreadsheet extends ej.Widget { * @param {Array|string} Optional. If range is specified, it will clear data for the specified range else it will use the current selected range. * @param {string} Optional. If property is specified, it will remove the specified property in the range else it will remove default properties * @param {any} Optional. - * @param {boolean} Optional. pass `true`, if you want to skip the hidden rows + * @param {boolean} Optional. pass {{'`true`' | markdownify}}, if you want to skip the hidden rows * @param {any} Optional. Pass the status to perform undo and redo operation. * @param {any} Optional. It specifies whether to skip element processing or not. * @returns {void} */ - clearRangeData(range?: Array|string, property?: string, cells?: any, skipHiddenRow?: boolean, status?: any, skipCell?: any): void; + clearRangeData(range?: any[]|string, property?: string, cells?: any, skipHiddenRow?: boolean, status?: any, skipCell?: any): void; + + /** This method is used to clear undo and redo collections in the Spreadsheet. + * @returns {void} + */ + clearUndoRedo(): void; /** This method is used to copy or move the sheets in Spreadsheet. * @param {number} Pass the sheet index that you want to copy or move. * @param {number} Pass the position index where you want to copy or move. - * @param {boolean} Pass `true`,If you want to copy sheet or else it will move sheet. + * @param {boolean} Pass {{'`true`' | markdownify}},If you want to copy sheet or else it will move sheet. * @returns {void} */ copySheet(fromIdx: number, toIdx: number, isCopySheet: boolean): void; @@ -35795,7 +37936,7 @@ class Spreadsheet extends ej.Widget { * @param {Function} Pass the function that you want to perform range edit. * @returns {void} */ - editRange(rangeName: string, fn: Function): void; + editRange(rangeName: string, fn: any): void; /** This method is used to get the activation panel in the Spreadsheet. * @returns {HTMLElement} @@ -35815,9 +37956,9 @@ class Spreadsheet extends ej.Widget { getActiveCellElem(sheetIdx?: number): HTMLElement; /** This method is used to get the current active sheet index in Spreadsheet. - * @returns {Number} + * @returns {number} */ - getActiveSheetIndex(): Number; + getActiveSheetIndex(): number; /** This method is used to get the auto fill element in Spreadsheet. * @returns {HTMLElement} @@ -35834,21 +37975,21 @@ class Spreadsheet extends ej.Widget { /** This method is used to get the data settings in the Spreadsheet. * @param {number} Pass the sheet index. - * @returns {Number} + * @returns {number} */ - getDataSettings(sheetIdx: number): Number; + getDataSettings(sheetIdx: number): number; /** This method is used to get the frozen columns index in the Spreadsheet. * @param {number} Pass the sheet index. - * @returns {Number} + * @returns {number} */ - getFrozenColumns(sheetIdx: number): Number; + getFrozenColumns(sheetIdx: number): number; /** This method is used to get the frozen row index in Spreadsheet. * @param {number} Pass the sheet index. - * @returns {Number} + * @returns {number} */ - getFrozenRows(sheetIdx: number): Number; + getFrozenRows(sheetIdx: number): number; /** This method is used to get the hyperlink data as object from the specified cell in Spreadsheet. * @param {HTMLElement} Pass the DOM element to get hyperlink @@ -35859,7 +38000,7 @@ class Spreadsheet extends ej.Widget { /** This method is used to get all cell elements in the specified range. * @param {string} Pass the range that you want to get the cells. * @param {number} Pass the index of the sheet. - * @param {boolean} Optional. Pass `true`, if you want to skip the hidden rows. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows. * @returns {HTMLElement} */ getRange(range: string, sheetIdx: number, skipHiddenRow?: boolean): HTMLElement; @@ -35868,13 +38009,13 @@ class Spreadsheet extends ej.Widget { * @param {any} Optional. Pass the range, property, sheetIdx, valueOnly in options. * @returns {Array} */ - getRangeData(options?: any): Array; + getRangeData(options?: any): any[]; /** This method is used to get the range indices array based on the specified alpha range in Spreadsheet. * @param {string} Pass the alpha range that you want to get range indices. * @returns {Array} */ - getRangeIndices(range: string): Array; + getRangeIndices(range: string): any[]; /** This method is used to get the sheet details based on the given sheet index in Spreadsheet. * @param {number} Pass the sheet index to get the sheet object. @@ -35888,9 +38029,14 @@ class Spreadsheet extends ej.Widget { */ getSheetElement(sheetIdx: number): HTMLElement; + /** This method is used to get all the sheets in workbook. + * @returns {Array} + */ + getSheets(): any[]; + /** This method is used to send a paging request to the specified sheet Index in the Spreadsheet. * @param {number} Pass the sheet index to perform paging at specified sheet index - * @param {boolean} Pass `true` to create a new sheet. If the specified sheet index is already exist, it navigate to that sheet else it create a new sheet. + * @param {boolean} Pass {{'`true`' | markdownify}} to create a new sheet. If the specified sheet index is already exist, it navigate to that sheet else it create a new sheet. * @returns {void} */ gotoPage(sheetIdx: number, newSheet: boolean): void; @@ -35972,24 +38118,31 @@ class Spreadsheet extends ej.Widget { /** This method is used to lock/unlock the range of cells in active sheet. Lock cells are activated only after the sheet is protected. Once the sheet is protected it is unable to lock/unlock cells. * @param {string|Array} Pass the alpha range cells or array range of cells. - * @param {string} Optional. By default is `true`. If it is `false` locked cells are unlocked. + * @param {string} Optional. By default is {{'`true`' | markdownify}}. If it is {{'`false`' | markdownify}} locked cells are unlocked. * @returns {void} */ - lockCells(range: string|Array, isLocked?: string): void; + lockCells(range: string|any[], isLocked?: string): void; /** This method is used to merge cells by across in the Spreadsheet. * @param {string} Optional. To pass the cell range or selected cells are process. - * @param {boolean} Optional. If pass `true` it does not show alert. + * @param {boolean} Optional. If pass {{'`true`' | markdownify}} it does not show alert. * @returns {void} */ mergeAcrossCells(range?: string, alertStatus?: boolean): void; /** This method is used to merge the selected cells in the Spreadsheet. * @param {string|Array} Optional. To pass the cell range or selected cells are process. - * @param {boolean} Optional. If pass `true` it does not show alert. + * @param {boolean} Optional. If pass {{'`true`' | markdownify}} it does not show alert. * @returns {void} */ - mergeCells(range?: string|Array, alertStatus?: boolean): void; + mergeCells(range?: string|any[], alertStatus?: boolean): void; + + /** This method is used to select a cell or range in the Spreadsheet. + * @param {any} Pass the start cell to perform selection. + * @param {any} Pass the end cell to perform selection. + * @returns {void} + */ + performSelection(startCell: any, endCell: any): void; /** This method is used to protect or unprotect active sheet. * @param {boolean} Optional. By default is `true`. If it is `false` active sheet is unprotected. @@ -36017,10 +38170,10 @@ class Spreadsheet extends ej.Widget { /** This method is used to remove the hyperlink from selected cells of current sheet. * @param {string} Hyperlink remove from the specified range. - * @param {boolean} Optional. If it is `true`, It will clear link only not format. + * @param {boolean} Optional. If it is {{'`true`' | markdownify}}, It will clear link only not format. * @param {boolean} Optional. Pass the status to perform undo and redo operations. * @param {any} Optional. Pass the cells that you want to remove hyperlink. - * @param {boolean} Optional. Pass `true`, if you want to skip the hidden rows. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows. * @returns {void} */ removeHyperlink(range: string, isClearHLink?: boolean, status?: boolean, cells?: any, skipHiddenRow?: boolean): void; @@ -36031,6 +38184,12 @@ class Spreadsheet extends ej.Widget { */ removeRange(rangeName: string): void; + /** This method is used to remove the readonly option for the specified range. + * @param {string|Array} Pass the range. + * @returns {void} + */ + removeReadOnly(range?: string|any[]): void; + /** This method is used to save JSON data in Spreadsheet. * @returns {any} */ @@ -36063,13 +38222,25 @@ class Spreadsheet extends ej.Widget { */ setBorder(property: any, range?: string): void; + /** This method is used to set the height for the rows in the Spreadsheet. + * @param {Array|any} Pass the row index and height of the rows. + * @returns {void} + */ + setHeightToRows(heightColl: any[]|any): void; + /** This method is used to set the hyperlink in selected cells of the current sheet. * @param {string|Array} If range is specified, it will set the hyperlink in range of the cells. * @param {any} Pass cellAddress or webAddress * @param {number} If we pass cellAddress then which sheet to be navigate in the applied link. * @returns {void} */ - setHyperlink(range: string|Array, link: any, sheetIdx: number): void; + setHyperlink(range: string|any[], link: any, sheetIdx: number): void; + + /** This method is used to set the readonly option for the specified range. + * @param {string|Array} Pass the range. + * @returns {void} + */ + setReadOnly(range?: string|any[]): void; /** This method is used to set the focus to the Spreadsheet. * @returns {void} @@ -36080,7 +38251,7 @@ class Spreadsheet extends ej.Widget { * @param {Array|any} Pass the column index and width of the columns. * @returns {void} */ - setWidthToColumns(widthColl: Array|any): void; + setWidthToColumns(widthColl: any[]|any): void; /** This method is used to rename the active sheet. * @param {string} Pass the sheet name that you want to change the current active sheet name. @@ -36107,17 +38278,23 @@ class Spreadsheet extends ej.Widget { showFormulaBar(): void; /** This method is used to show/hide gridlines in active sheet in the Spreadsheet. - * @param {boolean} Pass `true` to show the gridlines + * @param {boolean} Pass {{'`true`' | markdownify}} to show the gridlines * @returns {void} */ showGridlines(status: boolean): void; /** This method is used to show/hide the headers in active sheet in the Spreadsheet. - * @param {boolean} Pass `true` to show the sheet headers. + * @param {boolean} Pass {{'`true`' | markdownify}} to show the sheet headers. * @returns {void} */ showHeadings(startRow: boolean): void; + /** This method is used to show/hide pager in the Spreadsheet. + * @param {boolean} Pass {{'`true`' | markdownify}} to show pager. + * @returns {void} + */ + showPager(status: boolean): void; + /** This method is used to show the hidden rows in the specified range in the Spreadsheet. * @param {number} Index of the start row. * @param {number} Optional. Index of the end row. @@ -36151,14 +38328,14 @@ class Spreadsheet extends ej.Widget { * @param {Array|string} Optional. If the range is specified, then it will update unwrap in the specified range else it will use the current selected range. * @returns {void} */ - unWrapText(range?: Array|string): void; + unWrapText(range?: any[]|string): void; /** This method is used to update the data for the specified range of cells in the Spreadsheet. * @param {any} Pass the cells data that you want to update. * @param {Array|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. * @returns {void} */ - updateData(data: any, range?: Array|string): void; + updateData(data: any, range?: any[]|string): void; /** This method is used to update the formula bar in the Spreadsheet. * @returns {void} @@ -36172,19 +38349,25 @@ class Spreadsheet extends ej.Widget { */ updateRange(sheetIdx: number, settings: any): void; + /** This method is used to update the details for custom undo and redo operations. + * @param {any} Pass the details to update undo and redo collection + * @returns {void} + */ + updateUndoRedoCollection(details: any): void; + /** This method is used to update the unique data for the specified range of cells in Spreadsheet. * @param {any} Pass the data that you want to update in the particular range * @param {Array|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. * @param {any} Optional. It specifies whether to skip element processing or not. * @returns {void} */ - updateUniqueData(data: any, range?: Array|string, skipCell?: any): void; + updateUniqueData(data: any, range?: any[]|string, skipCell?: any): void; /** This method is used to wrap the selected range of cells in the Spreadsheet. * @param {Array|string} Optional. If the range is specified, then it will update wrap in the specified range else it will use the current selected range. * @returns {void} */ - wrapText(range?: Array|string): void; + wrapText(range?: any[]|string): void; XLCellType: Spreadsheet.XLCellType; @@ -36235,7 +38418,7 @@ class Spreadsheet extends ej.Widget { XLValidate: Spreadsheet.XLValidate; } -export module Spreadsheet{ +export namespace Spreadsheet { export interface XLCellType { @@ -36245,31 +38428,31 @@ export interface XLCellType { * @param {number} Optional. Pass sheet index. * @returns {void} */ - addCellTypes(range: string,settings: any,sheetIdx: number): void; + addCellTypes(range: string, settings: any, sheetIdx: number): void; /** This method is used to remove cell type from the specified range of cells in the Spreadsheet. * @param {string|Array} Pass the range where you want remove cell type. * @param {number} Optional. Pass sheet index. * @returns {void} */ - removeCellTypes(range: string|Array,sheetIdx: number): void; + removeCellTypes(range: string|any[], sheetIdx: number): void; } export interface XLCFormat { /** This method is used to clear the applied conditional formatting rules in the Spreadsheet. - * @param {boolean} Pass `true` if you want to clear rules from selected cells else it will clear rules from entire sheet. + * @param {boolean} Pass {{'`true`' | markdownify}} if you want to clear rules from selected cells else it will clear rules from entire sheet. * @param {Array|string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. * @returns {void} */ - clearCF(isSelected: boolean,range: Array|string): void; + clearCF(isSelected: boolean, range: any[]|string): void; /** This method is used to get the applied conditional formatting rules as array of objects based on the specified row Index and column Index in the Spreadsheet. * @param {number} Pass the row index. * @param {number} Pass the column index. * @returns {Array} */ - getCFRule(rowIdx: number,colIdx: number): Array; + getCFRule(rowIdx: number, colIdx: number): any[]; /** This method is used to set the conditional formatting rule in the Spreadsheet. * @param {any} Pass the rule to set. @@ -36285,7 +38468,14 @@ export interface XLChart { * @param {ej.datavisualization.Chart.Theme} Pass the chart theme which want to update. * @returns {void} */ - changeTheme(chartId: string,theme: ej.datavisualization.Chart.Theme): void; + changeTheme(chartId: string, theme: ej.datavisualization.Chart.Theme): void; + + /** This method is used to change the type of the chart in the Spreadsheet. + * @param {string} Pass the chart id. + * @param {any} Pass the chart type. + * @returns {void} + */ + changeType(chartId: string, option: any): void; /** This method is used to change the data range of the chart in the Spreadsheet. * @param {string} Pass the chart id. @@ -36294,21 +38484,21 @@ export interface XLChart { * @param {string} Legend range of chart data. * @returns {void} */ - changeDataRange(chartId: string,xRange: string,yRange: string,lRange: string): void; + changeDataRange(chartId: string, xRange: string, yRange: string, lRange: string): void; /** This method is used to create a chart for specified range in Spreadsheet. * @param {string|Array} Optional. If range is specified, it will create chart for the specified range else it will use the current selected range. * @param {any} Optional. To pass the type of chart and chart name. * @returns {void} */ - createChart(range: string|Array,options: any): void; + createChart(range: string|any[], options: any): void; /** This method is used to refresh the chart in the Spreadsheet. * @param {string} To pass the chart Id. * @param {any} To pass the type of chart and chart name. * @returns {void} */ - refreshChart(id: string,options: any): void; + refreshChart(id: string, options: any): void; /** This method is used to resize the chart of specified id in the Spreadsheet. * @param {string} To pass the chart id. @@ -36316,14 +38506,14 @@ export interface XLChart { * @param {number} To pass the width value. * @returns {void} */ - resizeChart(id: string,height: number,width: number): void; + resizeChart(id: string, height: number, width: number): void; /** This method is used to update the chart element, such as axes, titles, data labels, grid lines and legends in the Spreadsheet. * @param {string} Pass the chart id. * @param {ej.Spreadsheet.ChartProperties} Pass chart element value which you want to update. * @returns {void} */ - updateChartElement(chartId: string,value: ej.Spreadsheet.ChartProperties): void; + updateChartElement(chartId: string, value: ej.Spreadsheet.ChartProperties): void; /** This method is used switch row to columns and vice versa for chart in the Spreadsheet. So that the data is displayed in the chart the way you want. * @param {string} Pass the chart id. @@ -36355,10 +38545,10 @@ export interface XLComment { /** This method is used to delete the comment in the specified range in Spreadsheet. * @param {Array|string} Optional. If range is specified, it will delete comments for the specified range else it will use the current selected range. * @param {number} Optional. If sheetIdx is specified, it will delete comment in specified sheet else it will use active sheet. - * @param {boolean} Optional. Pass `true`, if you want to skip the hidden rows data. + * @param {boolean} Optional. Pass {{'`true`' | markdownify}}, if you want to skip the hidden rows data. * @returns {void} */ - deleteComment(range: Array|string,sheetIdx: number,skipHiddenRow: boolean): void; + deleteComment(range: any[]|string, sheetIdx: number, skipHiddenRow: boolean): void; /** This method is used to edit the comment in the target Cell in Spreadsheet. * @param {any} Optional. Pass the row index and column index of the cell which contains comment. @@ -36367,14 +38557,14 @@ export interface XLComment { editComment(targetCell: any): void; /** This method is used to find the next comment from the active cell in Spreadsheet. - * @returns {Boolean} + * @returns {boolean} */ - findNextComment(): Boolean; + findNextComment(): boolean; /** This method is used to find the previous comment from the active cell in Spreadsheet. - * @returns {Boolean} + * @returns {boolean} */ - findPrevComment(): Boolean; + findPrevComment(): boolean; /** This method is used to get comment data for the specified cell. * @param {HTMLElement} Pass the DOM element to get comment data as object. @@ -36385,11 +38575,11 @@ export interface XLComment { /** This method is used to set new comment in Spreadsheet. * @param {string|Array} Optional. If we pass the range comment will set in the range otherwise it will set with selected cells. * @param {string} Optional. Pass the comment data. - * @param {boolean} Optional. Pass `true` to show comment in edit mode - * @param {boolean} Optional. Pass `true` to show the user name + * @param {boolean} Optional. Pass {{'`true`' | markdownify}} to show comment in edit mode + * @param {boolean} Optional. Pass {{'`true`' | markdownify}} to show the user name * @returns {void} */ - setComment(range: string|Array,data: string,showEditPanel: boolean,showUserName: boolean): void; + setComment(range: string|any[], data: string, showEditPanel: boolean, showUserName: boolean): void; /** This method is used to show all the comments in the Spreadsheet. * @returns {void} @@ -36411,35 +38601,35 @@ export interface XLCMenu { * @param {string} Specifies the type of operation to be performed * @returns {void} */ - addItem(target: string,itemColl: Array,operation: string): void; + addItem(target: string, itemColl: any[], operation: string): void; /** This method is used to change data source in the context menu. * @param {string} Specifies the context menu type to bind the data source. * @param {Array} Pass the data source to be binded * @returns {void} */ - changeDataSource(target: string,data: Array): void; + changeDataSource(target: string, data: any[]): void; /** This method is used to disable the items in the context menu. * @param {string} Specifies the context menu type in which the item to be disabled. * @param {Array} Specifies the Menu Item id collection to be disabled * @returns {void} */ - disableItem(target: string,idxColl: Array): void; + disableItem(target: string, idxColl: any[]): void; /** This method is used to enable the items in the context menu. * @param {string} Specifies the context menu type in which the item to be enabled. * @param {Array} Specifies the Menu Item id collection to be enabled * @returns {void} */ - enableItem(target: string,idxColl: Array): void; + enableItem(target: string, idxColl: any[]): void; /** This method is used to remove the items in the context menu. * @param {string} Specifies the context menu type in which the item to be removed. * @param {Array} Specifies the Menu Item id collection to be removed * @returns {void} */ - removeItem(target: string,idxColl: Array): void; + removeItem(target: string, idxColl: any[]): void; } export interface XLDragDrop { @@ -36449,7 +38639,7 @@ export interface XLDragDrop { * @param {any|Array} Pass the destination range to drop the dragged cells. * @returns {void} */ - moveRangeTo(sourceRange: any|Array,destinationRange: any|Array): void; + moveRangeTo(sourceRange: any|any[], destinationRange: any|any[]): void; } export interface XLDragFill { @@ -36471,7 +38661,7 @@ export interface XLDragFill { hideAutoFillOptions(): void; /** This method is used to set position of the auto fill element in the Spreadsheet. - * @param {boolean} Pass the isDragFill option as `boolean` value to show auto fill options in Spreadsheet. + * @param {boolean} Pass the isDragFill option as {{'`boolean`' | markdownify}} value to show auto fill options in Spreadsheet. * @returns {void} */ positionAutoFillElement(isDragFill: boolean): void; @@ -36488,27 +38678,31 @@ export interface XLEdit { /** This method is used to edit a particular cell based on the row index and column index in the Spreadsheet. * @param {number} Pass the row index to edit particular cell. * @param {number} Pass the column index to edit particular cell. - * @param {boolean} Pass `true`, if you want to maintain previous cell value. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to maintain previous cell value. * @returns {void} */ - editCell(rowIdx: number,colIdx: number,oldData: boolean): void; + editCell(rowIdx: number, colIdx: number, oldData: boolean): void; /** This method is used to get the property value of particular cell, based on the row and column index in the Spreadsheet. * @param {number} Pass the row index to get the property value. * @param {number} Pass the column index to get the property value. - * @param {string} Optional. Pass the property name that you want("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", "cellType"). + * @param {string} Optional. Pass the property name that you want("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", + * "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", + * "decimalPlaces", "cellType"). * @param {number} Optional. Pass the index of the sheet. - * @returns {any|String|Array} + * @returns {any|string|Array} */ - getPropertyValue(rowIdx: number,colIdx: number,prop: string,sheetIdx: number): any|String|Array; + getPropertyValue(rowIdx: number, colIdx: number, prop: string, sheetIdx: number): any|string|any[]; /** This method is used to get the property value in specified cell in Spreadsheet. * @param {HTMLElement} Pass the cell element to get property value. - * @param {string} Pass the property name that you want ("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", "cellType"). + * @param {string} Pass the property name that you want ("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", + * "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", + * "comment", "formatStr", "decimalPlaces", "cellType"). * @param {number} Pass the index of sheet. - * @returns {any|String|Array} + * @returns {any|string|Array} */ - getPropertyValueByElem(elem: HTMLElement,property: string,sheetIdx: number): any|String|Array; + getPropertyValueByElem(elem: HTMLElement, property: string, sheetIdx: number): any|string|any[]; /** This method is used to save the edited cell value in the Spreadsheet. * @returns {void} @@ -36520,7 +38714,7 @@ export interface XLEdit { * @param {string|number} Pass the cell value. * @returns {void} */ - updateCell(cell: any,value: string|number): void; + updateCell(cell: any, value: string|number): void; /** This method is used to update a particular cell value and its format in the Spreadsheet. * @param {any} Pass row index and column index of the cell. @@ -36529,7 +38723,7 @@ export interface XLEdit { * @param {number} Pass sheet index. * @returns {void} */ - updateCellValue(cellIdx: any,val: string|number,formatClass: string,sheetIdx: number): void; + updateCellValue(cellIdx: any, val: string|number, formatClass: string, sheetIdx: number): void; } export interface XLExport { @@ -36557,7 +38751,7 @@ export interface XLFilter { * @param {string|Array} Pass the range of the selected cells. * @returns {void} */ - filter(range: string|Array): void; + filter(range: string|any[]): void; /** This method is used to apply filter for the column by active cell's value in the Spreadsheet. * @returns {void} @@ -36567,26 +38761,32 @@ export interface XLFilter { export interface XLFormat { + /** This method is used to convert table range to normal range. + * @param {any} Pass the sheet index and table id. + * @returns {void} + */ + convertToRange(options: any): void; + /** This method is used to create a table for the selected range of cells in the Spreadsheet. * @param {any} Pass the table object. * @param {string|Array} Optional. If the range is specified, then it will create table in the specified range else it will use the current selected range. - * @returns {String} + * @returns {string} */ - createTable(tableObject: any,range: string|Array): String; + createTable(tableObject: any, range: string|any[]): string; /** This method is used to set format style and values in a cell or range of cells. * @param {any} Pass the formatObject which contains style, type, format, groupSeparator and decimalPlaces. * @param {string} Pass the range to format cells. * @returns {void} */ - format(formatObj: any,range: string): void; + format(formatObj: any, range: string): void; /** This method is used to remove the style in the specified range. * @param {Array|string} Pass the cell range . * @param {any} Optional. Pass the options for which the style gets removed. * @returns {void} */ - removeStyle(range: Array|string,options: any): void; + removeStyle(range: any[]|string, options: any): void; /** This method is used to remove table with specified tableId in the Spreadsheet. * @param {number} Pass the tableId that you want to remove. @@ -36599,21 +38799,21 @@ export interface XLFormat { * @param {string|Array} Pass the range. * @returns {void} */ - updateDecimalPlaces(type: string,range: string|Array): void; + updateDecimalPlaces(type: string, range: string|any[]): void; /** This method is used to update the format for the selected range of cells in the Spreadsheet. * @param {any} Pass the format object that you want to update. * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. * @returns {void} */ - updateFormat(formatObj: any,range: Array): void; + updateFormat(formatObj: any, range: any[]): void; /** This method is used to update the unique format for selected range of cells in the Spreadsheet. * @param {string} Pass the unique format class. * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. * @returns {void} */ - updateUniqueFormat(formatClass: string,range: Array): void; + updateUniqueFormat(formatClass: string, range: any[]): void; } export interface XLFreeze { @@ -36661,9 +38861,9 @@ export interface XLPivot { * @param {string} It specifies the name of the pivot table. * @param {any} Pass the pivot table settings. * @param {any} Pass the pivot range, sheet index, address and data source . - * @returns {String} + * @returns {string} */ - createPivotTable(range: string,location: string,name: string,settings: any,pvt: any): String; + createPivotTable(range: string, location: string, name: string, settings: any, pvt: any): string; /** This method is used to delete the pivot table which is selected. * @param {string} Pass the name of the pivot table. @@ -36676,7 +38876,7 @@ export interface XLPivot { * @param {number} Optional. Pass the index of the sheet. * @returns {void} */ - refreshDataSource(name: string,sheetIdx: number): void; + refreshDataSource(name: string, sheetIdx: number): void; } export interface XLPrint { @@ -36698,39 +38898,39 @@ export interface XLResize { * @param {Array} Optional. Pass row index collection that you want to fit its height. * @returns {void} */ - fitHeight(rowIndexes: Array): void; + fitHeight(rowIndexes: any[]): void; /** This method is used to fit the width of columns in the Spreadsheet. * @param {Array} Optional. Pass column index collection that you want to fit its width. * @returns {void} */ - fitWidth(colIndexes: Array): void; + fitWidth(colIndexes: any[]): void; /** This method is used to get the column width of the specified column index in the Spreadsheet. * @param {number} Pass the column index. - * @returns {Number} + * @returns {number} */ - getColWidth(colIdx: number): Number; + getColWidth(colIdx: number): number; /** This method is used to get the row height of the specified row index in the Spreadsheet. * @param {number} Pass the row index which you want to find its height. - * @returns {Number} + * @returns {number} */ - getRowHeight(rowIdx: number): Number; + getRowHeight(rowIdx: number): number; /** This method is used to set the column width of the specified column index in the Spreadsheet. * @param {number} Pass the column index. * @param {number} Pass the width value that you want to set. * @returns {void} */ - setColWidth(colIdx: number,size: number): void; + setColWidth(colIdx: number, size: number): void; /** This method is used to set the row height of the specified row index in the Spreadsheet. * @param {number} Pass the row index. * @param {number} Pass the height value that you want to set. * @returns {void} */ - setRowHeight(rowIdx: number,size: number): void; + setRowHeight(rowIdx: number, size: number): void; } export interface XLRibbon { @@ -36740,21 +38940,21 @@ export interface XLRibbon { * @param {number} pass the index of the item to be added in the backstage. * @returns {void} */ - addBackStageItem(pageItem: any,index: number): void; + addBackStageItem(pageItem: any, index: number): void; /** This method is used to dynamically add the contextual tabs in the ribbon. * @param {any} Specifies the contextual tab set object. * @param {number} pass the index of the contextual tab. * @returns {void} */ - addContextualTabs(contextualTabSet: any,index: number): void; + addContextualTabs(contextualTabSet: any, index: number): void; /** This method is used to dynamically add the menu item in the file menu. * @param {Array} Specifies the item to be added * @param {number} pass the index of the menu item. * @returns {void} */ - addMenuItem(item: Array,index: number): void; + addMenuItem(item: any[], index: number): void; /** This method is used to add a new name in the Spreadsheet name manager. * @param {string} Pass the name that you want to define in name manager. @@ -36763,7 +38963,7 @@ export interface XLRibbon { * @param {number} Optional. Pass the sheet index. * @returns {void} */ - addNamedRange(name: string,refersTo: string,comment: string,sheetIdx: number): void; + addNamedRange(name: string, refersTo: string, comment: string, sheetIdx: number): void; /** This method is used to dynamically add the tab in the ribbon. * @param {Array} Specifies the text to be displayed in the tab. @@ -36771,7 +38971,7 @@ export interface XLRibbon { * @param {number} pass the index of the tab. * @returns {void} */ - addTab(tabText: Array,ribbonGroups: number,index: number): void; + addTab(tabText: any[], ribbonGroups: number, index: number): void; /** This method is used to dynamically add the tab group in the ribbon. * @param {number} Specifies the ribbon tab index. @@ -36779,14 +38979,14 @@ export interface XLRibbon { * @param {number} pass the index of the ribbon group. * @returns {void} */ - addTabGroup(tabIndex: number,tabGroup: any,groupIndex: number): void; + addTabGroup(tabIndex: number, tabGroup: any, groupIndex: number): void; /** This method is used to insert the few type (SUM, MAX, MIN, AVG, COUNT) of formulas in the selected range of cells in the Spreadsheet. * @param {string} To pass the type("SUM","MAX","MIN","AVG","COUNT"). * @param {string|Array} If range is specified, it will apply auto sum for the specified range else it will use the current selected range. * @returns {void} */ - autoSum(type: string,range: string|Array): void; + autoSum(type: string, range: string|any[]): void; /** This method is used to hide the file menu in the ribbon tab. * @returns {void} @@ -36816,14 +39016,14 @@ export interface XLRibbon { * @param {boolean} pass the boolean value to remove the tab from ribbon * @returns {void} */ - removeTab(index: number,isRemoveMenu: boolean): void; + removeTab(index: number, isRemoveMenu: boolean): void; /** This method is used to remove the tab group form ribbon in the spreadsheet. * @param {number} Specifies the index of the tab group to be removed from the ribbon. * @param {string} Specifies the text to be displayed in the tab group * @returns {void} */ - removeTabGroup(tabIndex: number,groupText: string): void; + removeTabGroup(tabIndex: number, groupText: string): void; /** This method is used to show the file menu in the ribbon tab. * @returns {void} @@ -36835,7 +39035,7 @@ export interface XLRibbon { * @param {number} pass the index of the item to be updated * @returns {void} */ - updateMenuItem(item: any,index: number): void; + updateMenuItem(item: any, index: number): void; /** This method is used to update the ribbon icons in the Spreadsheet. * @returns {void} @@ -36848,20 +39048,20 @@ export interface XLSearch { /** This method is used to find and replace all data by workbook in the Spreadsheet. * @param {string} Pass the search data. * @param {string} Pass the replace data. - * @param {boolean} Pass `true`, if you want to match with case-sensitive. - * @param {boolean} Pass `true`, if you want to match with entire cell contents. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with case-sensitive. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with entire cell contents. * @returns {void} */ - replaceAllByBook(findData: string,replaceData: string,isCSen: boolean,isEMatch: boolean): void; + replaceAllByBook(findData: string, replaceData: string, isCSen: boolean, isEMatch: boolean): void; /** This method is used to find and replace all data by sheet in Spreadsheet. * @param {string} Pass the search data. * @param {string} Pass the replace data. - * @param {boolean} Pass `true`, if you want to match with case-sensitive. - * @param {boolean} Pass `true`, if you want to match with entire cell contents. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with case-sensitive. + * @param {boolean} Pass {{'`true`' | markdownify}}, if you want to match with entire cell contents. * @returns {void} */ - replaceAllBySheet(findData: string,replaceData: string,isCSen: boolean,isEMatch: boolean): void; + replaceAllBySheet(findData: string, replaceData: string, isCSen: boolean, isEMatch: boolean): void; } export interface XLSelection { @@ -36881,7 +39081,7 @@ export interface XLSelection { * @param {Array|string} Optional. Pass range to refresh selection. * @returns {void} */ - refreshSelection(range: Array|string): void; + refreshSelection(range: any[]|string): void; /** This method is used to select a single column in the Spreadsheet. * @param {number} Pass the column index value. @@ -36894,7 +39094,7 @@ export interface XLSelection { * @param {number} Pass the column end index. * @returns {void} */ - selectColumns(startIdx: number,endIdx: number): void; + selectColumns(startIdx: number, endIdx: number): void; /** This method is used to select the specified range of cells in the Spreadsheet. * @param {string} Pass range which want to select. @@ -36913,7 +39113,7 @@ export interface XLSelection { * @param {number} Pass the end row index. * @returns {void} */ - selectRows(startIdx: number,endIdx: number): void; + selectRows(startIdx: number, endIdx: number): void; /** This method is used to select all cells in active sheet. * @returns {void} @@ -36930,28 +39130,28 @@ export interface XLShape { * @param {number} Optional. Pass the height of the image that you want to set. * @param {number} Optional. Pass the top of the image that you want to set. * @param {number} Optional. Pass the left of the image that you want to set. - * @returns {String} + * @returns {string} */ - setPicture(range: string,url: string,width: number,height: number,top: number,left: number): String; + setPicture(range: string, url: string, width: number, height: number, top: number, left: number): string; } export interface XLSort { /** This method is used to sort a particular range of cells based on its cell or font color in the Spreadsheet. - * @param {string} Pass 'PutCellColor' to sort by cell color or 'PutFontColor' for by font color. + * @param {string} Pass {{'`PutCellColor`' | markdownify}} to sort by cell color or {{'`PutFontColor`' | markdownify}} for sort by font color. * @param {any} Pass the HEX color code to sort. * @param {string} Pass the range * @returns {void} */ - sortByColor(operation: string,color: any,range: string): void; + sortByColor(operation: string, color: any, range: string): void; /** This method is used to sort a particular range of cells based on its values in the Spreadsheet. * @param {Array|string} Pass the range to sort. * @param {string} Pass the column name. * @param {any} Pass the direction to sort (ascending or descending). - * @returns {Boolean} + * @returns {boolean} */ - sortByRange(range: Array|string,columnName: string,direction: any): Boolean; + sortByRange(range: any[]|string, columnName: string, direction: any): boolean; } export interface XLValidate { @@ -36960,23 +39160,23 @@ export interface XLValidate { * @param {string|Array} If range is specified, it will apply rules for the specified range else it will use the current selected range. * @param {Array} Pass the validation condition, value1 and value2. * @param {string} Pass the data type. - * @param {boolean} Pass `true` if you ignore blank values. - * @param {boolean} Pass `true` if you want to show an error alert. + * @param {boolean} Pass {{'`true`' | markdownify}} if you ignore blank values. + * @param {boolean} Pass {{'`true`' | markdownify}} if you want to show an error alert. * @returns {void} */ - applyDVRules(range: string|Array,values: Array,type: string,required: boolean,showErrorAlert: boolean): void; + applyDVRules(range: string|any[], values: any[], type: string, required: boolean, showErrorAlert: boolean): void; /** This method is used to clear the applied validation rules in a specified range of cells in the Spreadsheet. * @param {string|Array} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. * @returns {void} */ - clearDV(range: string|Array): void; + clearDV(range: string|any[]): void; /** This method is used to highlight invalid data in a specified range of cells in the Spreadsheet. * @param {string|Array} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. * @returns {void} */ - highlightInvalidData(range: string|Array): void; + highlightInvalidData(range: string|any[]): void; } export interface Model { @@ -36984,7 +39184,7 @@ export interface Model { /** Gets or sets an active sheet index in the Spreadsheet. By defining this value, you can specify which sheet should be active in workbook. * @Default {1} */ - activeSheetIndex?: Number; + activeSheetIndex?: number; /** Gets or sets a value that indicates whether to enable or disable auto rendering of cell type in the Spreadsheet. * @Default {false} @@ -37031,7 +39231,8 @@ export interface Model { */ allowComments?: boolean; - /** Gets or sets a value that indicates whether to enable or disable Conditional Format feature in the Spreadsheet. By enabling this, you can apply formatting to the selected range of cells based on the provided conditions (Greater than, Less than, Equal, Between, Contains, etc.). + /** Gets or sets a value that indicates whether to enable or disable Conditional Format feature in the Spreadsheet. By enabling this, you can apply formatting to the selected range + * of cells based on the provided conditions (Greater than, Less than, Equal, Between, Contains, etc.). * @Default {true} */ allowConditionalFormats?: boolean; @@ -37066,7 +39267,8 @@ export interface Model { */ allowFormatAsTable?: boolean; - /** Get or sets a value that indicates whether to enable or disable format painter feature in the Spreadsheet. By enabling this feature, you can copy the format from the selected range and apply it to another range. + /** Get or sets a value that indicates whether to enable or disable format painter feature in the Spreadsheet. By enabling this feature, you can copy + * the format from the selected range and apply it to another range. * @Default {true} */ allowFormatPainter?: boolean; @@ -37076,12 +39278,14 @@ export interface Model { */ allowFormulaBar?: boolean; - /** Gets or sets a value that indicates whether to enable or disable freeze pane support in Spreadsheet. After enabling this feature, you can use freeze top row, freeze first column and freeze panes options. + /** Gets or sets a value that indicates whether to enable or disable freeze pane support in Spreadsheet. After enabling this feature, + * you can use freeze top row, freeze first column and freeze panes options. * @Default {false} */ allowFreezing?: boolean; - /** Gets or sets a value that indicates whether to enable or disable hyperlink feature in the Spreadsheet. By enabling this feature, you can add hyperlink which is used to easily navigate to the cell reference from one sheet to another or a web page. + /** Gets or sets a value that indicates whether to enable or disable hyperlink feature in the Spreadsheet. By enabling this feature, you can add hyperlink which is used to + * easily navigate to the cell reference from one sheet to another or a web page. * @Default {true} */ allowHyperlink?: boolean; @@ -37116,12 +39320,14 @@ export interface Model { */ allowOverflow?: boolean; - /** Gets or sets a value that indicates whether to enable or disable resizing feature in the Spreadsheet. By enabling this feature, you can change the column width and row height by dragging its header boundaries. + /** Gets or sets a value that indicates whether to enable or disable resizing feature in the Spreadsheet. By enabling this feature, you can change the column width and + * row height by dragging its header boundaries. * @Default {true} */ allowResizing?: boolean; - /** Gets or sets a value that indicates whether to enable or disable find and replace feature in the Spreadsheet. By enabling this, you can easily find and replace a specific value in the sheet or workbook. By using goto behavior, you can select and highlight all cells that contains specific data or data types. + /** Gets or sets a value that indicates whether to enable or disable find and replace feature in the Spreadsheet. By enabling this, you can easily find and replace + * a specific value in the sheet or workbook. By using goto behavior, you can select and highlight all cells that contains specific data or data types. * @Default {true} */ allowSearching?: boolean; @@ -37141,7 +39347,8 @@ export interface Model { */ allowUndoRedo?: boolean; - /** Gets or sets a value that indicates whether to enable or disable wrap text feature in the Spreadsheet. By enabling this, cell content can wrap to the next line, if the cell content exceeds the boundary of the cell. + /** Gets or sets a value that indicates whether to enable or disable wrap text feature in the Spreadsheet. By enabling this, cell content can wrap to the next line, + * if the cell content exceeds the boundary of the cell. * @Default {true} */ allowWrap?: boolean; @@ -37149,7 +39356,7 @@ export interface Model { /** Gets or sets a value that indicates to define the width of the activation panel in Spreadsheet. * @Default {300} */ - apWidth?: Number; + apWidth?: number; /** Gets or sets an object that indicates to customize the auto fill behavior in the Spreadsheet. */ @@ -37162,12 +39369,12 @@ export interface Model { /** Gets or sets a value that defines the number of columns displayed in the sheet. * @Default {21} */ - columnCount?: Number; + columnCount?: number; /** Gets or sets a value that indicates to define the common width for each column in the Spreadsheet. * @Default {64} */ - columnWidth?: Number; + columnWidth?: number; /** Gets or sets a value to add root CSS class for customizing Spreadsheet skins. */ @@ -37176,7 +39383,7 @@ export interface Model { /** Gets or sets a value that indicates custom formulas in Spreadsheet. * @Default {[]} */ - customFormulas?: Array; + customFormulas?: any[]; /** Gets or sets a value that indicates whether to enable or disable context menu in the Spreadsheet. * @Default {true} @@ -37210,7 +39417,8 @@ export interface Model { */ isReadOnly?: boolean; - /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data (i.e.) in a language and culture specific to a particular country or region. + /** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data (i.e.) + * in a language and culture specific to a particular country or region. * @Default {en-US} */ locale?: string; @@ -37230,12 +39438,12 @@ export interface Model { /** Gets or sets a value that indicates whether to define the number of rows to be displayed in the sheet. * @Default {20} */ - rowCount?: Number; + rowCount?: number; /** Gets or sets a value that indicates to define the common height for each row in the sheet. * @Default {20} */ - rowHeight?: Number; + rowHeight?: number; /** Gets or sets an object that indicates to customize the scroll options in the Spreadsheet. */ @@ -37248,11 +39456,11 @@ export interface Model { /** Gets or sets a value that indicates to define the number of sheets to be created at the initial load. * @Default {1} */ - sheetCount?: Number; + sheetCount?: number; /** Gets or sets an object that indicates to customize the sheet behavior in Spreadsheet. */ - sheets?: Array; + sheets?: Sheet[]; /** Gets or sets a value that indicates whether to show or hide pager in the Spreadsheet. * @Default {true} @@ -37267,7 +39475,7 @@ export interface Model { /** This is used to set the number of undo-redo steps in the Spreadsheet. * @Default {20} */ - undoRedoStep?: Number; + undoRedoStep?: number; /** Define the username for the Spreadsheet which is displayed in comment. * @Default {User Name} @@ -37275,112 +39483,118 @@ export interface Model { userName?: string; /** Triggered for every action before its starts. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggered for every action complete. */ - actionComplete? (e: ActionCompleteEventArgs): void; + actionComplete?(e: ActionCompleteEventArgs): void; /** Triggered when the auto fill operation begins. */ - autoFillBegin? (e: AutoFillBeginEventArgs): void; + autoFillBegin?(e: AutoFillBeginEventArgs): void; /** Triggered when the auto fill operation completes. */ - autoFillComplete? (e: AutoFillCompleteEventArgs): void; + autoFillComplete?(e: AutoFillCompleteEventArgs): void; /** Triggered before the batch save. */ - beforeBatchSave? (e: BeforeBatchSaveEventArgs): void; + beforeBatchSave?(e: BeforeBatchSaveEventArgs): void; /** Triggered before the cells to be formatted. */ - beforeCellFormat? (e: BeforeCellFormatEventArgs): void; + beforeCellFormat?(e: BeforeCellFormatEventArgs): void; /** Triggered before the cell selection. */ - beforeCellSelect? (e: BeforeCellSelectEventArgs): void; + beforeCellSelect?(e: BeforeCellSelectEventArgs): void; /** Triggered before the selected cells are dropped. */ - beforeDrop? (e: BeforeDropEventArgs): void; + beforeDrop?(e: BeforeDropEventArgs): void; /** Triggered while start to edit the comment. */ - beforeEditComment? (e: BeforeEditCommentEventArgs): void; + beforeEditComment?(e: BeforeEditCommentEventArgs): void; /** Triggered before the contextmenu is open. */ - beforeOpen? (e: BeforeOpenEventArgs): void; + beforeOpen?(e: BeforeOpenEventArgs): void; /** Triggered before the activation panel is open. */ - beforePanelOpen? (e: BeforePanelOpenEventArgs): void; + beforePanelOpen?(e: BeforePanelOpenEventArgs): void; /** Triggered when click on sheet cell. */ - cellClick? (e: CellClickEventArgs): void; + cellClick?(e: CellClickEventArgs): void; /** Triggered when the cell is edited. */ - cellEdit? (e: CellEditEventArgs): void; + cellEdit?(e: CellEditEventArgs): void; /** Triggered while cell is formatting. */ - cellFormatting? (e: CellFormattingEventArgs): void; + cellFormatting?(e: CellFormattingEventArgs): void; /** Triggered when mouse hover on cell in sheets. */ - cellHover? (e: CellHoverEventArgs): void; + cellHover?(e: CellHoverEventArgs): void; /** Triggered when save the edited cell. */ - cellSave? (e: CellSaveEventArgs): void; + cellSave?(e: CellSaveEventArgs): void; /** Triggered when the cell is selected. */ - cellSelected? (e: CellSelectedEventArgs): void; + cellSelected?(e: CellSelectedEventArgs): void; /** Triggered when click the contextmenu items. */ - contextMenuClick? (e: ContextMenuClickEventArgs): void; + contextMenuClick?(e: ContextMenuClickEventArgs): void; /** Triggered when the selected cells are being dragged. */ - drag? (e: DragEventArgs): void; + drag?(e: DragEventArgs): void; /** Triggered when you start to drag the picture or chart. */ - dragShape? (e: DragShapeEventArgs): void; + dragShape?(e: DragShapeEventArgs): void; /** Triggered when the selected cells are initiated to drag. */ - dragStart? (e: DragStartEventArgs): void; + dragStart?(e: DragStartEventArgs): void; /** Triggered when the selected cells are dropped. */ - drop? (e: DropEventArgs): void; + drop?(e: DropEventArgs): void; /** Triggered before the range editing starts. */ - editRangeBegin? (e: EditRangeBeginEventArgs): void; + editRangeBegin?(e: EditRangeBeginEventArgs): void; /** Triggered after range editing completes. */ - editRangeComplete? (e: EditRangeCompleteEventArgs): void; + editRangeComplete?(e: EditRangeCompleteEventArgs): void; + + /** Triggered when the key is pressed down. */ + keyDown?(e: KeyDownEventArgs): void; + + /** Triggered when the key is released. */ + keyUp?(e: KeyUpEventArgs): void; /** Triggered before the sheet is loaded. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggered after the sheet is loaded. */ - loadComplete? (e: LoadCompleteEventArgs): void; + loadComplete?(e: LoadCompleteEventArgs): void; /** Triggered every click of the menu item. */ - menuClick? (e: MenuClickEventArgs): void; + menuClick?(e: MenuClickEventArgs): void; /** Triggered when a file is imported. */ - onImport? (e: OnImportEventArgs): void; + onImport?(e: OnImportEventArgs): void; /** Triggered when import sheet is failed to open. */ - openFailure? (e: OpenFailureEventArgs): void; + openFailure?(e: OpenFailureEventArgs): void; /** Triggered when pager item is clicked in the Spreadsheet. */ - pagerClick? (e: PagerClickEventArgs): void; + pagerClick?(e: PagerClickEventArgs): void; /** Triggered when you start resizing the chart, picture, row and column. */ - resizeStart? (e: ResizeStartEventArgs): void; + resizeStart?(e: ResizeStartEventArgs): void; /** Triggered after end of resizing the chart, picture, row and column. */ - resizeEnd? (e: ResizeEndEventArgs): void; + resizeEnd?(e: ResizeEndEventArgs): void; /** Triggered when click on the ribbon. */ - ribbonClick? (e: RibbonClickEventArgs): void; + ribbonClick?(e: RibbonClickEventArgs): void; /** Triggered when the chart series rendering. */ - seriesRendering? (e: SeriesRenderingEventArgs): void; + seriesRendering?(e: SeriesRenderingEventArgs): void; /** Triggered when click the ribbon tab. */ - tabClick? (e: TabClickEventArgs): void; + tabClick?(e: TabClickEventArgs): void; /** Triggered when select the ribbon tab. */ - tabSelect? (e: TabSelectEventArgs): void; + tabSelect?(e: TabSelectEventArgs): void; } export interface ActionBeginEventArgs { @@ -37399,7 +39613,7 @@ export interface ActionBeginEventArgs { /** Returns the cell range. */ - range?: Array; + range?: any[]; /** Returns the action format. */ @@ -37434,7 +39648,7 @@ export interface ActionCompleteEventArgs { /** Returns the applied cell format object. */ - selectedCell?: Array|any; + selectedCell?: any[]|any; /** Returns the sheet index. */ @@ -37457,7 +39671,7 @@ export interface AutoFillBeginEventArgs { /** Returns auto fill begin cell range. */ - dataRange?: Array; + dataRange?: any[]; /** Returns which direction drag the auto fill. */ @@ -37465,7 +39679,7 @@ export interface AutoFillBeginEventArgs { /** Returns fill cells range. */ - fillRange?: Array; + fillRange?: any[]; /** Returns the auto fill type. */ @@ -37492,7 +39706,7 @@ export interface AutoFillCompleteEventArgs { /** Returns auto fill begin cell range. */ - dataRange?: Array; + dataRange?: any[]; /** Returns which direction to drag the auto fill. */ @@ -37500,7 +39714,7 @@ export interface AutoFillCompleteEventArgs { /** Returns fill cells range. */ - fillRange?: Array; + fillRange?: any[]; /** Returns the auto fill type. */ @@ -37550,7 +39764,7 @@ export interface BeforeCellFormatEventArgs { /** Returns the selected cells. */ - cells?: Array|any; + cells?: any[]|any; /** Returns the Spreadsheet model. */ @@ -37569,11 +39783,11 @@ export interface BeforeCellSelectEventArgs { /** Returns the previous cell range. */ - prevRange?: Array; + prevRange?: any[]; /** Returns the current cell range. */ - currRange?: Array; + currRange?: any[]; /** Returns the Spreadsheet model. */ @@ -37879,7 +40093,7 @@ export interface CellSelectedEventArgs { /** Returns the selected range. */ - selectedRange?: Array; + selectedRange?: any[]; /** Returns the target element. */ @@ -38099,6 +40313,76 @@ export interface EditRangeCompleteEventArgs { cancel?: boolean; } +export interface KeyDownEventArgs { + + /** Returns the sheet index. + */ + sheetIndex?: number; + + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /** Returns the boolean value. + */ + isCommentEdit?: boolean; + + /** Returns the boolean value. + */ + isEdit?: boolean; + + /** Returns the boolean value. + */ + isSheetRename?: boolean; + + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface KeyUpEventArgs { + + /** Returns the sheet index. + */ + sheetIndex?: number; + + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /** Returns the boolean value. + */ + isCommentEdit?: boolean; + + /** Returns the boolean value. + */ + isEdit?: boolean; + + /** Returns the boolean value. + */ + isSheetRename?: boolean; + + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the cancel option value. + */ + cancel?: boolean; +} + export interface LoadEventArgs { /** Returns the name of the event. @@ -38457,12 +40741,12 @@ export interface ChartSettings { /** Gets or sets a value that defines the chart height in Spreadsheet. * @Default {220} */ - height?: Number; + height?: number; /** Gets or sets a value that defines the chart width in the Spreadsheet. * @Default {440} */ - width?: Number; + width?: number; } export interface ExportSettings { @@ -38541,12 +40825,12 @@ export interface PictureSettings { /** Gets or sets a value that indicates to define height to picture in the Spreadsheet. * @Default {220} */ - height?: Number; + height?: number; /** Gets or sets a value that indicates to define width to picture in the Spreadsheet. * @Default {440} */ - width?: Number; + width?: number; } export interface PrintSettings { @@ -38577,7 +40861,7 @@ export interface RibbonSettingsApplicationTabMenuSettings { /** Specifies the data source to append in application tab. * @Default {[]} */ - dataSource?: Array; + dataSource?: any[]; } export interface RibbonSettingsApplicationTab { @@ -38619,7 +40903,7 @@ export interface ScrollSettings { /** Gets or sets the value that indicates to define the height of spreadsheet. * @Default {100%} */ - height?: Number|string; + height?: number|string; /** Gets or sets the value that indicates whether to enable or disable responsive mode in the Spreadsheet. * @Default {true} @@ -38634,7 +40918,7 @@ export interface ScrollSettings { /** Gets or sets the value that indicates to define the height of the spreadsheet. * @Default {100%} */ - width?: Number|string; + width?: number|string; } export interface SelectionSettings { @@ -38646,7 +40930,7 @@ export interface SelectionSettings { /** Gets or sets a value that indicates to define animation time while selection in the Spreadsheet. * @Default {0.001} */ - animationTime?: Number; + animationTime?: number; /** Gets or sets a value that indicates to enable or disable animation while selection. * @Default {false} @@ -38692,7 +40976,7 @@ export interface SheetsCFormatRule { /** Specifies the inputs for conditional formatting in Spreadsheet. * @Default {[]} */ - inputs?: Array; + inputs?: any[]; /** Specifies the range for conditional formatting in Spreadsheet. */ @@ -38745,6 +41029,20 @@ export interface SheetsRowsCellsComment { export interface SheetsRowsCellsFormat { + /** Specifies the number of decimal places for the given input. + * @Default {2} + */ + decimalPlaces?: number; + + /** Specifies the string format for the given input. + */ + formatStr?: string; + + /** Specifies the thousand separator for the given input. + * @Default {false} + */ + thousandSeparator?: boolean; + /** Specifies the type of the format in Spreadsheet. */ type?: string; @@ -38763,7 +41061,7 @@ export interface SheetsRowsCellsHyperlink { /** Specifies the sheet index to which the cell is referred. * @Default {1} */ - sheetIndex?: Number; + sheetIndex?: number; } export interface SheetsRowsCellsStyle { @@ -38801,7 +41099,12 @@ export interface SheetsRowsCell { /** Specifies the index of a cell in Spreadsheet. * @Default {0} */ - index?: Number; + index?: number; + + /** Specifies whether to lock or unlock a particular cell. + * @Default {false} + */ + isLocked?: boolean; /** Specifies the styles of a cell in Spreadsheet. * @Default {null} @@ -38818,17 +41121,17 @@ export interface SheetsRow { /** Gets or sets the height of a row in Spreadsheet. * @Default {20} */ - height?: Number; + height?: number; /** Specifies the cells of a row in Spreadsheet. * @Default {[]} */ - cells?: Array; + cells?: SheetsRowsCell[]; /** Gets or sets the index of a row in Spreadsheet. * @Default {0} */ - index?: Number; + index?: number; } export interface Sheet { @@ -38836,22 +41139,22 @@ export interface Sheet { /** Specifies the border for the cell in the Spreadsheet. * @Default {[]} */ - border?: Array; + border?: SheetsBorder[]; /** Specifies the conditional formatting for the range of cell in Spreadsheet. * @Default {[]} */ - cFormatRule?: Array; + cFormatRule?: SheetsCFormatRule[]; /** Gets or sets a value that indicates to define column count in the Spreadsheet. * @Default {21} */ - colCount?: Number; + colCount?: number; /** Gets or sets a value that indicates to define column width in the Spreadsheet. * @Default {64} */ - columnWidth?: Number; + columnWidth?: number; /** Gets or sets the data to render the Spreadsheet. * @Default {null} @@ -38871,17 +41174,17 @@ export interface Sheet { /** To hide the specified columns in Spreadsheet. * @Default {[]} */ - hideColumns?: Array; + hideColumns?: any[]; /** To hide the specified rows in Spreadsheet. * @Default {[]} */ - hideRows?: Array; + hideRows?: any[]; /** To merge specified ranges in Spreadsheet. * @Default {[]} */ - mergeCells?: Array; + mergeCells?: any[]; /** Specifies the primary key for the datasource in Spreadsheet. */ @@ -38895,17 +41198,17 @@ export interface Sheet { /** Specifies single range or multiple range settings for a sheet in Spreadsheet. * @Default {[]} */ - rangeSettings?: Array; + rangeSettings?: SheetsRangeSetting[]; /** Gets or sets a value that indicates to define row count in the Spreadsheet. * @Default {20} */ - rowCount?: Number; + rowCount?: number; /** Specifies the rows for a sheet in Spreadsheet. * @Default {[]} */ - rows?: Array; + rows?: SheetsRow[]; /** Gets or sets a value that indicates whether to show or hide grid lines in the Spreadsheet. * @Default {true} @@ -38928,7 +41231,7 @@ export interface Sheet { startCell?: string; } -enum AutoFillOptions{ +enum AutoFillOptions { ///Specifies the CopyCells property in AutoFillOptions. CopyCells, @@ -38947,7 +41250,7 @@ enum AutoFillOptions{ } -enum scrollMode{ +enum scrollMode { ///To enable Infinite scroll mode for Spreadsheet. Infinite, @@ -38957,7 +41260,7 @@ enum scrollMode{ } -enum SelectionType{ +enum SelectionType { ///To select only Column in Spreadsheet. Column, @@ -38970,7 +41273,7 @@ enum SelectionType{ } -enum SelectionUnit{ +enum SelectionUnit { ///To enable Single selection in Spreadsheet Single, @@ -38983,7 +41286,7 @@ enum SelectionUnit{ } -enum BorderType{ +enum BorderType { ///To apply top border for the given range of cell. Top, @@ -39017,7 +41320,7 @@ enum BorderType{ } -enum CFormatRule{ +enum CFormatRule { ///To identify greater than values in the given range of cells. GreaterThan, @@ -39039,7 +41342,7 @@ enum CFormatRule{ } -enum CFormatHighlightColor{ +enum CFormatHighlightColor { ///Highlights red with dark red text color. RedFillwithDarkRedText, @@ -39058,7 +41361,7 @@ enum CFormatHighlightColor{ } -enum ChartProperties{ +enum ChartProperties { ///Specifies to make the data label center of the chart. DataLabelCenter, @@ -39131,56 +41434,61 @@ enum ChartProperties{ class PdfViewer extends ej.Widget { static fn: PdfViewer; - constructor(element: JQuery, options?: PdfViewer.Model); - constructor(element: Element, options?: PdfViewer.Model); + constructor(element: JQuery | Element, options?: PdfViewer.Model); static Locale: any; - model:PdfViewer.Model; - defaults:PdfViewer.Model; + model: PdfViewer.Model; + defaults: PdfViewer.Model; /** Loads the document with the filename and displays it in PDF viewer. + * @param {string} File name to be loaded * @returns {void} */ - load(): void; + load(fileName: string): void; - /** Shows/hides the tool bar in the PDF viewer. + /** Shows/hides the toolbar in the PDF viewer. + * @param {boolean} shows/hides the toolbar * @returns {void} */ - showToolbar(): void; + showToolbar(show: boolean): void; /** Prints the PDF document. * @returns {void} */ print(): void; - /** Abort the printing function and restores the PDF Viewer. + /** Abort the printing function and restores the PDF viewer. * @returns {void} */ abortPrint(): void; - /** Shows/hides the print icon in the tool bar. + /** Shows/hides the print icon in the toolbar. + * @param {boolean} shows/hides print button in the toolbar * @returns {void} */ - showPrintTools(): void; + showPrintTools(show: boolean): void; /** Downloads the PDF document being loaded in the ejPdfViewer control. * @returns {void} */ download(): void; - /** Shows/hides the download tool in the tool bar. + /** Shows/hides the download tool in the toolbar. + * @param {boolean} shows/hides download button in the toolbar * @returns {void} */ - showDownloadTool(): void; + showDownloadTool(show: boolean): void; /** Shows/hides the page navigation tools in the toolbar + * @param {boolean} shows/hides navigation tools in the toolbar * @returns {void} */ - showPageNavigationTools(): void; + showPageNavigationTools(show: boolean): void; /** Navigates to the specific page in the PDF document. If the page is not available for the given pageNumber, PDF viewer retains the existing page in view. + * @param {number} navigates to the page number in the PDF document * @returns {void} */ - goToPage(): void; + goToPage(pageNumber: number): void; /** Navigates to the last page of the PDF document. * @returns {void} @@ -39202,10 +41510,11 @@ class PdfViewer extends ej.Widget { */ goToPreviousPage(): void; - /** Shows/hides the zoom tools in the tool bar. + /** Shows/hides the zoom tools in the toolbar. + * @param {boolean} shows/hides zoom tools in the toolbar * @returns {void} */ - showMagnificationTools(): void; + showMagnificationTools(show: boolean): void; /** Scales the page to fit the page in the container in the control. * @returns {void} @@ -39228,41 +41537,51 @@ class PdfViewer extends ej.Widget { zoomOut(): void; /** Scales the page to the specified percentage ranging from 50 to 400. If the given zoomValue is less than 50 or greater than 400; the PDF viewer scales the page to 50 and 400 respectively. + * @param {number} zoom value for scaling the pages in the PDF Viewer * @returns {void} */ - zoomTo(): void; + zoomTo(zoomValue: number): void; + + /** Unloads the PDF document being displayed in the PDF viewer. + * @returns {void} + */ + unload(): void; } -export module PdfViewer{ +export namespace PdfViewer { export interface Model { /** Specifies the locale information of the PDF viewer. */ - locale?: String; + locale?: string; /** Specifies the toolbar settings. */ toolbarSettings?: ToolbarSettings; - /** Shows or hides the grouped items in the toolbar with the help of enum ej.PdfViewer.ToolbarItems + /** Specifies the name of the action method in the server. */ - toolbarItems?: ej.PdfViewer.ToolbarItems|string; + serverActionSettings?: ServerActionSettings; /** Sets the PDF Web API service URL */ - serviceUrl?: String; + serviceUrl?: string; + + /** Sets the PDF document path for initial loading. + */ + documentPath?: string; /** Gets the total number of pages in PDF document. */ - pageCount?: Number; + pageCount?: number; - /** Gets the number of the page being displayed in the PDF Viewer. + /** Gets the number of the page being displayed in the PDF viewer. */ - currentPageNumber?: Number; + currentPageNumber?: number; /** Gets the current zoom percentage of the PDF document in viewer. */ - zoomPercentage?: Number; + zoomPercentage?: number; /** Specifies the location of the supporting PDF service */ @@ -39272,52 +41591,74 @@ export interface Model { */ hyperlinkOpenState?: ej.PdfViewer.LinkTarget|string; - /** Enables or disables the responsive support for PDF Viewer control during the window resizing time. + /** Enables or disables the hyperlinks in PDF document. */ - isResponsive?: Boolean; + enableHyperlink?: boolean; + + /** Enables or disables the text selection in PDF document. + */ + enableTextSelection?: boolean; + + /** Enables or disables the responsiveness of the PDF viewer control during the window resize. + */ + isResponsive?: boolean; + + /** Checks whether the PDF document is edited. + */ + isDocumentEdited?: boolean; + + /** Enables or disables the buffering of the PDF pages in the client side. + */ + allowClientBuffering?: boolean; /** Gets the name of the PDF document which loaded in the ejPdfViewer control for downloading. */ fileName?: string; /** Triggers when the PDF document gets loaded and is ready to view in the Control. */ - documentLoad? (e: DocumentLoadEventArgs): void; + documentLoad?(e: DocumentLoadEventArgs): void; /** Triggers when there is change in current page number. */ - pageChange? (e: PageChangeEventArgs): void; + pageChange?(e: PageChangeEventArgs): void; /** Triggers when there is change in the magnification value. */ - zoomChange? (e: ZoomChangeEventArgs): void; + zoomChange?(e: ZoomChangeEventArgs): void; /** Triggers when hyperlink in the PDF Document is clicked */ - hyperlinkClick? (e: HyperlinkClickEventArgs): void; + hyperlinkClick?(e: HyperlinkClickEventArgs): void; /** Triggers before the printing starts. */ - beforePrint? (e: BeforePrintEventArgs): void; + beforePrint?(e: BeforePrintEventArgs): void; /** Triggers after the printing is completed. */ - afterPrint? (e: AfterPrintEventArgs): void; + afterPrint?(e: AfterPrintEventArgs): void; /** Triggers when the mouse click is performed over the page of the PDF document. */ - pageClick? (e: PageClickEventArgs): void; + pageClick?(e: PageClickEventArgs): void; + + /** Triggers when the client buffering process starts. */ + bufferStart?(e: BufferStartEventArgs): void; + + /** Triggers when the client buffering process ends. */ + bufferEnd?(e: BufferEndEventArgs): void; /** Triggers when PDF viewer control is destroyed successfully. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; } export interface DocumentLoadEventArgs { /** true, if the event should be canceled; otherwise, false. */ - Cancel?: boolean; + cancel?: boolean; /** Returns the PDF viewer model */ - Model?: any; + model?: any; /** Returns the name of the event */ - Type?: string; + type?: string; } export interface PageChangeEventArgs { @@ -39434,6 +41775,44 @@ export interface PageClickEventArgs { offsetY?: number; } +export interface BufferStartEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Specifies the state of the buffering + */ + isBuffering?: boolean; +} + +export interface BufferEndEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Specifies the state of the buffering + */ + isBuffering?: boolean; +} + export interface DestroyEventArgs { /** True, if the event should be canceled; otherwise, false. @@ -39453,10 +41832,33 @@ export interface ToolbarSettings { /** Shows or hides the tooltip of the toolbar items. */ - showToolTip?: Boolean; + showToolTip?: boolean; + + /** Shows or hides the grouped items in the toolbar with the help of enum ej.PdfViewer.ToolbarItems + */ + toolbarItem?: ej.PdfViewer.ToolbarItems|string; } -enum ToolbarItems{ +export interface ServerActionSettings { + + /** Specifies the name of the action method used for loading the PDF document. + */ + load?: string; + + /** Specifies the name of the action method used for uploading the PDF document to the PDF viewer control. + */ + fileUpload?: string; + + /** Specifies the name of the action method used for printing the PDF document in the PDF viewer control. + */ + print?: string; + + /** Specifies the name of the action method used for downloading the PDF document from the PDF viewer control. + */ + download?: string; +} + +enum ToolbarItems { ///Shows only magnification tools in the toolbar. MagnificationTools, @@ -39475,7 +41877,7 @@ enum ToolbarItems{ } -enum PdfService{ +enum PdfService { ///Denotes that the service is located in the local project Local, @@ -39485,7 +41887,7 @@ enum PdfService{ } -enum LinkTarget{ +enum LinkTarget { ///Opens the hyperlink in the same tab of the browser. Default, @@ -39501,11 +41903,10 @@ enum LinkTarget{ class SpellCheck extends ej.Widget { static fn: SpellCheck; - constructor(element: JQuery, options?: SpellCheck.Model); - constructor(element: Element, options?: SpellCheck.Model); + constructor(element: JQuery | Element, options?: SpellCheck.Model); static Locale: any; - model:SpellCheck.Model; - defaults:SpellCheck.Model; + model: SpellCheck.Model; + defaults: SpellCheck.Model; /** Open the dialog to correct the spelling of the target content. * @returns {void} @@ -39562,7 +41963,7 @@ class SpellCheck extends ej.Widget { */ addToDictionary(customWord: string): any; } -export module SpellCheck{ +export namespace SpellCheck { export interface Model { @@ -39588,7 +41989,7 @@ export interface Model { /** To ignore the words from the error word consideration. * @Default {[]} */ - ignoreWords?: Array; + ignoreWords?: any[]; /** Holds all options related to the context menu settings of SpellCheck. */ @@ -39598,38 +41999,50 @@ export interface Model { */ ignoreSettings?: IgnoreSettings; + /** When set to true, allows the spellcheck to render based upon screen size. + * @Default {true} + */ + isResponsive?: boolean; + + /** It allows to spell check the multiple target HTML element's texts and correct its error words. + * @Default {null} + */ + controlsToValidate?: string; + /** Triggers on the success of AJAX call request. */ - actionSuccess? (e: ActionSuccessEventArgs): void; + actionSuccess?(e: ActionSuccessEventArgs): void; /** Triggers on the AJAX call request beginning. */ - actionBegin? (e: ActionBeginEventArgs): void; + actionBegin?(e: ActionBeginEventArgs): void; /** Triggers when the AJAX call request failure. */ - actionFailure? (e: ActionFailureEventArgs): void; + actionFailure?(e: ActionFailureEventArgs): void; /** Triggers when the dialog mode spell check starting. */ - start? (e: StartEventArgs): void; + start?(e: StartEventArgs): void; /** Triggers when the spell check operations completed through dialog mode. */ - complete? (e: CompleteEventArgs): void; + complete?(e: CompleteEventArgs): void; /** Triggers before context menu opening. */ - contextOpen? (e: ContextOpenEventArgs): void; + contextOpen?(e: ContextOpenEventArgs): void; /** Triggers when the context menu item clicked. */ - contextClick? (e: ContextClickEventArgs): void; + contextClick?(e: ContextClickEventArgs): void; /** Triggers before the spell check dialog opens. */ - dialogBeforeOpen? (e: DialogBeforeOpenEventArgs): void; - + dialogBeforeOpen?(e: DialogBeforeOpenEventArgs): void; /** Triggers after the spell check dialog opens. */ - dialogOpen? (e: DialogOpenEventArgs): void; + dialogOpen?(e: DialogOpenEventArgs): void; /** Triggers when the spell check dialog closed. */ - dialogClose? (e: DialogCloseEventArgs): void; + dialogClose?(e: DialogCloseEventArgs): void; /** Triggers when the spell check control performing the spell check operations such as ignore, ignoreAll, change, changeAll and addToDictionary. */ - validating? (e: ValidatingEventArgs): void; + validating?(e: ValidatingEventArgs): void; + + /** Triggers before loading the target HTML element text into the dialog sentence area. */ + targetUpdating?(e: TargetUpdatingEventArgs): void; } export interface ActionSuccessEventArgs { @@ -39925,6 +42338,33 @@ export interface ValidatingEventArgs { customWord?: string; } +export interface TargetUpdatingEventArgs { + + /** Returns the previous target element value. + */ + previousElement?: any; + + /** Returns the current target element value. + */ + currentElement?: any; + + /** Returns the target html value. + */ + targetHtml?: string; + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the SpellCheck model. + */ + model?: ej.SpellCheck.Model; + + /** Returns the name of the event. + */ + type?: string; +} + export interface DictionarySettings { /** The dictionaryUrl option accepts string, which is the method path to find the error words and get the suggestions to correct the errors. @@ -39943,10 +42383,11 @@ export interface ContextMenuSettings { */ enable?: boolean; - /** Contains all the default context menu options that are applicable for SpellCheck. It also supports adding custom menu items. All the SpellCheck related context menu items are grouped under this menu collection. + /** Contains all the default context menu options that are applicable for SpellCheck. It also supports adding custom menu items. + * All the SpellCheck related context menu items are grouped under this menu collection. * @Default {{% highlight javascript %}[{ id: IgnoreAll, text: Ignore All },{ id: AddToDictionary, text: Add To Dictionary }]{% endhighlight %}} */ - menuItems?: Array; + menuItems?: any[]; } export interface IgnoreSettings { @@ -39983,18 +42424,174 @@ export interface IgnoreSettings { } } +class DocumentEditor extends ej.Widget { + static fn: DocumentEditor; + constructor(element: JQuery | Element, options?: DocumentEditor.Model); + static Locale: any; + model: DocumentEditor.Model; + defaults: DocumentEditor.Model; + + /** Loads the document from specified path using web API provided by importUrl. + * @param {string} Specifies the file path. + * @returns {void} + */ + load(path: string): void; + + /** Gets the page number of current selection in the document. + * @returns {number} + */ + getCurrentPageNumber(): number; + + /** Gets the total number of pages in the document. + * @returns {number} + */ + getPageCount(): number; + + /** Gets the text of current selection in the document. + * @returns {string} + */ + getSelectedText(): string; + + /** Gets the current zoom factor value of the document editor. + * @returns {number} + */ + getZoomFactor(): number; + + /** Scales the document editor with the specified zoom factor. The range of zoom factor should be 0.10 to 5.00 (10 - 500 %). + * @param {number} Specifies the factor for zooming. + * @returns {void} + */ + setZoomFactor(factor: number): void; + + /** Prints the document content as page by page. + * @returns {void} + */ + print(): void; + + /** Finds the first occurrence of specified text from current selection and highlights the result. If the document end is reached, find operation will occur from the document start position. + * @param {string} Specifies the text to search in a document. + * @returns {void} + */ + find(text: string): void; } -declare module ej.datavisualization { +export namespace DocumentEditor { + +export interface Model { + + /** Gets or sets an object that indicates initialization of importing and exporting documents in document editor. + */ + importExportSettings?: ImportExportSettings; + + /** Triggers when the document changes. */ + onDocumentChange?(e: OnDocumentChangeEventArgs): void; + + /** Triggers when the selection changes. */ + onSelectionChange?(e: OnSelectionChangeEventArgs): void; + + /** Triggers when the zoom factor changes. */ + onZoomFactorChange?(e: OnZoomFactorChangeEventArgs): void; + + /** Triggers when the hyperlink is clicked. */ + onRequestNavigate?(e: OnRequestNavigateEventArgs): void; +} + +export interface OnDocumentChangeEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface OnSelectionChangeEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface OnZoomFactorChangeEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface OnRequestNavigateEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the document editor model. + */ + model?: any; + + /** Returns the link type and navigation link. + */ + hyperlink?: any; + + /** Returns the name of the event. + */ + type?: string; +} + +export interface ImportExportSettings { + + /** Gets or sets URL of Web API that should be used to parse the document while loading. + */ + importUrl?: string; +} +} + +} +declare namespace ej.datavisualization { class SymbolPalette extends ej.Widget { static fn: SymbolPalette; - constructor(element: JQuery, options?: SymbolPalette.Model); - constructor(element: Element, options?: SymbolPalette.Model); + constructor(element: JQuery | Element, options?: SymbolPalette.Model); static Locale: any; - model:SymbolPalette.Model; - defaults:SymbolPalette.Model; + model: SymbolPalette.Model; + defaults: SymbolPalette.Model; + + /** Add items to Palettes at runtime + * @param {string} name of the Palette + * @param {any} JSON for the new items to added in Palette + * @returns {void} + */ + addPaletteItem(paletteName: string, node: any): void; + + /** Remove items to Palettes at runtime + * @param {string} name of the Palette + * @param {any} JSON for the new node to removed in Palette + * @returns {void} + */ + removePaletteItem(paletteName: string, node: any): void; } -export module SymbolPalette{ +export namespace SymbolPalette { export interface Model { @@ -40040,7 +42637,7 @@ export interface Model { /** An array of JSON objects, where each object represents a node/connector * @Default {[]} */ - palettes?: Array; + palettes?: Palette[]; /** Defines the preview height of the symbols * @Default {100} @@ -40068,7 +42665,7 @@ export interface Model { width?: number; /** Triggers when a palette item is selected or unselected */ - selectionChange? (e: SelectionChangeEventArgs): void; + selectionChange?(e: SelectionChangeEventArgs): void; } export interface SelectionChangeEventArgs { @@ -40110,17 +42707,16 @@ export interface Palette { /** Defines the palette items * @Default {[]} */ - items?: Array; + items?: any[]; } } class LinearGauge extends ej.Widget { static fn: LinearGauge; - constructor(element: JQuery, options?: LinearGauge.Model); - constructor(element: Element, options?: LinearGauge.Model); + constructor(element: JQuery | Element, options?: LinearGauge.Model); static Locale: any; - model:LinearGauge.Model; - defaults:LinearGauge.Model; + model: LinearGauge.Model; + defaults: LinearGauge.Model; /** destroy the linear gauge all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -40537,7 +43133,7 @@ class LinearGauge extends ej.Widget { */ setTickYDistanceFromScale(): void; } -export module LinearGauge{ +export namespace LinearGauge { export interface Model { @@ -40624,7 +43220,7 @@ export interface Model { /** Specifies the scales * @Default {null} */ - scales?: Array; + scales?: Scale[]; /** Specifies the theme for Linear gauge. See LinearGauge.Themes * @Default {flatlight} @@ -40652,43 +43248,43 @@ export interface Model { width?: number; /** Triggers while the bar pointer are being drawn on the gauge. */ - drawBarPointers? (e: DrawBarPointersEventArgs): void; + drawBarPointers?(e: DrawBarPointersEventArgs): void; /** Triggers while the customLabel are being drawn on the gauge. */ - drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + drawCustomLabel?(e: DrawCustomLabelEventArgs): void; /** Triggers while the Indicator are being drawn on the gauge. */ - drawIndicators? (e: DrawIndicatorsEventArgs): void; + drawIndicators?(e: DrawIndicatorsEventArgs): void; /** Triggers while the label are being drawn on the gauge. */ - drawLabels? (e: DrawLabelsEventArgs): void; + drawLabels?(e: DrawLabelsEventArgs): void; /** Triggers while the marker are being drawn on the gauge. */ - drawMarkerPointers? (e: DrawMarkerPointersEventArgs): void; + drawMarkerPointers?(e: DrawMarkerPointersEventArgs): void; /** Triggers while the range are being drawn on the gauge. */ - drawRange? (e: DrawRangeEventArgs): void; + drawRange?(e: DrawRangeEventArgs): void; /** Triggers while the ticks are being drawn on the gauge. */ - drawTicks? (e: DrawTicksEventArgs): void; + drawTicks?(e: DrawTicksEventArgs): void; /** Triggers when the gauge is initialized. */ - init? (e: InitEventArgs): void; + init?(e: InitEventArgs): void; /** Triggers while the gauge start to Load. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when the left mouse button is clicked. */ - mouseClick? (e: MouseClickEventArgs): void; + mouseClick?(e: MouseClickEventArgs): void; /** Triggers when clicking and dragging the mouse pointer over the gauge pointer. */ - mouseClickMove? (e: MouseClickMoveEventArgs): void; + mouseClickMove?(e: MouseClickMoveEventArgs): void; /** Triggers when the mouse click is released. */ - mouseClickUp? (e: MouseClickUpEventArgs): void; + mouseClickUp?(e: MouseClickUpEventArgs): void; /** Triggers while the rendering of the gauge completed. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; } export interface DrawBarPointersEventArgs { @@ -41556,7 +44152,7 @@ export interface ScalesIndicator { /** Specifies the state ranges in bar indicators * @Default {Array} */ - stateRanges?: Array; + stateRanges?: ScalesIndicatorsStateRange[]; /** Specifies the textLocation in bar indicators * @Default {null} @@ -41868,7 +44464,7 @@ export interface Scale { /** Specifies the scaleBar Gradient of bar pointer * @Default {Array} */ - barPointers?: Array; + barPointers?: ScalesBarPointer[]; /** Specifies the border of the Scale. * @Default {null} @@ -41878,7 +44474,7 @@ export interface Scale { /** Specifies the customLabel * @Default {Array} */ - customLabels?: Array; + customLabels?: ScalesCustomLabel[]; /** Specifies the scale Direction of the Scale. See Directions * @Default {CounterClockwise} @@ -41888,12 +44484,12 @@ export interface Scale { /** Specifies the indicator * @Default {Array} */ - indicators?: Array; + indicators?: ScalesIndicator[]; /** Specifies the labels. * @Default {Array} */ - labels?: Array; + labels?: ScalesLabel[]; /** Specifies the scaleBar Length. * @Default {290} @@ -41908,7 +44504,7 @@ export interface Scale { /** Specifies the markerPointers * @Default {Array} */ - markerPointers?: Array; + markerPointers?: ScalesMarkerPointer[]; /** Specifies the maximum of the Scale. * @Default {null} @@ -41938,7 +44534,7 @@ export interface Scale { /** Specifies the ranges in the tick. * @Default {Array} */ - ranges?: Array; + ranges?: ScalesRange[]; /** Specifies the shadowOffset. * @Default {0} @@ -41983,7 +44579,7 @@ export interface Scale { /** Specifies the ticks in the scale. * @Default {Array} */ - ticks?: Array; + ticks?: ScalesTick[]; /** Specifies the scaleBar type .See ScaleType * @Default {Rectangle} @@ -42014,10 +44610,8 @@ export interface Tooltip { templateID?: string; } } -module LinearGauge -{ -enum OuterCustomLabelPosition -{ +namespace LinearGauge { +enum OuterCustomLabelPosition { //string Left, //string @@ -42028,10 +44622,8 @@ Top, Bottom, } } -module LinearGauge -{ -enum FontStyle -{ +namespace LinearGauge { +enum FontStyle { //string Bold, //string @@ -42044,20 +44636,16 @@ Strikeout, Underline, } } -module LinearGauge -{ -enum Direction -{ +namespace LinearGauge { +enum Direction { //string Clockwise, //string CounterClockwise, } } -module LinearGauge -{ -enum IndicatorTypes -{ +namespace LinearGauge { +enum IndicatorTypes { //string Rectangle, //string @@ -42068,10 +44656,8 @@ RoundedRectangle, Text, } } -module LinearGauge -{ -enum PointerPlacement -{ +namespace LinearGauge { +enum PointerPlacement { //string Near, //string @@ -42080,30 +44666,24 @@ Far, Center, } } -module LinearGauge -{ -enum ScaleType -{ +namespace LinearGauge { +enum ScaleType { //string Major, //string Minor, } } -module LinearGauge -{ -enum UnitTextPlacement -{ +namespace LinearGauge { +enum UnitTextPlacement { //string Back, //string From, } } -module LinearGauge -{ -enum MarkerType -{ +namespace LinearGauge { +enum MarkerType { //string Rectangle, //string @@ -42130,20 +44710,16 @@ Trapezoid, RoundedRectangle, } } -module LinearGauge -{ -enum TicksType -{ +namespace LinearGauge { +enum TicksType { //string Majorinterval, //string Minorinterval, } } -module LinearGauge -{ -enum Themes -{ +namespace LinearGauge { +enum Themes { //string FlatLight, //string @@ -42153,11 +44729,10 @@ FlatDark, class CircularGauge extends ej.Widget { static fn: CircularGauge; - constructor(element: JQuery, options?: CircularGauge.Model); - constructor(element: Element, options?: CircularGauge.Model); + constructor(element: JQuery | Element, options?: CircularGauge.Model); static Locale: any; - model:CircularGauge.Model; - defaults:CircularGauge.Model; + model: CircularGauge.Model; + defaults: CircularGauge.Model; /** destroy the circular gauge widget. all events bound using this._on will be unbind automatically and bring the control to pre-init state. * @returns {void} @@ -42579,7 +45154,7 @@ class CircularGauge extends ej.Widget { */ setTickWidth(): void; } -export module CircularGauge{ +export namespace CircularGauge { export interface Model { @@ -42661,7 +45236,7 @@ export interface Model { /** Specify the pointers, ticks, labels, indicators, ranges of circular gauge * @Default {null} */ - scales?: Array; + scales?: Scale[]; /** Specify the theme of circular gauge. * @Default {flatlight} @@ -42684,40 +45259,40 @@ export interface Model { width?: number; /** Triggers while the custom labels are being drawn on the gauge. */ - drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + drawCustomLabel?(e: DrawCustomLabelEventArgs): void; /** Triggers while the indicators are being started to drawn on the gauge. */ - drawIndicators? (e: DrawIndicatorsEventArgs): void; + drawIndicators?(e: DrawIndicatorsEventArgs): void; /** Triggers while the labels are being drawn on the gauge. */ - drawLabels? (e: DrawLabelsEventArgs): void; + drawLabels?(e: DrawLabelsEventArgs): void; /** Triggers while the pointer cap is being drawn on the gauge. */ - drawPointerCap? (e: DrawPointerCapEventArgs): void; + drawPointerCap?(e: DrawPointerCapEventArgs): void; /** Triggers while the pointers are being drawn on the gauge. */ - drawPointers? (e: DrawPointersEventArgs): void; + drawPointers?(e: DrawPointersEventArgs): void; /** Triggers when the ranges begin to be getting drawn on the gauge. */ - drawRange? (e: DrawRangeEventArgs): void; + drawRange?(e: DrawRangeEventArgs): void; /** Triggers while the ticks are being drawn on the gauge. */ - drawTicks? (e: DrawTicksEventArgs): void; + drawTicks?(e: DrawTicksEventArgs): void; /** Triggers while the gauge start to Load. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when the left mouse button is clicked. */ - mouseClick? (e: MouseClickEventArgs): void; + mouseClick?(e: MouseClickEventArgs): void; /** Triggers when clicking and dragging the mouse pointer over the gauge pointer. */ - mouseClickMove? (e: MouseClickMoveEventArgs): void; + mouseClickMove?(e: MouseClickMoveEventArgs): void; /** Triggers when the mouse click is released. */ - mouseClickUp? (e: MouseClickUpEventArgs): void; + mouseClickUp?(e: MouseClickUpEventArgs): void; /** Triggers when the rendering of the gauge is completed. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; } export interface DrawCustomLabelEventArgs { @@ -43438,7 +46013,7 @@ export interface ScalesIndicator { /** Specify the various states of circular gauge * @Default {Array} */ - stateRanges?: Array; + stateRanges?: ScalesIndicatorsStateRange[]; /** Specify indicator style of circular gauge. See IndicatorType * @Default {Circle} @@ -43871,17 +46446,17 @@ export interface Scale { /** Specify the custom labels for the scales. * @Default {Array} */ - customLabels?: Array; + customLabels?: ScalesCustomLabel[]; /** Specify representing state of circular gauge * @Default {Array} */ - indicators?: Array; + indicators?: ScalesIndicator[]; /** Specify the text values displayed in a meaningful manner alongside the ticks of circular gauge * @Default {Array} */ - labels?: Array; + labels?: ScalesLabel[]; /** Specify majorIntervalValue of circular gauge * @Default {10} @@ -43916,7 +46491,7 @@ export interface Scale { /** Specify pointers value of circular gauge * @Default {Array} */ - pointers?: Array; + pointers?: ScalesPointer[]; /** Specify scale radius of circular gauge * @Default {170} @@ -43926,7 +46501,7 @@ export interface Scale { /** Specify ranges value of circular gauge * @Default {Array} */ - ranges?: Array; + ranges?: ScalesRange[]; /** Specify shadowOffset value of circular gauge * @Default {0} @@ -43976,7 +46551,7 @@ export interface Scale { /** Specify subGauge of circular gauge * @Default {Array} */ - subGauges?: Array; + subGauges?: ScalesSubGauge[]; /** Specify sweepAngle of circular gauge * @Default {310} @@ -43986,7 +46561,7 @@ export interface Scale { /** Specify ticks of circular gauge * @Default {Array} */ - ticks?: Array; + ticks?: ScalesTick[]; } export interface Tooltip { @@ -44007,20 +46582,16 @@ export interface Tooltip { templateID?: string; } } -module CircularGauge -{ -enum FrameType -{ +namespace CircularGauge { +enum FrameType { //string FullCircle, //string HalfCircle, } } -module CircularGauge -{ -enum gaugePosition -{ +namespace CircularGauge { +enum gaugePosition { //string TopLeft, //string @@ -44041,10 +46612,8 @@ BottomRight, BottomCenter, } } -module CircularGauge -{ -enum CustomLabelPositionType -{ +namespace CircularGauge { +enum CustomLabelPositionType { //string Top, //string @@ -44055,20 +46624,16 @@ Right, Left, } } -module CircularGauge -{ -enum Direction -{ +namespace CircularGauge { +enum Direction { //string Clockwise, //string CounterClockwise, } } -module CircularGauge -{ -enum IndicatorTypes -{ +namespace CircularGauge { +enum IndicatorTypes { //string Rectangle, //string @@ -44081,40 +46646,32 @@ RoundedRectangle, Image, } } -module CircularGauge -{ -enum Placement -{ +namespace CircularGauge { +enum Placement { //string Near, //string Far, } } -module CircularGauge -{ -enum LabelType -{ +namespace CircularGauge { +enum LabelType { //string Major, //string Minor, } } -module CircularGauge -{ -enum UnitTextPlacement -{ +namespace CircularGauge { +enum UnitTextPlacement { //string Back, //string Front, } } -module CircularGauge -{ -enum MarkerType -{ +namespace CircularGauge { +enum MarkerType { //string Rectangle, //string @@ -44141,10 +46698,8 @@ RoundedRectangle, Image, } } -module CircularGauge -{ -enum NeedleType -{ +namespace CircularGauge { +enum NeedleType { //string Triangle, //string @@ -44157,10 +46712,8 @@ Image, Trapezoid, } } -module CircularGauge -{ -enum PointerType -{ +namespace CircularGauge { +enum PointerType { //string Needle, //string @@ -44170,11 +46723,10 @@ Marker, class DigitalGauge extends ej.Widget { static fn: DigitalGauge; - constructor(element: JQuery, options?: DigitalGauge.Model); - constructor(element: Element, options?: DigitalGauge.Model); + constructor(element: JQuery | Element, options?: DigitalGauge.Model); static Locale: any; - model:DigitalGauge.Model; - defaults:DigitalGauge.Model; + model: DigitalGauge.Model; + defaults: DigitalGauge.Model; /** To destroy the digital gauge * @returns {void} @@ -44219,7 +46771,7 @@ class DigitalGauge extends ej.Widget { */ setValue(itemIndex: number, value: string): void; } -export module DigitalGauge{ +export namespace DigitalGauge { export interface Model { @@ -44241,7 +46793,7 @@ export interface Model { /** Specifies the items for the DigitalGauge. * @Default {null} */ - items?: Array; + items?: Item[]; /** Specifies the matrixSegmentData for the DigitalGauge. */ @@ -44267,16 +46819,16 @@ export interface Model { width?: number; /** Triggers when the gauge is initialized. */ - init? (e: InitEventArgs): void; + init?(e: InitEventArgs): void; /** Triggers when the gauge item rendering. */ - itemRendering? (e: ItemRenderingEventArgs): void; + itemRendering?(e: ItemRenderingEventArgs): void; /** Triggers when the gauge is start to load. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Triggers when the gauge render is completed. */ - renderComplete? (e: RenderCompleteEventArgs): void; + renderComplete?(e: RenderCompleteEventArgs): void; } export interface InitEventArgs { @@ -44555,10 +47107,8 @@ export interface Item { value?: string; } } -module DigitalGauge -{ -enum CharacterType -{ +namespace DigitalGauge { +enum CharacterType { //string SevenSegment, //string @@ -44571,10 +47121,8 @@ EightCrossEightDotMatrix, EightCrossEightSquareMatrix, } } -module DigitalGauge -{ -enum FontStyle -{ +namespace DigitalGauge { +enum FontStyle { //string Normal, //string @@ -44590,14 +47138,14 @@ Strikeout, class Chart extends ej.Widget { static fn: Chart; - constructor(element: JQuery, options?: Chart.Model); - constructor(element: Element, options?: Chart.Model); + constructor(element: JQuery | Element, options?: Chart.Model); static Locale: any; - model:Chart.Model; - defaults:Chart.Model; + model: Chart.Model; + defaults: Chart.Model; /** Animates the series and/or indicators in Chart. When parameter is not passed to this method, then all the series and indicators present in Chart are animated. - * @param {any} If an array collection is passed as parameter, series and indicator objects passed in array collection are animated.ExampleIf a series or indicator object is passed to this method, then the specific series or indicator is animated.Example, + * @param {any} If an array collection is passed as parameter, series and indicator objects passed in array collection are animated.ExampleIf a series + * or indicator object is passed to this method, then the specific series or indicator is animated.Example, * @returns {void} */ animate(options: any): void; @@ -44605,7 +47153,8 @@ class Chart extends ej.Widget { /** Exports chart as an image or to an excel file. Chart can be exported as an image only when exportCanvasRendering option is set to true. * @param {string} Type of the export operation to be performed. Following are the two export types that are supported now,1. 'image'2. 'excel'Example * @param {string} URL of the service, where the chart will be exported to excel.Example, - * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. This is an optional parameter. By default, it is false.Example, + * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. + * This is an optional parameter. By default, it is false.Example, * @returns {any} */ export(type: string, URL: string, exportMultipleChart: boolean): any; @@ -44615,13 +47164,13 @@ class Chart extends ej.Widget { */ redraw(): void; } -export module Chart{ +export namespace Chart { export interface Model { /** Options for adding and customizing annotations in Chart. */ - annotations?: Array; + annotations?: Annotation[]; /** URL of the image to be used as chart background. * @Default {null} @@ -44642,7 +47191,7 @@ export interface Model { /** Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. */ - columnDefinitions?: Array; + columnDefinitions?: ColumnDefinition[]; /** Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. */ @@ -44667,6 +47216,12 @@ export interface Model { */ enableCanvasRendering?: boolean; + /** Controls whether the series has to be rendered at initial loading of chart, this will be useful in scenarios where chart is placed at the bottom of the web page + * and we need to render the series only when the chart is visible while scrolling to the top. + * @Default {true} + */ + initSeriesRender?: boolean; + /** Controls whether 3D view has to be rotated on dragging. This property is applicable only for 3D view. * @Default {false} */ @@ -44674,7 +47229,7 @@ export interface Model { /** Options to customize the technical indicators. */ - indicators?: Array; + indicators?: Indicator[]; /** Controls whether Chart has to be responsive while resizing. * @Default {false} @@ -44685,7 +47240,8 @@ export interface Model { */ legend?: Legend; - /** Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are not localized automatically. Provide localized text as value to string type properties. + /** Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are + * not localized automatically. Provide localized text as value to string type properties. * @Default {en-US} */ locale?: string; @@ -44693,26 +47249,32 @@ export interface Model { /** Palette is used to store the series fill color in array and apply the color to series collection in the order of series index. * @Default {null} */ - palette?: Array; + palette?: any[]; /** Options to customize the left, right, top and bottom margins of chart area. */ Margin?: any; - /** Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased.This property is applicable only when 3D view is enabled + /** Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased. + * This property is applicable only when 3D view is enabled * @Default {90} */ perspectiveAngle?: number; - /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + /** This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. + * To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. + * Then, assign the name to the series’s xAxisName property to link both axis and series. */ primaryXAxis?: PrimaryXAxis; - /** To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + /** To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. + * Then, assign the name to the series’s xAxisName property to link both axis and series. */ - axes?: Array; + axes?: Axis[]; - /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + /** This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. + * To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. + * Then, assign the name to the series’s yAxisName property to link both axis and series. */ primaryYAxis?: PrimaryYAxis; @@ -44723,11 +47285,11 @@ export interface Model { /** Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. */ - rowDefinitions?: Array; + rowDefinitions?: RowDefinition[]; /** Specifies the properties used for customizing the series. */ - series?: Array; + series?: Series[]; /** Controls whether data points has to be displayed side by side or along the depth of the axis. * @Default {false} @@ -44762,112 +47324,116 @@ export interface Model { zooming?: Zooming; /** Fires after the series animation is completed. This event will be triggered for each series when animation is enabled. */ - animationComplete? (e: AnimationCompleteEventArgs): void; + animationComplete?(e: AnimationCompleteEventArgs): void; /** Fires before rendering the labels. This event is fired for each label in axis. You can use this event to add custom text to axis labels. */ - axesLabelRendering? (e: AxesLabelRenderingEventArgs): void; + axesLabelRendering?(e: AxesLabelRenderingEventArgs): void; /** Fires during the initialization of axis labels. */ - axesLabelsInitialize? (e: AxesLabelsInitializeEventArgs): void; + axesLabelsInitialize?(e: AxesLabelsInitializeEventArgs): void; /** Fires during axes range calculation. This event is fired for each axis present in Chart. You can use this event to customize axis range as required. */ - axesRangeCalculate? (e: AxesRangeCalculateEventArgs): void; + axesRangeCalculate?(e: AxesRangeCalculateEventArgs): void; /** Fires before rendering the axis title. This event is triggered for each axis with title. You can use this event to add custom text to axis title. */ - axesTitleRendering? (e: AxesTitleRenderingEventArgs): void; + axesTitleRendering?(e: AxesTitleRenderingEventArgs): void; /** Fires during the calculation of chart area bounds. You can use this event to customize the bounds of chart area. */ - chartAreaBoundsCalculate? (e: ChartAreaBoundsCalculateEventArgs): void; + chartAreaBoundsCalculate?(e: ChartAreaBoundsCalculateEventArgs): void; /** Fires after chart is created. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; /** Fires when chart is destroyed completely. */ - destroy? (e: DestroyEventArgs): void; + destroy?(e: DestroyEventArgs): void; /** Fires before rendering the data labels. This event is triggered for each data label in the series. You can use this event to add custom text in data labels. */ - displayTextRendering? (e: DisplayTextRenderingEventArgs): void; + displayTextRendering?(e: DisplayTextRenderingEventArgs): void; /** Fires during the calculation of legend bounds. You can use this event to customize the bounds of legend. */ - legendBoundsCalculate? (e: LegendBoundsCalculateEventArgs): void; + legendBoundsCalculate?(e: LegendBoundsCalculateEventArgs): void; /** Fires on clicking the legend item. */ - legendItemClick? (e: LegendItemClickEventArgs): void; + legendItemClick?(e: LegendItemClickEventArgs): void; /** Fires when moving mouse over legend item. You can use this event for hit testing on legend items. */ - legendItemMouseMove? (e: LegendItemMouseMoveEventArgs): void; + legendItemMouseMove?(e: LegendItemMouseMoveEventArgs): void; /** Fires before rendering the legend item. This event is fired for each legend item in Chart. You can use this event to customize legend item shape or add custom text to legend item. */ - legendItemRendering? (e: LegendItemRenderingEventArgs): void; + legendItemRendering?(e: LegendItemRenderingEventArgs): void; /** Fires before loading the chart. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; + + /** Fires after selected the data in chart. */ + rangeSelected?(e: RangeSelectedEventArgs): void; /** Fires on clicking a point in chart. You can use this event to handle clicks made on points. */ - pointRegionClick? (e: PointRegionClickEventArgs): void; + pointRegionClick?(e: PointRegionClickEventArgs): void; /** Fires when mouse is moved over a point. */ - pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; /** Fires before rendering chart. */ - preRender? (e: PreRenderEventArgs): void; + preRender?(e: PreRenderEventArgs): void; /** Fires after selecting a series. This event is triggered after selecting a series only if selection mode is series. */ - seriesRegionClick? (e: SeriesRegionClickEventArgs): void; + seriesRegionClick?(e: SeriesRegionClickEventArgs): void; /** Fires before rendering a series. This event is fired for each series in Chart. */ - seriesRendering? (e: SeriesRenderingEventArgs): void; + seriesRendering?(e: SeriesRenderingEventArgs): void; /** Fires before rendering the marker symbols. This event is triggered for each marker in Chart. */ - symbolRendering? (e: SymbolRenderingEventArgs): void; + symbolRendering?(e: SymbolRenderingEventArgs): void; /** Fires before rendering the Chart title. You can use this event to add custom text in Chart title. */ - titleRendering? (e: TitleRenderingEventArgs): void; + titleRendering?(e: TitleRenderingEventArgs): void; /** Fires before rendering the tooltip. This event is fired when tooltip is enabled and mouse is hovered on a Chart point. You can use this event to customize tooltip before rendering. */ - toolTipInitialize? (e: ToolTipInitializeEventArgs): void; + toolTipInitialize?(e: ToolTipInitializeEventArgs): void; /** Fires before rendering crosshair tooltip in axis. This event is fired for each axis with crosshair label enabled. You can use this event to customize crosshair label before rendering */ - trackAxisToolTip? (e: TrackAxisToolTipEventArgs): void; + trackAxisToolTip?(e: TrackAxisToolTipEventArgs): void; - /** Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. You can use this event to customize the text displayed in trackball tooltip. */ - trackToolTip? (e: TrackToolTipEventArgs): void; + /** Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. + * You can use this event to customize the text displayed in trackball tooltip. */ + trackToolTip?(e: TrackToolTipEventArgs): void; /** Fires, on clicking the axis label. */ - axisLabelClick? (e: AxisLabelClickEventArgs): void; + axisLabelClick?(e: AxisLabelClickEventArgs): void; /** Fires on moving mouse over the axis label. */ - axisLabelMouseMove? (e: AxisLabelMouseMoveEventArgs): void; + axisLabelMouseMove?(e: AxisLabelMouseMoveEventArgs): void; /** Fires, on the clicking the chart. */ - chartClick? (e: ChartClickEventArgs): void; + chartClick?(e: ChartClickEventArgs): void; /** Fires on moving mouse over the chart. */ - chartMouseMove? (e: ChartMouseMoveEventArgs): void; + chartMouseMove?(e: ChartMouseMoveEventArgs): void; /** Fires, on double clicking the chart. */ - chartDoubleClick? (e: ChartDoubleClickEventArgs): void; + chartDoubleClick?(e: ChartDoubleClickEventArgs): void; /** Fires on clicking the annotation. */ - annotationClick? (e: AnnotationClickEventArgs): void; + annotationClick?(e: AnnotationClickEventArgs): void; /** Fires, after the chart is resized. */ - afterResize? (e: AfterResizeEventArgs): void; + afterResize?(e: AfterResizeEventArgs): void; /** Fires, when chart size is changing. */ - beforeResize? (e: BeforeResizeEventArgs): void; + beforeResize?(e: BeforeResizeEventArgs): void; /** Fires, when error bar is rendering. */ - errorBarRendering? (e: ErrorBarRenderingEventArgs): void; + errorBarRendering?(e: ErrorBarRenderingEventArgs): void; /** Trigger, after the scrollbar position is changed. */ - scrollChanged? (e: ScrollChangedEventArgs): void; + scrollChanged?(e: ScrollChangedEventArgs): void; /** Event triggered when scroll starts */ - scrollStart? (e: ScrollStartEventArgs): void; + scrollStart?(e: ScrollStartEventArgs): void; /** Event triggered when scroll end */ - scrollEnd? (e: ScrollEndEventArgs): void; + scrollEnd?(e: ScrollEndEventArgs): void; } export interface AnimationCompleteEventArgs { @@ -45146,7 +47712,7 @@ export interface LegendItemClickEventArgs { */ LegendItem?: any; - /** Options to customize the legend item styles such as border, color, size, etc…, + /** Options to customize the legend item styles such as border, color, size, etc…, */ style?: any; @@ -45189,11 +47755,11 @@ export interface LegendItemMouseMoveEventArgs { */ LegendItem?: any; - /** Options to customize the legend item styles such as border, color, size, etc…, + /** Options to customize the legend item styles such as border, color, size, etc…, */ style?: any; - /** Options to customize the legend item styles such as border, color, size, etc…, + /** Options to customize the legend item styles such as border, color, size, etc…, */ Bounds?: any; @@ -45256,6 +47822,25 @@ export interface LoadEventArgs { type?: string; } +export interface RangeSelectedEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the chart model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** Selected data collection of object + */ + data?: any; +} + export interface PointRegionClickEventArgs { /** Set this option to true to cancel the event @@ -45954,7 +48539,8 @@ export interface Annotation { */ visible?: boolean; - /** Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property or primary X axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. + /** Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property + * or primary X axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. * @Default {0} */ x?: number; @@ -45963,7 +48549,8 @@ export interface Annotation { */ xAxisName?: string; - /** Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with yAxisName property or primary Y axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. + /** Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with + * yAxisName property or primary Y axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. * @Default {0} */ y?: number; @@ -46290,7 +48877,7 @@ export interface CommonSeriesOptionsMarkerDataLabel { */ shape?: ej.datavisualization.Chart.Shape|string; - /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. */ template?: string; @@ -46342,7 +48929,7 @@ export interface CommonSeriesOptionsMarker { */ fill?: string; - /** The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + /** The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. */ imageUrl?: string; @@ -46366,6 +48953,31 @@ export interface CommonSeriesOptionsMarker { visible?: boolean; } +export interface CommonSeriesOptionsOutlierSettingsSize { + + /** Height of the outlier shape. + * @Default {6} + */ + height?: number; + + /** Width of the outlier shape. + * @Default {6} + */ + width?: number; +} + +export interface CommonSeriesOptionsOutlierSettings { + + /** Specifies the shape of the outlier. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the outlier shape. + */ + size?: CommonSeriesOptionsOutlierSettingsSize; +} + export interface CommonSeriesOptionsCornerRadius { /** Specifies the radius for the top left corner. @@ -46443,7 +49055,7 @@ export interface CommonSeriesOptionsTooltip { */ opacity?: number; - /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. * @Default {null} */ template?: string; @@ -46517,6 +49129,19 @@ export interface CommonSeriesOptionsConnectorLine { opacity?: number; } +export interface CommonSeriesOptionsDragSettings { + + /** drag/drop the series + * @Default {false} + */ + enable?: boolean; + + /** Specifies the type of drag settings. + * @Default {xy} + */ + type?: string; +} + export interface CommonSeriesOptionsErrorBarCap { /** Show/Hides the error bar cap. @@ -46535,7 +49160,7 @@ export interface CommonSeriesOptionsErrorBarCap { length?: number; /** Color of the error bar cap. - * @Default {“#000000”} + * @Default {“#000000”} */ fill?: string; } @@ -46793,6 +49418,10 @@ export interface CommonSeriesOptions { */ visibleOnLegend?: string; + /** Group of the stacking collection series. + */ + stackingGroup?: string; + /** Pattern of dashes and gaps used to stroke all the line type series. */ dashArray?: string; @@ -46891,11 +49520,21 @@ export interface CommonSeriesOptions { */ isTransposed?: boolean; + /** Render the x mark in the center of the box and whisker series type.x represents the average value of the box and whisker series. + * @Default {true} + */ + showMedian?: boolean; + /** Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. * @Default {inside. See LabelPosition} */ labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + /** Quartile calculation has been performed in three different formulas to render the box and whisker series. + * @Default {exclusive} + */ + boxPlotMode?: ej.datavisualization.Chart.boxPlotMode|string; + /** Specifies the line cap of the series. * @Default {butt. See LineCap} */ @@ -46915,6 +49554,10 @@ export interface CommonSeriesOptions { */ opacity?: number; + /** Options for customizing the outlier of the series. + */ + outlierSettings?: CommonSeriesOptionsOutlierSettings; + /** Name of a field in data source, where the fill color for all the data points is generated. */ palette?: string; @@ -47015,13 +49658,17 @@ export interface CommonSeriesOptions { */ connectorLine?: CommonSeriesOptionsConnectorLine; + /** Options to customize the drag and drop in series. + */ + dragSettings?: CommonSeriesOptionsDragSettings; + /** Options to customize the error bar in series. */ errorBar?: CommonSeriesOptionsErrorBar; /** Option to add the trendlines to chart. */ - trendlines?: Array; + trendlines?: CommonSeriesOptionsTrendline[]; /** Options for customizing the appearance of the series or data point while highlighting. */ @@ -47255,7 +49902,7 @@ export interface IndicatorsTooltip { */ enableAnimation?: boolean; - /** Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + /** Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. * @Default {#point.x# : #point.y#} */ format?: string; @@ -47669,6 +50316,10 @@ export interface PrimaryXAxisAxisLine { */ visible?: boolean; + /** Default Value + */ + color?: string; + /** Width of axis line. * @Default {1} */ @@ -47996,7 +50647,8 @@ export interface PrimaryXAxisStripLine { */ width?: number; - /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered under the series and when it is “over”, it is rendered above the series. + /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered + * under the series and when it is “over”, it is rendered above the series. * @Default {over. See ZIndex} */ zIndex?: ej.datavisualization.Chart.ZIndex|string; @@ -48090,17 +50742,19 @@ export interface PrimaryXAxis { */ alternateGridBand?: PrimaryXAxisAlternateGridBand; - /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. + /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. + * If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. * @Default {null} */ crossesAt?: number; - /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, then primary X axis or primary Y axis will be used for crossing + /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. + * If the provided name does not belongs to a valid axis, then primary X axis or primary Y axis will be used for crossing * @Default {null} */ crossesInAxis?: string; - /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. + /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. * @Default {false} */ isIndexed?: boolean; @@ -48250,12 +50904,12 @@ export interface PrimaryXAxis { /** Options for customizing the multi level labels. * @Default {[ ]} */ - multiLevelLabels?: Array; + multiLevelLabels?: PrimaryXAxisMultiLevelLabel[]; /** Options for customizing the strip lines. * @Default {[ ]} */ - stripLine?: Array; + stripLine?: PrimaryXAxisStripLine[]; /** Specifies the position of the axis tick lines. * @Default {outside. See TickLinesPosition} @@ -48345,6 +50999,10 @@ export interface AxesAxisLine { */ visible?: boolean; + /** Color of axis line. + */ + color?: string; + /** Width of axis line. * @Default {1} */ @@ -48672,7 +51330,8 @@ export interface AxesStripLine { */ width?: number; - /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered under the series and when it is “over”, it is rendered above the series. + /** Specifies the order where the strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered under the series and when it is “over”, + * it is rendered above the series. * @Default {over. See ZIndex} */ zIndex?: ej.datavisualization.Chart.ZIndex|string; @@ -48766,12 +51425,13 @@ export interface Axis { */ alternateGridBand?: AxesAlternateGridBand; - /** Specifies where axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. + /** Specifies where axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, + * then axis will be placed at the opposite side. * @Default {null} */ crossesAt?: number; - /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. + /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. * @Default {false} */ isIndexed?: boolean; @@ -48921,12 +51581,12 @@ export interface Axis { /** Options for customizing the multi level labels. * @Default {[ ]} */ - multiLevelLabels?: Array; + multiLevelLabels?: AxesMultiLevelLabel[]; /** Options for customizing the strip lines. * @Default {[ ]} */ - stripLine?: Array; + stripLine?: AxesStripLine[]; /** Specifies the position of the axis tick lines. * @Default {outside. See TickLinesPosition} @@ -49016,6 +51676,10 @@ export interface PrimaryYAxisAxisLine { */ visible?: boolean; + /** Color of axis line. + */ + color?: string; + /** Width of axis line. * @Default {1} */ @@ -49318,7 +51982,7 @@ export interface PrimaryYAxisStripLine { */ start?: number; - /** Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. + /** Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. * @Default {false} */ startFromAxis?: boolean; @@ -49343,7 +52007,8 @@ export interface PrimaryYAxisStripLine { */ width?: number; - /** Specifies the order in which strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered below the series and when it is “over”, it is rendered above the series. + /** Specifies the order in which strip line and the series have to be rendered. When Z-order is “behind”, strip line is rendered below the series and + * when it is “over”, it is rendered above the series. * @Default {over. See ZIndex} */ zIndex?: ej.datavisualization.Chart.ZIndex|string; @@ -49441,12 +52106,14 @@ export interface PrimaryYAxis { */ axisLine?: PrimaryYAxisAxisLine; - /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. + /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. + * If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. * @Default {null} */ crossesAt?: number; - /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, then primary X axis or primary Y axis will be used for crossing + /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, + * then primary X axis or primary Y axis will be used for crossing * @Default {null} */ crossesInAxis?: string; @@ -49587,12 +52254,12 @@ export interface PrimaryYAxis { /** Options for customizing the multi level labels. * @Default {[ ]} */ - multiLevelLabels?: Array; + multiLevelLabels?: PrimaryYAxisMultiLevelLabel[]; /** Options for customizing the strip lines. * @Default {[ ]} */ - stripLine?: Array; + stripLine?: PrimaryYAxisStripLine[]; /** Specifies the position of the axis tick lines. * @Default {outside. See TickLinesPosition} @@ -49856,7 +52523,7 @@ export interface SeriesMarkerDataLabel { opacity?: number; /** Background shape of the data label. - * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} */ shape?: ej.datavisualization.Chart.Shape|string; @@ -49879,7 +52546,7 @@ export interface SeriesMarkerDataLabel { */ visible?: boolean; - /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. */ template?: string; @@ -49917,7 +52584,7 @@ export interface SeriesMarker { */ fill?: string; - /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. */ imageUrl?: string; @@ -49941,6 +52608,31 @@ export interface SeriesMarker { visible?: boolean; } +export interface SeriesOutlierSettingsSize { + + /** Height of the outlier shape. + * @Default {6} + */ + height?: number; + + /** Width of the outlier shape. + * @Default {6} + */ + width?: number; +} + +export interface SeriesOutlierSettings { + + /** Specifies the shape of the outlier. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /** Options for customizing the size of the outlier shape. + */ + size?: SeriesOutlierSettingsSize; +} + export interface SeriesEmptyPointSettingsStyleBorder { /** Border color of the empty point. @@ -50004,6 +52696,19 @@ export interface SeriesConnectorLine { opacity?: number; } +export interface SeriesDragSettings { + + /** drag/drop the series + * @Default {false} + */ + enable?: boolean; + + /** Specifies the type of drag settings. + * @Default {xy} + */ + type?: string; +} + export interface SeriesErrorBarCap { /** Show/Hides the error bar cap. @@ -50236,7 +52941,7 @@ export interface SeriesPointsMarkerDataLabel { opacity?: number; /** Background shape of the data label. - * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} */ shape?: ej.datavisualization.Chart.Shape|string; @@ -50255,7 +52960,7 @@ export interface SeriesPointsMarkerDataLabel { */ visible?: boolean; - /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + /** Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. */ template?: string; @@ -50293,7 +52998,7 @@ export interface SeriesPointsMarker { */ fill?: string; - /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + /** The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. */ imageUrl?: string; @@ -50465,7 +53170,7 @@ export interface SeriesTooltip { */ opacity?: number; - /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + /** Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. * @Default {null} */ template?: string; @@ -50667,6 +53372,10 @@ export interface Series { */ columnSpacing?: number; + /** To group the series of stacking collection. + */ + stackingGroup?: string; + /** Pattern of dashes and gaps used to stroke the line type series. */ dashArray?: string; @@ -50765,11 +53474,21 @@ export interface Series { */ isTransposed?: boolean; + /** Render the x mark in the center of the box and whisker series type.x represents the average value of the box and whisker series. + * @Default {true} + */ + showMedian?: boolean; + /** Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. * @Default {inside. See LabelPosition} */ labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + /** Quartile calculation has been performed in three different formulas to render the boxplot series . + * @Default {exclusive} + */ + boxPlotMode?: ej.datavisualization.Chart.LabelPosition|string; + /** Specifies the line cap of the series. * @Default {Butt. See LineCap} */ @@ -50794,6 +53513,10 @@ export interface Series { */ opacity?: number; + /** Options for customizing the outlier of individual series. + */ + outlierSettings?: SeriesOutlierSettings; + /** Name of a field in data source where fill color for all the data points is generated. */ palette?: string; @@ -50816,13 +53539,17 @@ export interface Series { */ connectorLine?: SeriesConnectorLine; + /** Options to customize the drag and drop in series. + */ + dragSettings?: SeriesDragSettings; + /** Options to customize the error bar in series. */ errorBar?: SeriesErrorBar; /** Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. */ - points?: Array; + points?: SeriesPoint[]; /** Specifies the mode of the pyramid series. * @Default {linear} @@ -50919,7 +53646,7 @@ export interface Series { /** Option to add trendlines to chart. */ - trendlines?: Array; + trendlines?: SeriesTrendline[]; /** Options for customizing the appearance of the series or data point while highlighting. */ @@ -51134,13 +53861,11 @@ export interface Zooming { /** To display user specified buttons in zooming toolbar. * @Default {[zoomIn, zoomOut, zoom, pan, reset]} */ - toolbarItems?: Array; + toolbarItems?: any[]; } } -module Chart -{ -enum CoordinateUnit -{ +namespace Chart { +enum CoordinateUnit { //string None, //string @@ -51149,10 +53874,8 @@ Pixels, Points, } } -module Chart -{ -enum HorizontalAlignment -{ +namespace Chart { +enum HorizontalAlignment { //string Left, //string @@ -51161,20 +53884,16 @@ Right, Middle, } } -module Chart -{ -enum Region -{ +namespace Chart { +enum Region { //string Chart, //string Series, } } -module Chart -{ -enum VerticalAlignment -{ +namespace Chart { +enum VerticalAlignment { //string Top, //string @@ -51183,10 +53902,8 @@ Bottom, Middle, } } -module Chart -{ -enum ExportingType -{ +namespace Chart { +enum ExportingType { //string PNG, //string @@ -51201,50 +53918,40 @@ XLSX, SVG, } } -module Chart -{ -enum ExportingOrientation -{ +namespace Chart { +enum ExportingOrientation { //string Portrait, //string Landscape, } } -module Chart -{ -enum ExportingMode -{ +namespace Chart { +enum ExportingMode { //string ServerSide, //string ClientSide, } } -module Chart -{ -enum Unit -{ +namespace Chart { +enum Unit { //string Percentage, //string Pixel, } } -module Chart -{ -enum ColumnFacet -{ +namespace Chart { +enum ColumnFacet { //string Rectangle, //string Cylinder, } } -module Chart -{ -enum DrawType -{ +namespace Chart { +enum DrawType { //string Line, //string @@ -51253,20 +53960,16 @@ Area, Column, } } -module Chart -{ -enum FontStyle -{ +namespace Chart { +enum FontStyle { //string Normal, //string Italic, } } -module Chart -{ -enum FontWeight -{ +namespace Chart { +enum FontWeight { //string Regular, //string @@ -51275,10 +53978,8 @@ Bold, Lighter, } } -module Chart -{ -enum LabelPosition -{ +namespace Chart { +enum LabelPosition { //string Inside, //string @@ -51287,10 +53988,18 @@ Outside, OutsideExtended, } } -module Chart -{ -enum LineCap -{ +namespace Chart { +enum boxPlotMode { +//string +Exclusive, +//string +Inclusive, +//string +Normal, +} +} +namespace Chart { +enum LineCap { //string Butt, //string @@ -51299,10 +54008,8 @@ Round, Square, } } -module Chart -{ -enum LineJoin -{ +namespace Chart { +enum LineJoin { //string Round, //string @@ -51311,20 +54018,16 @@ Bevel, Miter, } } -module Chart -{ -enum ConnectorLineType -{ +namespace Chart { +enum ConnectorLineType { //string Line, //string Bezier, } } -module Chart -{ -enum HorizontalTextAlignment -{ +namespace Chart { +enum HorizontalTextAlignment { //string Center, //string @@ -51333,10 +54036,8 @@ Near, Far, } } -module Chart -{ -enum Shape -{ +namespace Chart { +enum Shape { //string None, //string @@ -51377,10 +54078,8 @@ Image, SeriesType, } } -module Chart -{ -enum TextPosition -{ +namespace Chart { +enum TextPosition { //string Top, //string @@ -51389,10 +54088,8 @@ Bottom, Middle, } } -module Chart -{ -enum VerticalTextAlignment -{ +namespace Chart { +enum VerticalTextAlignment { //string Center, //string @@ -51401,20 +54098,16 @@ Near, Far, } } -module Chart -{ -enum PyramidMode -{ +namespace Chart { +enum PyramidMode { //string Linear, //string Surface, } } -module Chart -{ -enum Type -{ +namespace Chart { +enum Type { //string Area, //string @@ -51471,10 +54164,8 @@ Radar, RangeArea, } } -module Chart -{ -enum EmptyPointMode -{ +namespace Chart { +enum EmptyPointMode { //string Gap, //string @@ -51483,10 +54174,8 @@ Zero, Average, } } -module Chart -{ -enum ErrorBarType -{ +namespace Chart { +enum ErrorBarType { //string FixedValue, //string @@ -51497,10 +54186,8 @@ StandardDeviation, StandardError, } } -module Chart -{ -enum ErrorBarMode -{ +namespace Chart { +enum ErrorBarMode { //string Both, //string @@ -51509,10 +54196,8 @@ Vertical, Horizontal, } } -module Chart -{ -enum ErrorBarDirection -{ +namespace Chart { +enum ErrorBarDirection { //string Both, //string @@ -51521,10 +54206,8 @@ Plus, Minus, } } -module Chart -{ -enum Mode -{ +namespace Chart { +enum Mode { //string Series, //string @@ -51535,20 +54218,16 @@ Cluster, Range, } } -module Chart -{ -enum SelectionType -{ +namespace Chart { +enum SelectionType { //string Single, //string Multiple, } } -module Chart -{ -enum RangeType -{ +namespace Chart { +enum RangeType { //string XY, //string @@ -51557,30 +54236,24 @@ X, Y, } } -module Chart -{ -enum CrosshairMode -{ +namespace Chart { +enum CrosshairMode { //string Float, //string Grouping, } } -module Chart -{ -enum CrosshairType -{ +namespace Chart { +enum CrosshairType { //string Crosshair, //string Trackball, } } -module Chart -{ -enum Alignment -{ +namespace Chart { +enum Alignment { //string Center, //string @@ -51589,10 +54262,8 @@ Near, Far, } } -module Chart -{ -enum Position -{ +namespace Chart { +enum Position { //string Left, //string @@ -51603,10 +54274,8 @@ Top, Bottom, } } -module Chart -{ -enum TextOverflow -{ +namespace Chart { +enum TextOverflow { //string None, //string @@ -51617,20 +54286,16 @@ Wrap, WrapAndTrim, } } -module Chart -{ -enum LabelPlacement -{ +namespace Chart { +enum LabelPlacement { //string OnTicks, //string BetweenTicks, } } -module Chart -{ -enum EdgeLabelPlacement -{ +namespace Chart { +enum EdgeLabelPlacement { //string None, //string @@ -51639,10 +54304,8 @@ Shift, Hide, } } -module Chart -{ -enum IntervalType -{ +namespace Chart { +enum IntervalType { //string Days, //string @@ -51659,10 +54322,8 @@ Months, Years, } } -module Chart -{ -enum LabelIntersectAction -{ +namespace Chart { +enum LabelIntersectAction { //string None, //string @@ -51681,10 +54342,8 @@ Hide, MultipleRows, } } -module Chart -{ -enum LabelAlignment -{ +namespace Chart { +enum LabelAlignment { //string Near, //string @@ -51693,10 +54352,8 @@ Far, Center, } } -module Chart -{ -enum RangePadding -{ +namespace Chart { +enum RangePadding { //string Additional, //string @@ -51707,10 +54364,8 @@ None, Round, } } -module Chart -{ -enum MultiLevelLabelsBorderType -{ +namespace Chart { +enum MultiLevelLabelsBorderType { //string Rectangle, //string @@ -51723,10 +54378,8 @@ Brace, CurlyBrace, } } -module Chart -{ -enum TextAlignment -{ +namespace Chart { +enum TextAlignment { //string MiddleTop, //string @@ -51735,30 +54388,24 @@ MiddleCenter, MiddleBottom, } } -module Chart -{ -enum ZIndex -{ +namespace Chart { +enum ZIndex { //string Inside, //string Over, } } -module Chart -{ -enum TickLinesPosition -{ +namespace Chart { +enum TickLinesPosition { //string Inside, //string Outside, } } -module Chart -{ -enum ValueType -{ +namespace Chart { +enum ValueType { //string Double, //string @@ -51769,10 +54416,8 @@ DateTime, Logarithmic, } } -module Chart -{ -enum Theme -{ +namespace Chart { +enum Theme { //string Azure, //string @@ -51798,18 +54443,17 @@ GradientDark, class RangeNavigator extends ej.Widget { static fn: RangeNavigator; - constructor(element: JQuery, options?: RangeNavigator.Model); - constructor(element: Element, options?: RangeNavigator.Model); + constructor(element: JQuery | Element, options?: RangeNavigator.Model); static Locale: any; - model:RangeNavigator.Model; - defaults:RangeNavigator.Model; + model: RangeNavigator.Model; + defaults: RangeNavigator.Model; /** destroy the range navigator widget * @returns {void} */ _destroy(): void; } -export module RangeNavigator{ +export namespace RangeNavigator { export interface Model { @@ -51828,7 +54472,7 @@ export interface Model { /** Specifies the properties used for customizing the range series. */ - series?: Array; + series?: Series[]; /** Toggles the redrawing of chart on moving the sliders. * @Default {true} @@ -51920,22 +54564,22 @@ export interface Model { yName?: any; /** Fires on load of range navigator. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Fires after range navigator is loaded. */ - loaded? (e: LoadedEventArgs): void; + loaded?(e: LoadedEventArgs): void; /** Fires on changing the range of range navigator. */ - rangeChanged? (e: RangeChangedEventArgs): void; + rangeChanged?(e: RangeChangedEventArgs): void; /** Fires on changing the scrollbar position of range navigator. */ - scrollChanged? (e: ScrollChangedEventArgs): void; + scrollChanged?(e: ScrollChangedEventArgs): void; /** Fires on when starting to change the scrollbar position of range navigator. */ - scrollStart? (e: ScrollStartEventArgs): void; + scrollStart?(e: ScrollStartEventArgs): void; /** Fires on changes ending the scrollbar position of range navigator. */ - scrollEnd? (e: ScrollEndEventArgs): void; + scrollEnd?(e: ScrollEndEventArgs): void; } export interface LoadEventArgs { @@ -52794,10 +55438,8 @@ export interface ValueAxisSettings { visible?: boolean; } } -module RangeNavigator -{ -enum Type -{ +namespace RangeNavigator { +enum Type { //string Area, //string @@ -52812,10 +55454,8 @@ SplineArea, StepLine, } } -module RangeNavigator -{ -enum IntervalType -{ +namespace RangeNavigator { +enum IntervalType { //string Years, //string @@ -52832,30 +55472,24 @@ Hours, Minutes, } } -module RangeNavigator -{ -enum LabelPlacement -{ +namespace RangeNavigator { +enum LabelPlacement { //string Inside, //string Outside, } } -module RangeNavigator -{ -enum Position -{ +namespace RangeNavigator { +enum Position { //string Top, //string Bottom, } } -module RangeNavigator -{ -enum FontStyle -{ +namespace RangeNavigator { +enum FontStyle { //string Normal, //string @@ -52864,20 +55498,16 @@ Bold, Italic, } } -module RangeNavigator -{ -enum FontWeight -{ +namespace RangeNavigator { +enum FontWeight { //string Regular, //string Lighter, } } -module RangeNavigator -{ -enum HorizontalAlignment -{ +namespace RangeNavigator { +enum HorizontalAlignment { //string Middle, //string @@ -52886,10 +55516,8 @@ Left, Right, } } -module RangeNavigator -{ -enum RangePadding -{ +namespace RangeNavigator { +enum RangePadding { //string Additional, //string @@ -52900,10 +55528,8 @@ None, Round, } } -module RangeNavigator -{ -enum ValueType -{ +namespace RangeNavigator { +enum ValueType { //string Numeric, //string @@ -52913,11 +55539,10 @@ DateTime, class BulletGraph extends ej.Widget { static fn: BulletGraph; - constructor(element: JQuery, options?: BulletGraph.Model); - constructor(element: Element, options?: BulletGraph.Model); + constructor(element: JQuery | Element, options?: BulletGraph.Model); static Locale: any; - model:BulletGraph.Model; - defaults:BulletGraph.Model; + model: BulletGraph.Model; + defaults: BulletGraph.Model; /** To destroy the bullet graph * @returns {void} @@ -52939,7 +55564,7 @@ class BulletGraph extends ej.Widget { */ setFeatureMeasureBarValue(): void; } -export module BulletGraph{ +export namespace BulletGraph { export interface Model { @@ -52989,7 +55614,7 @@ export interface Model { /** Contains property to customize the qualitative ranges. */ - qualitativeRanges?: Array; + qualitativeRanges?: QualitativeRange[]; /** Size of the qualitative range depends up on the specified value. * @Default {32} @@ -53005,11 +55630,6 @@ export interface Model { */ quantitativeScaleSettings?: QuantitativeScaleSettings; - /** Contains property to add dataSource and dataSource fields. - * @Default {null} - */ - fields?: any; - /** By specifying this property the user can change the theme of the bullet graph. * @Default {flatlight} */ @@ -53030,28 +55650,28 @@ export interface Model { width?: number; /** Fires on rendering the caption of bullet graph. */ - drawCaption? (e: DrawCaptionEventArgs): void; + drawCaption?(e: DrawCaptionEventArgs): void; /** Fires on rendering the category. */ - drawCategory? (e: DrawCategoryEventArgs): void; + drawCategory?(e: DrawCategoryEventArgs): void; /** Fires on rendering the comparative measure symbol. */ - drawComparativeMeasureSymbol? (e: DrawComparativeMeasureSymbolEventArgs): void; + drawComparativeMeasureSymbol?(e: DrawComparativeMeasureSymbolEventArgs): void; /** Fires on rendering the feature measure bar. */ - drawFeatureMeasureBar? (e: DrawFeatureMeasureBarEventArgs): void; + drawFeatureMeasureBar?(e: DrawFeatureMeasureBarEventArgs): void; /** Fires on rendering the indicator of bullet graph. */ - drawIndicator? (e: DrawIndicatorEventArgs): void; + drawIndicator?(e: DrawIndicatorEventArgs): void; /** Fires on rendering the labels. */ - drawLabels? (e: DrawLabelsEventArgs): void; + drawLabels?(e: DrawLabelsEventArgs): void; /** Fires on rendering the qualitative ranges. */ - drawQualitativeRanges? (e: DrawQualitativeRangesEventArgs): void; + drawQualitativeRanges?(e: DrawQualitativeRangesEventArgs): void; /** Fires on loading bullet graph. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; } export interface DrawCaptionEventArgs { @@ -53188,6 +55808,9 @@ export interface DrawQualitativeRangesEventArgs { } export interface LoadEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface CaptionSettingsFont { @@ -53352,7 +55975,8 @@ export interface CaptionSettingsIndicator { */ textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; - /** Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + /** Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. + * Anchoring is not applicable for float position. * @Default {'start'} */ textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; @@ -53461,7 +56085,8 @@ export interface CaptionSettingsSubTitle { */ textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; - /** Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + /** Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping + * caption group text are at same position. Anchoring is not applicable for float position. * @Default {'start'} */ textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; @@ -53514,7 +56139,8 @@ export interface CaptionSettings { */ textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; - /** Specifies caption text anchoring when caption text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + /** Specifies caption text anchoring when caption text overlaps with other caption group text. + * Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. * @Default {'start'} */ textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; @@ -53751,7 +56377,7 @@ export interface QuantitativeScaleSettings { /** Contains property to customize the featured measure. */ - featureMeasures?: Array; + featureMeasures?: QuantitativeScaleSettingsFeatureMeasure[]; /** Contains property to customize the fields. */ @@ -53827,10 +56453,8 @@ export interface TooltipSettings { visible?: boolean; } } -module BulletGraph -{ -enum FontStyle -{ +namespace BulletGraph { +enum FontStyle { //string Normal, //string @@ -53839,10 +56463,8 @@ Italic, Oblique, } } -module BulletGraph -{ -enum FontWeight -{ +namespace BulletGraph { +enum FontWeight { //string Normal, //string @@ -53853,10 +56475,8 @@ Bolder, Lighter, } } -module BulletGraph -{ -enum TextAlignment -{ +namespace BulletGraph { +enum TextAlignment { //string Near, //string @@ -53865,10 +56485,8 @@ Far, Center, } } -module BulletGraph -{ -enum TextAnchor -{ +namespace BulletGraph { +enum TextAnchor { //string Start, //string @@ -53877,10 +56495,8 @@ Middle, End, } } -module BulletGraph -{ -enum TextPosition -{ +namespace BulletGraph { +enum TextPosition { //string Top, //string @@ -53893,60 +56509,48 @@ Bottom, Float, } } -module BulletGraph -{ -enum FlowDirection -{ +namespace BulletGraph { +enum FlowDirection { //string Forward, //string Backward, } } -module BulletGraph -{ -enum Orientation -{ +namespace BulletGraph { +enum Orientation { //string Horizontal, //string Vertical, } } -module BulletGraph -{ -enum LabelPlacement -{ +namespace BulletGraph { +enum LabelPlacement { //string Inside, //string Outside, } } -module BulletGraph -{ -enum LabelPosition -{ +namespace BulletGraph { +enum LabelPosition { //string Above, //string Below, } } -module BulletGraph -{ -enum TickPlacement -{ +namespace BulletGraph { +enum TickPlacement { //string Inside, //string Outside, } } -module BulletGraph -{ -enum TickPosition -{ +namespace BulletGraph { +enum TickPosition { //string Below, //string @@ -53958,11 +56562,10 @@ Cross, class Barcode extends ej.Widget { static fn: Barcode; - constructor(element: JQuery, options?: Barcode.Model); - constructor(element: Element, options?: Barcode.Model); + constructor(element: JQuery | Element, options?: Barcode.Model); static Locale: any; - model:Barcode.Model; - defaults:Barcode.Model; + model: Barcode.Model; + defaults: Barcode.Model; /** To disable the barcode * @returns {void} @@ -53974,7 +56577,7 @@ class Barcode extends ej.Widget { */ enable(): void; } -export module Barcode{ +export namespace Barcode { export interface Model { @@ -53982,7 +56585,8 @@ export interface Model { */ barcodeToTextGapHeight?: number; - /** Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. Please refer to xDimension for two dimensional barcode height customization. + /** Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. + * Please refer to xDimension for two dimensional barcode height customization. */ barHeight?: number; @@ -53998,7 +56602,8 @@ export interface Model { */ enabled?: boolean; - /** Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. These symbols are optional and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. + /** Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. + * These symbols are optional and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. */ encodeStartStopSymbol?: number; @@ -54006,11 +56611,13 @@ export interface Model { */ lightBarColor?: any; - /** Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on the provided input which can be specified during initialization. + /** Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on + * the provided input which can be specified during initialization. */ narrowBarWidth?: number; - /** Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and stops. The purpose of a quiet zone is to prevent the reader from picking up unrelated information. + /** Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and stops. + * The purpose of a quiet zone is to prevent the reader from picking up unrelated information. */ quietZone?: QuietZone; @@ -54035,7 +56642,7 @@ export interface Model { xDimension?: number; /** Fires after Barcode control is loaded. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; } export interface LoadEventArgs { @@ -54080,10 +56687,8 @@ export interface QuietZone { top?: number; } } -module Barcode -{ -enum SymbologyType -{ +namespace Barcode { +enum SymbologyType { //Represents the QR code QRBarcode, //Represents the Data Matrix barcode @@ -54113,11 +56718,10 @@ Code128C, class Map extends ej.Widget { static fn: Map; - constructor(element: JQuery, options?: Map.Model); - constructor(element: Element, options?: Map.Model); + constructor(element: JQuery | Element, options?: Map.Model); static Locale: any; - model:Map.Model; - defaults:Map.Model; + model: Map.Model; + defaults: Map.Model; /** Method for navigating to specific shape based on latitude, longitude and zoom level. * @param {number} Pass the latitude value for map @@ -54156,7 +56760,7 @@ class Map extends ej.Widget { */ zoom(level: number, isAnimate: boolean): void; } -export module Map{ +export namespace Map { export interface Model { @@ -54205,31 +56809,31 @@ export interface Model { /** Layer for holding the map shapes */ - layers?: Array; + layers?: Layer[]; /** Triggered on selecting the map markers. */ - markerSelected? (e: MarkerSelectedEventArgs): void; + markerSelected?(e: MarkerSelectedEventArgs): void; /** Triggers while leaving the hovered map shape */ - mouseleave? (e: MouseleaveEventArgs): void; + mouseleave?(e: MouseleaveEventArgs): void; /** Triggers while hovering the map shape. */ - mouseover? (e: MouseoverEventArgs): void; + mouseover?(e: MouseoverEventArgs): void; /** Triggers once map render completed. */ - onRenderComplete? (e: OnRenderCompleteEventArgs): void; + onRenderComplete?(e: OnRenderCompleteEventArgs): void; /** Triggers when map panning ends. */ - panned? (e: PannedEventArgs): void; + panned?(e: PannedEventArgs): void; /** Triggered on selecting the map shapes. */ - shapeSelected? (e: ShapeSelectedEventArgs): void; + shapeSelected?(e: ShapeSelectedEventArgs): void; /** Triggered when map is zoomed-in. */ - zoomedIn? (e: ZoomedInEventArgs): void; + zoomedIn?(e: ZoomedInEventArgs): void; /** Triggers when map is zoomed out. */ - zoomedOut? (e: ZoomedOutEventArgs): void; + zoomedOut?(e: ZoomedOutEventArgs): void; } export interface MarkerSelectedEventArgs { @@ -54371,7 +56975,7 @@ export interface LayersBubbleSettingsColorMappingsRangeColorMapping { /** GradientColors in the bubble layer of map. */ - gradientColors?: Array; + gradientColors?: any[]; /** Color of the bubble layer. * @Default {null} @@ -54384,7 +56988,7 @@ export interface LayersBubbleSettingsColorMappings { /** Specifies the range colorMappings in the bubble layer. * @Default {null} */ - rangeColorMapping?: Array; + rangeColorMapping?: LayersBubbleSettingsColorMappingsRangeColorMapping[]; } export interface LayersBubbleSettings { @@ -54445,7 +57049,7 @@ export interface LayersLabelSettings { /** enable or disable the enableSmartLabel property * @Default {false} */ - enableSmartLabel?: Boolean; + enableSmartLabel?: boolean; /** set the labelLength property * @Default {'2'} @@ -54576,7 +57180,7 @@ export interface LayersShapeSettingsColorMappingsRangeColorMapping { /** Specifies the gradientColors in the shape layer of map. * @Default {null} */ - gradientColors?: Array; + gradientColors?: any[]; } export interface LayersShapeSettingsColorMappingsEqualColorMapping { @@ -54597,12 +57201,12 @@ export interface LayersShapeSettingsColorMappings { /** Specifies the range colorMappings in the shape layer of map. * @Default {null} */ - rangeColorMapping?: Array; + rangeColorMapping?: LayersShapeSettingsColorMappingsRangeColorMapping[]; /** Specifies the equalColorMapping in the shape layer of map. * @Default {null} */ - equalColorMapping?: Array; + equalColorMapping?: LayersShapeSettingsColorMappingsEqualColorMapping[]; } export interface LayersShapeSettings { @@ -54725,6 +57329,11 @@ export interface Layer { */ labelSettings?: LayersLabelSettings; + /** Specifies the map view type. + * @Default {'geographic'} + */ + geometryType?: ej.datavisualization.Map.GeometryType|string; + /** Specifies the map type. * @Default {'geometry'} */ @@ -54741,7 +57350,7 @@ export interface Layer { /** Specify markers for shape layer. * @Default {[]} */ - markers?: Array; + markers?: any[]; /** Specifies the map marker template for map layer. * @Default {null} @@ -54751,7 +57360,7 @@ export interface Layer { /** Specify selectedMapShapes for shape layer * @Default {[]} */ - selectedMapShapes?: Array; + selectedMapShapes?: any[]; /** Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. * @Default {default} @@ -54786,10 +57395,8 @@ export interface Layer { urlTemplate?: string; } } -module Map -{ -enum Position -{ +namespace Map { +enum Position { //specifies the none position None, //specifies the topleft position @@ -54812,20 +57419,16 @@ Bottomcenter, Bottomright, } } -module Map -{ -enum LabelOrientation -{ +namespace Map { +enum LabelOrientation { //specifies the horizontal position Horizontal, //specifies the vertical position Vertical, } } -module Map -{ -enum BingMapType -{ +namespace Map { +enum BingMapType { //specifies the aerial type Aerial, //specifies the aerialwithlabel type @@ -54834,20 +57437,24 @@ Aerialwithlabel, Road, } } -module Map -{ -enum LabelSize -{ +namespace Map { +enum LabelSize { //specifies the fixed size Fixed, //specifies the default size Default, } } -module Map -{ -enum LayerType -{ +namespace Map { +enum GeometryType { +//specifies the geographic view of map +Geographic, +//specifies the normal land view of map +Normal, +} +} +namespace Map { +enum LayerType { //specifies the geometry type Geometry, //specifies the osm type @@ -54856,10 +57463,8 @@ Osm, Bing, } } -module Map -{ -enum DockPosition -{ +namespace Map { +enum DockPosition { //specifies the top position Top, //specifies the bottom position @@ -54870,50 +57475,40 @@ Right, Left, } } -module Map -{ -enum LegendIcons -{ +namespace Map { +enum LegendIcons { //specifies the rectangle position Rectangle, //specifies the circle position Circle, } } -module Map -{ -enum Mode -{ +namespace Map { +enum Mode { //specifies the default mode Default, //specifies the interactive mode Interactive, } } -module Map -{ -enum LegendType -{ +namespace Map { +enum LegendType { //specifies the layers type Layers, //specifies the bubbles type Bubbles, } } -module Map -{ -enum SelectionMode -{ +namespace Map { +enum SelectionMode { //specifies the default position Default, //specifies the multiple position Multiple, } } -module Map -{ -enum ColorPalette -{ +namespace Map { +enum ColorPalette { //specifies the palette1 color Palette1, //specifies the palette2 color @@ -54927,18 +57522,17 @@ Custompalette, class TreeMap extends ej.Widget { static fn: TreeMap; - constructor(element: JQuery, options?: TreeMap.Model); - constructor(element: Element, options?: TreeMap.Model); + constructor(element: JQuery | Element, options?: TreeMap.Model); static Locale: any; - model:TreeMap.Model; - defaults:TreeMap.Model; + model: TreeMap.Model; + defaults: TreeMap.Model; /** Method to reload treemap with updated values. * @returns {void} */ refresh(): void; } -export module TreeMap{ +export namespace TreeMap { export interface Model { @@ -54989,6 +57583,16 @@ export interface Model { */ drillDownSelectionColor?: string; + /** Specifies whether datasource is hierarchical or not. + * @Default {false} + */ + isHierarchicalDatasource?: boolean; + + /** Specifies the header for parent item during drilldown. This is applicable only for hierarchical data source. + * @Default {null} + */ + header?: string; + /** Enable/Disable the drillDown for treemap * @Default {false} */ @@ -55017,7 +57621,7 @@ export interface Model { /** Specifies the group color mapping of the treemap * @Default {[]} */ - groupColorMapping?: Array; + groupColorMapping?: GroupColorMapping[]; /** Specifies the legend settings of the treemap */ @@ -55065,7 +57669,7 @@ export interface Model { /** Specifies the rangeColorMapping settings of the treemap * @Default {[]} */ - rangeColorMapping?: Array; + rangeColorMapping?: RangeColorMapping[]; /** Specifies the selection mode of treemap item. Accepted selection mode values are Default and Multiple. * @Default {default} @@ -55099,12 +57703,12 @@ export interface Model { /** Hold the treeMapItems to be displayed in treemap * @Default {[]} */ - treeMapItems?: Array; + treeMapItems?: any[]; /** Specify levels of treemap for grouped visualization of data * @Default {[]} */ - levels?: Array; + levels?: Level[]; /** Specifies the weight value path of the treemap * @Default {null} @@ -55112,7 +57716,7 @@ export interface Model { weightValuePath?: string; /** Triggers on treemap item selected. */ - treeMapItemSelected? (e: TreeMapItemSelectedEventArgs): void; + treeMapItemSelected?(e: TreeMapItemSelectedEventArgs): void; } export interface TreeMapItemSelectedEventArgs { @@ -55163,7 +57767,7 @@ export interface PaletteColorMapping { /** Specifies the colors of the paletteColorMapping * @Default {[]} */ - colors?: Array; + colors?: any[]; } export interface GroupColorMapping { @@ -55282,7 +57886,7 @@ export interface RangeColorMapping { /** specifies the gradient colors for th given range value * @Default {[]} */ - gradientColors?: Array; + gradientColors?: any[]; /** Specifies the from value for rangeColorMapping. * @Default {-1} @@ -55372,10 +57976,8 @@ export interface Level { showLabels?: boolean; } } -module TreeMap -{ -enum DockPosition -{ +namespace TreeMap { +enum DockPosition { //specifies the top position Top, //specifies the bottom position @@ -55386,10 +57988,8 @@ Right, Left, } } -module TreeMap -{ -enum ItemsLayoutMode -{ +namespace TreeMap { +enum ItemsLayoutMode { //specifies the squarified as layout type position Squarified, //specifies the sliceanddicehorizontal as layout type position @@ -55400,10 +58000,8 @@ Sliceanddicevertical, Sliceanddiceauto, } } -module TreeMap -{ -enum Position -{ +namespace TreeMap { +enum Position { //specifies the none position None, //specifies the topleft position @@ -55426,30 +58024,24 @@ Bottomcenter, Bottomright, } } -module TreeMap -{ -enum VisibilityMode -{ +namespace TreeMap { +enum VisibilityMode { //specifies the visible mode Top, //specifies the hide on exceeded length mode Hideonexceededlength, } } -module TreeMap -{ -enum selectionMode -{ +namespace TreeMap { +enum selectionMode { //specifies the default mode Default, //specifies the multiple mode Multiple, } } -module TreeMap -{ -enum groupSelectionMode -{ +namespace TreeMap { +enum groupSelectionMode { //specifies the default mode Default, //specifies the multiple mode @@ -55459,11 +58051,10 @@ Multiple, class Diagram extends ej.Widget { static fn: Diagram; - constructor(element: JQuery, options?: Diagram.Model); - constructor(element: Element, options?: Diagram.Model); + constructor(element: JQuery | Element, options?: Diagram.Model); static Locale: any; - model:Diagram.Model; - defaults:Diagram.Model; + model: Diagram.Model; + defaults: Diagram.Model; /** Add nodes and connectors to diagram at runtime * @param {any} a JSON to define a node/connector or an array of nodes and connector @@ -55478,6 +58069,13 @@ class Diagram extends ej.Widget { */ addLabel(nodeName: string, newLabel: any): void; + /** Add dynamic Lanes to swimlane at runtime + * @param {any} JSON for the new lane to be added + * @param {number} Index value to add the lane in swimlane + * @returns {void} + */ + addLane(lane: any, index: number): void; + /** Add a phase to a swimlane at runtime * @param {string} name of the swimlane to which the phase will be added * @param {any} JSON object to define the phase to be added @@ -55490,7 +58088,7 @@ class Diagram extends ej.Widget { * @param {Array} a collection of ports to be added to the specified node * @returns {void} */ - addPorts(name: string, ports: Array): void; + addPorts(name: string, ports: any[]): void; /** Add the specified node to selection list * @param {any} the node to be selected @@ -55548,7 +58146,7 @@ class Diagram extends ej.Widget { cut(): void; /** Export the diagram as downloadable files or as data - * @param {Diagram.Options} options to export the desired region of diagram to the desired formats.NameTypeDescriptionfileNamestringname of the file to be downloaded.formatstringformat of the exported file/data. See [File Formats](/api/js/global#fileformats).modestringto set whether to export diagram as a file or as raw data. See [Export Modes](/api/js/global#exportmodes).regionstringto set the region of the diagram to be exported. See [Region](/api/js/global#region).boundsobjectto export any custom region of diagram.marginobjectto set margin to the exported data. + * @param {Diagram.Options} options to export the desired region of diagram to the desired formats. * @returns {string} */ exportDiagram(options?: Diagram.Options): string; @@ -55771,12 +58369,12 @@ class Diagram extends ej.Widget { upgrade(data: any): void; /** Used to zoomIn/zoomOut diagram - * @param {any} options to zoom the diagram(zoom factor, zoomIn/zoomOut) + * @param {Diagram.Zoom} options to zoom the diagram(zoom factor, zoomIn/zoomOut) * @returns {void} */ - zoomTo(zoom: any): void; + zoomTo(Zoom?: Diagram.Zoom): void; } -export module Diagram{ +export namespace Diagram { export interface Options { @@ -55803,6 +58401,25 @@ export interface Options { /** to set margin to the exported data. */ margin?: any; + + /** to set stretch to the exported data. + */ + stretch?: string; +} + +export interface Zoom { + + /** Used to increase the zoom-in or zoom-out based on the zoom factor value. + */ + zoomFactor?: number; + + /** Used to zoom-in or zoom-out the diagram. + */ + zoomCommand?: ej.datavisualization.Diagram.ZoomCommand; + + /** Used to zoom-in or zoom-out the diagram based on the point. + */ + focusPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint; } export interface Model { @@ -55828,7 +58445,7 @@ export interface Model { /** A collection of JSON objects where each object represents a connector * @Default {[]} */ - connectors?: Array; + connectors?: Connector[]; /** Binds the custom JSON data with connector properties * @Default {null} @@ -55877,6 +58494,11 @@ export interface Model { */ historyManager?: HistoryManager; + /** Defines the type of the rendering mode of label. + * @Default {Html} + */ + labelRenderingMode?: ej.datavisualization.Diagram.LabelRenderingMode|string; + /** Automatically arranges the nodes and connectors in a predefined manner. */ layout?: Layout; @@ -55889,7 +58511,7 @@ export interface Model { /** Array of JSON objects where each object represents a node * @Default {[]} */ - nodes?: Array; + nodes?: Node[]; /** Binds the custom JSON data with node properties * @Default {null} @@ -55938,94 +58560,94 @@ export interface Model { zoomFactor?: number; /** Triggers When auto scroll is changed */ - autoScrollChange? (e: AutoScrollChangeEventArgs): void; + autoScrollChange?(e: AutoScrollChangeEventArgs): void; /** Triggers when a node, connector or diagram is clicked */ - click? (e: ClickEventArgs): void; + click?(e: ClickEventArgs): void; /** Triggers when the connection is changed */ - connectionChange? (e: ConnectionChangeEventArgs): void; + connectionChange?(e: ConnectionChangeEventArgs): void; /** Triggers when the connector collection is changed */ - connectorCollectionChange? (e: ConnectorCollectionChangeEventArgs): void; + connectorCollectionChange?(e: ConnectorCollectionChangeEventArgs): void; /** Triggers when the connectors' source point is changed */ - connectorSourceChange? (e: ConnectorSourceChangeEventArgs): void; + connectorSourceChange?(e: ConnectorSourceChangeEventArgs): void; /** Triggers when the connectors' target point is changed */ - connectorTargetChange? (e: ConnectorTargetChangeEventArgs): void; + connectorTargetChange?(e: ConnectorTargetChangeEventArgs): void; /** Triggers before opening the context menu */ - contextMenuBeforeOpen? (e: ContextMenuBeforeOpenEventArgs): void; + contextMenuBeforeOpen?(e: ContextMenuBeforeOpenEventArgs): void; /** Triggers when a context menu item is clicked */ - contextMenuClick? (e: ContextMenuClickEventArgs): void; + contextMenuClick?(e: ContextMenuClickEventArgs): void; /** Triggers when a node, connector or diagram model is clicked twice */ - doubleClick? (e: DoubleClickEventArgs): void; + doubleClick?(e: DoubleClickEventArgs): void; /** Triggers while dragging the elements in diagram */ - drag? (e: DragEventArgs): void; + drag?(e: DragEventArgs): void; /** Triggers when a symbol is dragged into diagram from symbol palette */ - dragEnter? (e: DragEnterEventArgs): void; + dragEnter?(e: DragEnterEventArgs): void; /** Triggers when a symbol is dragged outside of the diagram. */ - dragLeave? (e: DragLeaveEventArgs): void; + dragLeave?(e: DragLeaveEventArgs): void; /** Triggers when a symbol is dragged over diagram */ - dragOver? (e: DragOverEventArgs): void; + dragOver?(e: DragOverEventArgs): void; /** Triggers when a symbol is dragged and dropped from symbol palette to drawing area */ - drop? (e: DropEventArgs): void; + drop?(e: DropEventArgs): void; /** Triggers when editor got focus at the time of node's label or text node editing. */ - editorFocusChange? (e: EditorFocusChangeEventArgs): void; + editorFocusChange?(e: EditorFocusChangeEventArgs): void; /** Triggers when a child is added to or removed from a group */ - groupChange? (e: GroupChangeEventArgs): void; + groupChange?(e: GroupChangeEventArgs): void; /** Triggers when a change is reverted or restored(undo/redo) */ - historyChange? (e: HistoryChangeEventArgs): void; + historyChange?(e: HistoryChangeEventArgs): void; /** Triggers when a diagram element is clicked */ - itemClick? (e: ItemClickEventArgs): void; + itemClick?(e: ItemClickEventArgs): void; /** Triggers when mouse enters a node/connector */ - mouseEnter? (e: MouseEnterEventArgs): void; + mouseEnter?(e: MouseEnterEventArgs): void; /** Triggers when mouse leaves node/connector */ - mouseLeave? (e: MouseLeaveEventArgs): void; + mouseLeave?(e: MouseLeaveEventArgs): void; /** Triggers when mouse hovers over a node/connector */ - mouseOver? (e: MouseOverEventArgs): void; + mouseOver?(e: MouseOverEventArgs): void; /** Triggers when node collection is changed */ - nodeCollectionChange? (e: NodeCollectionChangeEventArgs): void; + nodeCollectionChange?(e: NodeCollectionChangeEventArgs): void; /** Triggers when the node properties(x, y,width and height alone) are changed using nudge commands or updateNode API. */ - propertyChange? (e: PropertyChangeEventArgs): void; + propertyChange?(e: PropertyChangeEventArgs): void; /** Triggers when the diagram elements are rotated */ - rotationChange? (e: RotationChangeEventArgs): void; + rotationChange?(e: RotationChangeEventArgs): void; /** Triggers when the diagram is zoomed or panned */ - scrollChange? (e: ScrollChangeEventArgs): void; + scrollChange?(e: ScrollChangeEventArgs): void; /** Triggers when a connector segment is edited */ - segmentChange? (e: SegmentChangeEventArgs): void; + segmentChange?(e: SegmentChangeEventArgs): void; /** Triggers when the selection is changed in diagram */ - selectionChange? (e: SelectionChangeEventArgs): void; + selectionChange?(e: SelectionChangeEventArgs): void; /** Triggers when a node is resized */ - sizeChange? (e: SizeChangeEventArgs): void; + sizeChange?(e: SizeChangeEventArgs): void; /** Triggers when label editing is ended */ - textChange? (e: TextChangeEventArgs): void; + textChange?(e: TextChangeEventArgs): void; /** Triggered when the diagram is rendered completely. */ - create? (e: CreateEventArgs): void; + create?(e: CreateEventArgs): void; } export interface AutoScrollChangeEventArgs { @@ -56355,6 +58977,9 @@ export interface DropEventArgs { } export interface EditorFocusChangeEventArgs { + /** Returns the cancel option value. + */ + cancel?: boolean; } export interface GroupChangeEventArgs { @@ -56384,11 +59009,11 @@ export interface HistoryChangeEventArgs { /** An array of objects, where each object represents the changes made in last undo/redo. To explore how the changes are defined, refer [Undo Redo Changes](#undo-redo-changes) */ - changes?: Array; + changes?: any[]; /** A collection of objects that are changed in the last undo/redo */ - Source?: Array; + Source?: any[]; /** parameter returns the id of the diagram */ @@ -56598,15 +59223,15 @@ export interface SelectionChangeEventArgs { /** parameter returns the collection of nodes and connectors that have to be removed from selection list */ - oldItems?: Array; + oldItems?: any[]; /** parameter returns the collection of nodes and connectors that have to be added to selection list */ - newItems?: Array; + newItems?: any[]; /** parameter returns the collection of nodes and connectors that will be selected after selection change */ - selectedItems?: Array; + selectedItems?: any[]; /** parameter to specify whether or not to cancel the selection change event */ @@ -56711,11 +59336,11 @@ export interface CommandManagerCommands { /** A method that defines whether the command is executable at the moment or not. */ - canExecute?: Function; + canExecute?: any; /** A method that defines what to be executed when the key combination is recognized. */ - execute?: Function; + execute?: any; /** Defines a combination of keys and key modifiers, on recognition of which the command will be executed */ @@ -56810,6 +59435,11 @@ export interface ConnectorsLabel { */ horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + /** Sets the hyperlink for the labels in the connectors. + * @Default {none} + */ + hyperlink?: string; + /** Enables/disables the italic style * @Default {false} */ @@ -57007,6 +59637,11 @@ export interface ConnectorsShape { * @Default {null} */ multiplicity?: ConnectorsShapeMultiplicity; + + /** Defines the shape of UMLActivity to connector. Applicable, if the connector is of type UMLActivity + * @Default {ej.datavisualization.Diagram.UMLActivityFlow.Control} + */ + ActivityFlow?: ej.datavisualization.Diagram.UMLActivityFlow|string; } export interface ConnectorsSourceDecorator { @@ -57125,7 +59760,7 @@ export interface Connector { /** A collection of JSON objects where each object represents a label. * @Default {[]} */ - labels?: Array; + labels?: ConnectorsLabel[]; /** Sets the stroke color of the connector * @Default {black} @@ -57187,7 +59822,7 @@ export interface Connector { /** An array of JSON objects where each object represents a segment * @Default {[ { type:straight } ]} */ - segments?: Array; + segments?: ConnectorsSegment[]; /** Defines the role/meaning of the connector * @Default {null} @@ -57261,12 +59896,40 @@ export interface Connector { zOrder?: number; } +export interface ContextMenuItem { + + /** Defines the text for the collection of context menu item + * @Default {null} + */ + text?: string; + + /** Defines the name for the collection of context menu items + * @Default {null} + */ + name?: string; + + /** Defines the image url for the collection of context menu items + * @Default {null} + */ + imageUrl?: string; + + /** Defines the CssClass for the collection of context menu items + * @Default {null} + */ + cssClass?: string; + + /** Defines the collection of sub items for the context menu items + * @Default {[]} + */ + subItems?: any[]; +} + export interface ContextMenu { /** Defines the collection of context menu items * @Default {[]} */ - items?: Array; + items?: ContextMenuItem[]; /** To set whether to display the default context menu items or not * @Default {false} @@ -57327,29 +59990,29 @@ export interface HistoryManager { /** A method that takes a history entry as argument and returns whether the specific entry can be popped or not */ - canPop?: Function; + canPop?: any; /** A method that ends grouping the changes */ - closeGroupAction?: Function; + closeGroupAction?: any; /** A method that removes the history of a recent change made in diagram */ - pop?: Function; + pop?: any; /** A method that allows to track the custom changes made in diagram */ - push?: Function; + push?: any; /** Defines what should be happened while trying to restore a custom change * @Default {null} */ - redo?: Function; + redo?: any; /** The redoStack property is used to get the number of redo actions to be stored on the history manager. Its an read-only property and the collection should not be modified. * @Default {[]} */ - redoStack?: Array; + redoStack?: any[]; /** The stackLimit property used to restrict the undo and redo actions to a certain limit. * @Default {null} @@ -57358,16 +60021,16 @@ export interface HistoryManager { /** A method that starts to group the changes to revert/restore them in a single undo or redo */ - startGroupAction?: Function; + startGroupAction?: any; /** Defines what should be happened while trying to revert a custom change */ - undo?: Function; + undo?: any; /** The undoStack property is used to get the number of undo actions to be stored on the history manager. Its an read-only property and the collection should not be modified. * @Default {[]} */ - undoStack?: Array; + undoStack?: any[]; } export interface Layout { @@ -57487,12 +60150,12 @@ export interface NodesClass { /** Defines the collection of attributes * @Default {[]} */ - attributes?: Array; + attributes?: NodesClassAttribute[]; /** Defines the collection of methods of a Class. * @Default {[]} */ - methods?: Array; + methods?: NodesClassMethod[]; } export interface NodesCollapseIcon { @@ -57585,7 +60248,7 @@ export interface NodesEnumeration { /** Defines the collection of enumeration members * @Default {[]} */ - members?: Array; + members?: NodesEnumerationMember[]; } export interface NodesExpandIcon { @@ -57641,7 +60304,7 @@ export interface NodesGradientLinearGradient { /** Defines the different colors and the region of color transitions * @Default {[]} */ - stops?: Array; + stops?: any[]; /** Defines the left most position(relative to node) of the rectangular region that needs to be painted * @Default {0} @@ -57689,7 +60352,7 @@ export interface NodesGradientRadialGradient { /** Defines the different colors and the region of color transitions. * @Default {[]} */ - stops?: Array; + stops?: any[]; } export interface NodesGradientStop { @@ -57755,12 +60418,12 @@ export interface NodesInterface { /** Defines a collection of attributes of the interface * @Default {[]} */ - attributes?: Array; + attributes?: NodesInterfaceAttribute[]; /** Defines the collection of public methods of an interface * @Default {[]} */ - methods?: Array; + methods?: NodesInterfaceMethod[]; } export interface NodesLabel { @@ -57834,6 +60497,11 @@ export interface NodesLabel { */ opacity?: number; + /** Sets the overflowType of the labels + * @Default {ej.datavisualization.Diagram.OverflowType.Ellipsis} + */ + overflowType?: ej.datavisualization.Diagram.OverflowType|string; + /** Defines whether the label is editable or not * @Default {false} */ @@ -57858,6 +60526,11 @@ export interface NodesLabel { */ textDecoration?: ej.datavisualization.Diagram.TextDecorations|string; + /** Defines the overflowed content is displayed or not. + * @Default {false} + */ + textOverflow?: boolean; + /** Sets the vertical alignment of the label. * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} */ @@ -57904,7 +60577,7 @@ export interface NodesLane { /** An array of objects where each object represents a child node of the lane * @Default {[]} */ - children?: Array; + children?: any[]; /** Defines the fill color of the lane * @Default {white} @@ -58109,7 +60782,7 @@ export interface NodesSubProcess { /** Defines the collection of events that need to be appended with BPMN Sub-Process */ - events?: Array; + events?: any[]; /** Defines the loop type of a sub process. * @Default {ej.datavisualization.Diagram.BPMNLoops.None} @@ -58119,7 +60792,7 @@ export interface NodesSubProcess { /** Defines the children for BPMN's SubProcess * @Default {[]} */ - Processes?: Array; + Processes?: any[]; /** Defines the type of the event trigger * @Default {ej.datavisualization.Diagram.BPMNTriggers.Message} @@ -58194,7 +60867,7 @@ export interface Node { /** Array of JSON objects where each object represents a child node/connector * @Default {[]} */ - children?: Array; + children?: any[]; /** Sets the type of UML classifier. Applicable, if the node is a UML Class Diagram shape. * @Default {ej.datavisualization.Diagram.ClassifierShapes.Class} @@ -58294,7 +60967,7 @@ export interface Node { /** A read only collection of the incoming connectors/edges of the node * @Default {[]} */ - inEdges?: Array; + inEdges?: any[]; /** Defines an interface in a UML Class Diagram * @Default {null} @@ -58314,12 +60987,12 @@ export interface Node { /** A collection of objects where each object represents a label * @Default {[]} */ - labels?: Array; + labels?: NodesLabel[]; /** An array of objects where each object represents a lane. Applicable, if the node is a swimlane. * @Default {[]} */ - lanes?: Array; + lanes?: NodesLane[]; /** Defines the minimum space to be left between the bottom of parent bounds and the node. Applicable, if the parent is a container. * @Default {0} @@ -58388,7 +61061,7 @@ export interface Node { /** A read only collection of outgoing connectors/edges of the node * @Default {[]} */ - outEdges?: Array; + outEdges?: any[]; /** Defines the minimum padding value to be left between the bottom most position of a group and its children. Applicable, if the group is a container. * @Default {0} @@ -58426,7 +61099,7 @@ export interface Node { /** An array of objects, where each object represents a smaller region(phase) of a swimlane. * @Default {[]} */ - phases?: Array; + phases?: NodesPhase[]; /** Sets the height of the phase headers * @Default {0} @@ -58441,12 +61114,12 @@ export interface Node { /** Defines a collection of points to draw a polygon. Applicable, if the shape is a polygon. * @Default {[]} */ - points?: Array; + points?: any[]; /** An array of objects where each object represents a port * @Default {[]} */ - ports?: Array; + ports?: NodesPort[]; /** Sets the angle to which the node should be rotated * @Default {0} @@ -58461,7 +61134,7 @@ export interface Node { /** Sets the shape of the node. It depends upon the type of node. * @Default {ej.datavisualization.Diagram.BasicShapes.Rectangle} */ - shape?: ej.datavisualization.Diagram.BasicShapes|string; + shape?: ej.datavisualization.Diagram.BasicShapes | ej.datavisualization.Diagram.FlowShapes | ej.datavisualization.Diagram.BPMNShapes | ej.datavisualization.Diagram.UMLActivityShapes|string; /** Sets the source path of the image. Applicable, if the type of the node is image. */ @@ -58674,7 +61347,7 @@ export interface SelectedItems { /** A read only collection of the selected items * @Default {[]} */ - children?: Array; + children?: any[]; /** Controls the visibility of selector. * @Default {ej.datavisualization.Diagram.SelectorConstraints.All} @@ -58714,7 +61387,7 @@ export interface SelectedItems { /** A collection of frequently used commands that will be added around the selector * @Default {[]} */ - userHandles?: Array; + userHandles?: SelectedItemsUserHandle[]; /** Sets the width of the selected items * @Default {0} @@ -58736,12 +61409,12 @@ export interface SnapSettingsHorizontalGridLines { /** A pattern of lines and gaps that defines a set of horizontal gridlines * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} */ - linesInterval?: Array; + linesInterval?: any[]; /** Specifies a set of intervals to snap the objects * @Default {[20]} */ - snapInterval?: Array; + snapInterval?: any[]; } export interface SnapSettingsVerticalGridLines { @@ -58758,12 +61431,12 @@ export interface SnapSettingsVerticalGridLines { /** A pattern of lines and gaps that defines a set of horizontal gridlines * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} */ - linesInterval?: Array; + linesInterval?: any[]; /** Specifies a set of intervals to snap the objects * @Default {[20]} */ - snapInterval?: Array; + snapInterval?: any[]; } export interface SnapSettings { @@ -58830,10 +61503,8 @@ export interface Tooltip { templateId?: string; } } -module Diagram -{ -enum ImageAlignment -{ +namespace Diagram { +enum ImageAlignment { //Scales the graphic content non-uniformly to the width and height of the diagram area None, //Used to align the image at the top left of diagram area @@ -58856,10 +61527,8 @@ XMaxYMid, XMaxYMax, } } -module Diagram -{ -enum BridgeDirection -{ +namespace Diagram { +enum BridgeDirection { //Used to set the direction of line bridges as left Left, //Used to set the direction of line bridges as right @@ -58870,10 +61539,8 @@ Top, Bottom, } } -module Diagram -{ -enum Keys -{ +namespace Diagram { +enum Keys { //No key pressed. None, //The A key. @@ -58966,10 +61633,8 @@ Tab, Enter, } } -module Diagram -{ -enum KeyModifiers -{ +namespace Diagram { +enum KeyModifiers { //No modifiers are pressed. None, //The ALT key. @@ -58980,10 +61645,8 @@ Control, Shift, } } -module Diagram -{ -enum ConnectorConstraints -{ +namespace Diagram { +enum ConnectorConstraints { //Disable all connector Constraints None, //Enables connector to be selected @@ -59012,10 +61675,8 @@ CrispEdges, Default, } } -module Diagram -{ -enum HorizontalAlignment -{ +namespace Diagram { +enum HorizontalAlignment { //Used to align text horizontally on left side of node/connector Left, //Used to align text horizontally on center of node/connector @@ -59024,10 +61685,8 @@ Center, Right, } } -module Diagram -{ -enum Alignment -{ +namespace Diagram { +enum Alignment { //Used to align the label either top or left(before) of the connector segment Before, //Used to align the label at center of the connector segment @@ -59036,20 +61695,16 @@ Center, After, } } -module Diagram -{ -enum LabelRelativeMode -{ +namespace Diagram { +enum LabelRelativeMode { //Sets the relativeMode as SegmentPath SegmentPath, //Sets the relativeMode as SegmentBounds SegmentBounds, } } -module Diagram -{ -enum Segments -{ +namespace Diagram { +enum Segments { //Used to specify the lines as Straight Straight, //Used to specify the lines as Orthogonal @@ -59058,20 +61713,18 @@ Orthogonal, Bezier, } } -module Diagram -{ -enum ConnectorShapes -{ +namespace Diagram { +enum ConnectorShapes { //Used to specify connector type as BPMN BPMN, -//Used to specify connector type as Classifier -Classifier, +//Used to specify connector type as UMLClassifier +UMLClassifier, +//Used to specify connector type as UMLActivity +UMLActivity, } } -module Diagram -{ -enum BPMNFlows -{ +namespace Diagram { +enum BPMNFlows { //Used to specify the Sequence flow in a BPMN Process Sequence, //Used to specify the Association flow in a BPMN Process @@ -59080,10 +61733,8 @@ Association, Message, } } -module Diagram -{ -enum AssociationFlows -{ +namespace Diagram { +enum AssociationFlows { //Used to notate default association in a BPMN Process Default, //Used to notate directional association in a BPMN Process @@ -59092,10 +61743,8 @@ Directional, BiDirectional, } } -module Diagram -{ -enum BPMNMessageFlows -{ +namespace Diagram { +enum BPMNMessageFlows { //Used to notate the default message flow in a BPMN Process Default, //Used to notate the instantiating message flow in a BPMN Process @@ -59104,10 +61753,8 @@ InitiatingMessage, NonInitiatingMessage, } } -module Diagram -{ -enum BPMNSequenceFlows -{ +namespace Diagram { +enum BPMNSequenceFlows { //Used to notate the normal sequence flow in a BPMN Process Normal, //Used to notate the conditional sequence flow in a BPMN Process @@ -59116,10 +61763,8 @@ Conditional, Default, } } -module Diagram -{ -enum ClassifierShapes -{ +namespace Diagram { +enum ClassifierShapes { //Used to define a Class Class, //Used to define an Interface @@ -59138,10 +61783,8 @@ Dependency, Inheritance, } } -module Diagram -{ -enum Multiplicity -{ +namespace Diagram { +enum Multiplicity { //Each entity instance is related to a single instance of another entity OneToOne, //An entity instance can be related to multiple instances of the other entities @@ -59152,10 +61795,18 @@ ManyToOne, ManyToMany, } } -module Diagram -{ -enum DecoratorShapes -{ +namespace Diagram { +enum UMLActivityFlow { +//Defines a activity flow as Object in UML Activity Diagram +Object, +//Defines a activity flow as Control in UML Activity Diagram +Control, +//Defines a activity flow as Exception in UML Activity Diagram +Exception, +} +} +namespace Diagram { +enum DecoratorShapes { //Used to set decorator shape as none None, //Used to set decorator shape as Arrow @@ -59170,10 +61821,8 @@ Diamond, Path, } } -module Diagram -{ -enum VerticalAlignment -{ +namespace Diagram { +enum VerticalAlignment { //Used to align text Vertically on left side of node/connector Top, //Used to align text Vertically on center of node/connector @@ -59182,10 +61831,8 @@ Center, Bottom, } } -module Diagram -{ -enum DiagramConstraints -{ +namespace Diagram { +enum DiagramConstraints { //Disables all DiagramConstraints None, //Enables/Disables PageEditing @@ -59208,10 +61855,16 @@ CrispEdges, Default, } } -module Diagram -{ -enum LayoutOrientations -{ +namespace Diagram { +enum LabelRenderingMode { +//Sets the labelRenderingMode as Html +Html, +//Sets the labelRenderingMode as Svg +Svg, +} +} +namespace Diagram { +enum LayoutOrientations { //Used to set LayoutOrientation from top to bottom TopToBottom, //Used to set LayoutOrientation from bottom to top @@ -59222,10 +61875,8 @@ LeftToRight, RightToLeft, } } -module Diagram -{ -enum LayoutTypes -{ +namespace Diagram { +enum LayoutTypes { //Used not to set any specific layout None, //Used to set layout type as hierarchical layout @@ -59234,10 +61885,8 @@ HierarchicalTree, OrganizationalChart, } } -module Diagram -{ -enum BPMNActivity -{ +namespace Diagram { +enum BPMNActivity { //Used to set BPMN Activity as None None, //Used to set BPMN Activity as Task @@ -59246,10 +61895,8 @@ Task, SubProcess, } } -module Diagram -{ -enum BPMNAnnotationDirection -{ +namespace Diagram { +enum BPMNAnnotationDirection { //Used to set the direction of BPMN Annotation as left Left, //Used to set the direction of BPMN Annotation as right @@ -59260,10 +61907,8 @@ Top, Bottom, } } -module Diagram -{ -enum IconShapes -{ +namespace Diagram { +enum IconShapes { //Used to set collapse icon shape as none None, //Used to set collapse icon shape as Arrow(Up/Down) @@ -59280,10 +61925,8 @@ Template, Image, } } -module Diagram -{ -enum NodeConstraints -{ +namespace Diagram { +enum NodeConstraints { //Disable all node Constraints None, //Enables node to be selected @@ -59330,20 +61973,16 @@ CrispEdges, Default, } } -module Diagram -{ -enum ContainerType -{ +namespace Diagram { +enum ContainerType { //Sets the container type as Canvas Canvas, //Sets the container type as Stack Stack, } } -module Diagram -{ -enum BPMNDataObjects -{ +namespace Diagram { +enum BPMNDataObjects { //Used to notate the Input type BPMN data object Input, //Used to notate the Output type BPMN data object @@ -59352,10 +61991,8 @@ Output, None, } } -module Diagram -{ -enum BPMNEvents -{ +namespace Diagram { +enum BPMNEvents { //Used to set BPMN Event as Start Start, //Used to set BPMN Event as Intermediate @@ -59370,10 +62007,8 @@ NonInterruptingIntermediate, ThrowingIntermediate, } } -module Diagram -{ -enum BPMNGateways -{ +namespace Diagram { +enum BPMNGateways { //Used to set BPMN Gateway as None None, //Used to set BPMN Gateway as Exclusive @@ -59392,20 +62027,24 @@ ExclusiveEventBased, ParallelEventBased, } } -module Diagram -{ -enum LabelEditMode -{ +namespace Diagram { +enum LabelEditMode { //Used to set label edit mode as edit Edit, //Used to set label edit mode as view View, } } -module Diagram -{ -enum TextAlign -{ +namespace Diagram { +enum OverflowType { +//Set overflow Type as ellipsis +Ellipsis, +//Set overflow Type as Clip +Clip, +} +} +namespace Diagram { +enum TextAlign { //Used to align text on left side of node/connector Left, //Used to align text on center of node/connector @@ -59414,10 +62053,8 @@ Center, Right, } } -module Diagram -{ -enum TextDecorations -{ +namespace Diagram { +enum TextDecorations { //Used to set text decoration of the label as Underline Underline, //Used to set text decoration of the label as Overline @@ -59428,10 +62065,8 @@ LineThrough, None, } } -module Diagram -{ -enum TextWrapping -{ +namespace Diagram { +enum TextWrapping { //Disables wrapping NoWrap, //Enables Line-break at normal word break points @@ -59440,10 +62075,8 @@ Wrap, WrapWithOverflow, } } -module Diagram -{ -enum PortConstraints -{ +namespace Diagram { +enum PortConstraints { //Disable all constraints None, //Enables connections with connector @@ -59452,10 +62085,8 @@ Connect, ConnectOnDrag, } } -module Diagram -{ -enum PortShapes -{ +namespace Diagram { +enum PortShapes { //Used to set port shape as X X, //Used to set port shape as Circle @@ -59466,10 +62097,8 @@ Square, Path, } } -module Diagram -{ -enum PortVisibility -{ +namespace Diagram { +enum PortVisibility { //Set the port visibility as Visible Visible, //Set the port visibility as Hidden @@ -59482,10 +62111,8 @@ Connect, Default, } } -module Diagram -{ -enum BasicShapes -{ +namespace Diagram { +enum BasicShapes { //Used to specify node Shape as Rectangle Rectangle, //Used to specify node Shape as Ellipse @@ -59516,10 +62143,106 @@ RightTriangle, Cylinder, } } -module Diagram -{ -enum BPMNBoundary -{ +namespace Diagram { +enum FlowShapes { +//Used to specify node Shape as Process +Process, +//Used to specify node Shape as Decision +Decision, +//Used to specify node Shape as Document +Document, +//Used to specify node Shape as PreDefinedProcess +PreDefinedProcess, +//Used to specify node Shape as Terminator +Terminator, +//Used to specify node Shape as PaperTap +PaperTap, +//Used to specify node Shape as DirectData +DirectData, +//Used to specify node Shape as SequentialData +SequentialData, +//Used to specify node Shape as Sort +Sort, +//Used to specify node Shape as MultiDocument +MultiDocument, +//Used to specify node Shape as Collate +Collate, +//Used to specify node Shape as SummingJunction +SummingJunction, +//Used to specify node Shape as Or +Or, +//Used to specify node Shape as InternalStorage +InternalStorage, +//Used to specify node Shape as Extract +Extract, +//Used to specify node Shape as ManualOperation +ManualOperation, +//Used to specify node Shape as Merge +Merge, +//Used to specify node Shape as OffPageReference +OffPageReference, +//Used to specify node Shape as SequentialAccessStorage +SequentialAccessStorage, +//Used to specify node Shape as Annotation1 +Annotation1, +//Used to specify node Shape as Annotation2 +Annotation2, +//Used to specify node Shape as Data +Data, +//Used to specify node Shape as Card +Card, +} +} +namespace Diagram { +enum BPMNShapes { +//Used to specify node Shape as Event +Event, +//Used to specify node Shape as Gateway +Gateway, +//Used to specify node Shape as Message +Message, +//Used to specify node Shape as DataObject +DataObject, +//Used to specify node Shape as DataSource +DataSource, +//Used to specify node Shape as Activity +Activity, +//Used to specify node Shape as Group +Group, +} +} +namespace Diagram { +enum UMLActivityShapes { +//Used to set UML ActivityShapes as Action +Action, +//Used to set UML ActivityShapes as Decision +Decision, +//Used to set UML ActivityShapes as MergeNode +MergeNode, +//Used to set UML ActivityShapes as InitialNode +InitialNode, +//Used to set UML ActivityShapes as FinalNode +FinalNode, +//Used to set UML ActivityShapes as ForkNode +ForkNode, +//Used to set UML ActivityShapes as JoinNode +JoinNode, +//Used to set UML ActivityShapes as TimeEvent +TimeEvent, +//Used to set UML ActivityShapes as AcceptingEvent +AcceptingEvent, +//Used to set UML ActivityShapes as SendSignal +SendSignal, +//Used to set UML ActivityShapes as ReceiveSignal +ReceiveSignal, +//Used to set UML ActivityShapes as StructuredNode +StructuredNode, +//Used to set UML ActivityShapes as Note +Note, +} +} +namespace Diagram { +enum BPMNBoundary { //Used to set BPMN SubProcess's Boundary as Default Default, //Used to set BPMN SubProcess's Boundary as Call @@ -59528,10 +62251,8 @@ Call, Event, } } -module Diagram -{ -enum BPMNLoops -{ +namespace Diagram { +enum BPMNLoops { //Used to set BPMN Activity's Loop as None None, //Used to set BPMN Activity's Loop as Standard @@ -59542,10 +62263,8 @@ ParallelMultiInstance, SequenceMultiInstance, } } -module Diagram -{ -enum BPMNSubProcessTypes -{ +namespace Diagram { +enum BPMNSubProcessTypes { //Used to set BPMN SubProcess type as None None, //Used to set BPMN SubProcess type as Transaction @@ -59554,10 +62273,8 @@ Transaction, Event, } } -module Diagram -{ -enum BPMNTasks -{ +namespace Diagram { +enum BPMNTasks { //Used to set BPMN Task Type as None None, //Used to set BPMN Task Type as Service @@ -59580,10 +62297,8 @@ Script, Parallel, } } -module Diagram -{ -enum BPMNTriggers -{ +namespace Diagram { +enum BPMNTriggers { //Used to set Event Trigger as None None, //Used to set Event Trigger as Message @@ -59612,38 +62327,38 @@ Termination, Cancel, } } -module Diagram -{ -enum Shapes -{ -//Used to set decorator shape as none -None, -//Used to set decorator shape as Arrow -Arrow, -//Used to set decorator shape as Open Arrow -OpenArrow, -//Used to set decorator shape as Circle -Circle, -//Used to set decorator shape as Diamond -Diamond, -//Used to set decorator shape as path -Path, +namespace Diagram { +enum Shapes { +//Used to specify node type as Text +Text, +//Used to specify node type as Image +Image, +//Used to specify node type as Html +Html, +//Used to specify node type as Native +Native, +//Used to specify node type as Basic +Basic, +//Used to specify node type as Flow +Flow, +//Used to specify node type as BPMN +BPMN, +//Used to specify node type as UMLClassifier +UMLClassifier, +//Used to specify node type as UMLActivity +UMLActivity, } } -module Diagram -{ -enum PageOrientations -{ +namespace Diagram { +enum PageOrientations { //Used to set orientation as Landscape Landscape, //Used to set orientation as portrait Portrait, } } -module Diagram -{ -enum ScrollLimit -{ +namespace Diagram { +enum ScrollLimit { //Used to set scrollLimit as Infinite Infinite, //Used to set scrollLimit as Diagram @@ -59652,10 +62367,8 @@ Diagram, Limited, } } -module Diagram -{ -enum BoundaryConstraints -{ +namespace Diagram { +enum BoundaryConstraints { //Used to set boundaryConstraints as Infinite Infinite, //Used to set boundaryConstraints as Diagram @@ -59664,10 +62377,8 @@ Diagram, Page, } } -module Diagram -{ -enum SelectorConstraints -{ +namespace Diagram { +enum SelectorConstraints { //Hides the selector None, //Sets the visibility of rotation handle as visible @@ -59680,10 +62391,8 @@ UserHandles, All, } } -module Diagram -{ -enum UserHandlePositions -{ +namespace Diagram { +enum UserHandlePositions { //Set the position of the userhandle as topleft TopLeft, //Set the position of the userhandle as topcenter @@ -59702,10 +62411,8 @@ BottomCenter, BottomRight, } } -module Diagram -{ -enum SnapConstraints -{ +namespace Diagram { +enum SnapConstraints { //Enables node to be snapped to horizontal gridlines None, //Enables node to be snapped to vertical gridlines @@ -59724,10 +62431,8 @@ ShowLines, All, } } -module Diagram -{ -enum Tool -{ +namespace Diagram { +enum Tool { //Disables all Tools None, //Enables/Disables SingleSelect tool @@ -59742,26 +62447,31 @@ DrawOnce, ContinuesDraw, } } -module Diagram -{ -enum RelativeMode -{ +namespace Diagram { +enum RelativeMode { //Shows tooltip around the node Object, //Shows tooltip at the mouse position Mouse, } } +namespace Diagram { +enum ZoomCommand { +//Used to zoom in the Diagram +ZoomIn, +//Used to zoom out the diagram +ZoomOut, +} +} class HeatMap extends ej.Widget { static fn: HeatMap; - constructor(element: JQuery, options?: HeatMap.Model); - constructor(element: Element, options?: HeatMap.Model); + constructor(element: JQuery | Element, options?: HeatMap.Model); static Locale: any; - model:HeatMap.Model; - defaults:HeatMap.Model; + model: HeatMap.Model; + defaults: HeatMap.Model; } -export module HeatMap{ +export namespace HeatMap { export interface Model { @@ -59780,6 +62490,15 @@ export interface Model { */ id?: number; + /** Enables or disables tooltip of heatmap + * @Default {true} + */ + showTooltip?: boolean; + + /** Defines the tooltip that should be shown when the mouse hovers over rows/columns. + */ + tooltipSettings?: TooltipSettings; + /** Specifies the source data of the heat map. * @Default {[]} */ @@ -59808,7 +62527,7 @@ export interface Model { /** Specifies the no of legends can sync with heat map. * @Default {[]} */ - legendCollection?: Array; + legendCollection?: any[]; /** Specifies the property and display value of the heat map column. * @Default {[]} @@ -59818,19 +62537,19 @@ export interface Model { /** Specifies the color values of the heat map column data. * @Default {[]} */ - colorMappingCollection?: Array; + colorMappingCollection?: ColorMappingCollection[]; /** Triggered when the mouse over on the cell. */ - cellMouseOver? (e: CellMouseOverEventArgs): void; + cellMouseOver?(e: CellMouseOverEventArgs): void; /** Triggered when the mouse over on the cell. */ - cellMouseEnter? (e: CellMouseEnterEventArgs): void; + cellMouseEnter?(e: CellMouseEnterEventArgs): void; /** Triggered when the mouse over on the cell. */ - cellMouseLeave? (e: CellMouseLeaveEventArgs): void; + cellMouseLeave?(e: CellMouseLeaveEventArgs): void; /** Triggered when the mouse over on the cell. */ - cellSelected? (e: CellSelectedEventArgs): void; + cellSelected?(e: CellSelectedEventArgs): void; } export interface CellMouseOverEventArgs { @@ -59893,6 +62612,86 @@ export interface CellSelectedEventArgs { cell?: any; } +export interface TooltipSettingsPositionTarget { + + /** Sets the arrow position again popup based on horizontal(x) value + * @Default {center} + */ + horizontal?: ej.datavisualization.HeatMap.Horizontal|string; + + /** Sets the arrow position again popup based on vertical(y) value + * @Default {top} + */ + vertical?: ej.datavisualization.HeatMap.Vertical|string; +} + +export interface TooltipSettingsPositionStem { + + /** Sets the arrow position again popup based on horizontal(x) value + * @Default {center} + */ + horizontal?: ej.datavisualization.HeatMap.Horizontal|string; + + /** Sets the arrow position again popup based on vertical(y) value + * @Default {bottom} + */ + vertical?: ej.datavisualization.HeatMap.Vertical|string; +} + +export interface TooltipSettingsPosition { + + /** Sets the Tooltip position against target. + */ + target?: TooltipSettingsPositionTarget; + + /** Sets the arrow position again popup. + */ + stem?: TooltipSettingsPositionStem; +} + +export interface TooltipSettingsAnimation { + + /** Defines the animation effect for the tooltip that should be shown when the mouse hovers over rows/columns. + * @Default {none} + */ + effect?: ej.datavisualization.HeatMap.Effect|string; + + /** Defines the animation speed for the tooltip that should be shown when the mouse hovers over rows/columns. + * @Default {0} + */ + speed?: number; +} + +export interface TooltipSettings { + + /** Defines the tooltip that should be shown when the mouse hovers over rows/columns. + * @Default {null} + */ + templateId?: string; + + /** Defines the tooltip of associate that should be shown when the mouse hovers over rows/columns. + */ + associate?: ej.datavisualization.HeatMap.Associate|string; + + /** Enables/ disables the balloon for the tooltip to be shown + * @Default {true} + */ + isBalloon?: boolean; + + /** Defines various attributes of the Tooltip position + */ + position?: TooltipSettingsPosition; + + /** Defines the tooltip to be triggered. + * @Default {hover} + */ + trigger?: ej.datavisualization.HeatMap.Trigger|string; + + /** Defines the animation for the tooltip that should be shown when the mouse hovers over rows/columns. + */ + animation?: TooltipSettingsAnimation; +} + export interface HeatMapCell { /** Specifies whether the cell content can be visible or not. @@ -60022,7 +62821,7 @@ export interface ItemsMapping { /** Specifies the property and display value of the collection of column. * @Default {[]} */ - columnMapping?: Array; + columnMapping?: any[]; } export interface ColorMappingCollectionLabel { @@ -60080,20 +62879,64 @@ export interface ColorMappingCollection { label?: ColorMappingCollectionLabel; } } -module HeatMap -{ -enum CellVisibility -{ +namespace HeatMap { +enum Associate { +//Used to set the associate of tooltip as Target +Target, +//Used to set the associate of tooltip as MouseFollow +MouseFollow, +//Used to set the associate of tooltip as MouseEnter +MouseEnter, +} +} +namespace HeatMap { +enum Horizontal { +//Used to display the tooltip horizontally on left side of rows/columns +Left, +//Used to display the tooltip horizontally on center side of rows/columns +Center, +//Used to display the tooltip horizontally on right side of rows/columns +Right, +} +} +namespace HeatMap { +enum Vertical { +//Used to display the tooltip horizontally on left side of rows/columns +Top, +//Used to display the tooltip horizontally on center side of rows/columns +Center, +//Used to display the tooltip horizontally on right side of rows/columns +Bottom, +} +} +namespace HeatMap { +enum Trigger { +//Tooltip can be triggered on mouse hovers +Hover, +//Tooltip can be triggered on mouse click +Click, +} +} +namespace HeatMap { +enum Effect { +//Sets tooltip animation as None +None, +//Sets tooltip animation as Fade +Fade, +//Sets tooltip animation as Slide +Slide, +} +} +namespace HeatMap { +enum CellVisibility { //Display the content of the cell Visible, //Hide the content of the cell Hidden, } } -module HeatMap -{ -enum TextDecoration -{ +namespace HeatMap { +enum TextDecoration { //Defines a line below the text Underline, //Defines a line above the text @@ -60107,13 +62950,12 @@ None, class HeatMapLegend extends ej.Widget { static fn: HeatMapLegend; - constructor(element: JQuery, options?: HeatMapLegend.Model); - constructor(element: Element, options?: HeatMapLegend.Model); + constructor(element: JQuery | Element, options?: HeatMapLegend.Model); static Locale: any; - model:HeatMapLegend.Model; - defaults:HeatMapLegend.Model; + model: HeatMapLegend.Model; + defaults: HeatMapLegend.Model; } -export module HeatMapLegend{ +export namespace HeatMapLegend { export interface Model { @@ -60140,7 +62982,7 @@ export interface Model { /** Specifies the color values of the column data. * @Default {[]} */ - colorMappingCollection?: Array; + colorMappingCollection?: ColorMappingCollection[]; /** Specifies the orientation of the heatmap legend * @Default {ej.HeatMap.LegendOrientation.Horizontal} @@ -60208,20 +63050,16 @@ export interface ColorMappingCollection { label?: ColorMappingCollectionLabel; } } -module HeatMap -{ -enum LegendOrientation -{ +namespace HeatMap { +enum LegendOrientation { //Scales the graphic content non-uniformly to the width and height of the diagram area Horizontal, //Used to align the image at the top left of diagram area Vertical, } } -module HeatMap -{ -enum LegendMode -{ +namespace HeatMap { +enum LegendMode { //Scales the graphic content non-uniformly to the width and height of the diagram area Gradient, //Used to align the image at the top left of diagram area @@ -60231,18 +63069,17 @@ List, class Sparkline extends ej.Widget { static fn: Sparkline; - constructor(element: JQuery, options?: Sparkline.Model); - constructor(element: Element, options?: Sparkline.Model); + constructor(element: JQuery | Element, options?: Sparkline.Model); static Locale: any; - model:Sparkline.Model; - defaults:Sparkline.Model; + model: Sparkline.Model; + defaults: Sparkline.Model; /** Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. * @returns {void} */ redraw(): void; } -export module Sparkline{ +export namespace Sparkline { export interface Model { @@ -60365,28 +63202,28 @@ export interface Model { axisLineSettings?: AxisLineSettings; /** Fires before loading the sparkline. */ - load? (e: LoadEventArgs): void; + load?(e: LoadEventArgs): void; /** Fires after loaded the sparkline. */ - loaded? (e: LoadedEventArgs): void; + loaded?(e: LoadedEventArgs): void; /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. */ - tooltipInitialize? (e: TooltipInitializeEventArgs): void; + tooltipInitialize?(e: TooltipInitializeEventArgs): void; /** Fires before rendering a series. This event is fired for each series in Sparkline. */ - seriesRendering? (e: SeriesRenderingEventArgs): void; + seriesRendering?(e: SeriesRenderingEventArgs): void; /** Fires when mouse is moved over a point. */ - pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. */ - pointRegionMouseClick? (e: PointRegionMouseClickEventArgs): void; + pointRegionMouseClick?(e: PointRegionMouseClickEventArgs): void; /** Fires on moving mouse over the sparkline. */ - sparklineMouseMove? (e: SparklineMouseMoveEventArgs): void; + sparklineMouseMove?(e: SparklineMouseMoveEventArgs): void; /** Fires on moving mouse outside the sparkline. */ - sparklineMouseLeave? (e: SparklineMouseLeaveEventArgs): void; + sparklineMouseLeave?(e: SparklineMouseLeaveEventArgs): void; } export interface LoadEventArgs { @@ -60761,10 +63598,8 @@ export interface AxisLineSettings { dashArray?: number; } } -module Sparkline -{ -enum Type -{ +namespace Sparkline { +enum Type { //string Area, //string @@ -60777,10 +63612,8 @@ Pie, WinLoss, } } -module Sparkline -{ -enum Theme -{ +namespace Sparkline { +enum Theme { //string Azure, //string @@ -60803,20 +63636,16 @@ GradientLight, GradientDark, } } -module Sparkline -{ -enum FontStyle -{ +namespace Sparkline { +enum FontStyle { //string Normal, //string Italic, } } -module Sparkline -{ -enum FontWeight -{ +namespace Sparkline { +enum FontWeight { //string Regular, //string @@ -60826,15 +63655,1171 @@ Lighter, } } +class SunburstChart extends ej.Widget { + static fn: SunburstChart; + constructor(element: JQuery | Element, options?: SunburstChart.Model); + static Locale: any; + model: SunburstChart.Model; + defaults: SunburstChart.Model; + + /** Redraws the entire sunburst. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; + + /** destroy the sunburst + * @returns {void} + */ + _destroy(): void; +} +export namespace SunburstChart { + +export interface Model { + + /** Background color of the plot area. + * @Default {null} + */ + background?: string; + + /** Bind the data field from the data source. + * @Default {null} + */ + valueMemberPath?: string; + + /** Options for customizing the sunburst border. + */ + border?: Border; + + /** Options for customizing the sunburst segment border. + */ + segmentBorder?: SegmentBorder; + + /** Specifies the dataSource to the sunburst. + * @Default {null} + */ + dataSource?: any; + + /** Palette color for the data points. + * @Default {null} + */ + palette?: string; + + /** Parent node of the data points. + * @Default {null} + */ + parentNode?: string; + + /** Name of the property in the datasource that contains x values. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y values. + * @Default {null} + */ + yName?: string; + + /** Controls whether sunburst has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Options to customize the Sunburst size. + */ + size?: Size; + + /** Controls the visibility of sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options to customize the Sunburst tooltip. + */ + tooltip?: Tooltip; + + /** Options for customizing sunburst points. + */ + points?: Points; + + /** Sunburst rendering will start from the specified value + * @Default {null} + */ + startAngle?: number; + + /** Sunburst rendering will end at the specified value + * @Default {null} + */ + endAngle?: number; + + /** Sunburst outer radius value + * @Default {1} + */ + radius?: number; + + /** Sunburst inner radius value + * @Default {0.4} + */ + innerRadius?: number; + + /** Options to customize the Sunburst dataLabel. + */ + dataLabelSettings?: DataLabelSettings; + + /** Options for customizing the title and subtitle of sunburst. + */ + title?: Title; + + /** Options for customizing the appearance of the levels or point while highlighting. + */ + highlightSettings?: HighlightSettings; + + /** Options for customizing the appearance of the levels or data point while selection. + */ + selectionSettings?: SelectionSettings; + + /** Specify levels of sunburst for grouped visualization of data + * @Default {[]} + */ + levels?: Level[]; + + /** Options to customize the legend items and legend title. + */ + legend?: Legend; + + /** Specifies the theme for Sunburst. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sunburst.SunburstTheme|string; + + /** Options to customize the left, right, top and bottom margins of sunburst area. + */ + margin?: Margin; + + /** Enable/disable the animation for all the levels. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Opacity of the levels. + * @Default {1} + */ + opacity?: number; + + /** Options for enable zooming feature of chart. + */ + zoomSettings?: ZoomSettings; + + /** Animation type of sunburst + * @Default {rotation. See Alignment} + */ + animationType?: ej.datavisualization.Sunburst.Animation|string; + + /** Fires before loading. */ + load?(e: LoadEventArgs): void; + + /** Fires before rendering sunburst. */ + preRender?(e: PreRenderEventArgs): void; + + /** Fires after rendering sunburst. */ + loaded?(e: LoadedEventArgs): void; + + /** Fires before rendering the datalabel */ + dataLabelRendering?(e: DataLabelRenderingEventArgs): void; + + /** Fires before rendering each segment */ + segmentRendering?(e: SegmentRenderingEventArgs): void; + + /** Fires before rendering sunburst title. */ + titleRendering?(e: TitleRenderingEventArgs): void; + + /** Fires during initialization of tooltip. */ + tooltipInitialize?(e: TooltipInitializeEventArgs): void; + + /** Fires after clicking the point in sunburst */ + pointRegionClick?(e: PointRegionClickEventArgs): void; + + /** Fires while moving the mouse over sunburst points */ + pointRegionMouseMove?(e: PointRegionMouseMoveEventArgs): void; + + /** Fires when clicking the point to perform drilldown. */ + drillDownClick?(e: DrillDownClickEventArgs): void; + + /** Fires when resetting drilldown points. */ + drillDownBack?(e: DrillDownBackEventArgs): void; + + /** Fires after resetting the sunburst points */ + drillDownReset?(e: DrillDownResetEventArgs): void; +} + +export interface LoadEventArgs { + + /** Load event data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface PreRenderEventArgs { + + /** PreRender event data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /** Loaded event data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DataLabelRenderingEventArgs { + + /** Sunburst datalabel data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface SegmentRenderingEventArgs { + + /** Sunburst datalabel data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface TitleRenderingEventArgs { + + /** Sunburst title data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface TooltipInitializeEventArgs { + + /** Sunburst tooltip data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface PointRegionClickEventArgs { + + /** Includes clicked points region data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface PointRegionMouseMoveEventArgs { + + /** Includes data of mouse moved region + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DrillDownClickEventArgs { + + /** Clicked point data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DrillDownBackEventArgs { + + /** Drill down data of points + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface DrillDownResetEventArgs { + + /** Drill down reset data + */ + data?: string; + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sunburst model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface Border { + + /** Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst border. + * @Default {2} + */ + width?: number; +} + +export interface SegmentBorder { + + /** Segment Border color of the sunburst. + * @Default {null} + */ + color?: string; + + /** Width of the Sunburst segment border. + * @Default {2} + */ + width?: number; +} + +export interface Size { + + /** Height of the Sunburst. + * @Default {''} + */ + height?: string; + + /** Width of the Sunburst. + * @Default {''} + */ + width?: string; +} + +export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {5} + */ + width?: number; +} + +export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {null} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {12px} + */ + size?: string; +} + +export interface Tooltip { + + /** tooltip visibility of the Sunburst. + * @Default {true} + */ + visible?: boolean; + + /** Options for customizing the border of the sunburst tooltip. + */ + border?: TooltipBorder; + + /** Fill color for the sunburst tooltip. + * @Default {null} + */ + fill?: string; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; + + /** Custom template to the tooltip. + * @Default {null} + */ + template?: string; +} + +export interface Points { + + /** Points x value of the sunburst. + * @Default {null} + */ + x?: string; + + /** Points y value of the sunburst. + * @Default {null} + */ + y?: number; + + /** Points text of the sunburst. + * @Default {null} + */ + text?: string; + + /** Points fill color of the sunburst. + * @Default {null} + */ + fill?: string; +} + +export interface DataLabelSettingsFont { + + /** Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /** Font color of the data label text. + * @Default {null} + */ + color?: string; + + /** Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface DataLabelSettings { + + /** Datalabel visibility of the Sunburst. + * @Default {false} + */ + visible?: boolean; + + /** Alignment of sunburst datalabel + * @Default {Angle. See DatalabelAlignment} + */ + labelRotationMode?: ej.datavisualization.Sunburst.SunburstLabelRotationMode|string; + + /** Options for customizing the data label font. + */ + font?: DataLabelSettingsFont; + + /** Custom template for datalabel + * @Default {null} + */ + template?: string; + + /** Fill color for the datalabel + * @Default {null} + */ + fill?: string; + + /** Datalabel overflow mode + * @Default {Trim. See LabelOverflowMode} + */ + labelOverflowMode?: ej.datavisualization.Sunburst.SunburstLabelOverflowMode|string; +} + +export interface TitleFont { + + /** Font family for Sunburst title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for Sunburst title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for Sunburst title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the Sunburst title. + * @Default {1} + */ + opacity?: number; + + /** Font size for Sunburst title. + * @Default {20px} + */ + size?: string; +} + +export interface TitleSubtitleFont { + + /** Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /** Font size for sub title. + * @Default {12px} + */ + size?: string; +} + +export interface TitleSubtitle { + + /** Subtitle text for sunburst + */ + text?: string; + + /** Sub title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Sub title text alignment + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sub title. + */ + font?: TitleSubtitleFont; +} + +export interface Title { + + /** Title text for sunburst + */ + text?: string; + + /** Title text visibility for sunburst + * @Default {true} + */ + visible?: string; + + /** Title text alignment + * @Default {center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the font of sunburst title. + */ + font?: TitleFont; + + /** Options to customize the sub title of Sunburst. + */ + subtitle?: TitleSubtitle; +} + +export interface HighlightSettings { + + /** Enables/disables the ability to highlight the levels or point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or point has to be highlighted. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on highlight. + * @Default {red} + */ + color?: string; + + /** Opacity of the levels/point on highlight. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be highlighted. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; +} + +export interface SelectionSettings { + + /** Enables/disables the ability to select the levels or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /** Specifies whether the levels or data point has to be selected. + * @Default {point. See Mode} + */ + mode?: ej.datavisualization.Sunburst.SunburstHighlightMode|string; + + /** Color of the levels/point on selection. + * @Default {green} + */ + color?: string; + + /** Opacity of the levels/point on selection. + * @Default {0.5} + */ + opacity?: number; + + /** Specifies whether the levels or data point has to be selected. + * @Default {opacity. See Mode} + */ + type?: ej.datavisualization.Sunburst.SunburstHighlightType|string; +} + +export interface Level { + + /** Specifies the group member path + * @Default {null} + */ + groupMemberPath?: string; +} + +export interface LegendBorder { + + /** Border color of the legend. + * @Default {null} + */ + color?: string; + + /** Border width of the legend. + * @Default {1} + */ + width?: number; +} + +export interface LegendFont { + + /** Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend item text. + * @Default {12px} + */ + size?: string; +} + +export interface LegendItemStyle { + + /** Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /** Width of the shape in legend items. + * @Default {10} + */ + width?: number; +} + +export interface LegendLocation { + + /** X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /** Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; +} + +export interface LegendSize { + + /** Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /** Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; +} + +export interface LegendTitleFont { + + /** Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Sunburst.FontStyle|string; + + /** Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Sunburst.FontWeight|string; + + /** Font size for legend title. + * @Default {12px} + */ + size?: string; +} + +export interface LegendTitle { + + /** Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /** Enables or disables the legend title. + * @Default {true} + */ + visible?: string; + + /** Text to be displayed in legend title. + */ + text?: string; + + /** Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; +} + +export interface Legend { + + /** Visibility of the legend. + * @Default {false} + */ + visible?: boolean; + + /** Interactive action of legend items. + * @Default {toggleSegmentVisibility. See Alignment} + */ + clickAction?: ej.datavisualization.Sunburst.SunburstClickAction|string; + + /** Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Sunburst.SunburstAlignment|string; + + /** Options for customizing the legend border. + */ + border?: LegendBorder; + + /** Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /** Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /** Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /** Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /** Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /** Options to customize the location of sunburst legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /** Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Sunburst.SunburstLegendPosition|string; + + /** Shape of the legend items. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Sunburst.SunburstLegendShape|string; + + /** Options to customize the size of the legend. + */ + size?: LegendSize; + + /** Options to customize the legend title. + */ + title?: LegendTitle; +} + +export interface Margin { + + /** Spacing for the left margin of chart area. Setting positive value decreases the width of the chart area from left side. + * @Default {10} + */ + left?: number; + + /** Spacing for the right margin of chart area. Setting positive value decreases the width of the chart area from right side. + * @Default {10} + */ + right?: number; + + /** Spacing for the top margin of chart area. Setting positive value decreases the height of the chart area from the top. + * @Default {10} + */ + top?: number; + + /** Spacing for the bottom margin of the chart area. Setting positive value decreases the height of the chart area from the bottom. + * @Default {10} + */ + bottom?: number; +} + +export interface ZoomSettings { + + /** Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /** Toolbar horizontal alignment + * @Default {right. See Alignment} + */ + toolbarHorizontalAlignment?: ej.datavisualization.Sunburst.SunburstHorizontalAlignment|string; + + /** Toolbar vertical alignment + * @Default {top. See Alignment} + */ + toolbarVerticalAlignment?: ej.datavisualization.Sunburst.SunburstVerticalAlignment|string; +} +} +namespace Sunburst { +enum FontStyle { +//string +Normal, +//string +Italic, +} +} +namespace Sunburst { +enum FontWeight { +//string +Regular, +//string +Bold, +//string +Lighter, +} +} +namespace Sunburst { +enum SunburstLabelRotationMode { +//string +Angle, +//string +Normal, +} +} +namespace Sunburst { +enum SunburstLabelOverflowMode { +//string +Trim, +//string +Hide, +//string +None, +} +} +namespace Sunburst { +enum SunburstAlignment { +//string +Center, +//string +Near, +//string +Far, +} +} +namespace Sunburst { +enum SunburstHighlightMode { +//string +Point, +//string +Parent, +//string +Child, +//string +All, +} +} +namespace Sunburst { +enum SunburstHighlightType { +//string +Opacity, +//string +Color, +} +} +namespace Sunburst { +enum SunburstClickAction { +//string +None, +//string +ToggleSegmentVisibility, +//string +ToggleSegmentSelection, +} +} +namespace Sunburst { +enum SunburstLegendPosition { +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +namespace Sunburst { +enum SunburstLegendShape { +//string +Diamond, +//string +Pentagon, +//string +Rectangle, +//string +Circle, +//string +Cross, +//string +Triangle, +} +} +namespace Sunburst { +enum SunburstTheme { +//string +FlatLight, +//string +FlatDark, +} +} +namespace Sunburst { +enum SunburstHorizontalAlignment { +//string +Center, +//string +Left, +//string +Right, +} +} +namespace Sunburst { +enum SunburstVerticalAlignment { +//string +Top, +//string +Bottom, +//string +Middle, +} +} +namespace Sunburst { +enum Animation { +//string +Rotation, +//string +FadeIn, +} +} + class Overview extends ej.Widget { static fn: Overview; - constructor(element: JQuery, options?: Overview.Model); - constructor(element: Element, options?: Overview.Model); + constructor(element: JQuery | Element, options?: Overview.Model); static Locale: any; - model:Overview.Model; - defaults:Overview.Model; + model: Overview.Model; + defaults: Overview.Model; } -export module Overview{ +export namespace Overview { export interface Model { @@ -60858,12 +64843,24 @@ export interface Model { } interface JQueryXHR { + /** Returns the cancel option value. + */ + cancel?: boolean; } interface JQueryPromise { + /** Returns the cancel option value. + */ + cancel?: boolean; } interface JQueryDeferred extends JQueryPromise { + /** Returns the cancel option value. + */ + cancel?: boolean; } interface JQueryParam { + /** Returns the cancel option value. + */ + cancel?: boolean; } interface JQuery { data(key: any): any; @@ -60873,408 +64870,332 @@ interface Window { } interface JQuery { -ejAccordion(): JQuery; ejAccordion(options?: ej.Accordion.Model): JQuery; ejAccordion(memberName: any, value?: any, param?: any): any; -data(key: "ejAccordion"): ej.Accordion; -ejAutocomplete(): JQuery; ejAutocomplete(options?: ej.Autocomplete.Model): JQuery; ejAutocomplete(memberName: any, value?: any, param?: any): any; -data(key: "ejAutocomplete"): ej.Autocomplete; -ejBarcode(): JQuery; ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; ejBarcode(memberName: any, value?: any, param?: any): any; -data(key: "ejBarcode"): ej.datavisualization.Barcode; -ejBulletGraph(): JQuery; ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; ejBulletGraph(memberName: any, value?: any, param?: any): any; -data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; -ejButton(): JQuery; ejButton(options?: ej.Button.Model): JQuery; ejButton(memberName: any, value?: any, param?: any): any; -data(key: "ejButton"): ej.Button; -ejCaptcha(): JQuery; ejCaptcha(options?: ej.Captcha.Model): JQuery; ejCaptcha(memberName: any, value?: any, param?: any): any; -data(key: "ejCaptcha"): ej.Captcha; -ejChart(): JQuery; ejChart(options?: ej.datavisualization.Chart.Model): JQuery; ejChart(memberName: any, value?: any, param?: any): any; -data(key: "ejChart"): ej.datavisualization.Chart; -ejCheckBox(): JQuery; ejCheckBox(options?: ej.CheckBox.Model): JQuery; ejCheckBox(memberName: any, value?: any, param?: any): any; -data(key: "ejCheckBox"): ej.CheckBox; -ejCircularGauge(): JQuery; ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; ejCircularGauge(memberName: any, value?: any, param?: any): any; -data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; -ejColorPicker(): JQuery; ejColorPicker(options?: ej.ColorPicker.Model): JQuery; ejColorPicker(memberName: any, value?: any, param?: any): any; -data(key: "ejColorPicker"): ej.ColorPicker; -ejDatePicker(): JQuery; ejDatePicker(options?: ej.DatePicker.Model): JQuery; ejDatePicker(memberName: any, value?: any, param?: any): any; -data(key: "ejDatePicker"): ej.DatePicker; -ejDateRangePicker(): JQuery; ejDateRangePicker(options?: ej.DateRangePicker.Model): JQuery; ejDateRangePicker(memberName: any, value?: any, param?: any): any; -data(key: "ejDateRangePicker"): ej.DateRangePicker; -ejDateTimePicker(): JQuery; ejDateTimePicker(options?: ej.DateTimePicker.Model): JQuery; ejDateTimePicker(memberName: any, value?: any, param?: any): any; -data(key: "ejDateTimePicker"): ej.DateTimePicker; -ejDiagram(): JQuery; ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; ejDiagram(memberName: any, value?: any, param?: any): any; -data(key: "ejDiagram"): ej.datavisualization.Diagram; -ejDialog(): JQuery; ejDialog(options?: ej.Dialog.Model): JQuery; ejDialog(memberName: any, value?: any, param?: any): any; -data(key: "ejDialog"): ej.Dialog; -ejDigitalGauge(): JQuery; ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; ejDigitalGauge(memberName: any, value?: any, param?: any): any; -data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; -ejDocumentEditor(): JQuery; ejDocumentEditor(options?: ej.DocumentEditor.Model): JQuery; ejDocumentEditor(memberName: any, value?: any, param?: any): any; -data(key: "ejDocumentEditor"): ej.DocumentEditor; -ejDraggable(): JQuery; ejDraggable(options?: ej.Draggable.Model): JQuery; ejDraggable(memberName: any, value?: any, param?: any): any; -data(key: "ejDraggable"): ej.Draggable; -ejDropDownList(): JQuery; ejDropDownList(options?: ej.DropDownList.Model): JQuery; ejDropDownList(memberName: any, value?: any, param?: any): any; -data(key: "ejDropDownList"): ej.DropDownList; -ejDroppable(): JQuery; ejDroppable(options?: ej.Droppable.Model): JQuery; ejDroppable(memberName: any, value?: any, param?: any): any; -data(key: "ejDroppable"): ej.Droppable; -ejFileExplorer(): JQuery; ejFileExplorer(options?: ej.FileExplorer.Model): JQuery; ejFileExplorer(memberName: any, value?: any, param?: any): any; -data(key: "ejFileExplorer"): ej.FileExplorer; -ejGantt(): JQuery; ejGantt(options?: ej.Gantt.Model): JQuery; ejGantt(memberName: any, value?: any, param?: any): any; -data(key: "ejGantt"): ej.Gantt; -ejGrid(): JQuery; ejGrid(options?: ej.Grid.Model): JQuery; ejGrid(memberName: any, value?: any, param?: any): any; -data(key: "ejGrid"): ej.Grid; -ejGroupButton(): JQuery; ejGroupButton(options?: ej.GroupButton.Model): JQuery; ejGroupButton(memberName: any, value?: any, param?: any): any; -data(key: "ejGroupButton"): ej.GroupButton; -ejHeatMap(): JQuery; ejHeatMap(options?: ej.datavisualization.HeatMap.Model): JQuery; ejHeatMap(memberName: any, value?: any, param?: any): any; -data(key: "ejHeatMap"): ej.datavisualization.HeatMap; -ejHeatMapLegend(): JQuery; ejHeatMapLegend(options?: ej.datavisualization.HeatMapLegend.Model): JQuery; ejHeatMapLegend(memberName: any, value?: any, param?: any): any; -data(key: "ejHeatMapLegend"): ej.datavisualization.HeatMapLegend; -ejKanban(): JQuery; ejKanban(options?: ej.Kanban.Model): JQuery; ejKanban(memberName: any, value?: any, param?: any): any; -data(key: "ejKanban"): ej.Kanban; -ejLinearGauge(): JQuery; ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; ejLinearGauge(memberName: any, value?: any, param?: any): any; -data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; -ejListBox(): JQuery; ejListBox(options?: ej.ListBox.Model): JQuery; ejListBox(memberName: any, value?: any, param?: any): any; -data(key: "ejListBox"): ej.ListBox; -ejListView(): JQuery; ejListView(options?: ej.ListView.Model): JQuery; ejListView(memberName: any, value?: any, param?: any): any; -data(key: "ejListView"): ej.ListView; -ejMap(): JQuery; ejMap(options?: ej.datavisualization.Map.Model): JQuery; ejMap(memberName: any, value?: any, param?: any): any; -data(key: "ejMap"): ej.datavisualization.Map; -ejMaskEdit(): JQuery; ejMaskEdit(options?: ej.MaskEdit.Model): JQuery; ejMaskEdit(memberName: any, value?: any, param?: any): any; -data(key: "ejMaskEdit"): ej.MaskEdit; -ejMenu(): JQuery; ejMenu(options?: ej.Menu.Model): JQuery; ejMenu(memberName: any, value?: any, param?: any): any; -data(key: "ejMenu"): ej.Menu; -ejNavigationDrawer(): JQuery; ejNavigationDrawer(options?: ej.NavigationDrawer.Model): JQuery; ejNavigationDrawer(memberName: any, value?: any, param?: any): any; -data(key: "ejNavigationDrawer"): ej.NavigationDrawer; -ejOverview(): JQuery; ejOverview(options?: ej.datavisualization.Overview.Model): JQuery; ejOverview(memberName: any, value?: any, param?: any): any; -data(key: "ejOverview"): ej.datavisualization.Overview; -ejPager(): JQuery; ejPager(options?: ej.Pager.Model): JQuery; ejPager(memberName: any, value?: any, param?: any): any; -data(key: "ejPager"): ej.Pager; -ejPdfViewer(): JQuery; ejPdfViewer(options?: ej.PdfViewer.Model): JQuery; ejPdfViewer(memberName: any, value?: any, param?: any): any; -data(key: "ejPdfViewer"): ej.PdfViewer; -ejPivotChart(): JQuery; ejPivotChart(options?: ej.PivotChart.Model): JQuery; ejPivotChart(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotChart"): ej.PivotChart; -ejPivotClient(): JQuery; ejPivotClient(options?: ej.PivotClient.Model): JQuery; ejPivotClient(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotClient"): ej.PivotClient; -ejPivotGauge(): JQuery; ejPivotGauge(options?: ej.PivotGauge.Model): JQuery; ejPivotGauge(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotGauge"): ej.PivotGauge; -ejPivotGrid(): JQuery; ejPivotGrid(options?: ej.PivotGrid.Model): JQuery; ejPivotGrid(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotGrid"): ej.PivotGrid; -ejPivotPager(): JQuery; ejPivotPager(options?: ej.PivotPager.Model): JQuery; ejPivotPager(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotPager"): ej.PivotPager; -ejPivotSchemaDesigner(): JQuery; ejPivotSchemaDesigner(options?: ej.PivotSchemaDesigner.Model): JQuery; ejPivotSchemaDesigner(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; -ejPivotTreeMap(): JQuery; ejPivotTreeMap(options?: ej.PivotTreeMap.Model): JQuery; ejPivotTreeMap(memberName: any, value?: any, param?: any): any; -data(key: "ejPivotTreeMap"): ej.PivotTreeMap; -ejProgressBar(): JQuery; ejProgressBar(options?: ej.ProgressBar.Model): JQuery; ejProgressBar(memberName: any, value?: any, param?: any): any; -data(key: "ejProgressBar"): ej.ProgressBar; -ejRadialMenu(): JQuery; ejRadialMenu(options?: ej.RadialMenu.Model): JQuery; ejRadialMenu(memberName: any, value?: any, param?: any): any; -data(key: "ejRadialMenu"): ej.RadialMenu; -ejRadialSlider(): JQuery; ejRadialSlider(options?: ej.RadialSlider.Model): JQuery; ejRadialSlider(memberName: any, value?: any, param?: any): any; -data(key: "ejRadialSlider"): ej.RadialSlider; -ejRadioButton(): JQuery; ejRadioButton(options?: ej.RadioButton.Model): JQuery; ejRadioButton(memberName: any, value?: any, param?: any): any; -data(key: "ejRadioButton"): ej.RadioButton; -ejRangeNavigator(): JQuery; ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; ejRangeNavigator(memberName: any, value?: any, param?: any): any; -data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; -ejRating(): JQuery; ejRating(options?: ej.Rating.Model): JQuery; ejRating(memberName: any, value?: any, param?: any): any; -data(key: "ejRating"): ej.Rating; -ejRecurrenceEditor(): JQuery; ejRecurrenceEditor(options?: ej.RecurrenceEditor.Model): JQuery; ejRecurrenceEditor(memberName: any, value?: any, param?: any): any; -data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; -ejReportViewer(): JQuery; ejReportViewer(options?: ej.ReportViewer.Model): JQuery; ejReportViewer(memberName: any, value?: any, param?: any): any; -data(key: "ejReportViewer"): ej.ReportViewer; -ejResizable(): JQuery; ejResizable(options?: ej.Resizable.Model): JQuery; ejResizable(memberName: any, value?: any, param?: any): any; -data(key: "ejResizable"): ej.Resizable; -ejRibbon(): JQuery; ejRibbon(options?: ej.Ribbon.Model): JQuery; ejRibbon(memberName: any, value?: any, param?: any): any; -data(key: "ejRibbon"): ej.Ribbon; -ejRotator(): JQuery; ejRotator(options?: ej.Rotator.Model): JQuery; ejRotator(memberName: any, value?: any, param?: any): any; -data(key: "ejRotator"): ej.Rotator; -ejRTE(): JQuery; ejRTE(options?: ej.RTE.Model): JQuery; ejRTE(memberName: any, value?: any, param?: any): any; -data(key: "ejRTE"): ej.RTE; -ejSchedule(): JQuery; ejSchedule(options?: ej.Schedule.Model): JQuery; ejSchedule(memberName: any, value?: any, param?: any): any; -data(key: "ejSchedule"): ej.Schedule; -ejScroller(): JQuery; ejScroller(options?: ej.Scroller.Model): JQuery; ejScroller(memberName: any, value?: any, param?: any): any; -data(key: "ejScroller"): ej.Scroller; -ejSignature(): JQuery; ejSignature(options?: ej.Signature.Model): JQuery; ejSignature(memberName: any, value?: any, param?: any): any; -data(key: "ejSignature"): ej.Signature; -ejSlider(): JQuery; ejSlider(options?: ej.Slider.Model): JQuery; ejSlider(memberName: any, value?: any, param?: any): any; -data(key: "ejSlider"): ej.Slider; -ejSparkline(): JQuery; ejSparkline(options?: ej.datavisualization.Sparkline.Model): JQuery; ejSparkline(memberName: any, value?: any, param?: any): any; -data(key: "ejSparkline"): ej.datavisualization.Sparkline; -ejSpellCheck(): JQuery; ejSpellCheck(options?: ej.SpellCheck.Model): JQuery; ejSpellCheck(memberName: any, value?: any, param?: any): any; -data(key: "ejSpellCheck"): ej.SpellCheck; -ejSplitButton(): JQuery; ejSplitButton(options?: ej.SplitButton.Model): JQuery; ejSplitButton(memberName: any, value?: any, param?: any): any; -data(key: "ejSplitButton"): ej.SplitButton; -ejSplitter(): JQuery; ejSplitter(options?: ej.Splitter.Model): JQuery; ejSplitter(memberName: any, value?: any, param?: any): any; -data(key: "ejSplitter"): ej.Splitter; -ejSpreadsheet(): JQuery; ejSpreadsheet(options?: ej.Spreadsheet.Model): JQuery; ejSpreadsheet(memberName: any, value?: any, param?: any): any; -data(key: "ejSpreadsheet"): ej.Spreadsheet; -ejSymbolPalette(): JQuery; +ejSunburstChart(options?: ej.datavisualization.SunburstChart.Model): JQuery; +ejSunburstChart(memberName: any, value?: any, param?: any): any; + ejSymbolPalette(options?: ej.datavisualization.SymbolPalette.Model): JQuery; ejSymbolPalette(memberName: any, value?: any, param?: any): any; -data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; -ejTab(): JQuery; ejTab(options?: ej.Tab.Model): JQuery; ejTab(memberName: any, value?: any, param?: any): any; -data(key: "ejTab"): ej.Tab; -ejTagCloud(): JQuery; ejTagCloud(options?: ej.TagCloud.Model): JQuery; ejTagCloud(memberName: any, value?: any, param?: any): any; -data(key: "ejTagCloud"): ej.TagCloud; -ejNumericTextbox(): JQuery; ejNumericTextbox(options?: ej.Editor.Model): JQuery; ejNumericTextbox(memberName: any, value?: any, param?: any): any; -data(key: "ejNumericTextbox"): ej.NumericTextbox; -ejCurrencyTextbox(): JQuery; ejCurrencyTextbox(options?: ej.Editor.Model): JQuery; ejCurrencyTextbox(memberName: any, value?: any, param?: any): any; -data(key: "ejCurrencyTextbox"): ej.CurrencyTextbox; -ejPercentageTextbox(): JQuery; ejPercentageTextbox(options?: ej.Editor.Model): JQuery; ejPercentageTextbox(memberName: any, value?: any, param?: any): any; -data(key: "ejPercentageTextbox"): ej.PercentageTextbox; -ejTile(): JQuery; ejTile(options?: ej.Tile.Model): JQuery; ejTile(memberName: any, value?: any, param?: any): any; -data(key: "ejTile"): ej.Tile; -ejTimePicker(): JQuery; ejTimePicker(options?: ej.TimePicker.Model): JQuery; ejTimePicker(memberName: any, value?: any, param?: any): any; -data(key: "ejTimePicker"): ej.TimePicker; -ejToggleButton(): JQuery; ejToggleButton(options?: ej.ToggleButton.Model): JQuery; ejToggleButton(memberName: any, value?: any, param?: any): any; -data(key: "ejToggleButton"): ej.ToggleButton; -ejToolbar(): JQuery; ejToolbar(options?: ej.Toolbar.Model): JQuery; ejToolbar(memberName: any, value?: any, param?: any): any; -data(key: "ejToolbar"): ej.Toolbar; -ejTooltip(): JQuery; ejTooltip(options?: ej.Tooltip.Model): JQuery; ejTooltip(memberName: any, value?: any, param?: any): any; -data(key: "ejTooltip"): ej.Tooltip; -ejTreeGrid(): JQuery; ejTreeGrid(options?: ej.TreeGrid.Model): JQuery; ejTreeGrid(memberName: any, value?: any, param?: any): any; -data(key: "ejTreeGrid"): ej.TreeGrid; -ejTreeMap(): JQuery; ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; ejTreeMap(memberName: any, value?: any, param?: any): any; -data(key: "ejTreeMap"): ej.datavisualization.TreeMap; -ejTreeView(): JQuery; ejTreeView(options?: ej.TreeView.Model): JQuery; ejTreeView(memberName: any, value?: any, param?: any): any; -data(key: "ejTreeView"): ej.TreeView; -ejUploadbox(): JQuery; ejUploadbox(options?: ej.Uploadbox.Model): JQuery; ejUploadbox(memberName: any, value?: any, param?: any): any; -data(key: "ejUploadbox"): ej.Uploadbox; -ejWaitingPopup(): JQuery; ejWaitingPopup(options?: ej.WaitingPopup.Model): JQuery; ejWaitingPopup(memberName: any, value?: any, param?: any): any; + +data(key: "ejAccordion"): ej.Accordion; +data(key: "ejAutocomplete"): ej.Autocomplete; +data(key: "ejBarcode"): ej.datavisualization.Barcode; +data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; +data(key: "ejButton"): ej.Button; +data(key: "ejCaptcha"): ej.Captcha; +data(key: "ejChart"): ej.datavisualization.Chart; +data(key: "ejCheckBox"): ej.CheckBox; +data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; +data(key: "ejColorPicker"): ej.ColorPicker; +data(key: "ejDatePicker"): ej.DatePicker; +data(key: "ejDateRangePicker"): ej.DateRangePicker; +data(key: "ejDateTimePicker"): ej.DateTimePicker; +data(key: "ejDiagram"): ej.datavisualization.Diagram; +data(key: "ejDialog"): ej.Dialog; +data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; +data(key: "ejDocumentEditor"): ej.DocumentEditor; +data(key: "ejDraggable"): ej.Draggable; +data(key: "ejDropDownList"): ej.DropDownList; +data(key: "ejDroppable"): ej.Droppable; +data(key: "ejFileExplorer"): ej.FileExplorer; +data(key: "ejGantt"): ej.Gantt; +data(key: "ejGrid"): ej.Grid; +data(key: "ejGroupButton"): ej.GroupButton; +data(key: "ejHeatMap"): ej.datavisualization.HeatMap; +data(key: "ejHeatMapLegend"): ej.datavisualization.HeatMapLegend; +data(key: "ejKanban"): ej.Kanban; +data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; +data(key: "ejListBox"): ej.ListBox; +data(key: "ejListView"): ej.ListView; +data(key: "ejMap"): ej.datavisualization.Map; +data(key: "ejMaskEdit"): ej.MaskEdit; +data(key: "ejMenu"): ej.Menu; +data(key: "ejNavigationDrawer"): ej.NavigationDrawer; +data(key: "ejOverview"): ej.datavisualization.Overview; +data(key: "ejPager"): ej.Pager; +data(key: "ejPdfViewer"): ej.PdfViewer; +data(key: "ejPivotChart"): ej.PivotChart; +data(key: "ejPivotClient"): ej.PivotClient; +data(key: "ejPivotGauge"): ej.PivotGauge; +data(key: "ejPivotGrid"): ej.PivotGrid; +data(key: "ejPivotPager"): ej.PivotPager; +data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; +data(key: "ejPivotTreeMap"): ej.PivotTreeMap; +data(key: "ejProgressBar"): ej.ProgressBar; +data(key: "ejRadialMenu"): ej.RadialMenu; +data(key: "ejRadialSlider"): ej.RadialSlider; +data(key: "ejRadioButton"): ej.RadioButton; +data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; +data(key: "ejRating"): ej.Rating; +data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; +data(key: "ejReportViewer"): ej.ReportViewer; +data(key: "ejResizable"): ej.Resizable; +data(key: "ejRibbon"): ej.Ribbon; +data(key: "ejRotator"): ej.Rotator; +data(key: "ejRTE"): ej.RTE; +data(key: "ejSchedule"): ej.Schedule; +data(key: "ejScroller"): ej.Scroller; +data(key: "ejSignature"): ej.Signature; +data(key: "ejSlider"): ej.Slider; +data(key: "ejSparkline"): ej.datavisualization.Sparkline; +data(key: "ejSpellCheck"): ej.SpellCheck; +data(key: "ejSplitButton"): ej.SplitButton; +data(key: "ejSplitter"): ej.Splitter; +data(key: "ejSpreadsheet"): ej.Spreadsheet; +data(key: "ejSunburstChart"): ej.datavisualization.SunburstChart; +data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; +data(key: "ejTab"): ej.Tab; +data(key: "ejTagCloud"): ej.TagCloud; +data(key: "ejNumericTextbox"): ej.NumericTextbox; +data(key: "ejCurrencyTextbox"): ej.CurrencyTextbox; +data(key: "ejPercentageTextbox"): ej.PercentageTextbox; +data(key: "ejTile"): ej.Tile; +data(key: "ejTimePicker"): ej.TimePicker; +data(key: "ejToggleButton"): ej.ToggleButton; +data(key: "ejToolbar"): ej.Toolbar; +data(key: "ejTooltip"): ej.Tooltip; +data(key: "ejTreeGrid"): ej.TreeGrid; +data(key: "ejTreeMap"): ej.datavisualization.TreeMap; +data(key: "ejTreeView"): ej.TreeView; +data(key: "ejUploadbox"): ej.Uploadbox; data(key: "ejWaitingPopup"): ej.WaitingPopup; -} +} \ No newline at end of file diff --git a/ej.web.all/tslint.json b/ej.web.all/tslint.json new file mode 100644 index 0000000000..b0b7c81ba5 --- /dev/null +++ b/ej.web.all/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/elasticsearch/index.d.ts b/elasticsearch/index.d.ts index 84c8f281f9..a0606a4961 100644 --- a/elasticsearch/index.d.ts +++ b/elasticsearch/index.d.ts @@ -88,6 +88,7 @@ declare module Elasticsearch { export interface ConfigOptions { host?: any; hosts?: any; + httpAuth?: string; log?: any; apiVersion?: string; plugins?: any; diff --git a/electron-devtools-installer/electron-devtools-installer-tests.ts b/electron-devtools-installer/electron-devtools-installer-tests.ts index a923e2b20e..a453221698 100644 --- a/electron-devtools-installer/electron-devtools-installer-tests.ts +++ b/electron-devtools-installer/electron-devtools-installer-tests.ts @@ -1,5 +1,3 @@ -/// - import installExtension, { EMBER_INSPECTOR, REACT_DEVELOPER_TOOLS, BACKBONE_DEBUGGER, JQUERY_DEBUGGER, diff --git a/electron/index.d.ts b/electron/index.d.ts index 448df1915f..11103b3a18 100644 --- a/electron/index.d.ts +++ b/electron/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Electron v1.4.8 // Project: http://electron.atom.io/ -// Definitions by: jedmao , rhysd , Milan Burda , aliib +// Definitions by: jedmao , rhysd , Milan Burda , aliib , Daniel Perez Alvarez , Markus Olsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -398,6 +398,20 @@ declare namespace Electron { * This method can only be called before app is ready. */ disableHardwareAcceleration(): void; + /** + * Sets the counter badge for current app. Setting the count to 0 will hide the badge. + * + * @returns True when the call succeeded, otherwise returns false. + * + * Note: This API is only available on macOS and Linux. + */ + setBadgeCount(count: number): boolean; + /** + * @returns The current value displayed in the counter badge. + * + * Note: This API is only available on macOS and Linux. + */ + getBadgeCount(): number; /** * @returns whether current desktop environment is Unity launcher. (Linux) * @@ -505,20 +519,6 @@ declare namespace Electron { * Note: This API is only available on macOS. */ getBadge(): string; - /** - * Sets the counter badge for current app. Setting the count to 0 will hide the badge. - * - * @returns True when the call succeeded, otherwise returns false. - * - * Note: This API is only available on macOS and Linux. - */ - setBadgeCount(count: number): boolean; - /** - * @returns The current value displayed in the counter badge. - * - * Note: This API is only available on macOS and Linux. - */ - getBadgeCount(): number; /** * Hides the dock icon. * @@ -2455,7 +2455,11 @@ declare namespace Electron { */ constructor(options: MenuItemOptions); - click: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => void; + /** + * A function that is fired when the MenuItem receives a click event + */ + click: (event: Event, browserWindow: BrowserWindow, webContents: WebContents) => void; + /** * Read-only property. */ @@ -2492,7 +2496,7 @@ declare namespace Electron { /** * Callback when the menu item is clicked. */ - click?: (menuItem: MenuItem, browserWindow: BrowserWindow) => void; + click?: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => void; /** * Can be normal, separator, submenu, checkbox or radio. */ diff --git a/electron/test/main.ts b/electron/test/main.ts index 9912b62eea..35a85a81dc 100644 --- a/electron/test/main.ts +++ b/electron/test/main.ts @@ -232,7 +232,8 @@ app.dock.setBadge('foo'); var id = app.dock.bounce('informational'); app.dock.cancelBounce(id); app.dock.setIcon('/path/to/icon.png'); -app.dock.setBadgeCount(app.dock.getBadgeCount() + 1); + +app.setBadgeCount(app.getBadgeCount() + 1); app.setUserTasks([ { @@ -530,12 +531,19 @@ var winWindows = new BrowserWindow({ // menu-item // https://github.com/atom/electron/blob/master/docs/api/menu-item.md -var menuItem = new MenuItem({}); +var menuItem = new MenuItem({ + click: (menuItem: Electron.MenuItem, browserWindow: Electron.BrowserWindow, event: Electron.Event) => { + console.log('click', menuItem, browserWindow, event); + } +}); + +const fakeEvent: Electron.Event = { + preventDefault: () => { }, + sender: winWindows.webContents, +} menuItem.label = 'Hello World!'; -menuItem.click = (menuItem, browserWindow) => { - console.log('click', menuItem, browserWindow); -}; +menuItem.click(fakeEvent, winWindows, winWindows.webContents) // menu // https://github.com/atom/electron/blob/master/docs/api/menu.md diff --git a/ember/v1/ember-tests.ts b/ember/v1/ember-tests.ts index 25ca3e3cc5..103fb0146e 100644 --- a/ember/v1/ember-tests.ts +++ b/ember/v1/ember-tests.ts @@ -1,6 +1,3 @@ -/// - - var App : any; App = Em.Application.create(); diff --git a/enzyme/enzyme-tests.tsx b/enzyme/enzyme-tests.tsx index 82a8dc9822..c7323766f7 100644 --- a/enzyme/enzyme-tests.tsx +++ b/enzyme/enzyme-tests.tsx @@ -37,6 +37,13 @@ namespace ShallowWrapperTest { elementWrapper: ShallowWrapper, {}>, statelessWrapper: ShallowWrapper; + function test_props_state_inferring() { + let wrapper: ShallowWrapper; + wrapper = shallow(); + wrapper.state().stateProperty; + wrapper.props().stringProp.toUpperCase(); + } + function test_shallow_options() { shallow(, { context: { @@ -337,6 +344,13 @@ namespace ReactWrapperTest { elementWrapper: ReactWrapper, {}>, statelessWrapper: ReactWrapper; + function test_prop_state_inferring() { + let wrapper: ReactWrapper; + wrapper = mount(); + wrapper.state().stateProperty; + wrapper.props().stringProp.toUpperCase(); + } + function test_unmount() { reactWrapper = reactWrapper.unmount(); } diff --git a/enzyme/index.d.ts b/enzyme/index.d.ts index fc498ca78a..abb57e36ef 100644 --- a/enzyme/index.d.ts +++ b/enzyme/index.d.ts @@ -546,6 +546,7 @@ export interface MountRendererProps { * @param node * @param [options] */ +export function shallow

    (node: ReactElement

    , options?: ShallowRendererProps): ShallowWrapper; export function shallow(node: ReactElement

    , options?: ShallowRendererProps): ShallowWrapper; /** @@ -553,6 +554,7 @@ export function shallow(node: ReactElement

    , options?: ShallowRendererPr * @param node * @param [options] */ +export function mount

    (node: ReactElement

    , options?: MountRendererProps): ReactWrapper; export function mount(node: ReactElement

    , options?: MountRendererProps): ReactWrapper; /** diff --git a/esprima/esprima-tests.ts b/esprima/esprima-tests.ts index d7c748d3b8..60b54e0679 100644 --- a/esprima/esprima-tests.ts +++ b/esprima/esprima-tests.ts @@ -1,6 +1,3 @@ -/// - - import esprima = require('esprima'); import * as ESTree from 'estree'; diff --git a/event-stream/tsconfig.json b/event-stream/tsconfig.json index 208ff51fe0..768497bcd8 100644 --- a/event-stream/tsconfig.json +++ b/event-stream/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/express-serve-static-core/index.d.ts b/express-serve-static-core/index.d.ts index 42f1a535f7..e42568b14c 100644 --- a/express-serve-static-core/index.d.ts +++ b/express-serve-static-core/index.d.ts @@ -161,6 +161,8 @@ interface CookieOptions { path?: string; domain?: string; secure?: boolean | 'auto'; + encode?: (val: string) => void; + sameSite?: boolean | string; } interface Errback { (err: Error): void; } @@ -848,6 +850,8 @@ interface Response extends http.ServerResponse, Express.Response { * */ vary(field: string): Response; + + app: Application; } interface Handler extends RequestHandler { } diff --git a/extended-listbox/extended-listbox-tests.ts b/extended-listbox/extended-listbox-tests.ts index 0ca2f862b1..dfa51ffebf 100644 --- a/extended-listbox/extended-listbox-tests.ts +++ b/extended-listbox/extended-listbox-tests.ts @@ -1,5 +1,4 @@ - - +/// var $test = $("#test"); @@ -126,54 +125,3 @@ instance.onItemEnterPressed((event: ListboxEvent) => { instance.onItemDoubleClicked((event: ListboxEvent) => { console.log(event.args); }); - - - -/////// LEGACY API /////// - -// Add string item -instance.target.listbox("addItem", "Test2"); - - -// Add item -var item: ListboxItem = {}; -item.selected = true; -item.disabled = false; -item.childItems = ["Test4"]; -item.groupHeader = false; -item.id = "ouetioreit"; -item.index = 0; -item.text = "Test3"; -var id: string = instance.target.listbox("addItem", item); - - -// Remove item -instance.target.listbox("removeItem", id); - - -// Get item -var i: ListboxItem = instance.target.listbox("getItem", id); - - -// Get items -var allItems: ListboxItem[] = instance.target.listbox("getItems"); - - -// Move item up -var newIndex: number = instance.target.listbox("moveItemUp", i.id); - - -// Move item down -newIndex = instance.target.listbox("moveItemDown", i.id); - - -// Clear selection -instance.target.listbox("clearSelection"); - - -// Enable -instance.target.listbox("enable", false); - - -// Destroy -instance.target.listbox("destroy"); diff --git a/extended-listbox/index.d.ts b/extended-listbox/index.d.ts index eb5f0eec04..3f3527b903 100644 --- a/extended-listbox/index.d.ts +++ b/extended-listbox/index.d.ts @@ -1,10 +1,8 @@ -// Type definitions for extended-listbox 1.1.x +// Type definitions for extended-listbox 2.0.x // Project: https://github.com/code-chris/extended-listbox // Definitions by: Christian Kotzbauer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - interface ListboxItem { /** display text */ text?: string; @@ -147,37 +145,4 @@ interface JQuery { /** constructs a new instance of Listbox on the given DOM item */ listbox(options: ListBoxOptions): ExtendedListboxInstance|ExtendedListboxInstance[]; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'addItem'): string; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'removeItem'): void; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'destroy'): void; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'getItem'): ListboxItem; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'getItems'): ListboxItem[]; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'moveItemUp'): number; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'moveItemDown'): number; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'clearSelection'): void; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: 'enable'): void; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: string): any; - - /** @deprecated: use method in ExtendedListboxInstance */ - listbox(methodName: string, methodParameter: any): any; } diff --git a/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts b/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts index 63177ebde3..ca992ea3ef 100644 --- a/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts +++ b/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts @@ -22,18 +22,18 @@ configuration = { // Extract css files { test: /\.css$/, - loader: ExtractTextPlugin.extract({ - fallbackLoader: "style-loader", - loader: "css-loader", + use: ExtractTextPlugin.extract({ + fallback: "style-loader", + use: "css-loader", }) }, // Optionally extract less files // or any other compile-to-css language { test: /\.less$/, - loader: ExtractTextPlugin.extract({ - fallbackLoader: "style-loader", - loader: ["css-loader", "less-loader"], + use: ExtractTextPlugin.extract({ + fallback: "style-loader", + use: ["css-loader", "less-loader"], }) } // You could also use other loaders the same way. I. e. the autoprefixer-loader @@ -70,10 +70,13 @@ configuration = { // ... module: { rules: [ - { test: /\.css$/, loader: ExtractTextPlugin.extract({ - fallbackLoader: "style-loader", - loader: "css-loader" - }) } + { + test: /\.css$/, + use: ExtractTextPlugin.extract({ + fallback: "style-loader", + use: "css-loader" + }) + } ] }, plugins: [ @@ -89,8 +92,8 @@ configuration = { // ... module: { rules: [ - { test: /\.scss$/i, loader: extractCSS.extract(['css','sass']) }, - { test: /\.less$/i, loader: extractLESS.extract(['css','less']) }, + { test: /\.scss$/i, use: extractCSS.extract(['css','sass']) }, + { test: /\.less$/i, use: extractLESS.extract(['css','less']) }, ] }, plugins: [ diff --git a/extract-text-webpack-plugin/index.d.ts b/extract-text-webpack-plugin/index.d.ts index 21052b08c1..6da0c183c3 100644 --- a/extract-text-webpack-plugin/index.d.ts +++ b/extract-text-webpack-plugin/index.d.ts @@ -1,15 +1,15 @@ // Type definitions for extract-text-webpack-plugin 2.0.0 -// Project: https://github.com/webpack/extract-text-webpack-plugin -// Definitions by: flying-sheep +// Project: https://github.com/webpack-contrib/extract-text-webpack-plugin +// Definitions by: flying-sheep , kayo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import { Plugin, OldLoader } from 'webpack' +import { Plugin, OldLoader, NewLoader } from 'webpack' /** * extract-text-webpack-plugin has no support for .options instead of .query yet. * See https://github.com/webpack/extract-text-webpack-plugin/issues/281 */ -type Loader = string | OldLoader +type Loader = string | OldLoader | NewLoader interface ExtractPluginOptions { /** the filename of the result file. May contain `[name]`, `[id]` and `[contenthash]` */ @@ -24,9 +24,9 @@ interface ExtractPluginOptions { interface ExtractOptions { /** the loader(s) that should be used for converting the resource to a css exporting module */ - loader: Loader | Loader[] + use: Loader | Loader[] /** the loader(s) that should be used when the css is not extracted (i.e. in an additional chunk when `allChunks: false`) */ - fallbackLoader?: Loader | Loader[] + fallback?: Loader | Loader[] /** override the `publicPath` setting for this loader */ publicPath?: string } diff --git a/facebook-js-sdk/index.d.ts b/facebook-js-sdk/index.d.ts index a7b78e73b0..cb1981580a 100644 --- a/facebook-js-sdk/index.d.ts +++ b/facebook-js-sdk/index.d.ts @@ -172,6 +172,7 @@ declare namespace facebook { authResponse: { accessToken: string; expiresIn: number; + grantedScopes: string; signedRequest: string; userID: string; }; diff --git a/faker/faker-tests.ts b/faker/faker-tests.ts index 4dc2a3735f..5fb6a53746 100644 --- a/faker/faker-tests.ts +++ b/faker/faker-tests.ts @@ -52,6 +52,11 @@ resultStr = faker.company.bsAdjective(); resultStr = faker.company.bsBuzz(); resultStr = faker.company.bsNoun(); +resultStr = faker.database.column(); +resultStr = faker.database.type(); +resultStr = faker.database.collation(); +resultStr = faker.database.engine(); + resultDate = faker.date.past(); resultDate = faker.date.future(); resultDate = faker.date.between('foo', 'bar'); @@ -80,6 +85,8 @@ resultStr = faker.finance.transactionType(); resultStr = faker.finance.currencyCode(); resultStr = faker.finance.currencyName(); resultStr = faker.finance.currencySymbol(); +resultStr = faker.finance.bitcoinAddress(); +resultStr = faker.finance.bic(); resultStr = faker.hacker.abbreviation(); resultStr = faker.hacker.adjective(); @@ -110,6 +117,8 @@ resultStr = userCard.address.suite; resultStr = faker.internet.avatar(); resultStr = faker.internet.email(); resultStr = faker.internet.email('foo', 'bar', 'quux'); +resultStr = faker.internet.exampleEmail(); +resultStr = faker.internet.exampleEmail('foo', 'bar'); resultStr = faker.internet.protocol(); resultStr = faker.internet.url(); resultStr = faker.internet.domainName(); @@ -128,12 +137,18 @@ resultStr = faker.lorem.words(); resultStr = faker.lorem.words(0); resultStr = faker.lorem.sentence(); resultStr = faker.lorem.sentence(0, 0); +resultStr = faker.lorem.slug(); +resultStr = faker.lorem.slug(0); resultStr = faker.lorem.sentences(); resultStr = faker.lorem.sentences(0); resultStr = faker.lorem.paragraph(); resultStr = faker.lorem.paragraph(0); resultStr = faker.lorem.paragraphs(); resultStr = faker.lorem.paragraphs(0, ''); +resultStr = faker.lorem.text(); +resultStr = faker.lorem.text(0); +resultStr = faker.lorem.lines(); +resultStr = faker.lorem.lines(0); resultStr = faker.name.firstName(); resultStr = faker.name.firstName(0); @@ -169,6 +184,13 @@ resultStr = faker.random.objectElement(); resultStr = faker.random.objectElement({foo: 'bar', field: 'foo'}); resultStr = faker.random.uuid(); resultBool = faker.random.boolean(); +resultStr = faker.random.word(); +resultStr = faker.random.words(); +resultStr = faker.random.words(0); +resultStr = faker.random.image(); +resultStr = faker.random.locale(); +resultStr = faker.random.alphaNumeric(); +resultStr = faker.random.alphaNumeric(0); resultStr = faker.system.fileName( "foo", "bar" ); resultStr = faker.system.commonFileName( "foo", "bar" ); diff --git a/faker/index.d.ts b/faker/index.d.ts index 01e01b8b8b..ccca40e51a 100644 --- a/faker/index.d.ts +++ b/faker/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for faker v3.1 +// Type definitions for faker v4.1.0 // Project: http://marak.com/faker.js/ -// Definitions by: Bas Pennings , Yuki Kokubun +// Definitions by: Ben Swartz , Bas Pennings , Yuki Kokubun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare var fakerStatic: Faker.FakerStatic; @@ -52,6 +52,13 @@ declare namespace Faker { bsNoun(): string; }; + database: { + column(): string; + type(): string; + collation(): string; + engine(): string; + }; + date: { past(years?: number, refDate?: string|Date): Date; future(years?: number, refDate?: string|Date): Date; @@ -72,6 +79,8 @@ declare namespace Faker { currencyCode(): string; currencyName(): string; currencySymbol(): string; + bitcoinAddress(): string; + bic(): string }; hacker: { @@ -116,11 +125,13 @@ declare namespace Faker { sports(width?: number, height?: number): string; technics(width?: number, height?: number): string; transport(width?: number, height?: number): string; + dataUri(width?: number, height?: number): string; }; internet: { avatar(): string; email(firstName?: string, lastName?: string, provider?: string): string; + exampleEmail(firstName?: string, lastName?: string): string; userName(firstName?: string, lastName?: string): string; protocol(): string; url(): string; @@ -128,6 +139,7 @@ declare namespace Faker { domainSuffix(): string; domainWord(): string; ip(): string; + ipv6(): string; userAgent(): string; color(baseRed255?: number, baseGreen255?: number, baseBlue255?: number): string; mac(): string; @@ -138,9 +150,12 @@ declare namespace Faker { word(): string; words(num?: number): string; sentence(wordCount?: number, range?: number): string; + slug(wordCount?: number): string; sentences(sentenceCount?: number): string; paragraph(sentenceCount?: number): string; paragraphs(paragraphCount?: number, separator?: string): string; + text(times?: number): string; + lines(lineCount?: number): string; }; name: { @@ -171,6 +186,11 @@ declare namespace Faker { objectElement(object?: { [key: string]: T }, field?: any): T; uuid(): string; boolean(): boolean; + word(): string; // TODO: have ability to return specific type of word? As in: noun, adjective, verb, etc + words(count?: number): string; + image(): string; + locale(): string; + alphaNumeric(count?: number): string; }; system: { @@ -275,6 +295,14 @@ declare module "faker" { export = fakerStatic; } +declare module "faker/locale/az" { + export = fakerStatic; +} + +declare module "faker/locale/cz" { + export = fakerStatic; +} + declare module "faker/locale/de" { export = fakerStatic; } @@ -351,6 +379,10 @@ declare module "faker/locale/ge" { export = fakerStatic; } +declare module "faker/locale/id_ID" { + export = fakerStatic; +} + declare module "faker/locale/it" { export = fakerStatic; } diff --git a/faker/tsconfig.json b/faker/tsconfig.json index c2ce14c941..0589e5dc54 100644 --- a/faker/tsconfig.json +++ b/faker/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,4 +19,4 @@ "index.d.ts", "faker-tests.ts" ] -} \ No newline at end of file +} diff --git a/faker/v3/faker-tests.ts b/faker/v3/faker-tests.ts new file mode 100644 index 0000000000..4dc2a3735f --- /dev/null +++ b/faker/v3/faker-tests.ts @@ -0,0 +1,183 @@ + + +let resultStr: string; +let resultBool: boolean; +let resultNum: number; +let resultStrArr: string[]; +let resultDate: Date; + +import faker = require('faker'); +faker.locale = 'en'; + +resultStr = faker.address.zipCode(); +resultStr = faker.address.zipCode('###'); +resultStr = faker.address.city(); +resultStr = faker.address.city(0); +resultStr = faker.address.cityPrefix(); +resultStr = faker.address.citySuffix(); +resultStr = faker.address.streetName(); +resultStr = faker.address.streetAddress(); +resultStr = faker.address.streetAddress(false);; +resultStr = faker.address.streetSuffix(); +resultStr = faker.address.streetPrefix(); +resultStr = faker.address.secondaryAddress(); +resultStr = faker.address.county(); +resultStr = faker.address.country(); +resultStr = faker.address.countryCode(); +resultStr = faker.address.state(); +resultStr = faker.address.state(false); +resultStr = faker.address.stateAbbr(); +resultStr = faker.address.latitude(); +resultStr = faker.address.longitude(); + +resultStr = faker.commerce.color(); +resultStr = faker.commerce.department(); +resultStr = faker.commerce.productName(); +resultStr = faker.commerce.price(); +resultStr = faker.commerce.price(0, 0, 0, '#'); +resultStr = faker.commerce.productAdjective(); +resultStr = faker.commerce.productMaterial(); +resultStr = faker.commerce.product(); + +resultStrArr = faker.company.suffixes(); +resultStr = faker.company.companyName(); +resultStr = faker.company.companyName(0); +resultStr = faker.company.companySuffix(); +resultStr = faker.company.catchPhrase(); +resultStr = faker.company.bs(); +resultStr = faker.company.catchPhraseAdjective(); +resultStr = faker.company.catchPhraseDescriptor(); +resultStr = faker.company.catchPhraseNoun(); +resultStr = faker.company.bsAdjective(); +resultStr = faker.company.bsBuzz(); +resultStr = faker.company.bsNoun(); + +resultDate = faker.date.past(); +resultDate = faker.date.future(); +resultDate = faker.date.between('foo', 'bar'); +resultDate = faker.date.between(new Date(), new Date()); +resultDate = faker.date.recent(); +resultDate = faker.date.recent(100); +resultStr = faker.date.month(); +resultStr = faker.date.month({ + abbr: true, + context: true +}); +resultStr = faker.date.weekday(); +resultStr = faker.date.weekday({ + abbr: true, + context: true +}); + +resultStr = faker.finance.account(); +resultStr = faker.finance.account(0); +resultStr = faker.finance.accountName(); +resultStr = faker.finance.mask(); +resultStr = faker.finance.mask(0, false, false); +resultStr = faker.finance.amount(); +resultStr = faker.finance.amount(0, 0, 0, '#'); +resultStr = faker.finance.transactionType(); +resultStr = faker.finance.currencyCode(); +resultStr = faker.finance.currencyName(); +resultStr = faker.finance.currencySymbol(); + +resultStr = faker.hacker.abbreviation(); +resultStr = faker.hacker.adjective(); +resultStr = faker.hacker.noun(); +resultStr = faker.hacker.verb(); +resultStr = faker.hacker.ingverb(); +resultStr = faker.hacker.phrase(); + +resultStr = faker.helpers.randomize(); +resultNum = faker.helpers.randomize([1,2,3,4]); +resultStr = faker.helpers.randomize(['foo', 'bar', 'quux']); +resultStr = faker.helpers.slugify('foo bar quux'); +resultStr = faker.helpers.replaceSymbolWithNumber('foo# bar#'); +resultStr = faker.helpers.replaceSymbols('foo# bar? quux#'); +resultStrArr = faker.helpers.shuffle(['foo', 'bar', 'quux']); +resultStr = faker.helpers.mustache('{{foo}}{{bar}}', {foo: 'x', bar: 'y'}); + +const card = faker.helpers.createCard(); +resultStr = card.name; +resultStr = card.address.streetA; +const contextualCard = faker.helpers.contextualCard(); +resultStr = contextualCard.name; +resultStr = contextualCard.address.suite; +const userCard = faker.helpers.userCard(); +resultStr = userCard.name; +resultStr = userCard.address.suite; + +resultStr = faker.internet.avatar(); +resultStr = faker.internet.email(); +resultStr = faker.internet.email('foo', 'bar', 'quux'); +resultStr = faker.internet.protocol(); +resultStr = faker.internet.url(); +resultStr = faker.internet.domainName(); +resultStr = faker.internet.domainSuffix(); +resultStr = faker.internet.domainWord(); +resultStr = faker.internet.ip(); +resultStr = faker.internet.userAgent(); +resultStr = faker.internet.color(); +resultStr = faker.internet.color(0, 0, 0); +resultStr = faker.internet.mac(); +resultStr = faker.internet.password(); +resultStr = faker.internet.password(0, false, '#', 'foo'); + +resultStr = faker.lorem.word(); +resultStr = faker.lorem.words(); +resultStr = faker.lorem.words(0); +resultStr = faker.lorem.sentence(); +resultStr = faker.lorem.sentence(0, 0); +resultStr = faker.lorem.sentences(); +resultStr = faker.lorem.sentences(0); +resultStr = faker.lorem.paragraph(); +resultStr = faker.lorem.paragraph(0); +resultStr = faker.lorem.paragraphs(); +resultStr = faker.lorem.paragraphs(0, ''); + +resultStr = faker.name.firstName(); +resultStr = faker.name.firstName(0); +resultStr = faker.name.lastName(); +resultStr = faker.name.lastName(0); +resultStr = faker.name.findName(); +resultStr = faker.name.findName('', '', 0); +resultStr = faker.name.jobTitle(); +resultStr = faker.name.prefix(); +resultStr = faker.name.suffix(); +resultStr = faker.name.title(); +resultStr = faker.name.jobDescriptor(); +resultStr = faker.name.jobArea(); +resultStr = faker.name.jobType(); + +resultStr = faker.phone.phoneNumber(); +resultStr = faker.phone.phoneNumber('#'); +resultStr = faker.phone.phoneNumberFormat(); +// https://github.com/Marak/faker.js/blob/master/lib/phone_number.js#L9-L13 +resultStr = faker.phone.phoneNumberFormat(0); +resultStr = faker.phone.phoneFormats(); + +resultNum = faker.random.number(); +resultNum = faker.random.number(0); +resultNum = faker.random.number({ + min: 0, + max: 0, + precision: 0 +}); +resultStr = faker.random.arrayElement(); +resultStr = faker.random.arrayElement(['foo', 'bar', 'quux']) +resultStr = faker.random.objectElement(); +resultStr = faker.random.objectElement({foo: 'bar', field: 'foo'}); +resultStr = faker.random.uuid(); +resultBool = faker.random.boolean(); + +resultStr = faker.system.fileName( "foo", "bar" ); +resultStr = faker.system.commonFileName( "foo", "bar" ); +resultStr = faker.system.mimeType(); +resultStr = faker.system.commonFileType(); +resultStr = faker.system.commonFileExt(); +resultStr = faker.system.fileType(); +resultStr = faker.system.fileExt( "foo" ); +resultStr = faker.system.semver(); + +import fakerEn = require('faker/locale/en'); +resultStr = faker.name.firstName(); diff --git a/faker/v3/index.d.ts b/faker/v3/index.d.ts new file mode 100644 index 0000000000..01e01b8b8b --- /dev/null +++ b/faker/v3/index.d.ts @@ -0,0 +1,416 @@ +// Type definitions for faker v3.1 +// Project: http://marak.com/faker.js/ +// Definitions by: Bas Pennings , Yuki Kokubun +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var fakerStatic: Faker.FakerStatic; + +declare namespace Faker { + interface FakerStatic { + locale: string; + + address: { + zipCode(format?: string): string; + city(format?: number): string; + cityPrefix(): string; + citySuffix(): string; + streetName(): string; + streetAddress(useFullAddress?: boolean): string; + streetSuffix(): string; + streetPrefix(): string; + secondaryAddress(): string; + county(): string; + country(): string; + countryCode(): string; + state(useAbbr?: boolean): string; + stateAbbr(): string; + latitude(): string; + longitude(): string; + }; + + commerce: { + color(): string; + department(): string; + productName(): string; + price(min?: number, max?: number, dec?: number, symbol?: string): string; + productAdjective(): string; + productMaterial(): string; + product(): string; + }; + + company: { + suffixes(): string[]; + companyName(format?: number): string; + companySuffix(): string; + catchPhrase(): string; + bs(): string; + catchPhraseAdjective(): string; + catchPhraseDescriptor(): string; + catchPhraseNoun(): string; + bsAdjective(): string; + bsBuzz(): string; + bsNoun(): string; + }; + + date: { + past(years?: number, refDate?: string|Date): Date; + future(years?: number, refDate?: string|Date): Date; + between(from: string|number|Date, to: string|Date): Date; + recent(days?: number): Date; + month(options?: { abbr?: boolean, context?: boolean }): string; + weekday(options?: { abbr?: boolean, context?: boolean }): string; + }; + + fake(str: string): string; + + finance: { + account(length?: number): string; + accountName(): string; + mask(length?: number, parens?: boolean, elipsis?: boolean): string; + amount(min?:number, max?: number, dec?: number, symbol?: string): string; + transactionType(): string; + currencyCode(): string; + currencyName(): string; + currencySymbol(): string; + }; + + hacker: { + abbreviation(): string; + adjective(): string; + noun(): string; + verb(): string; + ingverb(): string; + phrase(): string; + }; + + helpers: { + randomize(array: T[]): T; + randomize(): string; + slugify(string?: string): string; + replaceSymbolWithNumber(string?: string, symbol?: string): string; + replaceSymbols(string?: string): string; + shuffle(o: T[]): T[]; + shuffle(): string[]; + mustache(str: string, data: { [key: string]: string|((substring: string, ...args: any[]) => string) }): string; + createCard(): Faker.Card; + contextualCard(): Faker.ContextualCard; + userCard(): Faker.UserCard; + createTransaction(): Faker.Transaction; + }; + + + image: { + image(): string; + avatar(): string; + imageUrl(width?: number, height?: number, category?: string): string; + abstract(width?: number, height?: number): string; + animals(width?: number, height?: number): string; + business(width?: number, height?: number): string; + cats(width?: number, height?: number): string; + city(width?: number, height?: number): string; + food(width?: number, height?: number): string; + nightlife(width?: number, height?: number): string; + fashion(width?: number, height?: number): string; + people(width?: number, height?: number): string; + nature(width?: number, height?: number): string; + sports(width?: number, height?: number): string; + technics(width?: number, height?: number): string; + transport(width?: number, height?: number): string; + }; + + internet: { + avatar(): string; + email(firstName?: string, lastName?: string, provider?: string): string; + userName(firstName?: string, lastName?: string): string; + protocol(): string; + url(): string; + domainName(): string; + domainSuffix(): string; + domainWord(): string; + ip(): string; + userAgent(): string; + color(baseRed255?: number, baseGreen255?: number, baseBlue255?: number): string; + mac(): string; + password(len?: number, memorable?: boolean, pattern?: string|RegExp, prefix?: string): string; + }; + + lorem: { + word(): string; + words(num?: number): string; + sentence(wordCount?: number, range?: number): string; + sentences(sentenceCount?: number): string; + paragraph(sentenceCount?: number): string; + paragraphs(paragraphCount?: number, separator?: string): string; + }; + + name: { + firstName(gender?: number): string; + lastName(gender?: number): string; + findName(firstName?: string, lastName?: string, gender?: number): string; + jobTitle(): string; + prefix(): string; + suffix(): string; + title(): string; + jobDescriptor(): string; + jobArea(): string; + jobType(): string; + }; + + phone: { + phoneNumber(format?: string): string; + phoneNumberFormat(phoneFormatsArrayIndex?: number): string; + phoneFormats(): string; + }; + + random: { + number(max: number): number; + number(options?: { min?: number, max?: number, precision?: number }): number; + arrayElement(): string; + arrayElement(array: T[]): T; + objectElement(object?: { [key: string]: any }, field?: "key"): string; + objectElement(object?: { [key: string]: T }, field?: any): T; + uuid(): string; + boolean(): boolean; + }; + + system: { + fileName(ext: string, type: string): string; + commonFileName(ext: string, type: string): string; + mimeType(): string; + commonFileType(): string; + commonFileExt(): string; + fileType(): string; + fileExt(mimeType: string): string; + //directoryPath(): string; + //filePath(): string; + semver(): string; + }; + + seed(value: number): void; + } + + interface Card { + name: string; + username: string; + email: string; + address: FullAddress; + phone: string; + website: string; + company: Company; + posts: Post[]; + accountHistory: string[]; + } + + interface FullAddress { + streetA: string; + streetB: string; + streetC: string; + streetD: string; + city: string; + state: string; + county: string; + zipcode: string; + geo: Geo; + } + + interface Geo { + lat: string; + lng: string; + } + + interface Company { + name: string; + catchPhrase: string; + bs: string; + } + + interface Post { + words: string; + sentence: string; + sentences: string; + paragraph: string; + } + + interface ContextualCard { + name: string; + username: string; + email: string; + dob: Date; + phone: string; + address: Address; + website: string; + company: Company; + } + + interface Address { + street: string; + suite: string; + city: string; + state: string; + zipcode: string; + geo: Geo; + } + + interface UserCard { + name: string; + username: string; + email: string; + address: Address; + phone: string; + website: string; + company: Company; + } + + interface Transaction { + amount: string; + date: Date; + business: string; + name: string; + type: string; + account: string; + } +} + +declare module "faker" { + export = fakerStatic; +} + +declare module "faker/locale/de" { + export = fakerStatic; +} + +declare module "faker/locale/de_AT" { + export = fakerStatic; +} + +declare module "faker/locale/de_CH" { + export = fakerStatic; +} + +declare module "faker/locale/el_GR" { + export = fakerStatic; +} + +declare module "faker/locale/en" { + export = fakerStatic; +} + +declare module "faker/locale/en_AU" { + export = fakerStatic; +} + +declare module "faker/locale/en_BORK" { + export = fakerStatic; +} + +declare module "faker/locale/en_CA" { + export = fakerStatic; +} + +declare module "faker/locale/en_GB" { + export = fakerStatic; +} + +declare module "faker/locale/en_IE" { + export = fakerStatic; +} + +declare module "faker/locale/en_IND" { + export = fakerStatic; +} + +declare module "faker/locale/en_US" { + export = fakerStatic; +} + +declare module "faker/locale/en_au_ocker" { + export = fakerStatic; +} + +declare module "faker/locale/es" { + export = fakerStatic; +} + +declare module "faker/locale/es_MX" { + export = fakerStatic; +} + +declare module "faker/locale/fa" { + export = fakerStatic; +} + +declare module "faker/locale/fr" { + export = fakerStatic; +} + +declare module "faker/locale/fr_CA" { + export = fakerStatic; +} + +declare module "faker/locale/ge" { + export = fakerStatic; +} + +declare module "faker/locale/it" { + export = fakerStatic; +} + +declare module "faker/locale/ja" { + export = fakerStatic; +} + +declare module "faker/locale/ko" { + export = fakerStatic; +} + +declare module "faker/locale/nb_NO" { + export = fakerStatic; +} + +declare module "faker/locale/nep" { + export = fakerStatic; +} + +declare module "faker/locale/nl" { + export = fakerStatic; +} + +declare module "faker/locale/pl" { + export = fakerStatic; +} + +declare module "faker/locale/pt_BR" { + export = fakerStatic; +} + +declare module "faker/locale/ru" { + export = fakerStatic; +} + +declare module "faker/locale/sk" { + export = fakerStatic; +} + +declare module "faker/locale/sv" { + export = fakerStatic; +} + +declare module "faker/locale/tr" { + export = fakerStatic; +} + +declare module "faker/locale/uk" { + export = fakerStatic; +} + +declare module "faker/locale/vi" { + export = fakerStatic; +} + +declare module "faker/locale/zh_CN" { + export = fakerStatic; +} + +declare module "faker/locale/zh_TW" { + export = fakerStatic; +} diff --git a/faker/v3/tsconfig.json b/faker/v3/tsconfig.json new file mode 100644 index 0000000000..052493a9c7 --- /dev/null +++ b/faker/v3/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "faker": [ "faker/v3" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "faker-tests.ts" + ] +} diff --git a/falcor-express/falcor-express-tests.ts b/falcor-express/falcor-express-tests.ts index f4a4ed8b52..c76a61f901 100644 --- a/falcor-express/falcor-express-tests.ts +++ b/falcor-express/falcor-express-tests.ts @@ -1,7 +1,3 @@ - -/// -/// - import express = require('express'); import Router = require('falcor-router'); import falcorExpress = require('falcor-express') diff --git a/fancybox/fancybox-tests.ts b/fancybox/fancybox-tests.ts index 2d5743c950..eac3f31771 100644 --- a/fancybox/fancybox-tests.ts +++ b/fancybox/fancybox-tests.ts @@ -1,6 +1,3 @@ -/// - - $('.fancybox').fancybox(); $('.fancybox').fancybox({ padding: 0, diff --git a/featherlight/featherlight-tests.ts b/featherlight/featherlight-tests.ts index 4d609d3475..e241a30990 100644 --- a/featherlight/featherlight-tests.ts +++ b/featherlight/featherlight-tests.ts @@ -1,7 +1,5 @@ // Tests by: Kaur Kuut -/// - // Every option as default var defaultOptions = { namespace: 'featherlight', diff --git a/fetch-jsonp/fetch-jsonp-tests.ts b/fetch-jsonp/fetch-jsonp-tests.ts new file mode 100644 index 0000000000..058f47e70c --- /dev/null +++ b/fetch-jsonp/fetch-jsonp-tests.ts @@ -0,0 +1,48 @@ +import * as fetchJsonp from 'fetch-jsonp'; + +/* Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/README.md */ + +fetchJsonp('/users.jsonp') + .then(function(response) { + return response.json() + }).then(function(json) { + console.log('parsed json', json) + }).catch(function(ex) { + console.log('parsing failed', ex) + }) + +fetchJsonp('/users.jsonp', { + jsonpCallback: 'custom_callback' + }) + .then(function(response) { + return response.json() + }).then(function(json) { + console.log('parsed json', json) + }).catch(function(ex) { + console.log('parsing failed', ex) + }) + +fetchJsonp('/users.jsonp', { + timeout: 3000, + jsonpCallback: 'custom_callback' + }) + .then(function(response) { + return response.json() + }).then(function(json) { + console.log('parsed json', json) + }).catch(function(ex) { + console.log('parsing failed', ex) + }) + +// Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/examples/index.html +var result = fetchJsonp('http://www.flickr.com/services/feeds/photos_public.gne?format=json', { + jsonpCallback: 'jsoncallback', + timeout: 3000 +}) +result.then(function(response) { + return response.json() +}).then(function(json) { + document.body.innerHTML = JSON.stringify(json); +})['catch'](function(ex) { + document.body.innerHTML = 'failed:' + ex; +}) diff --git a/fetch-jsonp/index.d.ts b/fetch-jsonp/index.d.ts new file mode 100644 index 0000000000..e37094254e --- /dev/null +++ b/fetch-jsonp/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for fetch-jsonp 1.0 +// Project: https://github.com/camsong/fetch-jsonp +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace fetchJsonp { + interface Options { + timeout?: number; + jsonpCallback?: string; + } +} + +declare function fetchJsonp(url: RequestInfo, options?: fetchJsonp.Options): Promise; + +export = fetchJsonp; diff --git a/fetch-jsonp/tsconfig.json b/fetch-jsonp/tsconfig.json new file mode 100644 index 0000000000..05c3f994ed --- /dev/null +++ b/fetch-jsonp/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "noUnusedLocals": true, + "noUnusedParameters": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "fetch-jsonp-tests.ts" + ] +} diff --git a/fetch-jsonp/tslint.json b/fetch-jsonp/tslint.json new file mode 100644 index 0000000000..88bd9662f7 --- /dev/null +++ b/fetch-jsonp/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "only-arrow-functions-2": false + } +} diff --git a/fetch-mock/index.d.ts b/fetch-mock/index.d.ts index 4d69096845..bda708ee55 100644 --- a/fetch-mock/index.d.ts +++ b/fetch-mock/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wheresrhys/fetch-mock // Definitions by: Alexey Svetliakov , Tamir Duberstein , Risto Keravuori // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +// TypeScript Version: 2.2 type MockRequest = Request | RequestInit; diff --git a/fetch.io/fetch.io-tests.ts b/fetch.io/fetch.io-tests.ts new file mode 100644 index 0000000000..4e14a7a9a9 --- /dev/null +++ b/fetch.io/fetch.io-tests.ts @@ -0,0 +1,60 @@ + +import Fetch from 'fetch.io' + +const request = new Fetch() + +request + .get('') + .query({}) + .json() + +request + .delete('') + .json() + +request + .head('') + .json() + +request + .options('') + .json() + +request + .put('') + .json() + +request + .config('key', 'value') + .json() + +request + .config({key: 'value'}) + .json() + +request + .config('set', 'value') + .json() + +request + .set({key: 'value'}) + .json() + +request + .type('json') + .json() + +request + .get('') + .query({}) + .text() + +request + .get('') + .query({}) + .then(() => {}) + +request + .post('') + .send({}) + .json() diff --git a/fetch.io/index.d.ts b/fetch.io/index.d.ts new file mode 100644 index 0000000000..3c4ff7d781 --- /dev/null +++ b/fetch.io/index.d.ts @@ -0,0 +1,126 @@ +// Type definitions for fetch.io 3.1 +// Project: https://github.com/haoxins/fetch.io +// Definitions by: newraina +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + + type TUrl = string; + + type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; + + interface Query { + [key: string]: number | boolean | string; + } + + interface Header { + [key: string]: string; + } + + interface Options extends RequestInit { + + prefix?: string; + + query?: Query; + + header?: Header; + + beforeRequest?(url: TUrl, body: BodyInit): boolean; + + afterResponse?(res: Response): void; + + afterJSON?(body: any): void; + } + + declare namespace FetchIo { + + class Request { + + constructor(method: TMethod, url: TUrl, options: Options) + + /** + * HTTP delete method + */ + delete: (url: TUrl) => this; + + /** + * HTTP get method + */ + get: (url: TUrl) => this; + + /** + * HTTP head method + */ + head: (url: TUrl) => this; + + /** + * HTTP options method + */ + options: (url: TUrl) => this; + + /** + * HTTP post method + */ + post: (url: TUrl) => this; + + /** + * HTTP put method + */ + put: (url: TUrl) => this; + + /** + * Set Options + */ + config(key: string, value: any): this + + config(opts: {[key: string]: any}): this + + /** + * Set Header + */ + set(key: string, value: any): this + + set(opts: {[key: string]: any}): this + + /** + * Set Content-Type + */ + type(type: 'json' | 'form' | 'urlencoded'): this + + /** + * Add query string + */ + query(object: {[key: string]: any}): this + + /** + * Send data + */ + send(data: {[key: string]: any}): this + + /** + * ppend formData + */ + append(key: string, value: string): this + + /** + * Get Response directly + */ + then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise + + /** + * Make Response to JSON + */ + json(strict?: boolean): Promise + + /** + * Make Response to string + */ + text(): Promise + } + + class Fetch extends Request { + constructor(options?: Options) + } +} + +export default FetchIo.Fetch; diff --git a/fetch.io/tsconfig.json b/fetch.io/tsconfig.json new file mode 100644 index 0000000000..8b05d3ca33 --- /dev/null +++ b/fetch.io/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fetch.io-tests.ts" + ] +} diff --git a/fetch.io/tslint.json b/fetch.io/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/fetch.io/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/file-type/index.d.ts b/file-type/index.d.ts index a1bc0d8466..3a88fe0a94 100644 --- a/file-type/index.d.ts +++ b/file-type/index.d.ts @@ -5,11 +5,13 @@ /// -interface FileTypeResult { - ext: string - mime: string +export = FileType; + +declare function FileType(buf: Buffer): FileType.FileTypeResult; + +declare namespace FileType { + export interface FileTypeResult { + ext: string; + mime: string; + } } - -declare function FileType(buf: Buffer): FileTypeResult - -export = FileType diff --git a/fine-uploader/index.d.ts b/fine-uploader/index.d.ts deleted file mode 100644 index dab4e720ea..0000000000 --- a/fine-uploader/index.d.ts +++ /dev/null @@ -1,346 +0,0 @@ -// Type definitions for FineUploader for 5.11 -// Project: http://fineuploader.com/ -// Definitions by: Bradford Wagner -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace qq { - interface BlobsOptions { - defaultName?: string; - } - - interface CameraOptions { - button?: HTMLElement; - ios?: boolean; - } - - interface ChunkingOptions { - concurrent?: ChunkingConcurrentOptions; - enabled?: boolean; // default false - mandatory?: boolean; // default false - partSize?: number; // default 2,000,000 - paramNames?: ChunkingParamNames; - success?: ChunkingSuccess; - } - - interface ChunkingConcurrentOptions { - enabled?: boolean; // default false - } - - interface ChunkingParamNames { - chunkSize?: string; // default: qqchunksize - partByteOffset?: string; // default: qqpartbyteoffset - partIndex?: string; // default: qqpartindex - totalParts?: string; // default: qqtotalparts - } - - interface ChunkingSuccess { - endpoint?: string | null; // default: null - } - - interface CorsOptions { - allowXdr?: boolean; // default: false - expected?: boolean; // default: false - sendCredentials: boolean; // default: false - } - - interface DeleteFileOptions { - customHeader?: H; // default: {} - enabled?: boolean; // default false - endpoint?: string; // default: /server/upload - method?: string; // default: DELETE - params?: P; // default: {} - } - - interface ExtraButtonsOptions { - element: HTMLElement | undefined; // default: undefined - fileInputTitle?: string; // default: file input - folders?: boolean; // default: false - multiple?: boolean; // default: true - validation?: V; // default: 'validation' - } - - interface FormOptions { - element?: string | HTMLElement; // default: qq-form - autoUpload?: boolean; // default: false - interceptSubmit?: boolean; // default: true - } - - interface MessagesOptions { - emptyError?: string; // default: {file} is empty, please select files again without it. - maxHeightImageError?: string; // default: Image is too tall. - maxWidthImageError?: string; // default: Image is too wide. - minHeightImageError?: string; // default: Image is not tall enough. - minWidthImageError?: string; // default: Image is not wide enough. - minSizeError?: string; // default: {file} is too small, minimum file size is {minSizeLimit}. - noFilesError?: string; // default: No files to upload. - onLeave?: string; // default: The files are being uploaded, if you leave now the upload will be canceled. - retryFailTooManyItemsError?: string; // default: Too many items ({netItems}) would be uploaded. Item limit is {itemLimit}. - typeError?: string; // default: {file} has an invalid extension. Valid extension(s): {extensions}. - // tslint:disable-next-line:max-line-length - unsupportedBrowserIos8Safari?: string; // default: Unrecoverable error - this browser does not permit file uploading of any kind due to serious bugs in iOS8 Safari. Please use iOS8 Chrome until Apple fixes these issues. - } - - interface PasteOptions { - defaultName?: string; // default: pasted_image - targetElement?: HTMLElement | null; // default: null - } - - interface ResumeOptions { - recordsExpireIn?: number; // default: 7 - enabled?: boolean; // default: false - paramNames?: ResumeParamNameOptions; - } - - interface ResumeParamNameOptions { - resuming: string; // default: qqresume - } - - interface RetryOptions { - autoAttemptDelay?: number; // default: 5 - enableAuto?: boolean; // default: false - maxAutoAttempts?: number; // default: 3 - preventRetryResponseProperty?: string; // default: preventRetry - } - - interface RequestOptions { - customHeaders?: H; // default: {} - endpoint?: string; // default: /server/upload - filenameParam?: string; // default: qqfilename - forceMultipart?: boolean; // default: true - inputName?: string; // default: qqfile - method?: string; // default: POST - params?: P; // default: {} - paramsInBody?: boolean; // default: true - uuid?: string; // default: qquuid - totalFileSizeName?: string; // default: qqtotalfilesize - } - - interface ScalingOptions { - customResizer?: ( - blob: File | Blob, - height: number, - image: HTMLImageElement, - sourceCanvas: HTMLCanvasElement, - targetCanvas: HTMLCanvasElement, - width: number) => Promise | undefined; // default: undefined - defaultQuality?: number; // default: 80 - defaultType?: string | null; // default: null - failureText?: string; // default: Failed to scale - includeExif?: boolean; // default: false - orient?: boolean; // default: true - sendOriginal?: boolean; // default: false - sizes?: Size[]; // default: [] - } - - /** - * From Documentation: - * An array containing size objects that describe scaled versions of each submitted image that should be generated and uploaded. - * A size object should usually contain a name String property (which will be appended to the file name of the scaled file), and must always contain a maxSize integer property. - * A type MIME string property is optional. - */ - interface Size { - name: string; - maxSize: number; - type?: string; - } - - interface SessionOptions { - customHeaders?: H; // default: {} - endpoint?: string | null; // default: null - params?: P; // default: {} - refreshOnReset?: boolean; // default: true - } - - interface TextOptions { - defaultResponseError?: string; // default: Upload failure reason unknown - fileInputTitle?: string; // default: file input - sizeSymbols?: string[]; // default: ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'] - } - - interface ValidationOptions { - acceptFiles?: MimeType[] | null; // default: null - allowedExtensions?: string[]; // default: [] - itemLimit?: number; // default: 0 - minSizeLimit?: number; // default: 0 - sizeLimit?: number; // default: 0 - stopOnFirstInvalidFile?: boolean; // default: true - image?: ValidationImageOptions; - } - - interface ValidationImageOptions { - maxHeight?: number; // default: 0 - maxWidth?: number; // default: 0 - minWidth?: number; // default: 0 - minHeight?: number; // default: 0 - } - - interface WorkaroundOptions { - iosEmptyVideos?: boolean; // default: true - ios8BrowserCrash?: boolean; // default: false - ios8SafariUploads?: boolean; // default: true - } - - interface ChunkData { - partIndex: number; - startByte: number; - endByte: number; - totalParts: number; - } - - interface ValidateMetadata { - name: string; - size?: number; - } - - interface CallbackOptions { - onAutoRetry?: (id: number, name: string, attemptNumber: number) => void; - onCancel?: (id: number, name: string) => void; - onComplete?: (id: number, name: string, responseJSON: T, xhr: XMLHttpRequest) => void; // ignore xhr: XDomainRequest as it is not compatible for all versions of TypeScript - onAllComplete?: (succeeded: number[], failed: number[]) => void; - onDelete?: (id: number) => void; - onDeleteComplete?: (id: number, xhr: XMLHttpRequest, isError: boolean) => void; // ignore xhr: XDomainRequest as it is not compatible for all versions of TypeScript - onError?: (id: number, name: string, errorReason: string, xhr: XMLHttpRequest) => void; // ignore xhr: XDomainRequest as it is not compatible for all versions of TypeScript - onManualRetry?: (id: number, name: string) => boolean; // return false to prevent this and all future retries - onPasteReceived?: (blob: Blob) => void; - onProgress?: (id: number, name: string, uploadedBytes: number, totalBytes: number) => void; - onResume?: (id: number, name: string, chunkData: T) => void; - onSessionRequestComplete?: (response: T[], success: boolean, xhrOrXdr: XMLHttpRequest) => void; // ignore xhr: XDomainRequest as it is not compatible for all versions of TypeScript - onStatusChange?: (id: number, oldStatus: string, newStatus: string) => void; - onSubmit?: (id: number, name: string) => void; - onSubmitDelete?: (id: number) => void; - onSubmitted?: (id: number, name: string) => void; - onTotalProgress?: (totalUploadedBytes: number, totalBytes: number) => void; - onUpload?: (id: number, name: string) => void; - onUploadChunk?: (id: number, name: string, chunkData: ChunkData) => void; - // ignore xhr: XDomainRequest as it is not compatible for all versions of TypeScript - onUploadChunkSuccess?: (id: number, chunkData: ChunkData, responseJSON: T, xhr: XMLHttpRequest) => void; - onValidate?: (data: ValidateMetadata, buttonContainer: HTMLElement) => void; - onValidateBatch?: (fileOrBlobDataArray: ValidateMetadata[], buttomContainer: HTMLElement) => void; - } - - interface BasicOptions { - // core options - autoUpload?: boolean; // default true - button?: HTMLElement; - debug?: boolean; - disableCancelForFormUploads?: boolean; - formatFileName?: (rawFileName: string) => string; // rawFilename to display filename - maxConnections?: number; - multiple?: boolean; - - blobs?: BlobsOptions; - camera?: CameraOptions; - chunking?: ChunkingOptions; - cors?: CorsOptions; - deleteFile?: DeleteFileOptions; - extraButtons?: ExtraButtonsOptions; - form?: FormOptions; - messages?: MessagesOptions; - paste?: PasteOptions; - resume?: ResumeOptions; - retry?: RetryOptions; - request?: RequestOptions; - scaling?: ScalingOptions; - session?: SessionOptions; - text?: TextOptions; - validation?: ValidationOptions; - workarounds?: WorkaroundOptions; - - callbacks?: CallbackOptions; - } - - interface BlobWrapper { - blob: Blob; - name: string; - } - - interface CanvasWrapper { - canvas: HTMLCanvasElement; - name: string; - quality: number; // 1-100 - type: MimeType; - } - - interface ResizeInfo { - blob: File | Blob; - height: number; - image: HTMLImageElement; - sourceCanvas: HTMLCanvasElement; - targetCanvas: HTMLCanvasElement; - width: number; - } - - interface ResumableItem { - name: string; - uuid: string; - partIdx: number; - } - - interface FilterOption { - id?: number; - uuid?: string; - originalName?: string; - name?: string; - status?: string; - size?: number; - } - - interface ScaleImageOptions { - maxSize: number; - orient?: boolean; // default: true - type?: string; // default: type or reference image - quality?: number; // 0-100 - default: 80 - includeExif?: boolean; // default: false - customResizer?: (resizeInfo: ResizeInfo) => Promise; - } - - class FineUploaderBasic { - constructor(options: BasicOptions) - - addFiles(files: File[] | HTMLInputElement[] | Blob[] | BlobWrapper[] | HTMLCanvasElement[] | CanvasWrapper[] | FileList, params: T, endpoint: string): void; - addInitialFiles(initialFiles: T[]): void; - cancel(id: number): void; - cancelAll(): void; - clearStoredFiles(): void; - continueUpload(id: number): boolean; // true if successful - deleteFile(id: number): void; - - /** - * TODO: need someone who has used this to update the returned promise related fields - */ - drawThumbnail(id: number, targetContainer: HTMLElement, maxSize: number, fromServer: boolean, customResizer: (resizeInfo: ResizeInfo) => Promise): Promise - getButton(id: number): HTMLElement; - getFile(id: number): File | Blob; - getInProgress(): number; - getName(id: number): string; - getParentId(scaledFileId: number): number; - getRemainingAllowedItems(): number; - getResumableFilesData(): ResumableItem[]; - getSize(id: number): number; - getUploads(filter: FilterOption): T | T[]; - getUuid(id: number): string; - log(message: string, level: string): void; - pauseUpload(id: number): boolean; // true if successful - reset(): void; - retry(id: number): void; - scaleImage(id: number, options: ScaleImageOptions): Promise; - setCustomHeaders(customHeaders: H, id: number): void; - setEndpoint(path: string, identifier: number | HTMLElement): void; - setDeleteFileCustomHeaders(customHeaders: H, id: number): void; - setDeleteFileEndpoint(path: string, identifier: number | HTMLElement): void; - setDeleteFileParams

    (params: P, id: number): void; - setItemLimit(newItemLimit: number): void; - setForm(formElementOrId: HTMLFormElement | string): void; - setName(id: number, name: string): void; - setParams

    (params: P, id: number): void; - setUuid(id: number, uuid: string): void; - uploadStoredFiles(): void; // throws NoFilesError - - // ui - addExtraDropzone(element: HTMLElement): void; - getDropTarget(id: number): HTMLElement; - getId(element: HTMLElement): number; - getItemByFileId(id: number): HTMLElement; - removeExtraDropzone(element: HTMLElement): void; - } -} diff --git a/fine-uploader/test/blobs.ts b/fine-uploader/test/blobs.ts deleted file mode 100644 index 99e5355460..0000000000 --- a/fine-uploader/test/blobs.ts +++ /dev/null @@ -1,9 +0,0 @@ -function testBlob() { - const config: qq.BasicOptions = { - blobs: { - defaultName: "hi.png" - } - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/callbacks.ts b/fine-uploader/test/callbacks.ts deleted file mode 100644 index eba85ad2a0..0000000000 --- a/fine-uploader/test/callbacks.ts +++ /dev/null @@ -1,59 +0,0 @@ -class CallbacksTest { - constructor(private opts: qq.CallbackOptions) { - - } - - testCallbacks() { - const opts = this.opts; - - interface CustomType { - myTypeOfClass: string; - } - - opts.onAutoRetry = (id, name, attemptNumber) => {}; - - opts.onCancel = (id, name) => {}; - - opts.onComplete = (id: number, name: string, responseJSON: CustomType, xhr: XMLHttpRequest) => {}; - - opts.onAllComplete = (succeeded, failed) => {}; - - opts.onDelete = (id) => {}; - - opts.onDeleteComplete = (id, xhr, isError) => {}; - - opts.onError = (id, name, errorReason, xhr) => {}; - - opts.onManualRetry = (id, name) => { - return true; - }; - - opts.onPasteReceived = (blob) => {}; - - opts.onProgress = (id, name, uploadedBytes, totalBytes) => {}; - - opts.onResume = (id: number, name: string, chunkData: CustomType) => {}; - - opts.onSessionRequestComplete = (response: CustomType[], success: boolean, xhrOrXdr: XMLHttpRequest) => {}; - - opts.onStatusChange = (id, oldStatus, newStatus) => {}; - - opts.onSubmit = (id, name) => {}; - - opts.onSubmitDelete = (id) => {}; - - opts.onSubmitted = (id, name) => {}; - - opts.onTotalProgress = (totalUploadedBytes, totalBytes) => {}; - - opts.onUpload = (id, name) => {}; - - opts.onUploadChunk = (id, name, chunkData) => {}; - - opts.onUploadChunkSuccess = (id: number, chunkData: qq.ChunkData, responseJSON: CustomType, xhr: XMLHttpRequest) => {}; - - opts.onValidate = (data, buttonContainer) => {}; - - opts.onValidateBatch = (fileOrBlobDataArray, buttonContaine) => {}; - } -} diff --git a/fine-uploader/test/camera.ts b/fine-uploader/test/camera.ts deleted file mode 100644 index b42a080778..0000000000 --- a/fine-uploader/test/camera.ts +++ /dev/null @@ -1,14 +0,0 @@ -function cameraTest() { - const cameraButton = new HTMLButtonElement(); - - const cameraOptions: qq.CameraOptions = { - button: cameraButton, - ios: false - }; - - const config: qq.BasicOptions = { - camera: cameraOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/chunking.ts b/fine-uploader/test/chunking.ts deleted file mode 100644 index 386dd67738..0000000000 --- a/fine-uploader/test/chunking.ts +++ /dev/null @@ -1,26 +0,0 @@ -function chunkingTest() { - - const chunkingOptions: qq.ChunkingOptions = { - concurrent: { - enabled: false - }, - enabled: true, - mandatory: true, - partSize: 1000000, - paramNames: { - chunkSize: "chunkSize", - partByteOffset: "partByteOffset", - partIndex: "partIndex", - totalParts: "totalParts" - }, - success: { - endpoint: "/some/web/endpoint/yaySuccesss" - } - }; - - const config: qq.BasicOptions = { - chunking: chunkingOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/core.ts b/fine-uploader/test/core.ts deleted file mode 100644 index dbc06e95d6..0000000000 --- a/fine-uploader/test/core.ts +++ /dev/null @@ -1,17 +0,0 @@ -function testCore() { - const button: HTMLElement = new HTMLButtonElement(); - - const config: qq.BasicOptions = { - autoUpload: true, - button, - debug: true, - disableCancelForFormUploads: true, - formatFileName: (rawFileName: string) => { - return "hi"; - }, - maxConnections: 10, - multiple: true - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/cors.ts b/fine-uploader/test/cors.ts deleted file mode 100644 index 771b210208..0000000000 --- a/fine-uploader/test/cors.ts +++ /dev/null @@ -1,13 +0,0 @@ -function corsTest() { - const corsOptions: qq.CorsOptions = { - allowXdr: true, - expected: true, - sendCredentials: true - }; - - const config: qq.BasicOptions = { - cors: corsOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/deleteFile.ts b/fine-uploader/test/deleteFile.ts deleted file mode 100644 index 49c3e68890..0000000000 --- a/fine-uploader/test/deleteFile.ts +++ /dev/null @@ -1,28 +0,0 @@ -function deleteFileTest() { - interface CustomHeader { - myOption: string; - } - - interface CustomParams { - myParam: string; - } - - const deleteFileOptions: qq.DeleteFileOptions = { - customHeader: { - myOption: "ewwww" - }, - enabled: true, - endpoint: "/my/server/location/delete", - method: "POST", - params: { - myParam: "u" - } - }; - - - const config: qq.BasicOptions = { - deleteFile: deleteFileOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/extraButtons.ts b/fine-uploader/test/extraButtons.ts deleted file mode 100644 index eef709bea8..0000000000 --- a/fine-uploader/test/extraButtons.ts +++ /dev/null @@ -1,23 +0,0 @@ -function extraButtons() { - interface Validation { - myValue: string; - } - - const element: HTMLElement = new HTMLElement(); - - const extraButtonOptions: qq.ExtraButtonsOptions = { - element, - fileInputTitle: "inputTitle", - folders: true, - multiple: false, - validation: { - myValue: "ew" - } - }; - - const config: qq.BasicOptions = { - extraButtons: extraButtonOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/form.ts b/fine-uploader/test/form.ts deleted file mode 100644 index ccc08b69a1..0000000000 --- a/fine-uploader/test/form.ts +++ /dev/null @@ -1,13 +0,0 @@ -function formTest() { - const formOptions: qq.FormOptions = { - element: "qq-form", - autoUpload: true, - interceptSubmit: true - }; - - const config: qq.BasicOptions = { - form: formOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/message.ts b/fine-uploader/test/message.ts deleted file mode 100644 index 726584bf7b..0000000000 --- a/fine-uploader/test/message.ts +++ /dev/null @@ -1,21 +0,0 @@ -function messageTest() { - const messageOptions: qq.MessagesOptions = { - emptyError: "emptyError", - maxHeightImageError: "maxHeightImageError", - maxWidthImageError: "error occurred", - minHeightImageError: "error occurred", - minWidthImageError: "error occurred", - minSizeError: "error occurred", - noFilesError: "error occurred", - onLeave: "error occurred", - retryFailTooManyItemsError: "error occurred", - typeError: "error occurred", - unsupportedBrowserIos8Safari: "error occurred" - }; - - const config: qq.BasicOptions = { - messages: messageOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/method.ts b/fine-uploader/test/method.ts deleted file mode 100644 index 1adb13db81..0000000000 --- a/fine-uploader/test/method.ts +++ /dev/null @@ -1,140 +0,0 @@ -class TestMethods { - constructor(private uploader: qq.FineUploaderBasic) { - } - - testAddFiles() { - interface ParamType { - field: string; - } - - const params: ParamType = { - field: 'hiiiii' - }; - - this.uploader.addFiles( - new FileList(), - params, - "/my/happy/endpoint" - ); - } - - testAddInitialFiles() { - interface InitialFiles { - myField: number; - } - - const initialFiles: InitialFiles[] = [{ - myField: 1324 - }]; - - this.uploader.addInitialFiles(initialFiles); - } - - testDrawThumbnail() { - const promise: Promise = this.uploader.drawThumbnail( - 1234, - new HTMLElement(), - 1234565, - false, - (resizeInfo) => { - return new Promise(() => { - return new Blob(); - }); - } - ); - } - - testGetUploads() { - interface ResponseType { - hi: string; - } - const response: ResponseType | ResponseType[] = this.uploader.getUploads({ - status: "proggresssssssesees" - }); - } - - testSetCustomHeaders() { - interface CustomHeader { - customField: number; - } - - this.uploader.setCustomHeaders({ - customField: 1234 - }, 1234); - } - - testSetDeleteCustomHeaders() { - interface CustomHeader { - customField: number; - } - - this.uploader.setDeleteFileCustomHeaders({ - customField: 1234 - }, 1234); - } - - testSetDeleteFileParams() { - interface CustomParams { - paramField: boolean; - } - this.uploader.setDeleteFileParams({ - paramField: false - }, 1234); - } - - testSetParams() { - interface CustomParams { - customParams: number; - } - - this.uploader.setParams({ - customParams: 1234 - }, 1234); - } - - bulkTests() { - this.uploader.cancel(1); - this.uploader.cancelAll(); - this.uploader.clearStoredFiles(); - const shouldContinue: boolean = this.uploader.continueUpload(1234); - this.uploader.deleteFile(1234); - const elem: HTMLElement = this.uploader.getButton(1234); - const fileOrBlob: File | Blob = this.uploader.getFile(1234); - let num: number = this.uploader.getInProgress(); - let s: string = this.uploader.getName(1234); - num = this.uploader.getParentId(1234); - num = this.uploader.getRemainingAllowedItems(); - const resumables: qq.ResumableItem[] = this.uploader.getResumableFilesData(); - num = this.uploader.getSize(1234); - s = this.uploader.getUuid(1234); - this.uploader.log("why am i doing this?", "info"); - const b: boolean = this.uploader.pauseUpload(1234); - this.uploader.reset(); - this.uploader.retry(1234); - const blobPromise: Promise = this.uploader.scaleImage(1234, { - maxSize: 20, - orient: false, - type: "png", - quality: 10, - includeExif: false, - }); - this.uploader.setEndpoint("/my/path/is/my/own", 1234); - this.uploader.setEndpoint("/my/path/is/my/own", new HTMLElement()); - this.uploader.setDeleteFileEndpoint("/some/path", 1234); - this.uploader.setDeleteFileEndpoint("/some/path", new HTMLElement()); - this.uploader.setItemLimit(1234); - this.uploader.setForm(new HTMLFormElement()); - this.uploader.setForm("myFormElement"); - this.uploader.setName(1234, "myCustomName"); - this.uploader.setUuid(1234, "12341234"); - this.uploader.uploadStoredFiles(); - } - - uiTests() { - this.uploader.addExtraDropzone(new HTMLElement()); - let elem: HTMLElement = this.uploader.getDropTarget(1234); - const n: number = this.uploader.getId(elem); - elem = this.uploader.getItemByFileId(n); - this.uploader.removeExtraDropzone(elem); - } -} diff --git a/fine-uploader/test/paste.ts b/fine-uploader/test/paste.ts deleted file mode 100644 index 9b3c7d9007..0000000000 --- a/fine-uploader/test/paste.ts +++ /dev/null @@ -1,14 +0,0 @@ -function pasteTest() { - const targetElement: HTMLElement = new HTMLElement(); - - const pasteOptions: qq.PasteOptions = { - defaultName: "pasted_image", - targetElement - }; - - const config: qq.BasicOptions = { - paste: pasteOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/request.ts b/fine-uploader/test/request.ts deleted file mode 100644 index 54b29c9be9..0000000000 --- a/fine-uploader/test/request.ts +++ /dev/null @@ -1,32 +0,0 @@ -function requestTest() { - interface CustomHeader { - customHeader: string; - } - - interface CustomParam { - customParam: boolean; - } - - const requestOptions: qq.RequestOptions = { - customHeaders: { - customHeader: "my custom header hehehehee" - }, - endpoint: "/my/custom/endpoint", - filenameParam: "newFilenameParam", - forceMultipart: true, - inputName: "filenameParamMapping", - method: "POST", - params: { - customParam: false - }, - paramsInBody: false, - uuid: "asdf123456", - totalFileSizeName: "totalFileSize" - }; - - const config: qq.BasicOptions = { - request: requestOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} \ No newline at end of file diff --git a/fine-uploader/test/resume.ts b/fine-uploader/test/resume.ts deleted file mode 100644 index dc588d19f5..0000000000 --- a/fine-uploader/test/resume.ts +++ /dev/null @@ -1,15 +0,0 @@ -function resumeTest() { - const resumeOptions: qq.ResumeOptions = { - recordsExpireIn: 10, - enabled: true, - paramNames: { - resuming: "ew you" - } - }; - - const config: qq.BasicOptions = { - resume: resumeOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/retry.ts b/fine-uploader/test/retry.ts deleted file mode 100644 index 85c9f71af3..0000000000 --- a/fine-uploader/test/retry.ts +++ /dev/null @@ -1,15 +0,0 @@ -function retryTest() { - - const retryOptions: qq.RetryOptions = { - autoAttemptDelay: 1, - enableAuto: true, - maxAutoAttempts: 32, - preventRetryResponseProperty: "preventRetry" - }; - - const config: qq.BasicOptions = { - retry: retryOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} \ No newline at end of file diff --git a/fine-uploader/test/scaling.ts b/fine-uploader/test/scaling.ts deleted file mode 100644 index 5e8ff3dc51..0000000000 --- a/fine-uploader/test/scaling.ts +++ /dev/null @@ -1,29 +0,0 @@ -function scalingTest() { - const scalingOptions: qq.ScalingOptions = { - customResizer: (blob, height, image, sourceCanvas, targetCanvas, width) => { - const promise = new Promise(() => { - return blob; - }); - return promise; - }, - defaultQuality: 10, - defaultType: "JPEG", - failureText: "you have failed me for the last time", - includeExif: true, - orient: false, - sendOriginal: true, - sizes: [ - { - maxSize: 10, - name: "i am added to name", - type: "mime type" - } - ] - }; - - const config: qq.BasicOptions = { - scaling: scalingOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/session.ts b/fine-uploader/test/session.ts deleted file mode 100644 index 7d8d6069b9..0000000000 --- a/fine-uploader/test/session.ts +++ /dev/null @@ -1,26 +0,0 @@ -function sessionTest() { - interface CustomHeader { - customHeader: string; - } - - interface CustomParam { - customParam: boolean; - } - - const sessionOptions: qq.SessionOptions = { - customHeaders: { - customHeader: "customHeader" - }, - endpoint: "/mysession/endpoint", - params: { - customParam: false - }, - refreshOnReset: false - }; - - const config: qq.BasicOptions = { - session: sessionOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/text.ts b/fine-uploader/test/text.ts deleted file mode 100644 index e83ddb4bcf..0000000000 --- a/fine-uploader/test/text.ts +++ /dev/null @@ -1,13 +0,0 @@ -function textTest() { - const textOptions: qq.TextOptions = { - defaultResponseError: "you have failed me for the last time", - fileInputTitle: "file input title", - sizeSymbols: ['kb'] - }; - - const config: qq.BasicOptions = { - text: textOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/validation.ts b/fine-uploader/test/validation.ts deleted file mode 100644 index 60324157f9..0000000000 --- a/fine-uploader/test/validation.ts +++ /dev/null @@ -1,22 +0,0 @@ -function validationTest() { - - const validationOptions: qq.ValidationOptions = { - acceptFiles: [new MimeType()], - allowedExtensions: ['csv, xls'], - itemLimit: 5, - sizeLimit: 10000000, - stopOnFirstInvalidFile: false, - image: { - maxHeight: 10, - maxWidth: 10, - minHeight: 1, - minWidth: 1 - } - }; - - const config: qq.BasicOptions = { - validation: validationOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/test/workarounds.ts b/fine-uploader/test/workarounds.ts deleted file mode 100644 index 42fa5ceee7..0000000000 --- a/fine-uploader/test/workarounds.ts +++ /dev/null @@ -1,13 +0,0 @@ -function workaroundsTest() { - const workaroundOptions: qq.WorkaroundOptions = { - iosEmptyVideos: false, - ios8BrowserCrash: false, - ios8SafariUploads: false - }; - - const config: qq.BasicOptions = { - workarounds: workaroundOptions - }; - - const uploader = new qq.FineUploaderBasic(config); -} diff --git a/fine-uploader/tsconfig.json b/fine-uploader/tsconfig.json deleted file mode 100644 index c02e485091..0000000000 --- a/fine-uploader/tsconfig.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "files": [ - "index.d.ts", - "test/blobs.ts", - "test/camera.ts", - "test/chunking.ts", - "test/core.ts", - "test/cors.ts", - "test/deleteFile.ts", - "test/extraButtons.ts", - "test/form.ts", - "test/message.ts", - "test/paste.ts", - "test/resume.ts", - "test/retry.ts", - "test/request.ts", - "test/scaling.ts", - "test/session.ts", - "test/text.ts", - "test/validation.ts", - "test/workarounds.ts", - "test/method.ts", - "test/callbacks.ts" - ], - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} \ No newline at end of file diff --git a/firebase-client/firebase-client-tests.ts b/firebase-client/firebase-client-tests.ts index 0b79ec75d6..987b4b638b 100644 --- a/firebase-client/firebase-client-tests.ts +++ b/firebase-client/firebase-client-tests.ts @@ -19,16 +19,16 @@ var client = new FirebaseClient({ var newUser:User = new User(); newUser.name = { first: "Fred", - last: "Flinstone" + last: "Flinstone" }; client.push("users", newUser) .then(function (result){ console.log(result.name); var newUser2:User = new User(); - newUser2.name = { - first: "Fred", - last: "Rockington" + newUser2.name = { + first: "Fred", + last: "Rockington" } return client.update("users/" + result.name, newUser2); }).then(function (result){ @@ -36,15 +36,15 @@ client.push("users", newUser) var newUser3:User = new User(); newUser3.name = { first: "Axe", - last: "Steel" + last: "Steel" }; return client.set("users/AXESTEEL", newUser3); }).then(function (result){ console.log(result.name.first); return client.get(); - }).then(function (result){ + }).then(function (result){ console.log(result); return client.get("users/AXESTEEL") }).then(function (result){ - console.log(result.name.first); + console.log(result.name.first); }); \ No newline at end of file diff --git a/firebase-client/index.d.ts b/firebase-client/index.d.ts index d2c58bb5ba..b766fc2478 100644 --- a/firebase-client/index.d.ts +++ b/firebase-client/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andrew Breen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Q from "q"; interface PushResponse { /** @@ -17,7 +17,7 @@ interface FirebaseConfig { * path for the Firebase instance */ url : string; - + /** * Token for authorisation */ @@ -29,38 +29,38 @@ interface FirebaseClient { * Creates a new FirebaseClient given the provided configuration */ new (config : FirebaseConfig) : FirebaseClient; - + /** * Retrieves all objects at the base path */ get() : Q.Promise; - + /** * Retrieves an object * @param path Relative path from the base for the resource */ get(path : string) : Q.Promise; - + /** * Returns a promise of the HTTP response from setting the value at the given path * @param path Relative path from the base for the resource * @param data Data to be set as the value for the given path */ set(path : string, data : T) : Q.Promise; - + /** * Update a node at a given path * @param path Relative path from the base for the resource * @param value Value of the response */ update(path : string, value : T) : Q.Promise; - + /** * Deletes the resource at a given path * @param path Relative path from the base for the resource */ delete(path : string) : Q.Promise; - + /** * @param path Relative path from the base for the resource * @param value Object to push to the path @@ -70,7 +70,5 @@ interface FirebaseClient { declare var FirebaseClient: FirebaseClient; -declare module 'firebase-client' { - export = FirebaseClient; -} - +export = FirebaseClient; +export as namespace FirebaseClient; diff --git a/firebase-client/tsconfig.json b/firebase-client/tsconfig.json index fdb35ab929..b439fb8310 100644 --- a/firebase-client/tsconfig.json +++ b/firebase-client/tsconfig.json @@ -12,6 +12,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/firmata/firmata-tests.ts b/firmata/firmata-tests.ts new file mode 100644 index 0000000000..5e1eab09cb --- /dev/null +++ b/firmata/firmata-tests.ts @@ -0,0 +1,42 @@ +import * as Board from 'firmata' + +function test_basic_board() +{ + let board = new Board(''); +} + +function test_board_with_callback() +{ + let board = new Board('', (error: any) => + { + board.pinMode(13, board.MODES.OUTPUT); + board.pinMode(12, Board.PIN_MODE.OUTPUT); + }); +} + +function test_board_with_listener() +{ + let board = new Board(''); + + board.on('ready', () => + { + board.pinMode(13, board.MODES.OUTPUT); + board.pinMode(12, Board.PIN_MODE.OUTPUT); + }); +} + +function test_class_extension() +{ + class MyBoard extends Board + { + Disconnect() + { + this.transport.close((error: any) => {}); + } + } + + let myBoard: MyBoard = new MyBoard('', () => + { + myBoard.Disconnect(); + }); +} \ No newline at end of file diff --git a/firmata/index.d.ts b/firmata/index.d.ts new file mode 100644 index 0000000000..4bda44d3f9 --- /dev/null +++ b/firmata/index.d.ts @@ -0,0 +1,303 @@ +// Type definitions for firmata.js 0.15 +// Project: https://github.com/firmata/firmata.js +// Definitions by: Troy W. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as SerialPort from 'serialport' + +export = Board; + +/** + * Most of these are generated by observing https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js. + * + * This is a starting point that appeared to work fine for months within a project of my company, but I give no + * guarantee that it cannot be improved. + */ +declare class Board extends NodeJS.EventEmitter +{ + constructor(serialPort: string, callback?: (error: any) => void) + MODES: Board.PinModes; + STEPPER: Board.StepperConstants; + I2C_MODES: Board.I2cModes; + SERIAL_MODES: Board.SerialModes; + SERIAL_PORT_IDs: Board.SerialPortIds; + SERIAL_PIN_TYPES: Board.SerialPinTypes; + HIGH: Board.PIN_STATE; + LOW: Board.PIN_STATE; + pins: Board.Pins[]; + ports: number[]; + analogPins: number[]; + version: Board.Version; + firmware: Board.Firmware; + settings: Board.Settings; + protected transport: SerialPort; + reportVersion(callback: () => void): void + queryFirmware(callback: () => void): void + analogRead(pin: number, callback: (value: number) => void): void + analogWrite(pin: number, value: number): void + pwmWrite(pin: number, value: number): void + servoConfig(pin: number, min: number, max: number): void + servoWrite(pin: number, value: number): void + pinMode(pin: number, mode: Board.PIN_MODE): void + digitalWrite(pin: number, val: Board.PIN_STATE): void + digitalRead(pin: number, callback: (val: Board.PIN_STATE) => void): void + queryCapabilities(callback: () => void): void + queryAnalogMapping(callback: () => void): void + queryPinState(pin: number, callback: () => void): void + // TODO untested --- TWW + sendString(str: string): void + // TODO untested --- TWW + sendI2CConfig(delay: number): void + // TODO untested --- TWW + i2cConfig(options: number|{ delay: number }): void + // TODO untested --- TWW + sendI2CWriteRequest(slaveAddress: number, bytes: number[]): void + // TODO untested --- TWW + i2cWrite(address: number, register: number, inBytes: number[]): void + i2cWrite(address: number, data: number[]): void + // TODO untested --- TWW + i2cWriteReg(address: number, register: number, byte: number): void + // TODO untested --- TWW + sendI2CReadRequest(address: number, numBytes: number, callback: () => void): void + // TODO untested --- TWW + i2cRead(address: number, register: number, bytesToRead: number, callback: (data: number[]) => void): void + i2cRead(address: number, bytesToRead: number, callback: (data: number[]) => void): void + // TODO untested --- TWW + i2cStop(options: number|{ bus: number, address: number }): void + // TODO untested --- TWW + i2cReadOnce(address: number, register: number, bytesToRead: number, callback: (data: number[]) => void): void + i2cReadOnce(address: number, bytesToRead: number, callback: (data: number[]) => void): void + // TODO untested --- TWW + sendOneWireConfig(pin: number, enableParasiticPower: boolean): void + // TODO untested --- TWW + sendOneWireSearch(pin: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireAlarmsSearch(pin: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireRead(pin: number, device: number, numBytesToRead: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireReset(pin: number): void + // TODO untested --- TWW + sendOneWireWrite(pin: number, device: number, data: number|number[]): void + // TODO untested --- TWW + sendOneWireDelay(pin: number, delay: number): void + // TODO untested --- TWW + sendOneWireWriteAndRead(pin: number, device: number, data: number|number[], numBytesToRead: number, + callback: (error?: Error, data?: number) => void): void + setSamplingInterval(interval: number): void + getSamplingInterval(): number + reportAnalogPin(pin: number, value: Board.REPORTING): void + reportDigitalPin(pin: number, value: Board.REPORTING): void + // TODO untested/incomplete --- TWW + pingRead(opts: any, callback: () => void): void + stepperConfig(deviceNum: number, type: number, stepsPerRev: number, dirOrMotor1Pin: number, + stepOrMotor2Pin: number, motor3Pin?: number, motor4Pin?: number): void + stepperStep(deviceNum: number, direction: Board.STEPPER_DIRECTION, steps: number, speed: number, + accel: number|((bool?: boolean) => void), decel?: number, callback?: (bool?: boolean) => void): void + // TODO untested --- TWW + serialConfig(options: { portId: Board.SERIAL_PORT_ID, baud: number, rxPin?: number, txPin?: number }): void + // TODO untested --- TWW + serialWrite(portId: Board.SERIAL_PORT_ID, inBytes: number[]): void + // TODO untested --- TWW + serialRead(portId: Board.SERIAL_PORT_ID, maxBytesToRead: number, callback: () => void): void + // TODO untested --- TWW + serialStop(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + serialClose(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + serialFlush(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + serialListen(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + sysexResponse(commandByte: number, handler: (data: number[]) => void): void + // TODO untested --- TWW + sysexCommand(message: number[]): void + reset(): void + static isAcceptablePort(port: Board.Port): boolean + static requestPort(callback: (error: any, port: Board.Port) => any): void + // TODO untested --- TWW + static encode(data: number[]): number[] + // TODO untested --- TWW + static decode(data: number[]): number[] + // TODO untested/incomplete --- TWW + protected _sendOneWireSearch(type: any, event: any, pin: number, callback: () => void): void + // TODO untested/incomplete --- TWW + protected _sendOneWireRequest(pin: number, subcommand: any, device: any, numBytesToRead: any, correlationId: any, + delay: number, dataToWrite: any, event: any, callback: () => void): void +} + +declare namespace Board +{ + export interface PinModes + { + INPUT: PIN_MODE, OUTPUT: PIN_MODE, ANALOG: PIN_MODE, PWM: PIN_MODE, SERVO: PIN_MODE, SHIFT: PIN_MODE, + I2C: PIN_MODE, ONEWIRE: PIN_MODE, STEPPER: PIN_MODE, SERIAL: PIN_MODE, PULLUP: PIN_MODE, IGNORE: PIN_MODE, + PING_READ: PIN_MODE, UNKOWN: PIN_MODE + } + + export interface StepperConstants + { + TYPE: { DRIVER: STEPPER_TYPE, TWO_WIRE: STEPPER_TYPE, FOUR_WIRE: STEPPER_TYPE }, + RUNSTATE: { + STOP: STEPPER_RUN_STATE, ACCEL: STEPPER_RUN_STATE, DECEL: STEPPER_RUN_STATE, RUN: STEPPER_RUN_STATE + }, + DIRECTION: { CCW: STEPPER_DIRECTION, CW: STEPPER_DIRECTION } + } + + // tslint:disable-next-line interface-name + export interface I2cModes + { + WRITE: I2C_MODE, READ: I2C_MODE, CONTINUOUS_READ: I2C_MODE, STOP_READING: I2C_MODE + } + + export interface SerialModes + { + CONTINUOUS_READ: SERIAL_MODE, STOP_READING: SERIAL_MODE + } + + export interface SerialPortIds + { + HW_SERIAL0: SERIAL_PORT_ID, HW_SERIAL1: SERIAL_PORT_ID, HW_SERIAL2: SERIAL_PORT_ID, + HW_SERIAL3: SERIAL_PORT_ID, SW_SERIAL0: SERIAL_PORT_ID, SW_SERIAL1: SERIAL_PORT_ID, + SW_SERIAL2: SERIAL_PORT_ID, SW_SERIAL3: SERIAL_PORT_ID, DEFAULT: SERIAL_PORT_ID, + } + + export interface SerialPinTypes + { + RES_RX0: SERIAL_PIN_TYPE, RES_TX0: SERIAL_PIN_TYPE, RES_RX1: SERIAL_PIN_TYPE, RES_TX1: SERIAL_PIN_TYPE, + RES_RX2: SERIAL_PIN_TYPE, RES_TX2: SERIAL_PIN_TYPE, RES_RX3: SERIAL_PIN_TYPE, RES_TX3: SERIAL_PIN_TYPE, + } + + export interface Pins + { + mode: PIN_MODE, + value: PIN_STATE|number, + supportedModes: PIN_MODE[], + analogChannel: number, + report: REPORTING, + state: PIN_STATE|PULLUP_STATE, // TODO not sure if this exists anymore... --- TWW + } + + export interface Firmware + { + name: string, + version: Version, + } + + export interface Settings + { + reportVersionTimeout: number, + samplingInterval: number, + serialport: { + baudRate: number, + bufferSize: number + } + } + + export interface Port + { + comName: string, + } + + export interface Version + { + major: number, + minor: number + } + + // TODO these enums could actually be non-const in the future (provides some benefits) --- TWW + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L449-L464 + export const enum PIN_MODE { + INPUT = 0x00, + OUTPUT = 0x01, + ANALOG = 0x02, + PWM = 0x03, + SERVO = 0x04, + SHIFT = 0x05, + I2C = 0x06, + ONEWIRE = 0x07, + STEPPER = 0x08, + SERIAL = 0x0A, + PULLUP = 0x0B, + IGNORE = 0x7F, + PING_READ = 0x75, + UNKNOWN = 0x10, + } + + export const enum PIN_STATE { + LOW = 0, + HIGH = 1 + } + + export const enum REPORTING { + ON = 1, + OFF = 0, + } + + export const enum PULLUP_STATE { + ENABLED = 1, + DISABLED = 0, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L474-L478 + export const enum STEPPER_TYPE { + DRIVER = 1, + TWO_WIRE = 2, + FOUR_WIRE = 4, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L479-L484 + export const enum STEPPER_RUN_STATE { + STOP = 0, + ACCEL = 1, + DECEL = 2, + RUN = 3, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L485-L488 + export const enum STEPPER_DIRECTION { + CCW = 0, + CW = 1, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L466-L471 + export const enum I2C_MODE { + WRITE = 0, + READ = 1, + CONTINUOUS_READ = 2, + STOP_READING = 3 + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L491-L494 + export const enum SERIAL_MODE { + CONTINUOUS_READ = 0x00, + STOP_READING = 0x01, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L497-L512 + export const enum SERIAL_PORT_ID { + HW_SERIAL0 = 0x00, + HW_SERIAL1 = 0x01, + HW_SERIAL2 = 0x02, + HW_SERIAL3 = 0x03, + SW_SERIAL0 = 0x08, + SW_SERIAL1 = 0x09, + SW_SERIAL2 = 0x10, + SW_SERIAL3 = 0x11, + DEFAULT = 0x08, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L515-L524 + export const enum SERIAL_PIN_TYPE { + RES_RX0 = 0x00, + RES_TX0 = 0x01, + RES_RX1 = 0x02, + RES_TX1 = 0x03, + RES_RX2 = 0x04, + RES_TX2 = 0x05, + RES_RX3 = 0x06, + RES_TX3 = 0x07, + } +} \ No newline at end of file diff --git a/xmpp-jid/tsconfig.json b/firmata/tsconfig.json similarity index 93% rename from xmpp-jid/tsconfig.json rename to firmata/tsconfig.json index f4d02187a2..3b0d4b97cb 100644 --- a/xmpp-jid/tsconfig.json +++ b/firmata/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "xmpp-jid-tests.ts" + "firmata-tests.ts" ] } \ No newline at end of file diff --git a/firmata/tslint.json b/firmata/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/firmata/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/fix b/fix new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fixed-data-table/fixed-data-table-tests.tsx b/fixed-data-table/fixed-data-table-tests.tsx index 7dfac22230..f57ff3d946 100644 --- a/fixed-data-table/fixed-data-table-tests.tsx +++ b/fixed-data-table/fixed-data-table-tests.tsx @@ -1,6 +1,3 @@ - -/// - import * as React from "react"; import {Table, Cell, Column, CellProps} from "fixed-data-table"; diff --git a/flickity/flickity-tests.ts b/flickity/flickity-tests.ts index b98315285f..b4ecf51997 100644 --- a/flickity/flickity-tests.ts +++ b/flickity/flickity-tests.ts @@ -4,11 +4,9 @@ // Definitions: https://github.com/clmcgrath/ /// -/// //jQuery tests - var $flickity: JQuery = $("#flickity-selector").flickity( { initialIndex: 0, @@ -105,15 +103,15 @@ flikty2.destroy(); flikty2.reloadCells(); //event handlers -flikty2.on(FlickityEvents.cellSelect, (evt, ele) => { +flikty2.on("cellSelect", (evt, ele) => { //do something }); -flikty2.off(FlickityEvents.cellSelect, (evt, ele, pntr, vctr) => { +flikty2.off("cellSelect", (evt, ele, pntr, vctr) => { //do something }); -flikty2.once(FlickityEvents.cellSelect, (evt, ele, pntr) => { +flikty2.once("cellSelect", (evt, ele, pntr) => { //do something }); diff --git a/flot/index.d.ts b/flot/index.d.ts index 20fadd0a47..e4fed6a246 100644 --- a/flot/index.d.ts +++ b/flot/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Flot // Project: http://www.flotcharts.org/ -// Definitions by: Matt Burland +// Definitions by: Matt Burland , Timo Mühlbach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -21,16 +21,16 @@ declare namespace jquery.flot { } interface hooks { - processOptions: { (plot: plot, options: plotOptions): void; } []; - processRawData: { (plot: plot, series: dataSeries, data: any[], datapoints: datapoints): void; }[]; - processDatapoints: { (plot: plot, series: dataSeries, datapoints: datapoints): void; }[]; - processOffset: { (plot: plot, offset: canvasPoint): void; }[]; - drawBackground: { (plot: plot, context: CanvasRenderingContext2D): void; }[]; - drawSeries: { (plot: plot, context: CanvasRenderingContext2D, series: dataSeries): void; }[]; - draw: { (plot: plot, context: CanvasRenderingContext2D): void; }[]; - bindEvents: { (plot: plot, eventHolder: JQuery): void; }[]; - drawOverlay: { (plot: plot, context: CanvasRenderingContext2D): void; }[]; - shutdown: { (plot: plot, eventHolder: JQuery): void; }[]; + processOptions?: { (plot: plot, options: plotOptions): void; } []; + processRawData?: { (plot: plot, series: dataSeries, data: any[], datapoints: datapoints): void; }[]; + processDatapoints?: { (plot: plot, series: dataSeries, datapoints: datapoints): void; }[]; + processOffset?: { (plot: plot, offset: canvasPoint): void; }[]; + drawBackground?: { (plot: plot, context: CanvasRenderingContext2D): void; }[]; + drawSeries?: { (plot: plot, context: CanvasRenderingContext2D, series: dataSeries): void; }[]; + draw?: { (plot: plot, context: CanvasRenderingContext2D): void; }[]; + bindEvents?: { (plot: plot, eventHolder: JQuery): void; }[]; + drawOverlay?: { (plot: plot, context: CanvasRenderingContext2D): void; }[]; + shutdown?: { (plot: plot, eventHolder: JQuery): void; }[]; } interface interaction { diff --git a/forever-monitor/tsconfig.json b/forever-monitor/tsconfig.json index e0d7d1d5ee..363ce2c8a0 100644 --- a/forever-monitor/tsconfig.json +++ b/forever-monitor/tsconfig.json @@ -19,4 +19,4 @@ "index.d.ts", "forever-monitor-tests.ts" ] -} \ No newline at end of file +} diff --git a/foundation-sites/foundation-sites-tests.ts b/foundation-sites/foundation-sites-tests.ts index 4932f01624..2e90071c7d 100644 --- a/foundation-sites/foundation-sites-tests.ts +++ b/foundation-sites/foundation-sites-tests.ts @@ -1,11 +1,3 @@ -// Tests for type definitions for Foundation Sites v6.0.4 -// Project: http://foundation.zurb.com/ -// Definitions by: Sam Vloeberghs -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - - $(document).foundation(); $(document).foundation('method5'); $(document).foundation(['method', 'method2']); diff --git a/foundation/foundation-tests.ts b/foundation/foundation-tests.ts index 913bd0ee1b..33f8530589 100644 --- a/foundation/foundation-tests.ts +++ b/foundation/foundation-tests.ts @@ -1,6 +1,3 @@ -/// - - function empty_callback() : void {} function plugin_list() { diff --git a/from/from-tests.ts b/from/from-tests.ts index b46bdf66f1..e73a4915a0 100644 --- a/from/from-tests.ts +++ b/from/from-tests.ts @@ -1,6 +1,3 @@ - -/// - import from = require('from'); var rs: NodeJS.ReadableStream; diff --git a/fs-ext/fs-ext-tests.ts b/fs-ext/fs-ext-tests.ts index baba88f092..0c774589bc 100644 --- a/fs-ext/fs-ext-tests.ts +++ b/fs-ext/fs-ext-tests.ts @@ -1,19 +1,16 @@ - -/// - import fs = require('fs-ext'); var num:number; var str:string; -//from node.js 'fs' module +//from node.js 'fs' module fs.appendFileSync(str, "data"); -fs.flock(num, str, (err)=>{ +fs.flock(num, str, (err)=>{ }); fs.flockSync(num, str); -fs.fcntl(num, str, num, (err, res)=>{ +fs.fcntl(num, str, num, (err, res)=>{ }); fs.fcntl(num, str, (err, res)=>{ }); diff --git a/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts b/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts index 12623c54b1..46e623207a 100644 --- a/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts +++ b/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts @@ -1,5 +1,3 @@ -/// - import fs = require('fs-extra-promise-es6'); import stream = require('stream'); @@ -145,7 +143,7 @@ strArr = fs.readdirSync(path); fs.close(fd, errorCallback); fs.closeSync(fd); fs.open(path, flags, modeStr, (err: Error, fd: number) => { - + }); num = fs.openSync(path, flags, modeStr); fs.utimes(path, atime, mtime, errorCallback); diff --git a/fs-extra-promise/fs-extra-promise-tests.ts b/fs-extra-promise/fs-extra-promise-tests.ts index 112a27109c..28bdd26120 100644 --- a/fs-extra-promise/fs-extra-promise-tests.ts +++ b/fs-extra-promise/fs-extra-promise-tests.ts @@ -1,6 +1,3 @@ - -/// - import fs = require('fs-extra-promise'); import stream = require('stream'); diff --git a/fs-extra/fs-extra-tests.ts b/fs-extra/fs-extra-tests.ts index 896d6411f7..a6990cc75f 100644 --- a/fs-extra/fs-extra-tests.ts +++ b/fs-extra/fs-extra-tests.ts @@ -1,8 +1,5 @@ - -/// - import fs = require('fs-extra'); -import * as Path from 'path' +import * as Path from 'path'; var src: string; var dest: string; @@ -22,7 +19,7 @@ fs.copy(src, dest, { clobber: true, preserveTimestamps: true, - filter: (src: string) => {return false} + filter: (src: string) => { return false; } }, errorCallback ); @@ -43,7 +40,7 @@ fs.copySync(src, dest, { clobber: true, preserveTimestamps: true, - filter: (src: string) => {return false} + filter: (src: string) => { return false; } } ); fs.copySync(src, dest, @@ -102,35 +99,3 @@ fs.ensureSymlink(path, errorCallback); fs.ensureSymlinkSync(path); fs.emptyDir(path, errorCallback); fs.emptyDirSync(path); - -var items: string[]; -fs.walk("my-path") - .on('data', function (item) { - items.push(item.path); - }) - .on('end', function () { - console.dir(items); - }); - -const ignoreHiddenFiles = (item: string): boolean => { - const basename = Path.basename(item) - return basename === '.' || basename[0] !== '.' -} - -const sortPaths = (left: string, right: string) => left.localeCompare(right); - -const options = { - filter: ignoreHiddenFiles, - pathSorter: sortPaths -} - -fs.walk(path, options) - .on('readable', function (this: fs.PathEntryStream) { - let item: fs.PathEntry | undefined - while ((item = this.read())) { - items.push(item.path) - } - }) - .on('end', function () { - - }) diff --git a/fs-extra/index.d.ts b/fs-extra/index.d.ts index 2cc47724c8..57f4a6fb24 100644 --- a/fs-extra/index.d.ts +++ b/fs-extra/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for fs-extra +// Type definitions for fs-extra v2.0.0 // Project: https://github.com/jprichardson/node-fs-extra -// Definitions by: midknight41 +// Definitions by: midknight41 , Brendan Forster // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Imported from: https://github.com/soywiz/typescript-node-definitions/fs-extra.d.ts @@ -120,9 +120,6 @@ export type PathEntryStream = { read(): PathEntry | null } -export function walk(path: string, options?: WalkOptions): WalkEventEmitter; -export function walkSync(path: string): ReadonlyArray; - export interface CopyFilterFunction { (src: string): boolean } diff --git a/ftp/ftp-tests.ts b/ftp/ftp-tests.ts index 6e5e7d37a9..4d78104940 100644 --- a/ftp/ftp-tests.ts +++ b/ftp/ftp-tests.ts @@ -1,6 +1,3 @@ - -/// - import Client = require("ftp"); import fs = require("fs"); @@ -8,8 +5,8 @@ var c = new Client(); c.on('ready', (): void => { c.get('foo.txt', function(err: Error, stream: NodeJS.ReadableStream): void { if (err) throw err; - stream.once('close', function(): void { - c.end(); + stream.once('close', function(): void { + c.end(); }); stream.pipe(fs.createWriteStream('foo.local-copy.txt')); }); @@ -25,4 +22,4 @@ c.connect({ }); - + diff --git a/fullcalendar/fullcalendar-tests.ts b/fullcalendar/fullcalendar-tests.ts index 7640c85db6..63328a9cef 100644 --- a/fullcalendar/fullcalendar-tests.ts +++ b/fullcalendar/fullcalendar-tests.ts @@ -1,5 +1,4 @@ -/// -/// +/// import * as FullCalendar from 'fullcalendar'; import * as moment from 'moment'; diff --git a/fullcalendar/v1/fullcalendar-tests.ts b/fullcalendar/v1/fullcalendar-tests.ts index 56a9eb0024..ede55bc0b1 100644 --- a/fullcalendar/v1/fullcalendar-tests.ts +++ b/fullcalendar/v1/fullcalendar-tests.ts @@ -1,6 +1,4 @@ -/// -/// -/// +/// // All examples from http://arshaw.com/fullcalendar/docs/ diff --git a/gapi.auth2/gapi.auth2-tests.ts b/gapi.auth2/gapi.auth2-tests.ts index 621ca6f056..1d389d59e9 100644 --- a/gapi.auth2/gapi.auth2-tests.ts +++ b/gapi.auth2/gapi.auth2-tests.ts @@ -1,6 +1,6 @@ +/// - -function test_init(){ +function test_init() { var auth = gapi.auth2.init({ client_id: 'my-id', cookie_policy: 'single_host_origin', @@ -9,7 +9,7 @@ function test_init(){ }); } -function test_getAuthInstance(){ +function test_getAuthInstance() { gapi.auth2.init({ client_id: 'my-id', cookie_policy: 'single_host_origin', @@ -19,14 +19,14 @@ function test_getAuthInstance(){ var auth = gapi.auth2.getAuthInstance(); } -function test_signIn(){ +function test_signIn() { gapi.auth2.getAuthInstance().signIn({ scope: 'email profile', prompt: 'content' }); } -function test_signInOptionsBuild(){ +function test_signInOptionsBuild() { var options = new gapi.auth2.SigninOptionsBuilder(); options.setAppPackageName('com.example.app'); options.setFetchBasicProfile(true); @@ -35,13 +35,13 @@ function test_signInOptionsBuild(){ gapi.auth2.getAuthInstance().signIn(options); } -function test_getAuthResponse(){ +function test_getAuthResponse() { var user = gapi.auth2.getAuthInstance().currentUser.get(); var authResponse = user.getAuthResponse(); var authResponseWithAuth = user.getAuthResponse(true); } -function test_render(){ +function test_render() { var success = (googleUser: gapi.auth2.GoogleUser): void => { console.log(googleUser); }; @@ -59,3 +59,87 @@ function test_render(){ onfailure: failure }); } + +/* Example taken from https://developers.google.com/identity/sign-in/web/ */ +function onSignIn(googleUser: gapi.auth2.GoogleUser) { + // Useful data for your client-side scripts: + var profile = googleUser.getBasicProfile(); + console.log("ID: " + profile.getId()); // Don't send this directly to your server! + console.log('Full Name: ' + profile.getName()); + console.log('Given Name: ' + profile.getGivenName()); + console.log('Family Name: ' + profile.getFamilyName()); + console.log("Image URL: " + profile.getImageUrl()); + console.log("Email: " + profile.getEmail()); + + // The ID token you need to pass to your backend: + var id_token = googleUser.getAuthResponse().id_token; + console.log("ID Token: " + id_token); +}; + + +/* Example taken from https://github.com/google/google-api-javascript-client/blob/master/samples/authSample.html */ + +// Enter an API key from the Google API Console: +// https://console.developers.google.com/apis/credentials +var apiKey = 'YOUR_API_KEY'; +// Enter the API Discovery Docs that describes the APIs you want to +// access. In this example, we are accessing the People API, so we load +// Discovery Doc found here: https://developers.google.com/people/api/rest/ +var discoveryDocs = ["https://people.googleapis.com/$discovery/rest?version=v1"]; +// Enter a client ID for a web application from the Google API Console: +// https://console.developers.google.com/apis/credentials?project=_ +// In your API Console project, add a JavaScript origin that corresponds +// to the domain where you will be running the script. +var clientId = 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com'; +// Enter one or more authorization scopes. Refer to the documentation for +// the API or https://developers.google.com/people/v1/how-tos/authorizing +// for details. +var scopes = 'profile'; +var authorizeButton = document.getElementById('authorize-button'); +var signoutButton = document.getElementById('signout-button'); +function handleClientLoad() { + // Load the API client and auth2 library + gapi.load('client:auth2', initClient); +} +function initClient() { + gapi.client.init({ + apiKey: apiKey, + discoveryDocs: discoveryDocs, + clientId: clientId, + scope: scopes + }).then(function () { + // Listen for sign-in state changes. + gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus); + // Handle the initial sign-in state. + updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get()); + authorizeButton.onclick = handleAuthClick; + signoutButton.onclick = handleSignoutClick; + }); +} +function updateSigninStatus(isSignedIn: boolean) { + if (isSignedIn) { + authorizeButton.style.display = 'none'; + signoutButton.style.display = 'block'; + makeApiCall(); + } else { + authorizeButton.style.display = 'block'; + signoutButton.style.display = 'none'; + } +} +function handleAuthClick(event: MouseEvent) { + gapi.auth2.getAuthInstance().signIn(); +} +function handleSignoutClick(event: MouseEvent) { + gapi.auth2.getAuthInstance().signOut(); +} +// Load the API and make an API call. Display the results on the screen. +function makeApiCall() { + gapi.client.people.people.get({ + resourceName: 'people/me' + }).then(function(resp) { + var p = document.createElement('p'); + var name = resp.result.names[0].givenName; + p.appendChild(document.createTextNode('Hello, '+name+'!')); + document.getElementById('content').appendChild(p); + }); +} diff --git a/gapi.auth2/index.d.ts b/gapi.auth2/index.d.ts index 6146a87e28..402da68699 100644 --- a/gapi.auth2/index.d.ts +++ b/gapi.auth2/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Sign-In API +// Type definitions for Google Sign-In API 0.0 // Project: https://developers.google.com/identity/sign-in/web/ // Definitions by: Derek Lawless // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -21,7 +21,7 @@ declare namespace gapi.auth2 { * Calls the onInit function when the GoogleAuth object is fully initialized, or calls the onFailure function if * initialization fails. */ - then(onInit: () => any, onFailure: (reason: string) => any): any; + then(onInit: () => any, onFailure?: (reason: string) => any): any; /** * Signs in the user with the options specified to gapi.auth2.init(). @@ -58,7 +58,7 @@ declare namespace gapi.auth2 { onsuccess: (googleUser: GoogleUser) => any, onfailure: (reason: string) => any): any; } - export interface IsSignedIn{ + export interface IsSignedIn { /** * Returns whether the current user is currently signed in. */ diff --git a/gapi.calendar/gapi.calendar-tests.ts b/gapi.calendar/gapi.calendar-tests.ts new file mode 100644 index 0000000000..0438e5dc06 --- /dev/null +++ b/gapi.calendar/gapi.calendar-tests.ts @@ -0,0 +1,152 @@ +/* Example taken from Google Calendar API JavaScript Quickstart https://developers.google.com/google-apps/calendar/quickstart/js */ + +{ + // Your Client ID can be retrieved from your project in the Google + // Developer Console, https://console.developers.google.com + var CLIENT_ID = ''; + + var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"]; + + /** + * Check if current user has authorized this application. + */ + function checkAuth() { + gapi.auth.authorize( + { + 'client_id': CLIENT_ID, + 'scope': SCOPES.join(' '), + 'immediate': true + }, handleAuthResult); + } + + /** + * Handle response from authorization server. + * + * @param {Object} authResult Authorization result. + */ + function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { + var authorizeDiv = document.getElementById('authorize-div')!; + if (authResult && !authResult.error) { + // Hide auth UI, then load client library. + authorizeDiv.style.display = 'none'; + loadCalendarApi(); + } else { + // Show auth UI, allowing the user to initiate authorization by + // clicking authorize button. + authorizeDiv.style.display = 'inline'; + } + } + + /** + * Initiate auth flow in response to user clicking authorize button. + * + * @param {Event} event Button click event. + */ + function handleAuthClick(event: MouseEvent) { + gapi.auth.authorize( + {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, + handleAuthResult); + return false; + } + + /** + * Load Google Calendar client library. List upcoming events + * once client library is loaded. + */ + function loadCalendarApi() { + gapi.client.load('calendar', 'v3', listUpcomingEvents); + } + + /** + * Print the summary and start datetime/date of the next ten events in + * the authorized user's calendar. If no events are found an + * appropriate message is printed. + */ + function listUpcomingEvents() { + var request = gapi.client.calendar.events.list({ + 'calendarId': 'primary', + 'timeMin': (new Date()).toISOString(), + 'showDeleted': false, + 'singleEvents': true, + 'maxResults': 10, + 'orderBy': 'startTime' + }); + + request.execute(function(resp) { + var events = resp.items; + appendPre('Upcoming events:'); + + if (events.length > 0) { + for (let i = 0; i < events.length; i++) { + var event = events[i]; + var when = event.start.dateTime; + if (!when) { + when = event.start.date; + } + appendPre(event.summary + ' (' + when + ')') + } + } else { + appendPre('No upcoming events found.'); + } + + }); + } + + /** + * Append a pre element to the body containing the given message + * as its text node. + * + * @param {string} message Text to be placed in pre element. + */ + function appendPre(message: string) { + var pre = document.getElementById('output')!; + var textContent = document.createTextNode(message + '\n'); + pre.appendChild(textContent); + } +} + +/* Example taken from https://developers.google.com/google-apps/calendar/v3/reference/events/insert#examples */ + +{ + // Refer to the JavaScript quickstart on how to setup the environment: + // https://developers.google.com/google-apps/calendar/quickstart/js + // Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any + // stored credentials. + + const event = { + 'summary': 'Google I/O 2015', + 'location': '800 Howard St., San Francisco, CA 94103', + 'description': 'A chance to hear more about Google\'s developer products.', + 'start': { + 'dateTime': '2015-05-28T09:00:00-07:00', + 'timeZone': 'America/Los_Angeles' + }, + 'end': { + 'dateTime': '2015-05-28T17:00:00-07:00', + 'timeZone': 'America/Los_Angeles' + }, + 'recurrence': [ + 'RRULE:FREQ=DAILY;COUNT=2' + ], + 'attendees': [ + {'email': 'lpage@example.com'}, + {'email': 'sbrin@example.com'} + ], + 'reminders': { + 'useDefault': false, + 'overrides': [ + {'method': 'email', 'minutes': 24 * 60}, + {'method': 'popup', 'minutes': 10} + ] + } + }; + + var request = gapi.client.calendar.events.insert({ + 'calendarId': 'primary', + 'resource': event + }); + + request.execute(function(event) { + appendPre('Event created: ' + event.htmlLink); + }); +} diff --git a/gapi.calendar/index.d.ts b/gapi.calendar/index.d.ts new file mode 100644 index 0000000000..bd0e3b0d17 --- /dev/null +++ b/gapi.calendar/index.d.ts @@ -0,0 +1,675 @@ +// Type definitions for Google Calendar API 3.0 +// Project: https://developers.google.com/google-apps/calendar/ +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace gapi.client.calendar { + export class freebusy { + static query(parameters: FreeBusyQueryParameters): HttpRequest; + } + + interface FreeBusyQueryParameters { + timeMin: datetime; + timeMax: datetime; + timeZone?: string; + groupExpansionMax?: integer; + calendarExpansionMax?: integer; + items: {id: string}[]; + } + + interface FreeBusy { + kind: 'calendar#freeBusy'; + timeMin: datetime; + timeMax: datetime; + groups: { + (key: string): { + errors?: { + domain: string; + reason: string; + }[]; + calendars: string[]; + } + }; + calendars: { + (key: string): { + errors?: { + domain: string; + reason: string; + }[]; + busy: { + start: datetime; + end: datetime; + }[]; + } + }; + } + + export class acl { + static insert(parameters: AclInsertParameters): HttpRequest; + static get(parameters: AclGetParameters): HttpRequest; + static update(parameters: AclUpdateParameters): HttpRequest; + static delete(parameters: AclDeleteParameters): HttpRequest; + } + + // The type of the scope. Possible values are: + type ScopeType = + // The public scope. This is the default value. + // Note: The permissions granted to the "default", or public, scope apply to any user, authenticated or not. + 'default' | + // Limits the scope to a single user. + 'user' | + // Limits the scope to a group. + 'group' | + // Limits the scope to a domain. + 'domain'; + + interface Acl { + kind: 'calendar#aclRule'; + etag: etag; + id: string; + scope: { + type: ScopeType; + value: string; + }; + role: AccessRole; + } + + interface AclInsertParameters { + calendarId: string; + + // Acl resource + role: AccessRole; + scope: { + type: ScopeType; + value?: string; + }; + } + + interface AclGetParameters { + calendarId: string; + ruleId: string; + } + + interface AclUpdateParameters extends AclInsertParameters { + ruleId: string; + } + + interface AclDeleteParameters extends AclGetParameters { + } + + export class calendarList { + static list(parameters?: CalendarListListParameters): HttpRequest; + static insert(parameters: CalendarListInsertParameters): HttpRequest; + } + + type AccessRoleWithoutNone = + // The user has read access to free/busy information. + 'freeBusyReader' | + // The user has read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. + 'reader' | + // The user has read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. + 'writer' | + // The user has ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs. + 'owner'; + + // The user's access role for this calendar. Read-only. Possible values are: + type AccessRole = + // The user has no access. + 'none' | + AccessRoleWithoutNone; + + interface CalendarListListParameters { + maxResults?: integer; + // The minimum access role for the user in the returned entries. Optional. The default is no restriction. Acceptable values are: + minAccessRole?: AccessRoleWithoutNone; + pageToken?: string; + showDeleted?: boolean; + showHidden?: boolean; + syncToken?: string; + } + + interface CalendarListInsertParameters { + // Parameters + // Optional query parameters + colorRgbFormat?: boolean; + + // CalendarList resource + resource: CalendarListInput; + } + + interface CalendarListInput { + // Required Properties + id: string; + + // Optional Properties + backgroundColor?: string; + colorId?: string; + defaultReminders?: { + method: ReminderMethod; + minutes: integer; + }[]; + foregroundColor?: string; + hidden?: boolean; + notificationSettings?: { + notifications: { + type: NotificationType; + method: string; + }[]; + }; + selected?: boolean; + summaryOverride?: string; + } + + interface CalendarList { + kind: 'calendar#calendarList'; + etag: etag; + + /** + * Token used to access the next page of this result. + * Omitted if no further results are available, in which case nextSyncToken is provided. + */ + nextPageToken?: string; + + /** + * Token used at a later point in time to retrieve only the entries that have changed since this result was returned. + * Omitted if further results are available, in which case nextPageToken is provided. + */ + nextSyncToken?: string; + + items: CalendarListEntry[]; + } + + // The type of notification. Possible values are: + type NotificationType = + // Notification sent when a new event is put on the calendar. + 'eventCreation' | + // Notification sent when an event is changed. + 'eventChange' | + // Notification sent when an event is cancelled. + 'eventCancellation' | + // Notification sent when an event is changed. + 'eventResponse' | + // An agenda with the events of the day (sent out in the morning). + 'agenda'; + + interface CalendarListEntry { + kind: 'calendar#calendarListEntry'; + etag: etag; + id: string; + summary: string; + description?: string; + location?: string; + timeZone?: string; + summaryOverride?: string; + colorId?: string; + backgroundColor?: string; + foregroundColor?: string; + hidden?: boolean; + selected?: boolean; + // The effective access role that the authenticated user has on the calendar. Read-only. + accessRole: AccessRoleWithoutNone; + defaultReminders: { + method: ReminderMethod; + minutes: integer; + }[]; + notificationSettings?: { + notifications: { + type: NotificationType; + method: string; + }[]; + }; + primary?: boolean; + deleted?: boolean; + } + + export class calendars { + static insert(parameters: CalendarsInsertParameters): HttpRequest; + static update(parameters: CalendarsUpdateParameters): HttpRequest; + static delete(parameters: CalendarsDeleteParameters): HttpRequest; + } + + interface CalendarsUpdateParameters { + calendarId: string; + + // Calendars resource + // Optional Properties + description?: string; + location?: string; + summary?: string; + timeZone?: string; + } + + interface CalendarsInsertParameters { + // Calendars resource + // Required Properties + summary: string; + + description?: string; + location?: string; + timeZone?: string; + } + + interface CalendarsDeleteParameters { + calendarId: string; + } + + interface Calendar { + kind: 'calendar#calendar'; + etag: etag; + id: string; + summary: string; + description?: string; + location?: string; + timeZone?: string; + } + + export class events { + static list(parameters: EventsListParameters): HttpRequest; + static insert(parameters: EventsInsertParameters): HttpRequest; + static update(parameters: EventsUpdateParameters): HttpRequest; + static get(parameters: EventsGetParameters): HttpRequest; + } + + interface EventsGetParameters { + calendarId: string; + eventId: string; + + alwaysIncludeEmail?: boolean; + maxAttendees?: integer; + timeZone?: string; + } + + interface EventsInsertParameters { + calendarId: string; + + maxAttendees?: integer; + sendNotifications?: boolean; + supportsAttachments?: boolean; + + // Event resource + resource: EventInput; + } + + interface EventsUpdateParameters { + calendarId: string; + eventId: string; + + alwaysIncludeEmail?: boolean; + maxAttendees?: integer; + sendNotifications?: boolean; + supportsAttachments?: boolean; + + // Event resource + resource: EventInput; + } + + interface EventInput { + // Required Properties + attachments?: { + fileUrl: string; + }[]; + attendees?: { + email: string; + displayName?: string; + optional?: boolean; + responseStatus?: AttendeeResponseStatus; + comment?: string; + additionalGuests?: integer; + }[]; + end: { + date?: date; + dateTime?: datetime; + timeZone?: string + }; + reminders?: { + overrides: { + method: string; + minutes: integer; + }[]; + useDefault: boolean; + }; + start: { + date?: date; + dateTime?: datetime; + timeZone: string; + }; + + // Optional Properties + anyoneCanAddSelf?: boolean; + colorId?: string; + description?: string; + extendedProperties?: { + private: { + (key: string): string + }; + shared: { + (key: string): string + } + }; + gadget?: { + display?: GadgetDisplayMode; + height: integer; + iconLink: string; + link: string; + preferences: { + (key: string): string + } + title: string; + type: string; + width: integer; + }; + guestsCanInviteOthers?: boolean; + guestsCanSeeOtherGuests?: boolean; + id?: string; + location?: string; + originalStartTime?: { + date: date; + dateTime: datetime; + timeZone: string + }; + recurrence?: string[]; + sequence?: integer; + source?: { + url: string; + title: string + }; + status?: EventStatus; + summary?: string; + transparency?: EventTransparency; + visibility?: EventVisibility; + } + + // The order of the events returned in the result. Optional. The default is an unspecified, stable order. + // Acceptable values are: + type EventsOrder = + // Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True) + 'startTime' | + // Order by last modification time (ascending). + 'updated'; + + // Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. + // It makes the result of this list request contain only entries that have changed since then. + // All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. + // There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. + // These are: + type SyncToken = + 'iCalUID' | + 'orderBy' | + 'privateExtendedProperty' | + 'q' | + 'sharedExtendedProperty' | + 'timeMin' | + 'timeMax' | + 'updatedMin'; + + interface EventsListParameters { + calendarId: string; + alwaysIncludeEmail?: boolean; + iCalUID?: string; + maxAttendees?: integer; + maxResults?: integer; + orderBy?: EventsOrder; + pageToken?: string; + privateExtendedProperty?: string; + q?: string; + sharedExtendedProperty?: string; + showDeleted?: boolean; + showHiddenInvitations?: boolean; + singleEvents?: boolean; + syncToken?: SyncToken; + timeMax?: datetime; + timeMin?: datetime; + timeZone?: string; + updatedMin?: datetime; + } + + interface Events { + kind: 'calendar#events'; + etag: etag; + summary: string; + description: string; + updated: datetime; + timeZone: string; + // The user's access role for this calendar. Read-only. Possible values are: + accessRole: AccessRole; + defaultReminders: { + method: ReminderMethod; + minutes: integer; + }[]; + nextPageToken?: string; + nextSyncToken?: string; + items: Event[]; + } + + type etag = string; + type datetime = string; + type date = string; + type integer = number; + + // The attendee's response status. Possible values are: + type AttendeeResponseStatus = + // The attendee has not responded to the invitation. + 'needsAction' | + // The attendee has declined the invitation. + 'declined' | + // The attendee has tentatively accepted the invitation. + 'tentative' | + // The attendee has accepted the invitation. + 'accepted'; + + // The gadget's display mode. Optional. Possible values are: + type GadgetDisplayMode = + // The gadget displays next to the event's title in the calendar view. + 'icon' | + // The gadget displays when the event is clicked. + 'chip'; + + // The method used by this reminder. Possible values are: + type ReminderMethod = + // Reminders are sent via email. + 'email' | + // Reminders are sent via SMS. These are only available for Google Apps for Work, Education, and Government customers. Requests to set SMS reminders for other account types are ignored. + 'sms' | + // Reminders are sent via a UI popup. + 'popup'; + + // Status of the event. Optional. Possible values are: + type EventStatus = + // The event is confirmed. This is the default status. + 'confirmed' | + // The event is tentatively confirmed. + 'tentative' | + // The event is cancelled. + 'cancelled'; + + // Whether the event blocks time on the calendar. Optional. Possible values are: + type EventTransparency = + // The event blocks time on the calendar. This is the default value. + 'opaque' | + // The event does not block time on the calendar. + 'transparent'; + + // Visibility of the event. Optional. Possible values are: + type EventVisibility = + // Uses the default visibility for events on the calendar. This is the default value. + 'default' | + // The event is public and event details are visible to all readers of the calendar. + 'public' | + // The event is private and only event attendees may view event details. + 'private' | + // The event is private. This value is provided for compatibility reasons. + 'confidential'; + + class Event { + kind: 'calendar#event'; + etag: etag; + id: string; + status?: EventStatus; + htmlLink: string; + created: datetime; + updated: datetime; + summary: string; + description: string; + location?: string; + colorId?: string; + + // The creator of the event. Read-only. + creator: { + // The creator's Profile ID, if available. + id?: string; + + // The creator's email address, if available. + email?: string; + + // The creator's name, if available. + displayName?: string; + + // Whether the creator corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. + self?: boolean; + }; + + // The organizer of the event. + organizer: { + // The organizer's Profile ID, if available. + id?: string; + + // The organizer's email address, if available. + email?: string; + + // The organizer's name, if available. + displayName?: string; + + // Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. + self?: boolean; + }; + + // The (inclusive) start time of the event. For a recurring event, this is the start time of the first instance. + start: { + // The date, in the format "yyyy-mm-dd", if this is an all-day event. + date?: date; + + // The time, as a combined date-time value (formatted according to RFC3339). + // A time zone offset is required unless a time zone is explicitly specified in timeZone. + dateTime?: datetime; + + // The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) + // For recurring events this field is required and specifies the time zone in which the recurrence is expanded. + // For single events this field is optional and indicates a custom time zone for the event start/end. + timeZone?: string; + }; + + // The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance. + end: { + // The date, in the format "yyyy-mm-dd", if this is an all-day event. + date?: date; + + // The time, as a combined date-time value (formatted according to RFC3339). + // A time zone offset is required unless a time zone is explicitly specified in timeZone. + dateTime?: datetime; + + // The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) + // For recurring events this field is required and specifies the time zone in which the recurrence is expanded. + // For single events this field is optional and indicates a custom time zone for the event start/end. + timeZone?: string; + }; + + // Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. + // The default is False. + endTimeUnspecified?: boolean; + + recurrence: string[]; + + // For an instance of a recurring event, this is the id of the recurring event to which this instance belongs. Immutable. + recurringEventId?: string; + + // Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. + originalStartTime?: { + date: date; + dateTime: datetime; + timeZone?: string; + }; + + transparency?: EventTransparency; + visibility?: EventVisibility; + iCalUID: string; + sequence: integer; + + // The attendees of the event. + attendees?: { + id: string; + email: string; + displayName?: string; + organizer: boolean; + self: boolean; + resource: boolean; + optional?: boolean; + responseStatus: AttendeeResponseStatus; + comment?: string; + additionalGuests?: integer; + }[]; + + attendeesOmitted?: boolean; + + // Extended properties of the event. + extendedProperties?: { + private: { + (key: string): string; + }; + shared: { + (key: string): string; + } + }; + + // An absolute link to the Google+ hangout associated with this event. Read-only. + hangoutLink?: string; + + // A gadget that extends this event. + gadget?: { + type: string; + title: string; + link: string; + iconLink: string; + width?: integer; + height?: integer; + display?: GadgetDisplayMode; + preferences: { + (key: string): string; + } + }; + + anyoneCanAddSelf?: boolean; + guestsCanInviteOthers?: boolean; + guestsCanModify?: boolean; + guestsCanSeeOtherGuests?: boolean; + privateCopy?: boolean; + + // Whether this is a locked event copy where no changes can be made to the main event fields "summary", "description", "location", "start", "end" or "recurrence". The default is False. Read-Only. + locked?: boolean; + + reminders: { + useDefault: boolean; + overrides?: { + method: ReminderMethod; + minutes: integer; + }[]; + }; + + // Source from which the event was created. For example, a web page, an email message or any document identifiable by an URL with HTTP or HTTPS scheme. + // Can only be seen or modified by the creator of the event. + source?: { + url: string; + title: string; + }; + + // File attachments for the event. Currently only Google Drive attachments are supported. + attachments?: { + fileUrl: string; + title: string; + mimeType: string; + iconLink: string; + fileId: string; + }[]; + } +} diff --git a/gapi.calendar/tsconfig.json b/gapi.calendar/tsconfig.json new file mode 100644 index 0000000000..7613ee5b3d --- /dev/null +++ b/gapi.calendar/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "gapi.calendar-tests.ts" + ] +} diff --git a/gapi.people/gapi.people-tests.ts b/gapi.people/gapi.people-tests.ts new file mode 100644 index 0000000000..65b6339765 --- /dev/null +++ b/gapi.people/gapi.people-tests.ts @@ -0,0 +1,99 @@ +/* Example taken from Google People API JavaScript Quickstart https://developers.google.com/people/quickstart/js */ + +{ + // Your Client ID can be retrieved from your project in the Google + // Developer Console, https://console.developers.google.com + var CLIENT_ID = ''; + + var SCOPES = ["https://www.googleapis.com/auth/contacts.readonly"]; + + /** + * Check if current user has authorized this application. + */ + function checkAuth() { + gapi.auth.authorize( + { + 'client_id': CLIENT_ID, + 'scope': SCOPES.join(' '), + 'immediate': true + }, handleAuthResult); + } + + /** + * Handle response from authorization server. + * + * @param {Object} authResult Authorization result. + */ + function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { + var authorizeDiv = document.getElementById('authorize-div')!; + if (authResult && !authResult.error) { + // Hide auth UI, then load client library. + authorizeDiv.style.display = 'none'; + loadPeopleApi(); + } else { + // Show auth UI, allowing the user to initiate authorization by + // clicking authorize button. + authorizeDiv.style.display = 'inline'; + } + } + + /** + * Initiate auth flow in response to user clicking authorize button. + * + * @param {Event} event Button click event. + */ + function handleAuthClick(event: MouseEvent) { + gapi.auth.authorize( + {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, + handleAuthResult); + return false; + } + + /** + * Load Google People client library. List names if available + * of 10 connections. + */ + function loadPeopleApi() { + gapi.client.load('https://people.googleapis.com/$discovery/rest', 'v1', listConnectionNames); + } + + /** + * Print the display name if available for 10 connections. + */ + function listConnectionNames() { + var request = gapi.client.people.people.connections.list({ + 'resourceName': 'people/me', + 'pageSize': 10, + }); + + request.execute(function(resp) { + var connections = resp.connections; + appendPre('Connections:'); + + if (connections.length > 0) { + for (var i = 0; i < connections.length; i++) { + var person = connections[i]; + if (person.names && person.names.length > 0) { + appendPre(person.names[0].displayName) + } else { + appendPre("No display name found for connection."); + } + } + } else { + appendPre('No upcoming events found.'); + } + }); + } + + /** + * Append a pre element to the body containing the given message + * as its text node. + * + * @param {string} message Text to be placed in pre element. + */ + function appendPre(message: string) { + var pre = document.getElementById('output')!; + var textContent = document.createTextNode(message + '\n'); + pre.appendChild(textContent); + } +} diff --git a/gapi.people/index.d.ts b/gapi.people/index.d.ts new file mode 100644 index 0000000000..86bf930beb --- /dev/null +++ b/gapi.people/index.d.ts @@ -0,0 +1,246 @@ +// Type definitions for Google People API 1.0 +// Project: https://developers.google.com/people/ +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace gapi.client.people { + export namespace people { + + interface GetParameters { + resourceName: string; + + // Query parameters + requestMask?: RequestMask; + } + + function get(parameters: GetParameters): HttpRequest; + + interface GetBatchGetParameters { + // Query parameters + resourcesName?: string; + requestMask?: RequestMask; + } + + function getBatchGet(parameters: GetBatchGetParameters): HttpRequest; + + interface BatchGetResponse { + responses: PersonResponse[]; + } + + interface PersonResponse { + httpStatusCode: number; + person: Person; + requestedResourceName: string; + } + + namespace connections { + function list(parameters: ListParameters): HttpRequest; + + type SortOrder = 'LAST_MODIFIED_ASCENDING' | 'FIRST_NAME_ASCENDING' | 'LAST_NAME_ASCENDING'; + + interface ListParameters { + resourceName: string; + + // Query parameters + pageToken?: string; + pageSize?: number; + sortOrder?: SortOrder; + syncToken?: string; + requestMask?: RequestMask; + } + + interface Response { + connections: Person[]; + nextPageToken: string; + nextSyncToken: string; + } + } + } + + interface RequestMask { + includeField: string; + } + + type SourceType = 'SOURCE_TYPE_UNSPECIFIED' | 'ACCOUNT' | 'PROFILE' | 'DOMAIN_PROFILE' | 'CONTACT'; + + interface Source { + type: SourceType; + id: string; + etag: string; + resourceName: string; + } + + type ObjectType = 'OBJECT_TYPE_UNSPECIFIED' | 'PERSON' | 'PAGE'; + + interface PersonMetadata { + sources: Source[]; + previousResourceNames: string[]; + linkedPeopleResourceNames: string[]; + deleted: boolean; + objectType: ObjectType; + } + + interface FieldMetadata { + primary: boolean; + verified: boolean; + source: Source; + } + + interface Locale { + metadata: FieldMetadata; + value: string; + } + + interface Name { + metadata: FieldMetadata; + displayName: string; + displayNameLastFirst: string; + familyName: string; + givenName: string; + middleName: string; + honorificPrefix: string; + honorificSuffix: string; + phoneticFullName: string; + phoneticFamilyName: string; + phoneticGivenName: string; + phoneticMiddleName: string; + phoneticHonorificPrefix: string; + phoneticHonorificSuffix: string; + } + + type NicknameType = 'DEFAULT' | 'MAIDEN_NAME' | 'INITIALS' | 'GPLUS' | 'OTHER_NAME'; + + interface Nickname { + metadata: FieldMetadata; + value: string; + type: NicknameType; + } + + interface CoverPhoto { + } + + interface Photo { + } + + interface Gender { + } + + interface AgeRange { + } + + interface Birthday { + } + + interface Event { + } + + interface Address { + metadata: FieldMetadata; + formattedValue: string; + type: string; + formattedType: string; + poBox: string; + streetAddress: string; + extendedAddress: string; + city: string; + region: string; + postalCode: string; + country: string; + countryCode: string; + } + + interface Residence { + metadata: FieldMetadata; + value: string; + current: boolean; + } + + interface EmailAddress { + metadata: FieldMetadata; + value: string; + type: string; + formattedType: string; + displayName: string; + } + + interface PhoneNumber { + metadata: FieldMetadata; + value: string; + canonicalForm: string; + type: string; + formattedType: string; + } + + interface ImClient { + } + + interface Tagline { + } + + interface Biography { + } + + interface Url { + } + + interface Organization { + } + + interface Occupation { + } + + interface Interest { + } + + interface Skill { + } + + interface BraggingRights { + } + + interface Relation { + } + + interface RelationshipInterest { + } + + interface RelationshipStatus { + } + + interface Membership { + } + + interface Person { + resourceName: string; + etag: string; + metadata: PersonMetadata; + locales: Locale[]; + names: Name[]; + nicknames?: Nickname[]; + coverPhotos: CoverPhoto[]; + photos?: Photo[]; + genders?: Gender[]; + ageRange?: AgeRange; + birthdays?: Birthday[]; + events?: Event[]; + addresses?: Address[]; + residences?: Residence[]; + emailAddresses?: EmailAddress[]; + phoneNumbers?: PhoneNumber[]; + imClients?: ImClient[]; + taglines?: Tagline[]; + biographies?: Biography[]; + urls?: Url[]; + organizations?: Organization[]; + occupations?: Occupation[]; + interests?: Interest[]; + skills?: Skill[]; + BraggingRights?: BraggingRights[]; + relations?: Relation[]; + relationshipInterests?: RelationshipInterest[]; + relationshipStatuses?: RelationshipStatus[]; + memberships?: Membership[]; + } +} diff --git a/gapi.people/tsconfig.json b/gapi.people/tsconfig.json new file mode 100644 index 0000000000..93fcfc59b6 --- /dev/null +++ b/gapi.people/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "gapi.people-tests.ts" + ] +} diff --git a/gapi.plus/gapi.plus-tests.ts b/gapi.plus/gapi.plus-tests.ts new file mode 100644 index 0000000000..12368dd63c --- /dev/null +++ b/gapi.plus/gapi.plus-tests.ts @@ -0,0 +1,10 @@ +/* Example taken from https://developers.google.com/+/web/people/ */ + +gapi.client.load('plus','v1', function(){ + var request = gapi.client.plus.people.get({ + 'userId': 'me' + }); + request.execute(function(resp) { + console.log('Retrieved profile for:' + resp.displayName); + }); +}); diff --git a/gapi.plus/index.d.ts b/gapi.plus/index.d.ts new file mode 100644 index 0000000000..3e24b79ce1 --- /dev/null +++ b/gapi.plus/index.d.ts @@ -0,0 +1,111 @@ +// Type definitions for Google+ Platform API 1.0 +// Project: https://developers.google.com/+/web/people/ +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +// See Google+ REST API Reference https://developers.google.com/+/web/api/rest/latest/ +declare namespace gapi.client.plus { + export namespace people { + + interface GetParameters { + userId: string; + } + function get(parameters: GetParameters): HttpRequest; + + interface SearchParameters { + query: string; + language?: string; + maxResults?: number; + pageToken?: string; + } + function search(parameters: SearchParameters): HttpRequest; + + // Search response + interface PeopleFeed { + kind: 'plus#peopleFeed'; + etag: string; + selfLink: string; + title: string; + nextPageToken: string; + totalItems: number; + items: Person[]; + } + + interface Person { + kind: 'plus#person'; + etag: string; + nickname: string; + occupation: string; + skills: string; + birthday: string; + gender: string; + emails: { + value: string; + type: string; + }[]; + urls: { + value: string; + type: string; + label: string; + }[]; + objectType: string; + id: string; + displayName: string; + name: { + formatted: string; + familyName: string; + givenName: string; + middleName: string; + honorificPrefix: string; + honorificSuffix: string; + }; + tagline: string; + braggingRights: string; + aboutMe: string; + relationshipStatus: string; + url: string; + image: { + url: string; + }; + organizations: { + name: string; + department: string; + title: string; + type: string; + startDate: string; + endDate: string; + location: string; + description: string; + primary: boolean; + }[]; + placesLived: { + value: string; + primary: boolean; + }[]; + isPlusUser: boolean; + language: string; + ageRange: { + min: number; + max: number; + }; + plusOneCount: number; + circledByCount: number; + verified: boolean; + cover: { + layout: string; + coverPhoto: { + url: string; + height: number; + width: number; + }; + coverInfo: { + topImageOffset: number; + leftImageOffset: number; + } + }; + domain: string; + } + } +} diff --git a/gapi.plus/tsconfig.json b/gapi.plus/tsconfig.json new file mode 100644 index 0000000000..1fc2401de1 --- /dev/null +++ b/gapi.plus/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "gapi.plus-tests.ts" + ] +} diff --git a/gapi/gapi-tests.ts b/gapi/gapi-tests.ts new file mode 100644 index 0000000000..3c70b9850d --- /dev/null +++ b/gapi/gapi-tests.ts @@ -0,0 +1,97 @@ +/// +/// + +/* Examples taken from https://developers.google.com/api-client-library/javascript/start/start-js */ + +{ + function start1() { + // 2. Initialize the JavaScript client library. + gapi.client.init({ + 'apiKey': 'YOUR_API_KEY', + 'discoveryDocs': ['https://people.googleapis.com/$discovery/rest'], + // clientId and scope are optional if auth is not required. + 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', + 'scope': 'profile', + }).then(function() { + // 3. Initialize and make the API request. + return gapi.client.people.people.get({ + resourceName: 'people/me' + }); + }).then(function(response) { + console.log(response.result); + }, function(reason) { + console.log('Error: ' + reason.result.error.message); + }); + }; + // 1. Load the JavaScript client library. + gapi.load('client', start1); +} + +{ + function start2() { + // 2. Initialize the JavaScript client library. + gapi.client.init({ + 'apiKey': 'YOUR_API_KEY', + // clientId and scope are optional if auth is not required. + 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', + 'scope': 'profile', + }).then(function() { + // 3. Initialize and make the API request. + return gapi.client.request({ + 'path': 'https://people.googleapis.com/v1/people/me', + }) + }).then(function(response) { + console.log(response.result); + }, function(reason) { + console.log('Error: ' + reason.result.error.message); + }); + }; + // 1. Load the JavaScript client library. + gapi.load('client', start2); +} + + +/* Examples taken from https://developers.google.com/api-client-library/javascript/features/promises */ + +gapi.client.request({'path': '/plus/v1/people', 'params': {'query': 'John'}}).then(function(response) { + // Handle response +}, function(reason) { + // Handle error +}); + +gapi.client.load('plus', 'v1').then(function() { + gapi.client.plus.people.search({'query': ''}).then(response => { }); +}); + +var personFetcher = { + results: [], + + // Why this: any? Check https://github.com/Microsoft/TypeScript/issues/10835 + + fetch: function(this: any, name: string) { + gapi.client.request({path: '/plus/v1/people', params:{query: name}}).then(function(this: any, response) { + this.results.push(response.result); + }, function(reason) { + console.error(name, 'was not fetched:', reason.result.error.message); + }, this); + } +}; +personFetcher.fetch('John'); + +gapi.client.request({ + 'path': 'plus/v1/people', + 'params': {'query': name} +}).execute(function(resp, rawResp) { + processResponse(resp); +}); + +gapi.client.request({ + 'path': 'plus/v1/people', + 'params': {'query': name} +}).then(function(resp) { + processResponse(resp.result); +}); + +function processResponse(response: any) { + // Stub +} diff --git a/gapi/index.d.ts b/gapi/index.d.ts index 28d5c990bc..8f8e621fa3 100644 --- a/gapi/index.d.ts +++ b/gapi/index.d.ts @@ -1,8 +1,8 @@ -// Type definitions for Google API Client +// Type definitions for Google API Client 0.0 // Project: https://code.google.com/p/google-api-javascript-client/ // Definitions by: Frank M // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +// TypeScript Version: 2.1 /** * The OAuth 2.0 token object represents the OAuth 2.0 token and any associated data. @@ -38,7 +38,7 @@ declare namespace gapi { /** * Pragmatically initialize gapi class member. */ - export function load(object: string, fn: any) : any; + export function load(apiName: string, callback: () => void): void; } @@ -102,7 +102,7 @@ declare namespace gapi.auth { /** * A function in the global namespace, which is called when the sign-in button is rendered and also called after a sign-in flow completes. */ - callback?: Function; + callback?: () => void; /** * If true, all previously granted scopes remain granted in each incremental request, for incremental authorization. The default value true is correct for most use cases; use false only if employing delegated auth, where you pass the bearer token to a less-trusted component with lower programmatic authority. */ @@ -127,6 +127,30 @@ declare namespace gapi.auth { } declare namespace gapi.client { + /** + * Initializes the JavaScript client with API key, OAuth client ID, scope, and API discovery document(s). + * If OAuth client ID and scope are provided, this function will load the gapi.auth2 module to perform OAuth. + * The gapi.client.init function can be run multiple times, such as to set up more APIs, to change API key, or initialize OAuth lazily. + */ + export function init(args: { + /** + * The API Key to use. + */ + apiKey?: string; + /** + * An array of discovery doc URLs or discovery doc JSON objects. + */ + discoveryDocs?: string[]; + /** + * The app's client ID, found and created in the Google Developers Console. + */ + clientId?: string; + /** + * The scopes to request, as a space-delimited string. + */ + scope?: string + }): Promise; + interface RequestOptions { /** * The URL to handle the request @@ -155,43 +179,79 @@ declare namespace gapi.client { } /** - * Loads the client library interface to a particular API. If a callback is not provided, a promise is returned. - * @param name The name of the API to load. - * @param version The version of the API to load. - * @return promise The promise that get's resolved after the request is finished. - */ - export function load(name: string, version: string): Promise + * Loads the client library interface to a particular API. If a callback is not provided, a promise is returned. + * @param name The name of the API to load. + * @param version The version of the API to load. + * @return promise The promise that get's resolved after the request is finished. + */ + export function load(name: string, version: string): Promise; /** - * Loads the client library interface to a particular API. The new API interface will be in the form gapi.client.api.collection.method. - * @param name The name of the API to load. - * @param version The version of the API to load - * @param callback the function that is called once the API interface is loaded - * @param url optional, the url of your app - if using Google's APIs, don't set it - */ + * Loads the client library interface to a particular API. The new API interface will be in the form gapi.client.api.collection.method. + * @param name The name of the API to load. + * @param version The version of the API to load + * @param callback the function that is called once the API interface is loaded + * @param url optional, the url of your app - if using Google's APIs, don't set it + */ export function load(name: string, version: string, callback: () => any, url?: string): void; /** - * Creates a HTTP request for making RESTful requests. - * An object encapsulating the various arguments for this method. - */ + * Creates a HTTP request for making RESTful requests. + * An object encapsulating the various arguments for this method. + */ export function request(args: RequestOptions): HttpRequest; /** - * Creates an RPC Request directly. The method name and version identify the method to be executed and the RPC params are provided upon RPC creation. - * @param method The method to be executed. - * @param version The version of the API which defines the method to be executed. Defaults to v1 - * @param rpcParams A key-value pair of the params to supply to this RPC - */ + * Creates an RPC Request directly. The method name and version identify the method to be executed and the RPC params are provided upon RPC creation. + * @param method The method to be executed. + * @param version The version of the API which defines the method to be executed. Defaults to v1 + * @param rpcParams A key-value pair of the params to supply to this RPC + */ export function rpcRequest(method: string, version?: string, rpcParams?: any): RpcRequest; /** - * Sets the API key for the application. - * @param apiKey The API key to set - */ + * Sets the API key for the application. + * @param apiKey The API key to set + */ export function setApiKey(apiKey: string): void; + interface HttpRequestFulfilled { + result: T; + body: string; + headers?: any[]; + status?: number; + statusText?: string; + } + + interface HttpRequestRejected { + result: { + error: { + message: string; + } + }; + body: string; + headers?: any[]; + status?: number; + statusText?: string; + } + + /** + * HttpRequest supports promises. + * See Google API Client JavaScript Using Promises https://developers.google.com/api-client-library/javascript/features/promises + * + * TODO This should be updated when TypeScript 2.3 is released + * See https://github.com/Microsoft/TypeScript/issues/12409 + * See https://github.com/Microsoft/TypeScript/blob/65da012527937a3074c62655d60ee08fee809f7f/lib/lib.es5.d.ts#L1339 + */ + class HttpRequestPromise { + then( + opt_onFulfilled?: ((response: HttpRequestFulfilled) => void) | null, + opt_onRejected?: ((reason: HttpRequestRejected) => void) | null, + opt_context?: any + ): Promise; + } + /** * An object encapsulating an HTTP request. This object is not instantiated directly, rather it is returned by gapi.client.request. */ - export class HttpRequest { + export class HttpRequest extends HttpRequestPromise { /** * Executes the request and runs the supplied callback on response. * @param callback The callback function which executes when the request succeeds or fails. @@ -210,25 +270,9 @@ declare namespace gapi.client { status: number; statusText: string; } - ) => any):void; - /** - * HttpRequest supports promises. - */ - then(success:(response:{ - result:T; - body:string; - headers?: any[]; - status?: number; - statusText?: string - })=>void, - failure:(response:{ - result:T; - body:string; - headers?: any[]; - status?: number; - statusText?: string - })=>void): void; + ) => any): void; } + /** * Represents an HTTP Batch operation. Individual HTTP requests are added with the add method and the batch is executed using execute. */ @@ -244,16 +288,16 @@ declare namespace gapi.client { */ id: string; callback: ( - /** - * is the response for this request only. Its format is defined by the API method being called. - */ - individualResponse: any, - /** - * is the raw batch ID-response map as a string. It contains all responses to all requests in the batch. - */ - rawBatchResponse: any - ) => any - }):void; + /** + * is the response for this request only. Its format is defined by the API method being called. + */ + individualResponse: any, + /** + * is the raw batch ID-response map as a string. It contains all responses to all requests in the batch. + */ + rawBatchResponse: any + ) => any + }): void; /** * Executes all requests in the batch. The supplied callback is executed on success or failure. * @param callback The callback to execute when the batch returns. @@ -267,7 +311,7 @@ declare namespace gapi.client { * is the same response, but as an unparsed JSON-string. */ rawBatchResponse: string - ) => any):void; + ) => any): void; } /** @@ -288,7 +332,7 @@ declare namespace gapi.client { * is the same as jsonResp, except it is a raw string that has not been parsed. It is typically used when the response is not JSON. */ rawResp: string - ) => void ):void; + ) => void): void; } } diff --git a/gapi/tsconfig.json b/gapi/tsconfig.json index 27e01ecd7b..22f5738c1a 100644 --- a/gapi/tsconfig.json +++ b/gapi/tsconfig.json @@ -2,11 +2,12 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -16,6 +17,7 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts" + "index.d.ts", + "gapi-tests.ts" ] -} \ No newline at end of file +} diff --git a/gettext.js/gettext.js-tests.ts b/gettext.js/gettext.js-tests.ts new file mode 100644 index 0000000000..6e5b4448ae --- /dev/null +++ b/gettext.js/gettext.js-tests.ts @@ -0,0 +1,21 @@ +import * as Gettext from 'gettext.js'; + +const json: Gettext.JsonData = { + "": { + "locale": "fr", + "plural-forms": "nplurals=2; plural=n>1;" + }, + "Welcome": "Bienvenue", + "There is %1 apple": [ + "Il y a %1 pomme", + "Il y a %1 pommes" + ] +}; + +const instance: Gettext.Gettext = Gettext.i18n(); + +instance.loadJSON(json, 'messages'); +instance.setLocale('fr'); +if (instance.ngettext('There is %1 apple', 'There are %1 apples', 0) === 'Il y a %1 pomme') { + throw new Error('Failed test'); +} diff --git a/gettext.js/index.d.ts b/gettext.js/index.d.ts new file mode 100644 index 0000000000..5096490721 --- /dev/null +++ b/gettext.js/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for gettext.js 0.5 +// Project: https://github.com/guillaumepotier/gettext.js +// Definitions by: Julien Crouzet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export type PluralForm = (n: number) => number; + +export type GettextStatic = (options?: GettextOptions) => Gettext; + +export interface GettextOptions { + domain?: string; + locale?: string; + plural_func?: PluralForm; + ctxt_delimiter?: string; +} + +export interface JsonDataHeader { + locale: string; + "plural-forms": string; +} + +export interface JsonDataMessages { + [key: string]: string | string[] | JsonDataHeader; +} + +export interface JsonData extends JsonDataMessages { + "": JsonDataHeader; +} + +export interface Gettext { + setMessages: (domain: string, locale: string, messages: JsonDataMessages, plural_forms?: PluralForm) => Gettext; + loadJSON: (jsonData: JsonData, domain?: string) => Gettext; + setLocale: (locale: string) => Gettext; + getLocale: () => string; + textdomain: (domain?: string) => Gettext | string; + gettext: (msgid: string, ...args: any[]) => string; + ngettext: (msgid: string, msgid_plural: string, n: number, ...args: any[]) => string; + pgettext: (msgctxt: string, msgid: string, ...args: any[]) => string; + dcnpgettext: (domain: string, msgctxt: string, msgid: string, msgid_plural: string, n: number, ...args: any[]) => string; + __: (msgid: string, ...args: any[]) => string; + _n: (msgid: string, msgid_plural: string, n: number, ...args: any[]) => string; + _p: (msgctxt: string, msgid: string, ...args: any[]) => string; +} + +export const i18n: GettextStatic; diff --git a/gettext.js/tsconfig.json b/gettext.js/tsconfig.json new file mode 100644 index 0000000000..d01ec061ab --- /dev/null +++ b/gettext.js/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gettext.js-tests.ts" + ] +} diff --git a/gettext.js/tslint.json b/gettext.js/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/gettext.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/gijgo/gijgo-tests.ts b/gijgo/gijgo-tests.ts index 5731732295..6e624ad4f6 100644 --- a/gijgo/gijgo-tests.ts +++ b/gijgo/gijgo-tests.ts @@ -1,5 +1,4 @@ /// -/// // Grid $(() => { diff --git a/gldatepicker/gldatepicker-tests.ts b/gldatepicker/gldatepicker-tests.ts index d133a5f823..974c1da8a7 100644 --- a/gldatepicker/gldatepicker-tests.ts +++ b/gldatepicker/gldatepicker-tests.ts @@ -1,5 +1,3 @@ -/// - $('input').glDatePicker(); $('#example2').glDatePicker( { diff --git a/gm/gm-tests.ts b/gm/gm-tests.ts index debd18ecff..e8bf5787cd 100644 --- a/gm/gm-tests.ts +++ b/gm/gm-tests.ts @@ -1,6 +1,3 @@ - -/// - import gm = require('gm'); import stream = require('stream'); @@ -78,6 +75,7 @@ gm(src) .authenticate(password) .autoOrient() .backdrop() + .background(color) .bitdepth(bits) .blackThreshold(intensity) .blackThreshold(r, g, b) diff --git a/gm/index.d.ts b/gm/index.d.ts index 288ce150ce..7fd419ede3 100644 --- a/gm/index.d.ts +++ b/gm/index.d.ts @@ -108,6 +108,7 @@ declare namespace m { authenticate(password: string): State; autoOrient(): State; backdrop(): State; + background(color: string): State; bitdepth(bits: number): State; blackThreshold(intensity: number): State; blackThreshold(red: number, green: number, blue: number, opacity?: number): State; diff --git a/google-protobuf/google-protobuf-tests.ts b/google-protobuf/google-protobuf-tests.ts new file mode 100644 index 0000000000..76d4f19fcc --- /dev/null +++ b/google-protobuf/google-protobuf-tests.ts @@ -0,0 +1,139 @@ +import * as jspb from "google-protobuf"; + +/* This is a typescript version of a simple generated class from a proto file that is shown below. In order to make + this ES5 JS file into TypeScript there have been quite a few modifications, but the same calls are made to the library + classes. + + // FILE: simple.proto + syntax = "proto3"; + + package examplecom; + + message MySimple { + string my_string = 1; + bool my_bool = 2; + repeated string some_labels = 3; + } +*/ + +class MySimple extends jspb.Message { + constructor(opt_data?: any) { + super(); // This isn't actually called in the JS version of this file, but it's required by TS + jspb.Message.initialize(this, opt_data, 0, -1, MySimple.repeatedFields_, null); + }; + + static repeatedFields_ = [3]; + + toObject(opt_includeInstance: boolean): {} { + return MySimple.toObject(opt_includeInstance, this); + }; + + static toObject(includeInstance: boolean, msg: MySimple): {} { + const obj: {} = { + myString: jspb.Message.getFieldWithDefault(msg, 1, ""), + myBool: jspb.Message.getFieldWithDefault(msg, 2, false), + someLabelsList: jspb.Message.getField(msg, 3), + }; + + if (includeInstance) { + // This is commented out because it's not valid in TS, but it's a simple append to an object + // obj['$jspbMessageInstance'] = msg; + } + return obj; + }; + + static deserializeBinary(bytes: Uint8Array) { + const reader = new jspb.BinaryReader(bytes); + const msg = new MySimple(); + return MySimple.deserializeBinaryFromReader(msg, reader); + }; + + static deserializeBinaryFromReader(msg: MySimple, reader: jspb.BinaryReader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + const field = reader.getFieldNumber(); + switch (field) { + case 1: + const value1 = (reader.readString()); + msg.setMyString(value1); + break; + case 2: + const value2 = (reader.readBool()); + msg.setMyBool(value2); + break; + case 3: + const value3 = (reader.readString()); + msg.addSomeLabels(value3); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + + serializeBinary(): Uint8Array { + const writer = new jspb.BinaryWriter(); + MySimple.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + + static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) { + let f1 = message.getMyString(); + if (f1.length > 0) { + writer.writeString( + 1, + f1, + ); + } + const f2 = message.getMyBool(); + if (f2) { + writer.writeBool( + 2, + f2, + ); + } + const f3 = message.getSomeLabelsList(); + if (f3.length > 0) { + writer.writeRepeatedString( + 3, + f3, + ); + } + } + + getMyString(): string { + return jspb.Message.getFieldWithDefault(this, 1, ""); + } + + setMyString(value: string) { + jspb.Message.setField(this, 1, value); + } + + getMyBool(): boolean { + return jspb.Message.getFieldWithDefault(this, 2, false); + } + + setMyBool(value: boolean) { + jspb.Message.setField(this, 2, value); + } + + getSomeLabelsList(): string[] { + return jspb.Message.getField(this, 3); + } + + setSomeLabelsList(value: string[]) { + jspb.Message.setField(this, 3, value || []); + } + + addSomeLabels(value: string, opt_index?: number) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); + } + + clearSomeLabelsList() { + this.setSomeLabelsList([]); + } +} diff --git a/google-protobuf/index.d.ts b/google-protobuf/index.d.ts new file mode 100644 index 0000000000..cf6a7e218a --- /dev/null +++ b/google-protobuf/index.d.ts @@ -0,0 +1,687 @@ +// Type definitions for google-protobuf 3.2 +// Project: https://github.com/google/google-protobuf +// Definitions by: Marcus Longmuir +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type ByteSource = ArrayBuffer|Uint8Array|number[]|string; +type ScalarFieldType = boolean|number|string; +type RepeatedFieldType = ScalarFieldType[] | Uint8Array[]; +type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array; +type FieldValue = (string|number|boolean|Uint8Array|any/*This should be Array, but that isn't allowed*/|undefined) + +export abstract class Message { + getJsPbMessageId(): (string | undefined); + static initialize(msg: Message, + data: Message.MessageArray, + messageId: (string | number), + suggestedPivot: number, + repeatedFields: number[], + oneofFields?: number[][] | null): void; + static toObjectList(field: T[], + toObjectFn: (includeInstance: boolean, + data: T) => {}, + includeInstance?: boolean): {}[]; + static toObjectExtension(msg: Message, + obj: {}, + extensions: {[key: number]: ExtensionFieldInfo}, + getExtensionFn: (fieldInfo: ExtensionFieldInfo) => Message, + includeInstance?: boolean): void; + serializeBinaryExtensions(proto: Message, + writer: BinaryWriter, + extensions: {[key: number]: ExtensionFieldBinaryInfo}, + getExtensionFn: (fieldInfo: ExtensionFieldInfo) => T): void + readBinaryExtension(proto: Message, + reader: BinaryReader, + extensions: {[key: number]: ExtensionFieldBinaryInfo}, + setExtensionFn: (fieldInfo: ExtensionFieldInfo, + val: T) => void): void + static getField(msg: Message, + fieldNumber: number): FieldValue|null; + static getOptionalFloatingPointField(msg: Message, + fieldNumber: number): (number | undefined); + static getRepeatedFloatingPointField(msg: Message, + fieldNumber: number): number[]; + static bytesAsB64(bytes: Uint8Array): string; + static bytesAsU8(str: string): Uint8Array; + static bytesListAsB64(bytesList: Uint8Array[]): string[]; + static bytesListAsU8(strList: string[]): Uint8Array[]; + static getFieldWithDefault(msg: Message, + fieldNumber: number, + defaultValue: T): T; + static getMapField(msg: Message, + fieldNumber: number, + noLazyCreate: boolean, + valueCtor: typeof Message): Map; + static setField(msg: Message, + fieldNumber: number, + value: FieldValue): void; + static addToRepeatedField(msg: Message, + fieldNumber: number, + value: any, + index?: number): void; + static setOneofField(msg: Message, + fieldNumber: number, + oneof: number[], + value: FieldValue): void; + static computeOneofCase(msg: Message, + oneof: number[]): number; + static getWrapperField(msg: Message, + ctor: typeof Message, + fieldNumber: number, + required?: number): Message; + static getRepeatedWrapperField(msg: Message, + ctor: typeof Message, + fieldNumber: number): Message[]; + static setWrapperField(msg: Message, + fieldNumber: number, + value?: (Message|Map)): void; + static setOneofWrapperField(msg: Message, + fieldNumber: number, + oneof: number[], + value: any): void; + static setRepeatedWrapperField(msg: Message, + fieldNumber: number, + value: any): void; + static addToRepeatedWrapperField(msg: Message, + fieldNumber: number, + value: any, + ctor: typeof Message, + index: number): any; + static toMap(field: any[], + mapKeyGetterFn: (field: any) => string, + toObjectFn?: Message.StaticToObject, + includeInstance?: boolean): void; + toArray(): Message.MessageArray; + toString(): string; + getExtension(fieldInfo: ExtensionFieldInfo): T; + setExtension(fieldInfo: ExtensionFieldInfo, + value: T): void; + static difference(m1: T, + m2: T): T; + static equals(m1: Message, + m2: Message): boolean; + static compareExtensions(extension1: {}, + extension2: {}): boolean; + static compareFields(field1: any, + field2: any): boolean; + cloneMessage(): Message; + clone(): Message; + static clone(msg: T): T; + static cloneMessage(msg: T): T; + static copyInto(fromMessage: Message, + toMessage: Message): void; + static registerMessageType(id: number, + constructor: typeof Message): void; + + abstract serializeBinary(): Uint8Array; + abstract toObject(includeInstance?: boolean): {}; + + // These are `abstract static`, but that isn't allowed. Subclasses of Message will have these methods and properties + // and not having them on Message makes using this class for its intended purpose quite difficult. + static deserializeBinary(bytes: Uint8Array): Message; + static deserializeBinaryFromReader(message: Message, reader: BinaryReader): Message; + static serializeBinaryToWriter(message: Message, writer: BinaryWriter): void; + static toObject(includeInstance: boolean, msg: Message): {}; + static extensions: {[key: number]: ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: ExtensionFieldBinaryInfo}; +} + +export namespace Message { + export type MessageArray = any[]; // This type needs to reference itself + interface StaticToObject { + (includeInstance: boolean, + msg: Message): {}; + } +} + +export class ExtensionFieldInfo { + fieldIndex: number; + fieldName: number; + ctor: typeof Message; + toObjectFn: Message.StaticToObject; + isRepeated: number; + constructor(fieldIndex: number, + fieldName: {[key: string]: number}, + ctor: typeof Message, + toObjectFn: Message.StaticToObject, + isRepeated: number); + isMessageType(): boolean; +} + +export class ExtensionFieldBinaryInfo { + fieldInfo: ExtensionFieldInfo; + binaryReaderFn: BinaryRead; + binaryWriterFn: BinaryWrite; + opt_binaryMessageSerializeFn: (msg: Message, + writer: BinaryWriter) => void; + opt_binaryMessageDeserializeFn: (msg: Message, + reader: BinaryReader) => Message; + opt_isPacked: boolean; + constructor(fieldInfo: ExtensionFieldInfo, + binaryReaderFn: BinaryRead, + binaryWriterFn: BinaryWrite, + opt_binaryMessageSerializeFn: (msg: Message, + writer: BinaryWriter) => void, + opt_binaryMessageDeserializeFn: (msg: Message, + reader: BinaryReader) => Message, + opt_isPacked: boolean); +} + +export class Map { + constructor(arr: Array<[K, V]>, + valueCtor?: {new(init: any): V}); + toArray(): Array<[K, V]>; + toObject(includeInstance: boolean, + valueToObject: (includeInstance: boolean) => any): Array<[K, V]>; + static fromObject(entries: Array<[K, V]>, + valueCtor: any, + valueFromObject: any): Map; + getLength(): number; + clear(): void; + del(key: K): boolean; + getEntryList(): Array<[K, V]>; + entries(): Map.Iterator<[K, V]>; + keys(): Map.Iterator; + forEach(callback: (entry: V, + key: K) => void, + thisArg?: {}): void; + set(key: K, + value: V): void; + get(key: K): (V | undefined); + has(key: K): boolean; +} + +export namespace Map { + // This is implemented by jspb.Map.ArrayIteratorIterable_, but that class shouldn't be exported + interface Iterator { + next(): IteratorResult; + } + type IteratorResult = { + done: boolean, + value: T, + } +} + +interface BinaryReadReader { + (msg: any, + binaryReader: BinaryReader): void; +} + +interface BinaryRead { + (msg: any, + reader: BinaryReadReader): void; +} + +interface BinaryWriteCallback { + (value: any, + binaryWriter: BinaryWriter): void; +} + +interface BinaryWrite { + (fieldNumber: number, + value: any, + writerCallback: BinaryWriteCallback): void; +} + +export class BinaryReader { + constructor(bytes?: ByteSource, + start?: number, + length?: number); + static alloc(bytes?: ByteSource, + start?: number, + length?: number): BinaryReader; + alloc(bytes?: ByteSource, + start?: number, + length?: number): BinaryReader; + free(): void; + getFieldCursor(): number; + getCursor(): number; + getBuffer(): Uint8Array; + getFieldNumber(): number; + getWireType(): BinaryConstants.WireType; + isEndGroup(): boolean; + getError(): boolean; + setBlock(bytes?: ByteSource, + start?: number, + length?: number): void; + reset(): void; + advance(count: number): void; + nextField(): boolean; + unskipHeader(): void; + skipMatchingFields(): void; + skipVarintField(): void; + skipDelimitedField(): void; + skipFixed32Field(): void; + skipFixed64Field(): void; + skipGroup(): void; + skipField(): void; + registerReadCallback(callbackName: string, + callback: (binaryReader: BinaryReader) => any): void; + runReadCallback(callbackName: string): any; + readAny(fieldType: BinaryConstants.FieldType): AnyFieldType; + readMessage: BinaryRead; + readGroup(field: number, + message: Message, + reader: BinaryReadReader): void; + getFieldDecoder(): BinaryDecoder; + readInt32(): number; + readInt32String(): string; + readInt64(): number; + readInt64String(): string; + readUint32(): number; + readUint32String(): string; + readUint64(): number; + readUint64String(): string; + readSint32(): number; + readSint64(): number; + readSint64String(): string; + readFixed32(): number; + readFixed64(): number; + readFixed64String(): string; + readSfixed32(): number; + readSfixed32String(): string; + readSfixed64(): number; + readSfixed64String(): string; + readFloat(): number; + readDouble(): number; + readBool(): boolean; + readEnum(): number; + readString(): string; + readBytes(): Uint8Array; + readVarintHash64(): string; + readFixedHash64(): string; + readPackedInt32(): number[]; + readPackedInt32String(): string[]; + readPackedInt64(): number[]; + readPackedInt64String(): string[]; + readPackedUint32(): number[]; + readPackedUint32String(): string[]; + readPackedUint64(): number[]; + readPackedUint64String(): string[]; + readPackedSint32(): number[]; + readPackedSint64(): number[]; + readPackedSint64String(): string[]; + readPackedFixed32(): number[]; + readPackedFixed64(): number[]; + readPackedFixed64String(): string[]; + readPackedSfixed32(): number[]; + readPackedSfixed64(): number[]; + readPackedSfixed64String(): string[]; + readPackedFloat(): number[]; + readPackedDouble(): number[]; + readPackedBool(): boolean[]; + readPackedEnum(): number[]; + readPackedVarintHash64(): string[]; + readPackedFixedHash64(): string[]; +} + +export class BinaryWriter { + constructor(); + writeSerializedMessage(bytes: Uint8Array, + start: number, + end: number): void; + maybeWriteSerializedMessage(bytes?: Uint8Array, + start?: number, + end?: number): void; + reset(): void; + getResultBuffer(): Uint8Array; + getResultBase64String(): string; + beginSubMessage(field: number): void; + endSubMessage(field: number): void; + writeAny(fieldType: BinaryConstants.FieldType, + field: number, + value: AnyFieldType): void; + writeInt32(field: number, + value?: number): void; + writeInt32String(field: number, + value?: string): void; + writeInt64(field: number, + value?: number): void; + writeInt64String(field: number, + value?: string): void; + writeUint32(field: number, + value?: number): void; + writeUint32String(field: number, + value?: string): void; + writeUint64(field: number, + value?: number): void; + writeUint64String(field: number, + value?: string): void; + writeSint32(field: number, + value?: number): void; + writeSint64(field: number, + value?: number): void; + writeSint64String(field: number, + value?: string): void; + writeFixed32(field: number, + value?: number): void; + writeFixed64(field: number, + value?: number): void; + writeFixed64String(field: number, + value?: string): void; + writeSfixed32(field: number, + value?: number): void; + writeSfixed64(field: number, + value?: number): void; + writeSfixed64String(field: number, + value?: string): void; + writeFloat(field: number, + value?: number): void; + writeDouble(field: number, + value?: number): void; + writeBool(field: number, + value?: boolean): void; + writeEnum(field: number, + value?: number): void; + writeString(field: number, + value?: string): void; + writeBytes(field: number, + value?: ByteSource): void; + writeMessage: BinaryWrite; + writeGroup(field: number, + value: any, + writeCallback: BinaryWriteCallback): void; + writeFixedHash64(field: number, + value?: string): void; + writeVarintHash64(field: number, + value?: string): void; + writeRepeatedInt32(field: number, + value?: number[]): void; + writeRepeatedInt32String(field: number, + value?: string[]): void; + writeRepeatedInt64(field: number, + value?: number[]): void; + writeRepeatedInt64String(field: number, + value?: string[]): void; + writeRepeatedUint32(field: number, + value?: number[]): void; + writeRepeatedUint32String(field: number, + value?: string[]): void; + writeRepeatedUint64(field: number, + value?: number[]): void; + writeRepeatedUint64String(field: number, + value?: string[]): void; + writeRepeatedSint32(field: number, + value?: number[]): void; + writeRepeatedSint64(field: number, + value?: number[]): void; + writeRepeatedSint64String(field: number, + value?: string[]): void; + writeRepeatedFixed32(field: number, + value?: number[]): void; + writeRepeatedFixed64(field: number, + value?: number[]): void; + writeRepeatedFixed64String(field: number, + value?: string[]): void; + writeRepeatedSfixed32(field: number, + value?: number[]): void; + writeRepeatedSfixed64(field: number, + value?: number[]): void; + writeRepeatedSfixed64String(field: number, + value?: string[]): void; + writeRepeatedFloat(field: number, + value?: number[]): void; + writeRepeatedDouble(field: number, + value?: number[]): void; + writeRepeatedBool(field: number, + value?: boolean[]): void; + writeRepeatedEnum(field: number, + value?: number[]): void; + writeRepeatedString(field: number, + value?: string[]): void; + writeRepeatedBytes(field: number, + value?: ByteSource[]): void; + writeRepeatedMessage(field: number, + value: Message[], + writerCallback: BinaryWriteCallback): void; + writeRepeatedGroup(field: number, + value: Message[], + writerCallback: BinaryWriteCallback): void; + writeRepeatedFixedHash64(field: number, + value?: string[]): void; + writeRepeatedVarintHash64(field: number, + value?: string[]): void; + writePackedInt32(field: number, + value?: number[]): void; + writePackedInt32String(field: number, + value?: string[]): void; + writePackedInt64(field: number, + value?: number[]): void; + writePackedInt64String(field: number, + value?: string[]): void; + writePackedUint32(field: number, + value?: number[]): void; + writePackedUint32String(field: number, + value?: string[]): void; + writePackedUint64(field: number, + value?: number[]): void; + writePackedUint64String(field: number, + value?: string[]): void; + writePackedSint32(field: number, + value?: number[]): void; + writePackedSint64(field: number, + value?: number[]): void; + writePackedSint64String(field: number, + value?: string[]): void; + writePackedFixed32(field: number, + value?: number[]): void; + writePackedFixed64(field: number, + value?: number[]): void; + writePackedFixed64String(field: number, + value?: string[]): void; + writePackedSfixed32(field: number, + value?: number[]): void; + writePackedSfixed64(field: number, + value?: number[]): void; + writePackedSfixed64String(field: number, + value?: string[]): void; + writePackedFloat(field: number, + value?: number[]): void; + writePackedDouble(field: number, + value?: number[]): void; + writePackedBool(field: number, + value?: boolean[]): void; + writePackedEnum(field: number, + value?: number[]): void; + writePackedFixedHash64(field: number, + value?: string[]): void; + writePackedVarintHash64(field: number, + value?: string[]): void; +} + +export class BinaryEncoder { + constructor(); + length(): number; + end(): number[]; + writeSplitVarint64(lowBits: number, + highBits: number): void; + writeSplitFixed64(lowBits: number, + highBits: number): void; + writeUnsignedVarint32(value: number): void; + writeSignedVarint32(value: number): void; + writeUnsignedVarint64(value: number): void; + writeSignedVarint64(value: number): void; + writeZigzagVarint32(value: number): void; + writeZigzagVarint64(value: number): void; + writeZigzagVarint64String(value: string): void; + writeUint8(value: number): void; + writeUint16(value: number): void; + writeUint32(value: number): void; + writeUint64(value: number): void; + writeInt8(value: number): void; + writeInt16(value: number): void; + writeInt32(value: number): void; + writeInt64(value: number): void; + writeInt64String(value: string): void; + writeFloat(value: number): void; + writeDouble(value: number): void; + writeBool(value: boolean): void; + writeEnum(value: number): void; + writeBytes(bytes: Uint8Array): void; + writeVarintHash64(hash: string): void; + writeFixedHash64(hash: string): void; + writeString(value: string): number; +} + +export class BinaryDecoder { + constructor(bytes?: ByteSource, + start?: number, + length?: number) + static alloc(bytes?: ByteSource, + start?: number, + length?: number): BinaryDecoder; + free(): void; + clone(): BinaryDecoder; + clear(): void; + getBuffer(): Uint8Array; + setBlock(data: ByteSource, + start?: number, + length?: number): void; + getEnd(): number; + setEnd(end: number): void; + reset(): void; + getCursor(): number; + setCursor(cursor: number): void; + advance(count: number): void; + atEnd(): boolean; + pastEnd(): boolean; + getError(): boolean; + skipVarint(): void; + unskipVarint(value: number): void; + readUnsignedVarint32(): number; + readSignedVarint32(): number; + readUnsignedVarint32String(): number; + readSignedVarint32String(): number; + readZigzagVarint32(): number; + readUnsignedVarint64(): number; + readUnsignedVarint64String(): number; + readSignedVarint64(): number; + readSignedVarint64String(): number; + readZigzagVarint64(): number; + readZigzagVarint64String(): number; + readUint8(): number; + readUint16(): number; + readUint32(): number; + readUint64(): number; + readUint64String(): string; + readInt8(): number; + readInt16(): number; + readInt32(): number; + readInt64(): number; + readInt64String(): string; + readFloat(): number; + readDouble(): number; + readBool(): boolean; + readEnum(): number; + readString(length: number): string; + readStringWithLength(): string; + readBytes(length: number): Uint8Array; + readVarintHash64(): string; + readFixedHash64(): string; +} + +export class BinaryIterator { + constructor(decoder?: BinaryDecoder, + next?: () => number|boolean|string|null, + elements?: Array) + static alloc(decoder?: BinaryDecoder, + next?: () => number|boolean|string|null, + elements?: Array): BinaryIterator; + free(): void; + clear(): void; + get(): (ScalarFieldType | null); + atEnd(): boolean; + next(): (ScalarFieldType | null); +} + +export namespace BinaryConstants { + export enum FieldType { + INVALID = -1, + DOUBLE = 1, + FLOAT = 2, + INT64 = 3, + UINT64 = 4, + INT32 = 5, + FIXED64 = 6, + FIXED32 = 7, + BOOL = 8, + STRING = 9, + GROUP = 10, + MESSAGE = 11, + BYTES = 12, + UINT32 = 13, + ENUM = 14, + SFIXED32 = 15, + SFIXED64 = 16, + SINT32 = 17, + SINT64 = 18, + FHASH64 = 30, + VHASH64 = 31, + } + + export enum WireType { + INVALID = -1, + VARINT = 0, + FIXED64 = 1, + DELIMITED = 2, + START_GROUP = 3, + END_GROUP = 4, + FIXED32 = 5, + } + + const FieldTypeToWireType: (fieldType: FieldType) => WireType; + + const INVALID_FIELD_NUMBER: number; + const FLOAT32_EPS: number; + const FLOAT32_MIN: number; + const FLOAT32_MAX: number; + const FLOAT64_EPS: number; + const FLOAT64_MIN: number; + const FLOAT64_MAX: number; + const TWO_TO_20: number; + const TWO_TO_23: number; + const TWO_TO_31: number; + const TWO_TO_32: number; + const TWO_TO_52: number; + const TWO_TO_63: number; + const TWO_TO_64: number; + const ZERO_HASH: string; +} + +export namespace arith { + export class UInt64 { + lo: number; + hi: number; + constructor(lo: number, + hi: number); + cmp(other: UInt64): number; + rightShift(): UInt64; + leftShift(): UInt64; + msb(): boolean; + lsb(): boolean; + zero(): boolean; + add(other: UInt64): UInt64; + sub(other: UInt64): UInt64; + static mul32x32(a: number, + b: number): UInt64; + mul(a: number): UInt64; + div(divisor: number): [UInt64, UInt64]; + toString(): string; + static fromString(str: string): UInt64; + clone(): UInt64; + } + + export class Int64 { + lo: number; + hi: number; + constructor(lo: number, + hi: number); + add(other: Int64): Int64; + sub(other: Int64): Int64; + clone(): Int64; + toString(): string; + static fromString(str: string): Int64; + } +} + +// jspb.utils package excluded as it likely shouldn't be called by user code \ No newline at end of file diff --git a/google-protobuf/tsconfig.json b/google-protobuf/tsconfig.json new file mode 100644 index 0000000000..269fec20d9 --- /dev/null +++ b/google-protobuf/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "google-protobuf-tests.ts" + ] +} \ No newline at end of file diff --git a/google-protobuf/tslint.json b/google-protobuf/tslint.json new file mode 100644 index 0000000000..fdc7cdc370 --- /dev/null +++ b/google-protobuf/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/google.analytics/google.analytics-tests.ts b/google.analytics/google.analytics-tests.ts index 6b7962899b..32df930cc9 100644 --- a/google.analytics/google.analytics-tests.ts +++ b/google.analytics/google.analytics-tests.ts @@ -1,5 +1,5 @@ - -/// +declare function describe(desc: string, fn: () => void): void; +declare function it(desc: string, fn: () => void): void; describe("tester Google Analytics Tracker _gat object", () => { it("can set ga script element", () => { diff --git a/google.analytics/index.d.ts b/google.analytics/index.d.ts index 0f86e0be40..bfed2eb277 100644 --- a/google.analytics/index.d.ts +++ b/google.analytics/index.d.ts @@ -42,13 +42,508 @@ declare namespace UniversalAnalytics { enum HitType { 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing' } + + // https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference + + interface FieldsObject { + affiliation?: string; + allowAnchor?: boolean; + allowLinker?: boolean; + alwaysSendReferrer?: boolean; + anonymizeIp?: boolean; + appId?: string; + appInstallerId?: string; + appName?: string; + appVersion?: string; + brand?: string; + campaignId?: string; + campaignContent?: string; + campaignKeyword?: string; + campaignMedium?: string; + campaignName?: string; + campaignSource?: string; + category?: string; + clientId?: string; + contentGroup1?: string; + contentGroup2?: string; + contentGroup3?: string; + contentGroup4?: string; + contentGroup5?: string; + contentGroup6?: string; + contentGroup7?: string; + contentGroup8?: string; + contentGroup9?: string; + contentGroup10?: string; + cookieName?: string; + cookieDomain?: string; + cookieExpires?: number; + coupon?: string; + creative?: string; + currencyCode?: string; + dataSource?: string; + dimension1?: string; + dimension2?: string; + dimension3?: string; + dimension4?: string; + dimension5?: string; + dimension6?: string; + dimension7?: string; + dimension8?: string; + dimension9?: string; + dimension10?: string; + dimension11?: string; + dimension12?: string; + dimension13?: string; + dimension14?: string; + dimension15?: string; + dimension16?: string; + dimension17?: string; + dimension18?: string; + dimension19?: string; + dimension20?: string; + dimension21?: string; + dimension22?: string; + dimension23?: string; + dimension24?: string; + dimension25?: string; + dimension26?: string; + dimension27?: string; + dimension28?: string; + dimension29?: string; + dimension30?: string; + dimension31?: string; + dimension32?: string; + dimension33?: string; + dimension34?: string; + dimension35?: string; + dimension36?: string; + dimension37?: string; + dimension38?: string; + dimension39?: string; + dimension40?: string; + dimension41?: string; + dimension42?: string; + dimension43?: string; + dimension44?: string; + dimension45?: string; + dimension46?: string; + dimension47?: string; + dimension48?: string; + dimension49?: string; + dimension50?: string; + dimension51?: string; + dimension52?: string; + dimension53?: string; + dimension54?: string; + dimension55?: string; + dimension56?: string; + dimension57?: string; + dimension58?: string; + dimension59?: string; + dimension60?: string; + dimension61?: string; + dimension62?: string; + dimension63?: string; + dimension64?: string; + dimension65?: string; + dimension66?: string; + dimension67?: string; + dimension68?: string; + dimension69?: string; + dimension70?: string; + dimension71?: string; + dimension72?: string; + dimension73?: string; + dimension74?: string; + dimension75?: string; + dimension76?: string; + dimension77?: string; + dimension78?: string; + dimension79?: string; + dimension80?: string; + dimension81?: string; + dimension82?: string; + dimension83?: string; + dimension84?: string; + dimension85?: string; + dimension86?: string; + dimension87?: string; + dimension88?: string; + dimension89?: string; + dimension90?: string; + dimension91?: string; + dimension92?: string; + dimension93?: string; + dimension94?: string; + dimension95?: string; + dimension96?: string; + dimension97?: string; + dimension98?: string; + dimension99?: string; + dimension100?: string; + dimension101?: string; + dimension102?: string; + dimension103?: string; + dimension104?: string; + dimension105?: string; + dimension106?: string; + dimension107?: string; + dimension108?: string; + dimension109?: string; + dimension110?: string; + dimension111?: string; + dimension112?: string; + dimension113?: string; + dimension114?: string; + dimension115?: string; + dimension116?: string; + dimension117?: string; + dimension118?: string; + dimension119?: string; + dimension120?: string; + dimension121?: string; + dimension122?: string; + dimension123?: string; + dimension124?: string; + dimension125?: string; + dimension126?: string; + dimension127?: string; + dimension128?: string; + dimension129?: string; + dimension130?: string; + dimension131?: string; + dimension132?: string; + dimension133?: string; + dimension134?: string; + dimension135?: string; + dimension136?: string; + dimension137?: string; + dimension138?: string; + dimension139?: string; + dimension140?: string; + dimension141?: string; + dimension142?: string; + dimension143?: string; + dimension144?: string; + dimension145?: string; + dimension146?: string; + dimension147?: string; + dimension148?: string; + dimension149?: string; + dimension150?: string; + dimension151?: string; + dimension152?: string; + dimension153?: string; + dimension154?: string; + dimension155?: string; + dimension156?: string; + dimension157?: string; + dimension158?: string; + dimension159?: string; + dimension160?: string; + dimension161?: string; + dimension162?: string; + dimension163?: string; + dimension164?: string; + dimension165?: string; + dimension166?: string; + dimension167?: string; + dimension168?: string; + dimension169?: string; + dimension170?: string; + dimension171?: string; + dimension172?: string; + dimension173?: string; + dimension174?: string; + dimension175?: string; + dimension176?: string; + dimension177?: string; + dimension178?: string; + dimension179?: string; + dimension180?: string; + dimension181?: string; + dimension182?: string; + dimension183?: string; + dimension184?: string; + dimension185?: string; + dimension186?: string; + dimension187?: string; + dimension188?: string; + dimension189?: string; + dimension190?: string; + dimension191?: string; + dimension192?: string; + dimension193?: string; + dimension194?: string; + dimension195?: string; + dimension196?: string; + dimension197?: string; + dimension198?: string; + dimension199?: string; + dimension200?: string; + encoding?: string; + eventAction?: string; + eventCategory?: string; + eventLabel?: string; + eventValue?: number; + exDescription?: string; + exFatal?: boolean; + expId?: string; + expVar?: string; + flashVersion?: string; + forceSSL?: boolean; + hitCallback?: () => void; + hitType?: string; + hostname?: string; + id?: string; + javaEnabled?: boolean; + language?: string; + legacyCookieDomain?: string; + legacyHistoryImport?: boolean; + linkid?: string; + list?: string; + location?: string; + metric1?: number; + metric2?: string; + metric3?: string; + metric4?: string; + metric5?: string; + metric6?: string; + metric7?: string; + metric8?: string; + metric9?: string; + metric10?: string; + metric11?: string; + metric12?: string; + metric13?: string; + metric14?: string; + metric15?: string; + metric16?: string; + metric17?: string; + metric18?: string; + metric19?: string; + metric20?: string; + metric21?: string; + metric22?: string; + metric23?: string; + metric24?: string; + metric25?: string; + metric26?: string; + metric27?: string; + metric28?: string; + metric29?: string; + metric30?: string; + metric31?: string; + metric32?: string; + metric33?: string; + metric34?: string; + metric35?: string; + metric36?: string; + metric37?: string; + metric38?: string; + metric39?: string; + metric40?: string; + metric41?: string; + metric42?: string; + metric43?: string; + metric44?: string; + metric45?: string; + metric46?: string; + metric47?: string; + metric48?: string; + metric49?: string; + metric50?: string; + metric51?: string; + metric52?: string; + metric53?: string; + metric54?: string; + metric55?: string; + metric56?: string; + metric57?: string; + metric58?: string; + metric59?: string; + metric60?: string; + metric61?: string; + metric62?: string; + metric63?: string; + metric64?: string; + metric65?: string; + metric66?: string; + metric67?: string; + metric68?: string; + metric69?: string; + metric70?: string; + metric71?: string; + metric72?: string; + metric73?: string; + metric74?: string; + metric75?: string; + metric76?: string; + metric77?: string; + metric78?: string; + metric79?: string; + metric80?: string; + metric81?: string; + metric82?: string; + metric83?: string; + metric84?: string; + metric85?: string; + metric86?: string; + metric87?: string; + metric88?: string; + metric89?: string; + metric90?: string; + metric91?: string; + metric92?: string; + metric93?: string; + metric94?: string; + metric95?: string; + metric96?: string; + metric97?: string; + metric98?: string; + metric99?: string; + metric100?: string; + metric101?: string; + metric102?: string; + metric103?: string; + metric104?: string; + metric105?: string; + metric106?: string; + metric107?: string; + metric108?: string; + metric109?: string; + metric110?: string; + metric111?: string; + metric112?: string; + metric113?: string; + metric114?: string; + metric115?: string; + metric116?: string; + metric117?: string; + metric118?: string; + metric119?: string; + metric120?: string; + metric121?: string; + metric122?: string; + metric123?: string; + metric124?: string; + metric125?: string; + metric126?: string; + metric127?: string; + metric128?: string; + metric129?: string; + metric130?: string; + metric131?: string; + metric132?: string; + metric133?: string; + metric134?: string; + metric135?: string; + metric136?: string; + metric137?: string; + metric138?: string; + metric139?: string; + metric140?: string; + metric141?: string; + metric142?: string; + metric143?: string; + metric144?: string; + metric145?: string; + metric146?: string; + metric147?: string; + metric148?: string; + metric149?: string; + metric150?: string; + metric151?: string; + metric152?: string; + metric153?: string; + metric154?: string; + metric155?: string; + metric156?: string; + metric157?: string; + metric158?: string; + metric159?: string; + metric160?: string; + metric161?: string; + metric162?: string; + metric163?: string; + metric164?: string; + metric165?: string; + metric166?: string; + metric167?: string; + metric168?: string; + metric169?: string; + metric170?: string; + metric171?: string; + metric172?: string; + metric173?: string; + metric174?: string; + metric175?: string; + metric176?: string; + metric177?: string; + metric178?: string; + metric179?: string; + metric180?: string; + metric181?: string; + metric182?: string; + metric183?: string; + metric184?: string; + metric185?: string; + metric186?: string; + metric187?: string; + metric188?: string; + metric189?: string; + metric190?: string; + metric191?: string; + metric192?: string; + metric193?: string; + metric194?: string; + metric195?: string; + metric196?: string; + metric197?: string; + metric198?: string; + metric199?: string; + metric200?: string; + name?: string; + nonInteraction?: boolean; + option?: string; + page?: string; + position?: number | string; + price?: string; + quantity?: number; + queueTime?: number; + referrer?: string; + revenue?: string; + sampleRate?: number; + sessionControl?: string; + siteSpeedSampleRate?: number; + screenColors?: string; + screenName?: string; + screenResolution?: string; + shipping?: string; + socialAction?: string; + socialNetwork?: string; + socialTarget?: string; + some?: string; + step?: boolean; + tax?: string; + timingCategory?: string; + timingLabel?: string; + timingValue?: number; + timingVar?: string; + title?: string; + transport?: string; + useBeacon?: boolean; + userId?: string; + variant?: string; + viewportSize?: string; + } interface ga { l: number; q: any[]; (command: 'send', hitType: 'event', eventCategory: string, eventAction: string, - eventLabel?: string, eventValue?: number, fieldsObject?: {}): void; + eventLabel?: string, eventValue?: number, fieldsObject?: FieldsObject): void; (command: 'send', hitType: 'event', fieldsObject: { eventCategory: string, eventAction: string, @@ -71,19 +566,19 @@ declare namespace UniversalAnalytics { timingCategory: string, timingVar: string, timingValue: number): void; (command: 'send', hitType: 'timing', fieldsObject: {timingCategory: string, timingVar: string, timingValue: number}): void; - (command: 'send', fieldsObject: {}): void; + (command: 'send', fieldsObject: FieldsObject): void; (command: string, hitType: HitType, ...fields: any[]): void; - (command: 'create', trackingId: string, cookieDomain?: string, name?: string, fieldsObject?: {}): void; + (command: 'create', trackingId: string, cookieDomain?: string, name?: string, fieldsObject?: FieldsObject): void; (command: 'remove'): void; (command: string, ...fields: any[]): void; (readyCallback: (defaultTracker?: UniversalAnalytics.Tracker) => void): void; - create(trackingId: string, cookieDomain: string, name: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - create(trackingId: string, cookieDomain: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - create(trackingId: string, fieldsObject?: {}): UniversalAnalytics.Tracker; + create(trackingId: string, cookieDomain: string, name: string, fieldsObject?: FieldsObject): UniversalAnalytics.Tracker; + create(trackingId: string, cookieDomain: string, fieldsObject?: FieldsObject): UniversalAnalytics.Tracker; + create(trackingId: string, fieldsObject?: FieldsObject): UniversalAnalytics.Tracker; getAll(): UniversalAnalytics.Tracker[]; getByName(name: string): UniversalAnalytics.Tracker; diff --git a/google.fonts/google.fonts-tests.ts b/google.fonts/google.fonts-tests.ts new file mode 100644 index 0000000000..7d63cd77fd --- /dev/null +++ b/google.fonts/google.fonts-tests.ts @@ -0,0 +1,16 @@ +function test(list: google.fonts.WebfontList) { + + var f = list.items[0]; + + var info = [ + f.category, + f.family, + f.kind, + f.subsets.length, + f.version + ]; + + var urls = f.variants.map( + v => f.files[v] + ); +} diff --git a/google.fonts/index.d.ts b/google.fonts/index.d.ts new file mode 100644 index 0000000000..959447b198 --- /dev/null +++ b/google.fonts/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for Google Fonts API 1.0 +// Project: https://developers.google.com/fonts/ +// Definitions by: Dan Marshall +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace google.fonts { + + export interface WebfontList { + kind: string; + items: WebfontFamily[]; + } + + export interface WebfontFamily { + category?: string; + kind: string; + family: string; + subsets: string[]; + variants: string[]; + version: string; + lastModified: string; + files: { [variant: string]: string }; + } +} diff --git a/poly2tri/tsconfig.json b/google.fonts/tsconfig.json similarity index 93% rename from poly2tri/tsconfig.json rename to google.fonts/tsconfig.json index 1fb436fbcb..2df5048a3b 100644 --- a/poly2tri/tsconfig.json +++ b/google.fonts/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "poly2tri-tests.ts" + "google.fonts-tests.ts" ] } \ No newline at end of file diff --git a/google.fonts/tslint.json b/google.fonts/tslint.json new file mode 100644 index 0000000000..fdc7cdc370 --- /dev/null +++ b/google.fonts/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/googlemaps/index.d.ts b/googlemaps/index.d.ts index 06eba68a94..fee406b348 100644 --- a/googlemaps/index.d.ts +++ b/googlemaps/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Google Maps JavaScript API 3.26 // Project: https://developers.google.com/maps/ -// Definitions by: Folia A/S , Chris Wrench , Kiarash Ghiaseddin , Grant Hutchins , Denis Atyasov +// Definitions by: Folia A/S , Chris Wrench , Kiarash Ghiaseddin , Grant Hutchins , Denis Atyasov , Michael McMullin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* @@ -371,7 +371,7 @@ declare namespace google.maps { setControlPosition(controlPosition: ControlPosition): void; setControls(controls: string[]): void; setDrawingMode(drawingMode: string): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setStyle(style: Data.StylingFunction|Data.StyleOptions): void; toGeoJson(callback: (feature: Object) => void): void; } @@ -835,7 +835,7 @@ declare namespace google.maps { getVisible(): boolean; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: PolylineOptions): void; setPath(path: MVCArray|LatLng[]|LatLngLiteral[]): void; // MVCArray|Array setVisible(visible: boolean): void; @@ -873,7 +873,7 @@ declare namespace google.maps { getVisible(): boolean; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: PolygonOptions): void; setPath(path: MVCArray|LatLng[]|LatLngLiteral[]): void; setPaths(paths: MVCArray): void; @@ -959,7 +959,7 @@ declare namespace google.maps { setBounds(bounds: LatLngBounds|LatLngBoundsLiteral): void; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: RectangleOptions): void; setVisible(visible: boolean): void; } @@ -992,7 +992,7 @@ declare namespace google.maps { setCenter(center: LatLng|LatLngLiteral): void; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: CircleOptions): void; setRadius(radius: number): void; setVisible(visible: boolean): void; @@ -1036,7 +1036,7 @@ declare namespace google.maps { getMap(): Map; getOpacity(): number; getUrl(): string; - setMap(map: Map): void; + setMap(map: Map | null): void; setOpacity(opacity: number): void; } @@ -1053,7 +1053,7 @@ declare namespace google.maps { getProjection(): MapCanvasProjection; onAdd(): void; onRemove(): void; - setMap(map: Map|StreetViewPanorama): void; + setMap(map: Map | StreetViewPanorama | null): void; } export interface MapPanes { @@ -1144,7 +1144,7 @@ declare namespace google.maps { getPanel(): Element; getRouteIndex(): number; setDirections(directions: DirectionsResult): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: DirectionsRendererOptions): void; setPanel(panel: Element): void; setRouteIndex(routeIndex: number): void; @@ -1624,13 +1624,13 @@ declare namespace google.maps { export class BicyclingLayer extends MVCObject { constructor(); getMap(): Map; - setMap(map: Map): void; + setMap(map: Map | null): void; } export class FusionTablesLayer extends MVCObject { constructor(options: FusionTablesLayerOptions); getMap(): Map; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: FusionTablesLayerOptions): void; } @@ -1701,7 +1701,7 @@ declare namespace google.maps { getStatus(): KmlLayerStatus; getUrl(): string; getZIndex(): number; - setMap(map: Map): void; + setMap(map: Map | null): void; setUrl(url: string): void; setZIndez(zIndex: number): void; } @@ -1760,7 +1760,7 @@ declare namespace google.maps { export class TrafficLayer extends MVCObject { constructor(opts?: TrafficLayerOptions); getMap(): Map; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: TrafficLayerOptions): void; } @@ -1772,7 +1772,7 @@ declare namespace google.maps { export class TransitLayer extends MVCObject { constructor(); getMap(): void; - setMap(map: Map): void; + setMap(map: Map | null): void; } /***** Street View *****/ @@ -1904,7 +1904,7 @@ declare namespace google.maps { export class StreetViewCoverageLayer extends MVCObject { getMap(): Map; - setMap(map: Map): void; + setMap(map: Map | null): void; } /***** Events *****/ @@ -2155,7 +2155,7 @@ declare namespace google.maps { setBorderColor(borderColor: string): void; setChannelNumber(channelNumber: string): void; setFormat(format: AdFormat): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setPosition(position: ControlPosition): void; setTextColor(textColor: string): void; setTitleColor(titleColor: string): void; @@ -2211,6 +2211,8 @@ declare namespace google.maps { export interface AutocompleteOptions { bounds?: LatLngBounds|LatLngBoundsLiteral; componentRestrictions?: ComponentRestrictions; + placeIdOnly?: boolean; + strictBounds?: boolean; types?: string[]; } @@ -2222,6 +2224,22 @@ declare namespace google.maps { types: string[]; } + export interface OpeningHours { + open_now: boolean, + periods: OpeningPeriod[], + weekday_text: string[] + } + + export interface OpeningPeriod { + open: OpeningHoursTime, + close?: OpeningHoursTime + } + + export interface OpeningHoursTime { + day: number, + time: string + } + export interface PredictionTerm { offset: number; value: string; @@ -2258,7 +2276,7 @@ declare namespace google.maps { } export interface PlaceDetailsRequest { - placeId: string; + placeid: string; } export interface PlaceGeometry { @@ -2288,6 +2306,7 @@ declare namespace google.maps { icon: string; international_phone_number: string; name: string; + opening_hours: OpeningHours; permanently_closed: boolean; photos: PlacePhoto[]; place_id: string; @@ -2402,7 +2421,7 @@ declare namespace google.maps { getDrawingMode(): OverlayType; getMap(): Map; setDrawingMode(drawingMode: OverlayType): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setOptions(options: DrawingManagerOptions): void; } @@ -2451,7 +2470,7 @@ declare namespace google.maps { getZIndex(): number; setLayerId(layerId: string): void; setLayerKey(layerKey: string): void; - setMap(map: Map): void; + setMap(map: Map | null): void; setMapId(mapId: string): void; setOpacity(opacity: number): void; setOptions(options: MapsEngineLayerOptions): void; @@ -2495,7 +2514,7 @@ declare namespace google.maps { setData(data: MVCArray): void; setData(data: LatLng[]): void; setData(data: WeightedLocation[]): void; - setMap(map: Map): void; + setMap(map: Map | null): void; } export interface HeatmapLayerOptions { diff --git a/graphite-udp/graphite-udp-tests.ts b/graphite-udp/graphite-udp-tests.ts new file mode 100644 index 0000000000..c61ad172cd --- /dev/null +++ b/graphite-udp/graphite-udp-tests.ts @@ -0,0 +1,43 @@ +import graphite = require('graphite-udp'); + +// Test creation of client directly. +let client = new graphite.Client(); +client.put('test', 1); +client.add('test', 1); +client.close(); + +// Create client with helper +let client2 = graphite.createClient(); +client2.put('test2', 1); +client2.add('test2', 1); +client2.close(); + +// Test creation with options. +graphite.createClient({ + host: '127.0.0.1', + port: 2003, + type: 'udp4', + maxPacketSize: 4096, + prefix: 'prefix', + suffix: 'suffix', + interval: 60 * 1000, + verbose: true, + callback: (error: Error, metrics: any): void => { + + } +}); + +// Test creation options with class directly. +new graphite.Client({ + host: '127.0.0.1', + port: 2003, + type: 'udp4', + maxPacketSize: 4096, + prefix: 'prefix', + suffix: 'suffix', + interval: 60 * 1000, + verbose: true, + callback: (error: Error, metrics: any): void => { + + } +}); diff --git a/graphite-udp/index.d.ts b/graphite-udp/index.d.ts new file mode 100644 index 0000000000..218888b39a --- /dev/null +++ b/graphite-udp/index.d.ts @@ -0,0 +1,97 @@ +// Type definitions for graphite-udp 1.2 +// Project: https://github.com/fermads/graphite-udp +// Definitions by: Eric Byers +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +interface ClientOptions { + /** + * graphite server host or ip + * Defaults to 127.0.0.1 + */ + host?: string; + + /** + * graphite server udp port + * Defaults to 2003 + */ + port?: number; + + /** + * udp type (udp4 or udp6) + * Defaults to udp4 + */ + type?: 'udp4' | 'udp6'; + + /** + * split into smaller UDP packets + * Defaults to 4096 + */ + maxPacketSize?: number; + + /** + * Prefix for each metric name + * Defaults to '' + */ + prefix?: string; + + /** + * Suffix for each metrtic name + * Defaults to '' + */ + suffix?: string; + + /** + * Interval to group metrics by in milliseconds + * Defaults to 5000 (5s) + */ + interval?: number; + + /** + * log messages to console + * Defaults to false + */ + verbose?: boolean; + + /** + * called when metrics are sent + * Defaults to null + * + * @param {error} Error + * @param {metrics} + * @return void + */ + callback?: (error: Error, metrics: any) => void; +} + +export class Client { + + constructor(clientOptions?: ClientOptions); + + /** + * During the interval time option, if 2 or more metrics with the same name are sent, metrics will be added (summed) + * + * @param {name} + * @param {value} number + * @return void + */ + add(name: string, value: number): void; + + /** + * During the interval time option, if 2 or more metrics with the same name are sent, the last one will be used + * + * @param {name} metric name (my.test.metric) + * @param {value} number + * @return void + */ + put(name: string, value: number): void; + + /** + * Close the underlying UDP client socket + * + * @return void + */ + close(): void; +} + +export function createClient(clientOptions?: ClientOptions): Client; diff --git a/graphite-udp/tsconfig.json b/graphite-udp/tsconfig.json new file mode 100644 index 0000000000..50f3e17459 --- /dev/null +++ b/graphite-udp/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "graphite-udp-tests.ts" + ] +} diff --git a/graphite-udp/tslint.json b/graphite-udp/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/graphite-udp/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/greensock/index.d.ts b/greensock/index.d.ts deleted file mode 100644 index 65f7ee52e7..0000000000 --- a/greensock/index.d.ts +++ /dev/null @@ -1,352 +0,0 @@ -// Type definitions for GreenSock Animation Platform 1.15.1 -// Project: http://www.greensock.com/get-started-js/ -// Definitions by: Robert S -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// JavaScript Docs http://api.greensock.com/js/ -// Version 1.15.1 (TypeScript 1.4) - -interface IDispatcher { - addEventListener(type:string, callback:Function, scope?:Object, useParam?:boolean, priority?:number):void; - removeEventListener(type:string, callback:Function):void; -} - -declare type Tween = TweenLite | TweenMax; -declare type Timeline = SimpleTimeline | TimelineLite | TimelineMax; -declare type TweenConfig = { - [tweenProp: string]: any; - delay?: number; - ease?: Ease; - repeat?: number; - repeatDelay?: number; - yoyo?: boolean; - paused?: boolean; - overwrite?: string|number; - onComplete?: Function; - immediateRender?: boolean; - onCompleteParams?: any[]; - onCompleteScope?: Object; - onRepeat?: Function; - onRepeatScope?: Object; - onReverseComplete?: Function; - onReverseCompleteParams?: any[]; - onReverseCompleteScope?: Object; - onStart?: Function; - onStartParams?: any[]; - onStartScope?: Object; - onUpdate?: Function; - onUpdateParams?: any[]; - onUpdateScope?: Object; - startAt?: Object; - useFrames?: boolean; - lazy?: boolean; - onOverwrite?: Function; - autoCSS?: boolean; - callbackScope?: Object; -} - -//com.greensock.core -declare class Animation { - static ticker: IDispatcher; - data: any; - timeline: SimpleTimeline; - vars: Object; - - constructor(duration?: number, vars?: Object); - - delay(): number; - delay(value: number): Animation; - duration(): number; - duration(value: number): Animation; - eventCallback(type: string): Function; - eventCallback(type: string, callback: Function, params?: any[], scope?: any): Animation; - invalidate(): Animation; - isActive(): boolean; - kill(vars?: Object, target?: Object): Animation; - pause(atTime?: any, suppressEvents?: boolean): Animation; - paused(): boolean; - paused(value: boolean): Animation; - play(from?: any, suppressEvents?: boolean): Animation; - progress(): number; - progress(value: number, supressEvents?: boolean): Animation; - restart(includeDelay?: boolean, suppressEvents?: boolean): Animation; - resume(from?: any, suppressEvents?: boolean): Animation; - reverse(from?: any, suppressEvents?: boolean): Animation; - reversed(): boolean; - reversed(value: boolean): Animation; - seek(time: any, suppressEvents?: boolean): Animation; - startTime(): number; - startTime(value: number): Animation; - time(): number; - time(value: number, suppressEvents?: boolean): Animation; - timeScale(): number; - timeScale(value: number): Animation; - totalDuration(): number; - totalDuration(value: number): Animation; - totalProgress(): number; - totalProgress(value: number): Animation; - totalTime(): number; - totalTime(time: number, suppressEvents?: boolean): Animation; -} - -declare class SimpleTimeline extends Animation { - autoRemoveChildren: boolean; - smoothChildTiming: boolean; - - constructor(vars?: Object); - - add(value: any, position?: any, align?: string, stagger?: number): SimpleTimeline; - render(time: number, suppressEvents?: boolean, force?: boolean): void; -} - -//com.greensock -declare class TweenLite extends Animation { - static defaultEase: Ease; - static defaultOverwrite: string; - static selector: any; - target: Object; - - constructor(target: Object, duration: number, vars: Object); - - static delayedCall(delay: number, callback: Function, params?: any[], scope?: any, useFrames?: boolean): TweenLite; - endTime(includeRepeats?: boolean): number; - static from(target: Object | Object[], duration: number, vars: Object): TweenLite; - static fromTo(target: Object | Object[], duration: number, fromVars: Object, toVars: Object): TweenLite; - static getTweensOf(target: Object, onlyActive: boolean): Tween[]; - static killDelayedCallsTo(func: Function): void; - static killTweensOf(target: Object, onlyActive?: boolean, vars?: Object): void; - static lagSmoothing(threshold: number, adjustedLag: number): void; - static set(target: Object, vars: Object): TweenLite; - static to(target: Object, duration: number, vars: TweenConfig): TweenLite; -} - -declare class TweenMax extends TweenLite { - constructor(target: Object, duration: number, vars: Object); - - static delayedCall(delay: number, callback: Function, params?: any[], scope?: Object, useFrames?: boolean): TweenMax; - static from(target: Object, duration: number, vars: Object): TweenMax; - static fromTo(target: Object, duration: number, fromVars: Object, toVars: Object): TweenMax; - static getAllTweens(includeTimelines?: boolean): Tween[]; - static getTweensOf(target: Object): Tween[]; - static isTweening(target: Object): boolean; - static killAll(complete?: boolean, tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; - static killChildTweensOf(parent: any, complete?: boolean): void; - static killDelayedCallsTo(func: Function): void; - static killTweensOf(target: Object, vars?: Object): void; - static pauseAll(tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; - repeat(): number; - repeat(value: number): TweenMax; - repeatDelay(): number; - repeatDelay(value: number): TweenMax; - static resumeAll(tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; - static set(target: Object, vars: Object): TweenMax; - static staggerFrom(targets: any, duration: number, vars: Object, stagger: number, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; - static staggerFromTo(targets: any, duration: number, fromVars: Object, toVars: Object, stagger: number, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; - static staggerTo(targets: any, duration: number, vars: Object, stagger: number, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; - static to(target:Object, duration:number, vars:TweenConfig):TweenMax; - updateTo(vars: Object, resetDuration?: boolean): TweenMax; - yoyo(): boolean; - yoyo(value?: boolean): TweenMax; -} - -declare class TimelineLite extends SimpleTimeline { - constructor(vars?: Object); - - add(value: any, position?: any, align?: string, stagger?: number): TimelineLite; - addLabel(label: string, position: any): TimelineLite; - addPause(position?: any, callback?: Function, params?: any[], scope?: any): TimelineLite; - call(callback: Function, params?: any[], scope?: any, position?: any): TimelineLite; - clear(labels?: boolean): TimelineLite; - endTime(includeRepeats?: boolean): number; - static exportRoot(vars?: Object, omitDelayedCalls?: boolean): TimelineLite; - from(target: Object, duration: number, vars: Object, position?: any): TimelineLite; - fromTo(target: Object, duration: number, fromVars: Object, toVars: Object, position?: any): TimelineLite; - getChildren(nested?: boolean, tweens?: boolean, timelines?: boolean, ignoreBeforeTime?: number): (Tween | Timeline)[]; - getLabelTime(label: string): number; - getTweensOf(target: Object, nested?: boolean): Tween[]; - recent(): Animation; - remove(value: any): TimelineLite; - removeLabel(label: string): any; - set(target: Object, vars: Object, position?: any): TimelineLite; - shiftChildren(amount: number, adjustLabels?: boolean, ignoreBeforeTime?: number): TimelineLite; - staggerFrom(targets: any, duration: number, vars: Object, stagger?: number, position?: any, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteScope?: any): TimelineLite; - staggerFromTo(targets: any, duration: number, fromVars: Object, toVars: Object, stagger?: number, position?: any, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite; - staggerTo(targets: any, duration: number, vars: Object, stagger: number, position?: any, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite; - to(target: Object, duration: number, vars: Object, position?: any): TimelineLite; - usesFrames(): boolean; -} - -declare class TimelineMax extends TimelineLite { - constructor(vars?: Object); - - addCallback(callback: Function, position: any, params?: any[], scope?: any): TimelineMax; - currentLabel(): string; - currentLabel(value: string): TimelineMax; - getActive(nested?: boolean, tweens?: boolean, timelines?: boolean): Tween | Timeline[]; - getLabelAfter(time: number): string; - getLabelBefore(time: number): string; - getLabelsArray(): {name: string; time: number;}[]; - removeCallback(callback: Function, timeOrLabel?: any): TimelineMax; - removePause(position: any): TimelineMax; - repeat(): number; - repeat(value: number): TimelineMax; - repeatDelay(): number; - repeatDelay(value: number): TimelineMax; - tweenFromTo(fromPosition: any, toPosition: any, vars?: Object): TweenLite; - tweenTo(position: any, vars?: Object): TweenLite; - yoyo(): boolean; - yoyo(value: boolean): TimelineMax; -} - -//com.greensock.easing -declare class Ease { - constructor(func:Function, extraParams:any[], type:number, power:number); - public getRatio(p: number): number; -} - -declare class EaseLookup { - public static find(name: string): Ease; -} - -declare class Back extends Ease { - public static easeIn: Back; - public static easeInOut: Back; - public static easeOut: Back; - public config(overshoot: number): Elastic; - -} -declare class Bounce extends Ease { - public static easeIn: Bounce; - public static easeInOut: Bounce; - public static easeOut: Bounce; -} -declare class Circ extends Ease { - public static easeIn: Circ; - public static easeInOut: Circ; - public static easeOut: Circ; -} -declare class Cubic extends Ease { - public static easeIn: Cubic; - public static easeInOut: Cubic; - public static easeOut: Cubic; -} - -declare class Elastic extends Ease { - public static easeIn: Elastic; - public static easeInOut: Elastic; - public static easeOut: Elastic; - public config(amplitude: number, period: number): Elastic; -} - -declare class Expo extends Ease { - public static easeIn: Expo; - public static easeInOut: Expo; - public static easeOut: Expo; -} - -declare class Linear extends Ease { - public static ease: Linear; - public static easeIn: Linear; - public static easeInOut: Linear; - public static easeNone: Linear; - public static easeOut: Linear; -} - -declare class Quad extends Ease { - public static easeIn: Quad; - public static easeInOut: Quad; - public static easeOut: Quad; -} - -declare class Quart extends Ease { - public static easeIn: Quart; - public static easeInOut: Quart; - public static easeOut: Quart; -} - -declare class Quint extends Ease { - public static easeIn: Quint; - public static easeInOut: Quint; - public static easeOut: Quint; -} - -declare class Sine extends Ease { - public static easeIn: Sine; - public static easeInOut: Sine; - public static easeOut: Sine; -} - -declare class SlowMo extends Ease { - public static ease: SlowMo; - public config(linearRatio: number, power: number, yoyoMode: boolean): SlowMo; -} - -declare class SteppedEase extends Ease { - constructor(staps: number); - public config(steps: number): SteppedEase; -} - -declare type RoughEaseConfig = { - clamp?: boolean; - points?: number; - randomize?: boolean; - strength?: number; - taper?: string; /* one of "in" | "out" | "both" | "none" */ - template?: Ease; -} - -declare class RoughEase extends Ease { - public static ease: RoughEase; - constructor(vars: RoughEaseConfig); - public config(steps: number): SteppedEase; -} - -//com.greensock.plugins -interface BezierPlugin extends TweenPlugin { - bezierThrough(values:any[], curviness?:number, quadratic?:boolean, correlate?:string, prepend?:Object, calcDifs?:boolean):Object; - cubicToQuadratic(a:number, b:number, c:number, d:number):any[]; - quadraticToCubic(a:number, b:number, c:number):Object; -} -interface ColorPropsPlugin extends TweenPlugin { - -} -interface CSSPlugin extends TweenPlugin { - -} -interface CSSRulePlugin extends TweenPlugin { - getRule(selector:string):Object; -} -interface EaselPlugin extends TweenPlugin { - -} -interface RaphaelPlugin extends TweenPlugin { - -} -interface RoundPropsPlugin extends TweenPlugin { - -} -interface ScrollToPlugin extends TweenPlugin { - -} -interface TweenPlugin { - activate(plugins:any[]):boolean; -} - -//com.greensock.easing -declare var Power0: typeof Linear; -declare var Power1: typeof Quad; -declare var Power2: typeof Cubic; -declare var Power3: typeof Quart; -declare var Power4: typeof Quint; -declare var Strong: typeof Quint; - -//com.greensock.plugins -declare var BezierPlugin:BezierPlugin; -declare var ColorPropsPlugin:ColorPropsPlugin; -declare var CSSPlugin:CSSPlugin; -declare var CSSRulePlugin:CSSRulePlugin; -declare var EaselPlugin:EaselPlugin; -declare var RaphaelPlugin:RaphaelPlugin; -declare var RoundPropsPlugin:RoundPropsPlugin; -declare var ScrollToPlugin:ScrollToPlugin; -declare var TweenPlugin:TweenPlugin; diff --git a/greensock/tsconfig.json b/greensock/tsconfig.json deleted file mode 100644 index 27e01ecd7b..0000000000 --- a/greensock/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts" - ] -} \ No newline at end of file diff --git a/gregorian-calendar/gregorian-calendar-tests.ts b/gregorian-calendar/gregorian-calendar-tests.ts index a7b11cf21d..096933ed2b 100644 --- a/gregorian-calendar/gregorian-calendar-tests.ts +++ b/gregorian-calendar/gregorian-calendar-tests.ts @@ -1,9 +1,6 @@ -/// - import GregorianCalendar = require('gregorian-calendar'); import GregorianCalendarFormat = require('gregorian-calendar-format'); - let cal = new GregorianCalendar(); cal.set(2016, 7, 27, 0, 0, 0, 0); diff --git a/griddle-react/griddle-react-tests.tsx b/griddle-react/griddle-react-tests.tsx new file mode 100644 index 0000000000..5f241feeb5 --- /dev/null +++ b/griddle-react/griddle-react-tests.tsx @@ -0,0 +1,78 @@ +/* +Licensed under the MIT License (MIT) + +Copyright (c) 2016 David Hara +*/ + +import * as React from 'react'; +import { render } from 'react-dom'; +import Griddle, { CustomColumnComponentProps } from 'griddle-react'; +import CustomColumnComponentGrid from './test/CustomColumnComponent'; +import CustomHeaderComponentGrid from './test/CustomHeaderComponent'; +import CustomFilterComponentGrid from './test/CustomFilterComponent'; + +interface MyCustomResult { + name: string, + test: string +} + +class LinkComponent extends React.Component, any> { + render() { + var url = "speakers/" + this.props.rowData.test + "/" + this.props.data; + return {this.props.data} + } +} + +const StatelessFunctionComponent = (props: CustomColumnComponentProps) => { + var url = "speakers/" + props.rowData.test + "/" + props.data; + return {props.data} +}; + +var columnMeta = [ + { + columnName: "name", + order: 1, + locked: false, + visible: true, + customComponent: StatelessFunctionComponent + }]; + +var results: MyCustomResult[] = [ + { + name: 'David Hara', + test: 'blah' + }, + { + name: 'Hara, David', + test: 'blah2' + } +]; + +var rowMetaData = { + bodyCssClassName: (rowData: MyCustomResult) => { + return rowData.test; + } +}; + +type TypedGriddle = new () => Griddle; +const TypedGriddle = Griddle as TypedGriddle; + +render( +

    +

    Custom Column Component Grid

    + +

    Custom Header Component Grid

    + +

    Custom Filter Component Grid

    + + } + sortDescendingComponent={} + customRowComponent={LinkComponent} + /> +
    , + document.getElementById('root') +); diff --git a/griddle-react/index.d.ts b/griddle-react/index.d.ts new file mode 100644 index 0000000000..e5d3e560bb --- /dev/null +++ b/griddle-react/index.d.ts @@ -0,0 +1,170 @@ +// Type definitions for griddle-react 0.7 +// Project: https://github.com/griddlegriddle/griddle +// Definitions by: David Hara +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/* +The MIT License (MIT) + +Copyright (c) 2016 David Hara + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +import * as React from 'react'; + +type ReactClass = React.ComponentClass | React.StatelessComponent + +export interface CustomColumnComponentProps { + data: any; + rowData: T; + metaData: ColumnMetaData; +} + +export interface CustomRowComponentProps { + data: T; +} + +export interface CustomGridComponentProps { + data: T[]; +} + +export interface CustomPagerComponentProps { + currentPage: number; + maxPage: number; + nextText: string; + previousText: string; + next(): void; + previous(): void; + setPage(number: number): void; +} + +export interface CustomHeaderComponentProps { + filterByColumn?(filter: string, columnName: string): void; + columnName: string; + displayName: string; +} + +export interface CustomFilterComponentProps { + placeholderText?: string; + changeFilter(val: any): void; +} + +export interface ColumnMetaData { + columnName: string; + cssClassName?: string; + customComponent?: ReactClass>; + customHeaderComponent?: ReactClass; + customHeaderComponentProps?: {}; + displayName?: string; + locked?: boolean; + order?: number; + sortable?: boolean; + visible?: boolean; +} + +export interface BodyCssClassNameFunction { + (rowData: T): string; +} + +export interface RowMetaData { + bodyCssClassName?: BodyCssClassNameFunction | string; +} + +export interface GriddleProps { + columns?: string[]; + columnMetadata?: ColumnMetaData[]; + rowMetadata?: RowMetaData; + results?: T[]; + resultsPerPage?: number; + initialSort?: string; + initialSortAscending?: boolean; + gridClassName?: string; + tableClassName?: string; + customFormatClassName?: string; + settingsText?: string; + filterPlaceholderText?: string; + nextText?: string; + previousText?: string; + maxRowsText?: string; + enableCustomFormatText?: string; + childrenColumnName?: string; + metadataColumns?: string[]; + showFilter?: boolean; + showSettings?: boolean; + useCustomRowComponent?: boolean; + useCustomGridComponent?: boolean; + useCustomPagerComponent?: boolean; + useCustomFilterer?: boolean; + useCustomFilterComponent?: boolean; + useGriddleStyles?: boolean; + customRowComponent?: ReactClass> + customGridComponent?: ReactClass> + customPagerComponent?: ReactClass + customFilterComponent?: ReactClass + customFilterer?(items: T[], query: any): T[]; + enableToggleCustom?: boolean; + noDataMessage?: string; + noDataClassName?: string; + customNoDataComponent?: ReactClass + showTableHeading?: boolean; + showPager?: boolean; + useFixedHeader?: boolean; + useExternal?: boolean; + externalSetPage?(index: number): void; + externalChangeSort?(sort: string, sortAscending: boolean): void; + externalSetFilter?(filter: string): void; + externalSetPageSize?(size: number): void; + externalMaxPage?: number; + externalCurrentPage?: number; + externalSortColumn?: string; + externalSortAscending?: boolean; + externalLoadingComponent?: ReactClass + externalIsLoading?: boolean; + enableInfiniteScroll?: boolean; + bodyHeight?: number; + paddingHeight?: number; + rowHeight?: number; + infiniteScrollLoadTreshold?: number; + useFixedLayout?: boolean; + isSubGriddle?: boolean; + enableSort?: boolean; + sortAscendingClassName?: string; + sortDescendingClassName?: string; + parentRowCollapsedClassName?: string; + parentRowExpandedClassName?: string; + settingsToggleClassName?: string; + nextClassName?: string; + previousClassName?: string; + sortAscendingComponent?: string | React.ReactElement; + sortDescendingComponent?: string | React.ReactElement; + sortDefaultComponent?: string | React.ReactElement; + parentRowCollapsedComponent?: string | React.ReactElement; + parentRowExpandedComponent?: string | React.ReactElement; + settingsIconComponent?: string | React.ReactElement; + nextIconComponent?: string | React.ReactElement; + previousIconComponent?: string | React.ReactElement; + onRowClick?(): void; +} + +declare class Griddle extends React.Component, any> { +} + +export default Griddle; diff --git a/griddle-react/test/CustomColumnComponent.tsx b/griddle-react/test/CustomColumnComponent.tsx new file mode 100644 index 0000000000..83adc8f05a --- /dev/null +++ b/griddle-react/test/CustomColumnComponent.tsx @@ -0,0 +1,70 @@ +/* +Licensed under the MIT License (MIT) + +Copyright (c) 2016 David Hara +*/ + +import * as React from 'react'; +import Griddle, { CustomColumnComponentProps } from 'griddle-react'; + +interface MyCustomResult { + name: string, + test: string +} + +class LinkComponent extends React.Component, any> { + render() { + var url = "speakers/" + this.props.rowData.test + "/" + this.props.data; + return {this.props.data} + } +} + +const StatelessFunctionComponent = (props: CustomColumnComponentProps) => { + var url = "speakers/" + props.rowData.test + "/" + props.data; + return {props.data} +}; + +var columnMeta = [ + { + columnName: "name", + order: 1, + locked: false, + visible: true, + customComponent: StatelessFunctionComponent + }]; + +var results: MyCustomResult[] = [ + { + name: 'David Hara', + test: 'blah' + }, + { + name: 'Hara, David', + test: 'blah2' + } +]; + +var rowMetaData = { + bodyCssClassName: (rowData: MyCustomResult) => { + return rowData.test; + } +}; + +class CustomColumnComponentGrid extends React.Component { + render() { + type TypedGriddle = new () => Griddle; + const TypedGriddle = Griddle as TypedGriddle; + + return ( + } + sortDescendingComponent={} + customRowComponent={LinkComponent} /> + ); + }; +} + +export default CustomColumnComponentGrid; \ No newline at end of file diff --git a/griddle-react/test/CustomFilterComponent.tsx b/griddle-react/test/CustomFilterComponent.tsx new file mode 100644 index 0000000000..e7508887f5 --- /dev/null +++ b/griddle-react/test/CustomFilterComponent.tsx @@ -0,0 +1,91 @@ +/* +Licensed under the MIT License (MIT) + +Copyright (c) 2016 David Hara +*/ + +import * as _ from 'lodash'; +import * as React from 'react'; +import Griddle, { CustomFilterComponentProps } from 'griddle-react'; + +const CustomFilterFunction = (items: ResultType[], query: string): ResultType[] => { + return _.filter(items, (item) => { + + let match = false; + _.forIn(item, (value, key) => { + if (String(value).toLowerCase().indexOf(query.toLowerCase()) >= 0) { + match = true; + return; + } + }); + + return match; + }); +}; + +class CustomFilterComponent extends React.Component { + query: string = ''; + + searchChange(event: React.FormEvent) { + this.query = event.currentTarget.value; + this.props.changeFilter(this.query); + } + + render() { + return ( +
    + +
    + ); + } +} + +interface ResultType { + id: number; + name: string; + city: string; + state: string; + country: string; + company: string; + favoriteNumber: number; +} + +var someData: ResultType[] = [ + { + "id": 0, + "name": "Mayer Leonard", + "city": "Kapowsin", + "state": "Hawaii", + "country": "United Kingdom", + "company": "Ovolo", + "favoriteNumber": 7 + }, + { + "id": 1, + "name": "Koch Becker", + "city": "Johnsonburg", + "state": "New Jersey", + "country": "Madagascar", + "company": "Eventage", + "favoriteNumber": 2 + } +]; + +class CustomFilterComponentGrid extends React.Component { + render() { + + type TypedGriddle = new () => Griddle; + const TypedGriddle = Griddle as TypedGriddle; + + return ( + + ); + } +} + +export default CustomFilterComponentGrid; diff --git a/griddle-react/test/CustomHeaderComponent.tsx b/griddle-react/test/CustomHeaderComponent.tsx new file mode 100644 index 0000000000..aed7d348aa --- /dev/null +++ b/griddle-react/test/CustomHeaderComponent.tsx @@ -0,0 +1,95 @@ +/* +Licensed under the MIT License (MIT) + +Copyright (c) 2016 David Hara +*/ + +import * as React from 'react'; +import Griddle, { ColumnMetaData, CustomHeaderComponentProps } from 'griddle-react'; + +interface MoreCustomHeaderComponentProps extends CustomHeaderComponentProps { + color: string; +} + +class HeaderComponent extends React.Component { + textOnClick(e: React.FormEvent) { + e.stopPropagation(); + } + + filterText(e: React.FormEvent) { + this.props.filterByColumn(e.currentTarget.value, this.props.columnName) + } + + render() { + return ( + +
    {this.props.displayName}
    + +
    + ); + } +} + +interface ResultType { + id: number; + name: string; + city: string; + state: string; + country: string; + company: string; + favoriteNumber: number; +} + +var someData: ResultType[] = [ + { + "id": 0, + "name": "Mayer Leonard", + "city": "Kapowsin", + "state": "Hawaii", + "country": "United Kingdom", + "company": "Ovolo", + "favoriteNumber": 7 + }, + { + "id": 1, + "name": "Koch Becker", + "city": "Johnsonburg", + "state": "New Jersey", + "country": "Madagascar", + "company": "Eventage", + "favoriteNumber": 2 + } +]; + +var columnMeta: ColumnMetaData[] = [ + { + columnName: 'name', + order: 1, + sortable: false, + visible: true, + }, + { + columnName: 'city', + customHeaderComponent: HeaderComponent, + customHeaderComponentProps: {color: 'red'} + }, + { + columnName: 'state', + customHeaderComponent: HeaderComponent, + customHeaderComponentProps: {color: 'blue'} + } +]; + +class CustomHeaderComponentGrid extends React.Component { + render() { + + type TypedGriddle = new () => Griddle; + const TypedGriddle = Griddle as TypedGriddle; + + return ( + + ); + } +} + +export default CustomHeaderComponentGrid; diff --git a/griddle-react/tsconfig.json b/griddle-react/tsconfig.json new file mode 100644 index 0000000000..5dd6f9d98b --- /dev/null +++ b/griddle-react/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "jsx": "preserve", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "griddle-react-tests.tsx", + "test/CustomColumnComponent.tsx", + "test/CustomFilterComponent.tsx", + "test/CustomHeaderComponent.tsx" + ] +} diff --git a/griddle-react/tslint.json b/griddle-react/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/griddle-react/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/gridfs-stream/gridfs-stream-tests.ts b/gridfs-stream/gridfs-stream-tests.ts index 1ed4e97006..8086245722 100644 --- a/gridfs-stream/gridfs-stream-tests.ts +++ b/gridfs-stream/gridfs-stream-tests.ts @@ -1,7 +1,3 @@ - - -/// - // Samples from: // https://github.com/aheckmann/gridfs-stream diff --git a/gridstack/gridstack-tests.ts b/gridstack/gridstack-tests.ts index 96aa14b19f..9330d2019e 100644 --- a/gridstack/gridstack-tests.ts +++ b/gridstack/gridstack-tests.ts @@ -4,13 +4,17 @@ // Type definitions for Gridstack // Project: http://troolee.github.io/gridstack.js/ -// Definitions by: Pascal Senn +// Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped var options = { float: true }; -var gridstack:GridStack = $(document).gridstack(options); +var element: JQuery = $(document).gridstack(options); +var gridstack: GridStack = $(document).data("gridstack"); +var gsFromElement: GridStack = element.data("gridstack"); + +if (gridstack !== gsFromElement) throw Error('These should match!'); gridstack.addWidget("test", 1, 2, 3, 4, true); gridstack.batchUpdate(); diff --git a/gridstack/index.d.ts b/gridstack/index.d.ts index 75056999e2..8d912e3a33 100644 --- a/gridstack/index.d.ts +++ b/gridstack/index.d.ts @@ -1,10 +1,11 @@ // Type definitions for Gridstack // Project: http://troolee.github.io/gridstack.js/ -// Definitions by: Pascal Senn +// Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface JQuery { - gridstack (options: IGridstackOptions):GridStack + gridstack (options: IGridstackOptions): JQuery; + data(key: "gridstack"): GridStack; } interface GridStack { @@ -181,61 +182,61 @@ interface IGridstackOptions { /** * if true the resizing handles are shown even if the user is not hovering over the widget (default: false) */ - alwaysShowResizeHandle: boolean; + alwaysShowResizeHandle?: boolean; /** * turns animation on (default: true) */ - animate: boolean; + animate?: boolean; /** * if false gridstack will not initialize existing items (default: true) */ - auto: boolean; + auto?: boolean; /** * one cell height (default: 60) */ - cellHeight: number; + cellHeight?: number; /** * allows to override jQuery UI draggable options. (default: { handle: '.grid-stack-item-content', scroll: true, appendTo: 'body' }) */ - draggable: {}; + draggable?: {}; /** * draggable handle selector (default: '.grid-stack-item-content') */ - handle: string; + handle?: string; /** * maximum rows amount.Default is 0 which means no maximum rows */ - height: number; + height?: number; /** * enable floating widgets (default: false) See example */ - float: boolean; + float?: boolean; /** * widget class (default: 'grid-stack-item') */ - itemClass: string; + itemClass?: string; /** * minimal width.If window width is less, grid will be shown in one - column mode (default: 768) */ - minWidth: number; + minWidth?: number; /** * class for placeholder (default: 'grid-stack-placeholder') */ - placeholderClass: string; + placeholderClass?: string; /** * allows to override jQuery UI resizable options. (default: { autoHide: true, handles: 'se' }) */ - resizable: {}; + resizable?: {}; /** * makes grid static (default false).If true widgets are not movable/ resizable.You don't even need jQueryUI draggable/resizable. A CSS class grid-stack-static is also added to the container. */ - staticGrid: boolean; + staticGrid?: boolean; /** * vertical gap size (default: 20) */ - verticalMargin: number; + verticalMargin?: number; /** * amount of columns (default: 12) */ - width: number; + width?: number; } diff --git a/gsap/Animation.d.ts b/gsap/Animation.d.ts new file mode 100644 index 0000000000..3c58f9b12a --- /dev/null +++ b/gsap/Animation.d.ts @@ -0,0 +1,90 @@ +declare namespace gsap { + export class Animation { + /** Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/() => voidality, but there is no reason to create an instance of this class directly. */ + constructor(duration?: number, vars?: any); + + /** A place to store any data you want (initially populated with vars.data if it exists). */ + data: any; + + /** [Read-only] Parent timeline. */ + timeline: SimpleTimeline; + + /** The vars object passed into the constructor which stores configuration variables like onComplete, onUpdate, etc. */ + vars: {}; + + /** Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin. */ + delay(): number; + delay(value: number): Animation; + + /** Gets or sets the animation's duration, not including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ + duration(): number; + duration(value: number): Animation; + + /** Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback. */ + eventCallback(type: string): () => void; + eventCallback(type: string, callback: () => void, params?: any[], scope?: any): Animation; + + /** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ + invalidate(): Animation; + + /** Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its ancestor timelines). */ + isActive(): boolean; + + /** Kills the animation entirely or in part depending on the parameters. */ + kill(vars?: {}, target?: {}): Animation; + + /** Pauses the instance, optionally jumping to a specific time. */ + pause(atTime?: any, suppressEvents?: boolean): Animation; + + /** Gets or sets the animation's paused state which indicates whether or not the animation is currently paused. */ + paused(): boolean; + paused(value: boolean): Animation; + + /** Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is). */ + play(from?: any, suppressEvents?: boolean): Animation; + + /** Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ + progress(): number; + progress(value: number, suppressEvents?: boolean): Animation; + + /** Restarts and begins playing forward from the beginning. */ + restart(includeDelay?: boolean, suppressEvents?: boolean): Animation; + + /** Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first. */ + resume(from?: any, suppressEvents?: boolean): Animation; + + /** Reverses playback so that all aspects of the animation are oriented backwards including, for example, a tween's ease. */ + reverse(from?: any, suppressEvents?: boolean): Animation; + + /** Gets or sets the animation's reversed state which indicates whether or not the animation should be played backwards. */ + reversed(): boolean; + reversed(value: boolean): Animation; + + /** Jumps to a specific time without affecting whether or not the instance is paused or reversed. */ + seek(time: any, suppressEvents?: boolean): Animation; + + /** Gets or sets the time at which the animation begins on its parent timeline (after any delay that was defined). */ + startTime(): number; + startTime(value: number): Animation; + + /** Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration. */ + time(): number; + time(value: number, suppressEvents?: boolean): Animation; + + /** Factor that's used to scale time in the animation where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. */ + timeScale(): number; + timeScale(value: number): Animation; + + /** Gets or sets the animation's total duration including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ + totalDuration(): number; + totalDuration(value: number): Animation; + + /** Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ + totalProgress(): number; + totalProgress(value: number, suppressEvents?: boolean): Animation; + + /** Gets or sets the position of the playhead according to the totalDuration which includes any repeats and repeatDelays (only available in TweenMax and TimelineMax). */ + totalTime(): number; + totalTime(time: number, suppressEvents?: boolean): Animation; + } +} diff --git a/gsap/Core.d.ts b/gsap/Core.d.ts deleted file mode 100644 index 30b07a3e19..0000000000 --- a/gsap/Core.d.ts +++ /dev/null @@ -1,179 +0,0 @@ -declare class Animation { - /** Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/functionality, but there is no reason to create an instance of this class directly. */ - constructor(duration?: number, vars?: any); - - /** A place to store any data you want (initially populated with vars.data if it exists). */ - data: any; - - /** [Read-only] Parent timeline. */ - timeline: SimpleTimeLine; - - /** The vars object passed into the constructor which stores configuration variables like onComplete, onUpdate, etc. */ - vars: any; - - /** Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin. */ - delay(): number; - delay(value: number): Animation; - - /** Gets or sets the animation's duration, not including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ - duration(): number; - duration(value: number): Animation; - - /** Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback. */ - eventCallback(type: string): Function; - eventCallback(type: string, callback: Function, params?: any[], scope?: any): Animation; - - /** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ - invalidate(): Animation; - - /** Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its ancestor timelines). */ - isActive(): boolean; - - /** Kills the animation entirely or in part depending on the parameters. */ - kill(vars?: any, target?: any): Animation; - - /** Pauses the instance, optionally jumping to a specific time. */ - pause(atTime?: any, suppressEvents?: boolean): Animation; - - /** Gets or sets the animation's paused state which indicates whether or not the animation is currently paused. */ - paused(): boolean; - paused(value: boolean): Animation; - - /** Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is). */ - play(from?: any, suppressEvents?: boolean): Animation; - - /** Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ - progress(): number; - progress(value: number, suppressEvents?: boolean): Animation; - - /** Restarts and begins playing forward from the beginning. */ - restart(includeDelay?: boolean, suppressEvents?: boolean): Animation; - - /** Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first. */ - resume(from?: any, suppressEvents?: boolean): Animation; - - /** Reverses playback so that all aspects of the animation are oriented backwards including, for example, a tween's ease. */ - reverse(from?: any, suppressEvents?: boolean): Animation; - - /** Gets or sets the animation's reversed state which indicates whether or not the animation should be played backwards. */ - reversed(): boolean; - reversed(value: boolean): Animation; - - /** Jumps to a specific time without affecting whether or not the instance is paused or reversed. */ - seek(time: any, suppressEvents?: boolean): Animation; - - /** Gets or sets the time at which the animation begins on its parent timeline (after any delay that was defined). */ - startTime(): number; - startTime(value: number): Animation; - - /** Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration. */ - time(): number; - time(value: number, suppressEvents?: boolean): Animation; - - /** Factor that's used to scale time in the animation where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. */ - timeScale(): number; - timeScale(value: number): Animation; - - /** Gets or sets the animation's total duration including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ - totalDuration(): number; - totalDuration(value: number): Animation; - - /** Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ - totalProgress(): number; - totalProgress(value: number, suppressEvents?: boolean): Animation; - - /** Gets or sets the position of the playhead according to the totalDuration which includes any repeats and repeatDelays (only available in TweenMax and TimelineMax). */ - totalTime(): number; - totalTime(time: number, suppressEvents?: boolean): Animation; -} - -declare class SimpleTimeLine extends Animation { - /** SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline functionality and it is used for the root timelines in TweenLite but is only intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight. */ - constructor(vars?: any); - - /** If true, child tweens/timelines will be removed as soon as they complete. */ - autoRemoveChildren: boolean; - - /** Controls whether or not child tweens/timelines are repositioned automatically (changing their startTime) in order to maintain smooth playback when properties are changed on-the-fly. */ - smoothChildTiming: boolean; - - /** Adds a TweenLite, TweenMax, TimelineLite, or TimelineMax instance to the timeline at a specific time. */ - add(child: any, position?: any, align?: string, stagger?: number): SimpleTimeLine; - - /** renders */ - render(time: number, suppressEvents?: boolean, force?: boolean): SimpleTimeLine; - - // INHERITANCE FROM ANIMATION - - /** Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin. */ - delay(): number; - delay(value: number): SimpleTimeLine; - - /** Gets or sets the animation's duration, not including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ - duration(): number; - duration(value: number): SimpleTimeLine; - - /** Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback. */ - eventCallback(type: string): Function; - eventCallback(type: string, callback: Function, params?: any[], scope?: any): SimpleTimeLine; - - /** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ - invalidate(): SimpleTimeLine; - - /** Kills the animation entirely or in part depending on the parameters. */ - kill(vars?: any, target?: any): SimpleTimeLine; - - /** Pauses the instance, optionally jumping to a specific time. */ - pause(atTime?: any, suppressEvents?: boolean): SimpleTimeLine; - - /** Gets or sets the animation's paused state which indicates whether or not the animation is currently paused. */ - paused(): boolean; - paused(value: boolean): SimpleTimeLine; - - /** Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is). */ - play(from?: any, suppressEvents?: boolean): SimpleTimeLine; - - /** Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ - progress(): number; - progress(value: number, suppressEvents?: boolean): SimpleTimeLine; - - /** Restarts and begins playing forward from the beginning. */ - restart(includeDelay?: boolean, suppressEvents?: boolean): SimpleTimeLine; - - /** Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first. */ - resume(from?: any, suppressEvents?: boolean): SimpleTimeLine; - - /** Reverses playback so that all aspects of the animation are oriented backwards including, for example, a tween's ease. */ - reverse(from?: any, suppressEvents?: boolean): SimpleTimeLine; - - /** Gets or sets the animation's reversed state which indicates whether or not the animation should be played backwards. */ - reversed(): boolean; - reversed(value: boolean): SimpleTimeLine; - - /** Jumps to a specific time without affecting whether or not the instance is paused or reversed. */ - seek(time: any, suppressEvents?: boolean): SimpleTimeLine; - - /** Gets or sets the time at which the animation begins on its parent timeline (after any delay that was defined). */ - startTime(): number; - startTime(value: number): SimpleTimeLine; - - /** Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration. */ - time(): number; - time(value: number, suppressEvents?: boolean): SimpleTimeLine; - - /** Factor that's used to scale time in the animation where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. */ - timeScale(): number; - timeScale(value: number): SimpleTimeLine; - - /** Gets or sets the animation's total duration including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ - totalDuration(): number; - totalDuration(value: number): SimpleTimeLine; - - /** Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ - totalProgress(): number; - totalProgress(value: number, suppressEvents?: boolean): SimpleTimeLine; - - /** Gets or sets the position of the playhead according to the totalDuration which includes any repeats and repeatDelays (only available in TweenMax and TimelineMax). */ - totalTime(): number; - totalTime(time: number, suppressEvents?: boolean): SimpleTimeLine; -} \ No newline at end of file diff --git a/gsap/Ease.d.ts b/gsap/Ease.d.ts index 932222ff56..ea2d7e1d84 100644 --- a/gsap/Ease.d.ts +++ b/gsap/Ease.d.ts @@ -1,6 +1,113 @@ -declare class Ease { - constructor(func?: Function, extraParams?: any[], type?: number, power?: number); +declare namespace gsap { + export class Ease { + constructor(func?: () => void, extraParams?: any[], type?: number, power?: number); - /** Translates the tween's progress ratio into the corresponding ease ratio. */ - getRatio(p: number): number; -} \ No newline at end of file + /** Translates the tween's progress ratio into the corresponding ease ratio. */ + getRatio(p: number): number; + } + + export class EaseLookup { + static find(name: string): Ease; + } + + export class Back extends Ease { + static easeIn: Back; + static easeInOut: Back; + static easeOut: Back; + config(overshoot: number): Elastic; + + } + export class Bounce extends Ease { + static easeIn: Bounce; + static easeInOut: Bounce; + static easeOut: Bounce; + } + export class Circ extends Ease { + static easeIn: Circ; + static easeInOut: Circ; + static easeOut: Circ; + } + export class Cubic extends Ease { + static easeIn: Cubic; + static easeInOut: Cubic; + static easeOut: Cubic; + } + + export class Elastic extends Ease { + static easeIn: Elastic; + static easeInOut: Elastic; + static easeOut: Elastic; + config(amplitude: number, period: number): Elastic; + } + + export class Expo extends Ease { + static easeIn: Expo; + static easeInOut: Expo; + static easeOut: Expo; + } + + export class Linear extends Ease { + static ease: Linear; + static easeIn: Linear; + static easeInOut: Linear; + static easeNone: Linear; + static easeOut: Linear; + } + + export class Quad extends Ease { + static easeIn: Quad; + static easeInOut: Quad; + static easeOut: Quad; + } + + export class Quart extends Ease { + static easeIn: Quart; + static easeInOut: Quart; + static easeOut: Quart; + } + + export class Quint extends Ease { + static easeIn: Quint; + static easeInOut: Quint; + static easeOut: Quint; + } + + export class Sine extends Ease { + static easeIn: Sine; + static easeInOut: Sine; + static easeOut: Sine; + } + + export class SlowMo extends Ease { + static ease: SlowMo; + config(linearRatio: number, power: number, yoyoMode: boolean): SlowMo; + } + + export class SteppedEase extends Ease { + constructor(staps: number); + config(steps: number): SteppedEase; + } + + export interface RoughEaseConfig { + clamp?: boolean; + points?: number; + randomize?: boolean; + strength?: number; + taper?: 'in' | 'out' | 'both' | 'none'; + template?: Ease; + } + + export class RoughEase extends Ease { + static ease: RoughEase; + constructor(vars: RoughEaseConfig); + config(steps?: number): RoughEase; + } + + + export var Power0: typeof Linear; + export var Power1: typeof Quad; + export var Power2: typeof Cubic; + export var Power3: typeof Quart; + export var Power4: typeof Quint; + export var Strong: typeof Quint; +} diff --git a/gsap/Plugins.d.ts b/gsap/Plugins.d.ts new file mode 100644 index 0000000000..d7ceca7bf8 --- /dev/null +++ b/gsap/Plugins.d.ts @@ -0,0 +1,15 @@ +declare namespace gsap { + export interface BezierPlugin extends TweenPlugin { + bezierThrough(values: any[], curviness?: number, quadratic?: boolean, correlate?: string, prepend?: {}, calcDifs?: boolean): {}; + cubicToQuadratic(a: number, b: number, c: number, d: number): any[]; + quadraticToCubic(a: number, b: number, c: number): {}; + } + + export interface CSSRulePlugin extends TweenPlugin { + getRule(selector: string): {}; + } + + export interface TweenPlugin { + activate(plugins: any[]): boolean; + } +} diff --git a/gsap/Timeline.d.ts b/gsap/Timeline.d.ts new file mode 100644 index 0000000000..9d14b2d4c5 --- /dev/null +++ b/gsap/Timeline.d.ts @@ -0,0 +1,119 @@ +declare namespace gsap { + export type Timeline = SimpleTimeline | TimelineLite | TimelineMax; + + export class SimpleTimeline extends Animation { + /** SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline () => voidality and it is used for the root timelines in TweenLite but is only intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight. */ + constructor(vars?: any); + + /** If true, child tweens/timelines will be removed as soon as they complete. */ + autoRemoveChildren: boolean; + + /** Controls whether or not child tweens/timelines are repositioned automatically (changing their startTime) in order to maintain smooth playback when properties are changed on-the-fly. */ + smoothChildTiming: boolean; + + /** Adds a TweenLite, TweenMax, TimelineLite, or TimelineMax instance to the timeline at a specific time. */ + add(child: any, position?: any, align?: string, stagger?: number): SimpleTimeline; + + /** renders */ + render(time: number, suppressEvents?: boolean, force?: boolean): SimpleTimeline; + } + + export class TimelineLite extends SimpleTimeline { + constructor(vars?: {}); + + /** Adds a tween, timeline, callback, or label (or an array of them) to the timeline. */ + add(value: any, position?: any, align?: string, stagger?: number): TimelineLite; + + /** Adds a label to the timeline, making it easy to mark important positions/times. */ + addLabel(label: string, position: any): TimelineLite; + + /** Inserts a special callback that pauses playback of the timeline at a particular time or label. */ + addPause(position?: any, callback?: () => void, params?: any[], scope?: any): TimelineLite; + + /** Adds a callback to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.delayedCall(...) ) but with less code. */ + call(callback: () => void, params?: any[], scope?: any, position?: any): TimelineLite; + + /** Empties the timeline of all tweens, timelines, and callbacks (and optionally labels too). */ + clear(labels?: boolean): TimelineLite; + + /** Returns the time at which the animation will finish according to the parent timeline's local time. */ + endTime(includeRepeats?: boolean): number; + + /** Seamlessly transfers all tweens, timelines, and [optionally] delayed calls from the root timeline into a new TimelineLite so that you can perform advanced tasks on a seemingly global basis without affecting tweens/timelines that you create after the export. */ + static exportRoot(vars?: {}, omitDelayedCalls?: boolean): TimelineLite; + + /** Adds a TweenLite.from() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.from(...) ) but with less code. */ + from(target: {}, duration: number, vars: {}, position?: any): TimelineLite; + + /** Adds a TweenLite.fromTo() tween to the end of the timeline - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.fromTo(...) ) but with less code. */ + fromTo(target: {}, duration: number, fromVars: {}, toVars: {}, position?: any): TimelineLite; + + /** Returns an array containing all the tweens and/or timelines nested in this timeline. */ + getChildren(nested?: boolean, tweens?: boolean, timelines?: boolean, ignoreBeforeTime?: number): Array; + + /** Returns the time associated with a particular label. */ + getLabelTime(label: string): number; + + /** Returns the tweens of a particular object that are inside this timeline. */ + getTweensOf(target: {}, nested?: boolean): Tween[]; + + /** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ + invalidate(): TimelineLite; + + /** Returns the most recently added child tween/timeline/callback regardless of its position in the timeline. */ + recent(): Animation; + + /** Removes a tween, timeline, callback, or label (or array of them) from the timeline. */ + remove(value: any): TimelineLite; + + /** Removes a label from the timeline and returns the time of that label. */ + removeLabel(label: string): any; + + /** Jumps to a specific time (or label) without affecting whether or not the instance is paused or reversed. */ + seek(position: string | number, supressEvents: boolean): TimelineLite; + + /** Adds a zero-duration tween to the end of the timeline (or elsewhere using the "position" parameter) that sets values immediately (when the virtual playhead reaches that position on the timeline) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(target, 0, {...}) ) but with less code. */ + set(target: {}, vars: {}, position?: any): TimelineLite; + + /** Shifts the startTime of the timeline's children by a certain amount and optionally adjusts labels too. */ + shiftChildren(amount: number, adjustLabels?: boolean, ignoreBeforeTime?: number): TimelineLite; + + /** Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ + staggerFrom(targets: any, duration: number, vars: {}, stagger?: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteScope?: any): TimelineLite; + + /** Tweens an array of targets from and to a common set of values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ + staggerFromTo(targets: any, duration: number, fromVars: {}, toVars: {}, stagger?: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite; + + /** Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ + staggerTo(targets: any, duration: number, vars: {}, stagger: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite; + + /** Adds a TweenLite.to() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(...) ) but with less code. */ + to(target: {}, duration: number, vars: {}, position?: any): TimelineLite; + usesFrames(): boolean; + + /** If true, the timeline's timing mode is frames-based instead of seconds. */ + useFrames(): boolean; + } + + export class TimelineMax extends TimelineLite { + constructor(vars?: {}); + + addCallback(callback: () => void, position: any, params?: any[], scope?: any): TimelineMax; + currentLabel(): string; + currentLabel(value: string): TimelineMax; + getActive(nested?: boolean, tweens?: boolean, timelines?: boolean): Tween | Timeline[]; + getLabelAfter(time: number): string; + getLabelBefore(time: number): string; + getLabelsArray(): Array<{ name: string; time: number; }>; + removeCallback(callback: () => void, timeOrLabel?: any): TimelineMax; + removePause(position: any): TimelineMax; + repeat(): number; + repeat(value: number): TimelineMax; + repeatDelay(): number; + repeatDelay(value: number): TimelineMax; + tweenFromTo(fromPosition: any, toPosition: any, vars?: {}): TweenLite; + tweenTo(position: any, vars?: {}): TweenLite; + yoyo(): boolean; + yoyo(value: boolean): TimelineMax; + } +} diff --git a/gsap/Tween.d.ts b/gsap/Tween.d.ts new file mode 100644 index 0000000000..b11260ef4c --- /dev/null +++ b/gsap/Tween.d.ts @@ -0,0 +1,127 @@ +declare namespace gsap { + export type Tween = TweenLite | TweenMax; + export class TweenLite extends Animation { + constructor(target: any, duration: number, vars: any); + + /** Provides An easy way to change the default easing equation. */ + static defaultEase: Ease; + + /** Provides An easy way to change the default overwrite mode. */ + static defaultOverwrite: string; + + /** The selector engine (like jQuery) that should be used when a tween receives a string as its target, like TweenLite.to("#myID", 1, {x:"100px"}). */ + static selector: (query: string) => any; + + /** Target object (or array of objects) whose properties the tween affects. */ + readonly target: any; + + /** The object that dispatches a "tick" event each time the engine updates, making it easy for you to add your own listener(s) to run custom logic after each update (great for game developers). */ + static ticker: any; + + /** Provides a simple way to call a () => void after a set amount of time (or frames). */ + static delayedCall(delay: number, callback: () => void, params?: any[], scope?: any, useFrames?: boolean): TweenLite; + + /** Static method for creating a TweenLite instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */ + static from(target: any, duration: number, vars: any): TweenLite; + + /** Static method for creating a TweenLite instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */ + static fromTo(target: any, duration: number, fromVars: any, toVars: any): TweenLite; + + /** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */ + static getTweensOf(target: any, onlyActive?: boolean): TweenLite[]; + + /** [override] Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ + invalidate(): TweenLite; + + /** Immediately kills all of the delayedCalls to a particular () => void. */ + static killDelayedCallsTo(func: () => void): void; + + /** Kills all the tweens (or specific tweening properties) of a particular object or delayedCalls to a particular () => void. */ + static killTweensOf(target: any, onlyActive?: boolean, vars?: any): void; + + /** Permits you to control what happens when too much time elapses between two ticks (updates) of the engine, adjusting the core timing mechanism to compensate and avoid "jumps". */ + static lagSmoothing(threshold: number, adjustedLag: number): void; + + /** Forces a render of all active tweens which can be useful if, for example, you set up a bunch of from() tweens and then you need to force an immediate render (even of "lazy" tweens) to avoid a brief delay before things render on the very next tick. */ + static render(): void; + + /** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */ + static set(target: any, vars: any): TweenLite; + + /** Static method for creating a TweenLite instance that animates to the specified destination values (from the current values). */ + static to(target: any, duration: number, vars: any): TweenLite; + } + + export class TweenMax extends TweenLite { + constructor(target: {}, duration: number, vars: {}); + + /** Provides a simple way to call a () => void after a set amount of time (or frames). */ + static delayedCall(delay: number, callback: () => void, params?: any[], scope?: {}, useFrames?: boolean): TweenMax; + + /** Static method for creating a TweenMax instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */ + static from(target: {}, duration: number, vars: {}): TweenMax; + + /** Static method for creating a TweenMax instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */ + static fromTo(target: {}, duration: number, fromVars: {}, toVars: {}): TweenMax; + + /** Returns an array containing all tweens (and optionally timelines too, excluding the root timelines). */ + static getAllTweens(includeTimelines?: boolean): Tween[]; + + /** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */ + static getTweensOf(target: {}): Tween[]; + + /** Gets or sets the global timeScale which is a multiplier that affects ALL animations equally. This is a great way to globally speed up or slow down all animations at once. */ + static globalTimeScale(value: number): void; + + /** Reports whether or not a particular object is actively tweening. */ + static isTweening(target: {}): boolean; + + /** Kills all tweens and/or delayedCalls/callbacks, and/or timelines, optionally forcing them to completion first. */ + static killAll(complete?: boolean, tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; + + /** Kills all tweens of the children of a particular DOM element, optionally forcing them to completion first. */ + static killChildTweensOf(parent: any, complete?: boolean): void; + + /** Immediately kills all of the delayedCalls to a particular () => void. */ + static killDelayedCallsTo(func: () => void): void; + + /** Kills all the tweens (or specific tweening properties) of a particular object or the delayedCalls to a particular () => void. */ + static killTweensOf(target: {}, vars?: {}): void; + + /** Pauses all tweens and/or delayedCalls/callbacks and/or timelines. */ + static pauseAll(tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; + + /** Gets or sets the tween's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is halfway complete, and 1 is complete. */ + repeat(): number; + repeat(value: number): TweenMax; + + /** Gets or sets the amount of time in seconds (or frames for frames-based tweens) between repeats. */ + repeatDelay(): number; + repeatDelay(value: number): TweenMax; + + /** Resumes all paused tweens and/or delayedCalls/callbacks and/or timelines. */ + static resumeAll(tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; + + /** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */ + static set(target: {}, vars: {}): TweenMax; + + /** Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ + static staggerFrom(targets: any, duration: number, vars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; + + /** Tweens an array of targets from a common set of destination values to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ + static staggerFromTo(targets: any, duration: number, fromVars: {}, toVars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; + + /** Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ + static staggerTo(targets: any, duration: number, vars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; + + /** Static method for creating a TweenMax instance that animates to the specified destination values (from the current values). */ + static to(target: {}, duration: number, vars: TweenConfig): TweenMax; + + /** Updates tweening values on the fly so that they appear to seamlessly change course even if the tween is in-progress. */ + updateTo(vars: {}, resetDuration?: boolean): TweenMax; + + /** Gets or sets the tween's yoyo state, where true causes the tween to go back and forth, alternating backward and forward on each repeat. */ + yoyo(): boolean; + yoyo(value?: boolean): TweenMax; + } +} diff --git a/gsap/TweenConfig.d.ts b/gsap/TweenConfig.d.ts new file mode 100644 index 0000000000..59c472bea2 --- /dev/null +++ b/gsap/TweenConfig.d.ts @@ -0,0 +1,82 @@ +declare namespace gsap { + export interface TweenConfig { + + /** Amount of delay in seconds (or frames for frames-based tweens) before the animation should begin.*/ + delay?: number; + + /** Ease (or () => void or String) - You can choose from various eases to control the rate of change during the animation, giving it a specific "feel". */ + ease?: Ease; + + yoyo?: boolean; + + /** If true, the tween will pause itself immediately upon creation. */ + paused?: boolean; + + /** Controls how (and if) other tweens of the same target are overwritten. There are several modes to choose from, but "auto" is the default (although you can change the default mode using theTweenLite.defaultOverwrite property) */ + overwrite?: string | number; + + /** A () => void that should be called when the animation has completed. */ + onComplete?: () => void; + + /** An Array of parameters to pass the onComplete () => void */ + onCompleteParams?: any[]; + + /** Defines the scope of the onComplete () => void (what "this" refers to inside that () => void). */ + onCompleteScope?: {}; + + /** Normally when you create a tween, it begins rendering on the very next frame (update cycle) unless you specify a delay. However, if you prefer to force the tween to render immediately when it is created, setimmediateRender to true. Or to prevent a from() from rendering immediately, set immediateRender to false. By default, from() tweens set immediateRender to true. */ + immediateRender?: boolean; + + /** A () => void that should be called when the tween has reached its beginning again from the reverse direction. */ + onReverseComplete?: () => void; + + /** An Array of parameters to pass the onReverseComplete () => void. */ + onReverseCompleteParams?: any[]; + + /** Defines the scope of the onReverseComplete () => void (what "this" refers to inside that () => void). */ + onReverseCompleteScope?: {}; + + /** A () => void that should be called when the tween begins (when its time changes from 0 to some other value which can happen more than once if the tween is restarted multiple times). */ + onStart?: () => void; + + /** An Array of parameters to pass the onStart () => void. */ + onStartParams?: any[]; + + /** Defines the scope of the onStart () => void (what "this" refers to inside that () => void). */ + onStartScope?: {}; + + /** A () => void that should be called every time the animation updates (on every frame while the animation is active). */ + onUpdate?: () => void; + + /** An Array of parameters to pass the onUpdate () => void. */ + onUpdateParams?: any[]; + + /** Defines the scope of the onUpdate () => void (what "this" refers to inside that () => void). */ + onUpdateScope?: {}; + + /** If useFrames is true, the tweens's timing will be based on frames instead of seconds because it is intially added to the root frames-based timeline. This causes both its duration and delay to be based on frames. An animations's timing mode is always determined by its parent timeline. */ + useFrames?: boolean; + + /** When a tween renders for the very first time and reads its starting values, GSAP will automatically "lazy render" that particular tick by default, meaning it will try to delay the rendering (writing of values) until the very end of the "tick" cycle which can improve performance because it avoids the read/write/read/write layout thrashing that some browsers do. If you would like to disable lazy rendering for a particular tween, you can set lazy:false. Or, since zero-duration tweens do not lazy-render by default, you can specifically give it permission to lazy-render by setting lazy:true like TweenLite.set(element, {opacity:0, lazy:true});. In most cases, you won't need to set lazy. */ + lazy?: boolean; + + /** A () => void that should be called when the tween gets overwritten by another tween. */ + onOverwrite?: () => void; + + /** If true atuomatically populates the css property for tween on DOM elements */ + autoCSS?: boolean; + + /** The scope to be used for all of the callbacks (onStart, onUpdate, onComplete, etc.). The scope is what "this" refers to inside any of the callbacks. */ + callbackScope?: {}; + + startAt?: {}; + + repeat?: number; + + repeatDelay?: number; + + onRepeat?: () => void; + + onRepeatScope?: {}; + } +} diff --git a/gsap/TweenLite.d.ts b/gsap/TweenLite.d.ts deleted file mode 100644 index 21150acf22..0000000000 --- a/gsap/TweenLite.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -declare class TweenLite { - constructor(target: any, duration: number, vars: any); - - /** Provides An easy way to change the default easing equation. */ - static defaultEase: Ease; - - /** Provides An easy way to change the default overwrite mode. */ - static defaultOverwrite: string; - - /** The selector engine (like jQuery) that should be used when a tween receives a string as its target, like TweenLite.to("#myID", 1, {x:"100px"}). */ - static selector: (query: string) => any; - - /** [READ-ONLY] Target object (or array of objects) whose properties the tween affects. */ - target: any; - - /** The object that dispatches a "tick" event each time the engine updates, making it easy for you to add your own listener(s) to run custom logic after each update (great for game developers). */ - static ticker: any; - - /** Provides a simple way to call a function after a set amount of time (or frames). */ - static delayedCall(delay: number, callback: Function, params?: any[], scope?: any, useFrames?: boolean): TweenLite; - - /** Static method for creating a TweenLite instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */ - static from(target: any, duration: number, vars: any): TweenLite; - - /** Static method for creating a TweenLite instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */ - static fromTo(target: any, duration: number, fromVars: any, toVars: any): TweenLite; - - /** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */ - static getTweensOf(target: any, onlyActive?: boolean): TweenLite[]; - - /** [override] Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ - invalidate(): TweenLite; - - /** Immediately kills all of the delayedCalls to a particular function. */ - static killDelayedCallsTo(func: Function): void; - - /** Kills all the tweens (or specific tweening properties) of a particular object or delayedCalls to a particular function. */ - static killTweensOf(target: any, onlyActive?: boolean, vars?: any): void; - - /** Permits you to control what happens when too much time elapses between two ticks (updates) of the engine, adjusting the core timing mechanism to compensate and avoid "jumps". */ - static lagSmoothing(threshold: number, adjustedLag: number): void; - - /** Forces a render of all active tweens which can be useful if, for example, you set up a bunch of from() tweens and then you need to force an immediate render (even of "lazy" tweens) to avoid a brief delay before things render on the very next tick. */ - static render(): void; - - /** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */ - static set(target: any, vars: any): TweenLite; - - /** Static method for creating a TweenLite instance that animates to the specified destination values (from the current values). */ - static to(target: any, duration: number, vars: any): TweenLite; - - // INHERITANCE FROM ANIMATION - - /** Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin. */ - delay(): number; - delay(value: number): TweenLite; - - /** Gets or sets the animation's duration, not including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ - duration(): number; - duration(value: number): TweenLite; - - /** Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback. */ - eventCallback(type: string): Function; - eventCallback(type: string, callback: Function, params?: any[], scope?: any): TweenLite; - - /** Kills the animation entirely or in part depending on the parameters. */ - kill(vars?: any, target?: any): TweenLite; - - /** Pauses the instance, optionally jumping to a specific time. */ - pause(atTime?: any, suppressEvents?: boolean): TweenLite; - - /** Gets or sets the animation's paused state which indicates whether or not the animation is currently paused. */ - paused(): boolean; - paused(value: boolean): TweenLite; - - /** Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is). */ - play(from?: any, suppressEvents?: boolean): TweenLite; - - /** Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ - progress(): number; - progress(value: number, suppressEvents?: boolean): TweenLite; - - /** Restarts and begins playing forward from the beginning. */ - restart(includeDelay?: boolean, suppressEvents?: boolean): TweenLite; - - /** Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first. */ - resume(from?: any, suppressEvents?: boolean): TweenLite; - - /** Reverses playback so that all aspects of the animation are oriented backwards including, for example, a tween's ease. */ - reverse(from?: any, suppressEvents?: boolean): TweenLite; - - /** Gets or sets the animation's reversed state which indicates whether or not the animation should be played backwards. */ - reversed(): boolean; - reversed(value: boolean): TweenLite; - - /** Jumps to a specific time without affecting whether or not the instance is paused or reversed. */ - seek(time: any, suppressEvents?: boolean): TweenLite; - - /** Gets or sets the time at which the animation begins on its parent timeline (after any delay that was defined). */ - startTime(): number; - startTime(value: number): TweenLite; - - /** Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration. */ - time(): number; - time(value: number, suppressEvents?: boolean): TweenLite; - - /** Factor that's used to scale time in the animation where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. */ - timeScale(): number; - timeScale(value: number): TweenLite; - - /** Gets or sets the animation's total duration including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax). */ - totalDuration(): number; - totalDuration(value: number): TweenLite; - - /** Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ - totalProgress(): number; - totalProgress(value: number, suppressEvents?: boolean): TweenLite; - - /** Gets or sets the position of the playhead according to the totalDuration which includes any repeats and repeatDelays (only available in TweenMax and TimelineMax). */ - totalTime(): number; - totalTime(time: number, suppressEvents?: boolean): TweenLite; -} \ No newline at end of file diff --git a/gsap/gsap-tests.ts b/gsap/gsap-tests.ts index 49d5ce19d0..f811ac1089 100644 --- a/gsap/gsap-tests.ts +++ b/gsap/gsap-tests.ts @@ -1,8 +1,8 @@ - +import { TweenLite } from 'gsap'; var tween = TweenLite .to(document.getElementById('some-div'), 1, { width: '200px', height: '200px' }) - .seek(0.5); \ No newline at end of file + .seek(0.5); diff --git a/gsap/index.d.ts b/gsap/index.d.ts index eb493dc9ec..cebefcf1c9 100644 --- a/gsap/index.d.ts +++ b/gsap/index.d.ts @@ -1,10 +1,15 @@ -// Type definitions for GSAP v1.19 +// Type definitions for GSAP 1.19 // Project: http://greensock.com/ -// Definitions by: VILIC VANE +// Definitions by: VILIC VANE , Robert S , Richard Fox // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// -/// +/// +/// +/// +/// -export = TweenLite; +declare module 'gsap' { + export = gsap; +} diff --git a/gsap/tslint.json b/gsap/tslint.json new file mode 100644 index 0000000000..0b14fdec0d --- /dev/null +++ b/gsap/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-single-declare-module": false + } +} diff --git a/gulp-angular-templatecache/tsconfig.json b/gulp-angular-templatecache/tsconfig.json index eda0469b48..869b08da9a 100644 --- a/gulp-angular-templatecache/tsconfig.json +++ b/gulp-angular-templatecache/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-autoprefixer/tsconfig.json b/gulp-autoprefixer/tsconfig.json index 955f890f2b..35ad131268 100644 --- a/gulp-autoprefixer/tsconfig.json +++ b/gulp-autoprefixer/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-babel/gulp-babel-tests.ts b/gulp-babel/gulp-babel-tests.ts index b705c68850..4cd6ff0467 100644 --- a/gulp-babel/gulp-babel-tests.ts +++ b/gulp-babel/gulp-babel-tests.ts @@ -1,5 +1,3 @@ -/// - import babel = require('gulp-babel'); var x: NodeJS.ReadWriteStream = babel(); diff --git a/gulp-batch/gulp-batch-tests.ts b/gulp-batch/gulp-batch-tests.ts new file mode 100644 index 0000000000..c5936eb031 --- /dev/null +++ b/gulp-batch/gulp-batch-tests.ts @@ -0,0 +1,8 @@ +import * as gulp from "gulp"; +import * as batch from "gulp-batch"; + +gulp.task('default', () => { + gulp.watch([ 'lib/**', 'test/**' ], batch((events: any, cb: any) => { + events.on('data', console.log).on('end', cb); + })); +}); diff --git a/gulp-batch/index.d.ts b/gulp-batch/index.d.ts new file mode 100644 index 0000000000..a3be8e252e --- /dev/null +++ b/gulp-batch/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for gulp-batch 1.0 +// Project: https://github.com/floatdrop/gulp-batch +// Definitions by: Alvaro Menezes , Vinicius Salomao +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function batch(opts?: any, cb?: any, errorHandler?: any): (event: any) => void; +declare namespace batch { } +export = batch; diff --git a/gulp-batch/tsconfig.json b/gulp-batch/tsconfig.json new file mode 100644 index 0000000000..1406137b98 --- /dev/null +++ b/gulp-batch/tsconfig.json @@ -0,0 +1,25 @@ +{ + "files": [ + "index.d.ts", + "gulp-batch-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "q": [ "q/v0" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/gulp-batch/tslint.json b/gulp-batch/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/gulp-batch/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/gulp-cache/tsconfig.json b/gulp-cache/tsconfig.json index 3126e1ef38..368718e5d1 100644 --- a/gulp-cache/tsconfig.json +++ b/gulp-cache/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-cached/tsconfig.json b/gulp-cached/tsconfig.json index 32f3759409..77ef9c0aa1 100644 --- a/gulp-cached/tsconfig.json +++ b/gulp-cached/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-changed/tsconfig.json b/gulp-changed/tsconfig.json index 4185d001ef..ab8e90a21d 100644 --- a/gulp-changed/tsconfig.json +++ b/gulp-changed/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-cheerio/gulp-cheerio-tests.ts b/gulp-cheerio/gulp-cheerio-tests.ts index 464abccead..e2d3bfe267 100644 --- a/gulp-cheerio/gulp-cheerio-tests.ts +++ b/gulp-cheerio/gulp-cheerio-tests.ts @@ -1,7 +1,3 @@ - - -/// - import cheerio = require('gulp-cheerio'); import gulp = require('gulp'); import Vinyl = require('vinyl'); diff --git a/gulp-cheerio/tsconfig.json b/gulp-cheerio/tsconfig.json index 254698a94e..d6cdfaac69 100644 --- a/gulp-cheerio/tsconfig.json +++ b/gulp-cheerio/tsconfig.json @@ -12,6 +12,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-coffeeify/tsconfig.json b/gulp-coffeeify/tsconfig.json index 54406ca98a..67e213beda 100644 --- a/gulp-coffeeify/tsconfig.json +++ b/gulp-coffeeify/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-coffeelint/tsconfig.json b/gulp-coffeelint/tsconfig.json index 2cc883884b..f1d388ddb7 100644 --- a/gulp-coffeelint/tsconfig.json +++ b/gulp-coffeelint/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-concat/tsconfig.json b/gulp-concat/tsconfig.json index 1f4acfd285..0d4c2e1c52 100644 --- a/gulp-concat/tsconfig.json +++ b/gulp-concat/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-copy/tsconfig.json b/gulp-copy/tsconfig.json index cc4c620b9f..0111f96820 100644 --- a/gulp-copy/tsconfig.json +++ b/gulp-copy/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-csso/tsconfig.json b/gulp-csso/tsconfig.json index 706fd106af..9519eac9b6 100644 --- a/gulp-csso/tsconfig.json +++ b/gulp-csso/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-debug/tsconfig.json b/gulp-debug/tsconfig.json index accf822a92..dac4ba0725 100644 --- a/gulp-debug/tsconfig.json +++ b/gulp-debug/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-dtsm/gulp-dtsm-tests.ts b/gulp-dtsm/gulp-dtsm-tests.ts index 54e12eff6a..dafc6b3468 100644 --- a/gulp-dtsm/gulp-dtsm-tests.ts +++ b/gulp-dtsm/gulp-dtsm-tests.ts @@ -1,6 +1,3 @@ - -/// - import * as dtsm from 'gulp-dtsm'; import * as gulp from 'gulp'; diff --git a/gulp-dtsm/tsconfig.json b/gulp-dtsm/tsconfig.json index 6003ac335b..872e75dd19 100644 --- a/gulp-dtsm/tsconfig.json +++ b/gulp-dtsm/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-espower/tsconfig.json b/gulp-espower/tsconfig.json index 1140a956aa..92f4388198 100644 --- a/gulp-espower/tsconfig.json +++ b/gulp-espower/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-file-include/tsconfig.json b/gulp-file-include/tsconfig.json index d166690ec5..d08b25fa2e 100644 --- a/gulp-file-include/tsconfig.json +++ b/gulp-file-include/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-filter/tsconfig.json b/gulp-filter/tsconfig.json index f217497fa9..c48a36bb69 100644 --- a/gulp-filter/tsconfig.json +++ b/gulp-filter/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-flatten/tsconfig.json b/gulp-flatten/tsconfig.json index 484a4e3aef..72d3110eaa 100644 --- a/gulp-flatten/tsconfig.json +++ b/gulp-flatten/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-gh-pages/tsconfig.json b/gulp-gh-pages/tsconfig.json index a6f5d411b1..44cffa6d99 100644 --- a/gulp-gh-pages/tsconfig.json +++ b/gulp-gh-pages/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-gzip/tsconfig.json b/gulp-gzip/tsconfig.json index 07e07f0cf5..4eea3f8d72 100644 --- a/gulp-gzip/tsconfig.json +++ b/gulp-gzip/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-help-doc/tsconfig.json b/gulp-help-doc/tsconfig.json index 646e8ad141..283808fe7b 100644 --- a/gulp-help-doc/tsconfig.json +++ b/gulp-help-doc/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-help/gulp-help-tests.ts b/gulp-help/gulp-help-tests.ts index 5d11bc23b7..ae7d0846e7 100644 --- a/gulp-help/gulp-help-tests.ts +++ b/gulp-help/gulp-help-tests.ts @@ -1,7 +1,3 @@ -/// - -'use strict'; - import gulpHelp = require('gulp-help'); var gulp = gulpHelp(require('gulp')); diff --git a/gulp-help/tsconfig.json b/gulp-help/tsconfig.json index d0647ad22a..f8e499e793 100644 --- a/gulp-help/tsconfig.json +++ b/gulp-help/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-html-replace/gulp-html-replace-tests.ts b/gulp-html-replace/gulp-html-replace-tests.ts index 568fb481fd..9a21a53b84 100644 --- a/gulp-html-replace/gulp-html-replace-tests.ts +++ b/gulp-html-replace/gulp-html-replace-tests.ts @@ -1,7 +1,3 @@ - - -/// - import * as gulp from 'gulp'; import * as htmlreplace from 'gulp-html-replace'; diff --git a/gulp-html-replace/tsconfig.json b/gulp-html-replace/tsconfig.json index 25eff60770..e074dcc546 100644 --- a/gulp-html-replace/tsconfig.json +++ b/gulp-html-replace/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-htmlmin/tsconfig.json b/gulp-htmlmin/tsconfig.json index 5d12b48035..964d06a7a1 100644 --- a/gulp-htmlmin/tsconfig.json +++ b/gulp-htmlmin/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-if/tsconfig.json b/gulp-if/tsconfig.json index f9db5297cf..6ea4d6a30b 100644 --- a/gulp-if/tsconfig.json +++ b/gulp-if/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-inject/tsconfig.json b/gulp-inject/tsconfig.json index 0201da00d9..c243f76d43 100644 --- a/gulp-inject/tsconfig.json +++ b/gulp-inject/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-insert/tsconfig.json b/gulp-insert/tsconfig.json index e548f022fa..aa58483b8a 100644 --- a/gulp-insert/tsconfig.json +++ b/gulp-insert/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-install/tsconfig.json b/gulp-install/tsconfig.json index 0b4494f7cd..79ecdd6cf1 100644 --- a/gulp-install/tsconfig.json +++ b/gulp-install/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-istanbul/tsconfig.json b/gulp-istanbul/tsconfig.json index f7ca4e96c7..f860b33143 100644 --- a/gulp-istanbul/tsconfig.json +++ b/gulp-istanbul/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-jade/tsconfig.json b/gulp-jade/tsconfig.json index b746e232bf..6b9c5c22c4 100644 --- a/gulp-jade/tsconfig.json +++ b/gulp-jade/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-jasmine-browser/tsconfig.json b/gulp-jasmine-browser/tsconfig.json index e5b112e90f..c347d86d35 100644 --- a/gulp-jasmine-browser/tsconfig.json +++ b/gulp-jasmine-browser/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-json-editor/tsconfig.json b/gulp-json-editor/tsconfig.json index 85846b46fd..8d6021c6f8 100644 --- a/gulp-json-editor/tsconfig.json +++ b/gulp-json-editor/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-jspm/tsconfig.json b/gulp-jspm/tsconfig.json index fbf318afab..e52189d99a 100644 --- a/gulp-jspm/tsconfig.json +++ b/gulp-jspm/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-less/tsconfig.json b/gulp-less/tsconfig.json index be38992302..4c9110c114 100644 --- a/gulp-less/tsconfig.json +++ b/gulp-less/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-load-plugins/tsconfig.json b/gulp-load-plugins/tsconfig.json index 77238a0e61..4e3ea0ba8c 100644 --- a/gulp-load-plugins/tsconfig.json +++ b/gulp-load-plugins/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-minify-css/tsconfig.json b/gulp-minify-css/tsconfig.json index 2d59793675..0b04647f28 100644 --- a/gulp-minify-css/tsconfig.json +++ b/gulp-minify-css/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-minify-html/tsconfig.json b/gulp-minify-html/tsconfig.json index 3e37896bd2..2b5f377a6c 100644 --- a/gulp-minify-html/tsconfig.json +++ b/gulp-minify-html/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-mocha/tsconfig.json b/gulp-mocha/tsconfig.json index aef5d2d758..3405efd531 100644 --- a/gulp-mocha/tsconfig.json +++ b/gulp-mocha/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-newer/tsconfig.json b/gulp-newer/tsconfig.json index ac02863c9b..53fd3b5fd5 100644 --- a/gulp-newer/tsconfig.json +++ b/gulp-newer/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-ng-annotate/tsconfig.json b/gulp-ng-annotate/tsconfig.json index 16f68955bb..b8b4d4fc6d 100644 --- a/gulp-ng-annotate/tsconfig.json +++ b/gulp-ng-annotate/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-nodemon/tsconfig.json b/gulp-nodemon/tsconfig.json index dc91f8e066..9af358b797 100644 --- a/gulp-nodemon/tsconfig.json +++ b/gulp-nodemon/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-plumber/tsconfig.json b/gulp-plumber/tsconfig.json index 878facc1f7..9f00169b06 100644 --- a/gulp-plumber/tsconfig.json +++ b/gulp-plumber/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-protractor/tsconfig.json b/gulp-protractor/tsconfig.json index 1141cf2042..667da98b75 100644 --- a/gulp-protractor/tsconfig.json +++ b/gulp-protractor/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-remember/tsconfig.json b/gulp-remember/tsconfig.json index e8ecc18bdc..f8ae755cca 100644 --- a/gulp-remember/tsconfig.json +++ b/gulp-remember/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-rename/tsconfig.json b/gulp-rename/tsconfig.json index 8a3a2c34dd..7276696b70 100644 --- a/gulp-rename/tsconfig.json +++ b/gulp-rename/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-replace/tsconfig.json b/gulp-replace/tsconfig.json index 5624a977d3..8b78b80dcc 100644 --- a/gulp-replace/tsconfig.json +++ b/gulp-replace/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-rev-replace/tsconfig.json b/gulp-rev-replace/tsconfig.json index b3fb130952..dfbd0d502f 100644 --- a/gulp-rev-replace/tsconfig.json +++ b/gulp-rev-replace/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-rev/tsconfig.json b/gulp-rev/tsconfig.json index ea7647e39a..b1f1715d28 100644 --- a/gulp-rev/tsconfig.json +++ b/gulp-rev/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-ruby-sass/tsconfig.json b/gulp-ruby-sass/tsconfig.json index 9465184b37..b6c74a2dd8 100644 --- a/gulp-ruby-sass/tsconfig.json +++ b/gulp-ruby-sass/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-sass/tsconfig.json b/gulp-sass/tsconfig.json index 26e1b2af4c..bec0180414 100644 --- a/gulp-sass/tsconfig.json +++ b/gulp-sass/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-shell/tsconfig.json b/gulp-shell/tsconfig.json index 81356de73d..ac0bc0cf3a 100644 --- a/gulp-shell/tsconfig.json +++ b/gulp-shell/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-size/tsconfig.json b/gulp-size/tsconfig.json index b1be4ca1dc..fe93b09ba6 100644 --- a/gulp-size/tsconfig.json +++ b/gulp-size/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-sort/tsconfig.json b/gulp-sort/tsconfig.json index 87097c7ad2..1921a1884c 100644 --- a/gulp-sort/tsconfig.json +++ b/gulp-sort/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-sourcemaps/tsconfig.json b/gulp-sourcemaps/tsconfig.json index e9c6d80281..9ce9bf808f 100644 --- a/gulp-sourcemaps/tsconfig.json +++ b/gulp-sourcemaps/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-strip-debug/tsconfig.json b/gulp-strip-debug/tsconfig.json index db20e2db69..572113b3cf 100644 --- a/gulp-strip-debug/tsconfig.json +++ b/gulp-strip-debug/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-svg-sprite/tsconfig.json b/gulp-svg-sprite/tsconfig.json index 381d78b150..82b417934a 100644 --- a/gulp-svg-sprite/tsconfig.json +++ b/gulp-svg-sprite/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-task-listing/tsconfig.json b/gulp-task-listing/tsconfig.json index 1f3b796968..fb06f0a926 100644 --- a/gulp-task-listing/tsconfig.json +++ b/gulp-task-listing/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-tsd/tsconfig.json b/gulp-tsd/tsconfig.json index a5738eb561..813e29fd74 100644 --- a/gulp-tsd/tsconfig.json +++ b/gulp-tsd/tsconfig.json @@ -11,6 +11,12 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-tslint/tsconfig.json b/gulp-tslint/tsconfig.json index 91d3edf8a3..46befdb599 100644 --- a/gulp-tslint/tsconfig.json +++ b/gulp-tslint/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-typedoc/tsconfig.json b/gulp-typedoc/tsconfig.json index 9d0f620269..f60478c1fa 100644 --- a/gulp-typedoc/tsconfig.json +++ b/gulp-typedoc/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-typescript/tsconfig.json b/gulp-typescript/tsconfig.json index fa6cbbc908..120791965a 100644 --- a/gulp-typescript/tsconfig.json +++ b/gulp-typescript/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-uglify/tsconfig.json b/gulp-uglify/tsconfig.json index 43db40e019..d0ae9de799 100644 --- a/gulp-uglify/tsconfig.json +++ b/gulp-uglify/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-useref/gulp-useref-tests.ts b/gulp-useref/gulp-useref-tests.ts index 1f1a152be0..9f2bd409d5 100644 --- a/gulp-useref/gulp-useref-tests.ts +++ b/gulp-useref/gulp-useref-tests.ts @@ -1,5 +1,3 @@ -/// - import * as gulp from 'gulp'; import * as useref from 'gulp-useref'; diff --git a/gulp-useref/tsconfig.json b/gulp-useref/tsconfig.json index 132913f9d8..67e8c2aaed 100644 --- a/gulp-useref/tsconfig.json +++ b/gulp-useref/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-util/tsconfig.json b/gulp-util/tsconfig.json index 06b269e0ed..44b42dbad1 100644 --- a/gulp-util/tsconfig.json +++ b/gulp-util/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp-watch/tsconfig.json b/gulp-watch/tsconfig.json index 7062be6f7e..9822101d39 100644 --- a/gulp-watch/tsconfig.json +++ b/gulp-watch/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/gulp/index.d.ts b/gulp/index.d.ts index 89b1a5dfa5..fefd5b0fda 100644 --- a/gulp/index.d.ts +++ b/gulp/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Gulp v3.8.x +// Type definitions for Gulp v4.0.x // Project: http://gulpjs.com -// Definitions by: Drew Noakes +// Definitions by: Drew Noakes , Juan Arroyave // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -10,6 +10,7 @@ import Orchestrator = require("orchestrator"); import VinylFile = require("vinyl"); +declare type Strings = string|string[]; declare namespace gulp { interface Gulp extends Orchestrator { @@ -24,6 +25,28 @@ declare namespace gulp { * */ task: Orchestrator.AddMethod; + /** + * Takes a number of task names or functions and returns a function of the composed tasks or functions + * When the returned function is executed, the tasks or functions will be executed in series, + * each waiting for the prior to finish. If an error occurs, execution will stop. + * @param A task name, a function or an array of either. + *
      + *
    • Take in a callback
    • + *
    • Return a stream or a promise
    • + *
    + */ + series: SeriesMethod; + /** + * Takes a number of task names or functions and returns a function of the composed tasks or functions + * When the returned function is executed, the tasks or functions will be executed in parallel, + * all being executed at the same time. If an error occurs, all execution will complete. + * @param A task name, a function or an array of either. + *
      + *
    • Take in a callback
    • + *
    • Return a stream or a promise
    • + *
    + */ + parallel: ParallelMethod; /** * Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins. * @param glob Glob or array of globs to read. @@ -105,6 +128,51 @@ declare namespace gulp { */ (glob: string|string[], opt?: SrcOptions): NodeJS.ReadWriteStream; } + interface SeriesMethod { + /** + * Takes a number of task names or functions and returns a function of the composed tasks or functions. + * When using task names, the task should already be registered. + * When the returned function is executed, the tasks or functions will be executed in series, + * each waiting for the prior to finish. If an error occurs, execution will stop. + * @param tasks, string, function or array of both. + */ + (...tasks: string[]): NodeJS.EventEmitter; + + (...tasks: Function[]): NodeJS.EventEmitter; + + (task: string|string[], ...fn: Function[]): NodeJS.EventEmitter; + + //TODO: TypeScript cannot express varargs followed by callback as a last argument... + (task1: Strings, task2: Strings, cb?: (error?: any) => any): Function; + (task1: Strings, task2: Strings, task3: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + (task1: Strings, task2: Strings, task3: Strings, task4: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, task6: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + + } + + interface ParallelMethod { + /** + * Takes a number of task names or functions and returns a function of the composed tasks or functions. + * When using task names, the task should already be registered. + * When the returned function is executed, the tasks or functions will be executed in parallel, + * all being executed at the same time. If an error occurs, all execution will complete. + * @param tasks, string, function or array of both. + */ + (...tasks: string[]): NodeJS.EventEmitter; + + (...tasks: Function[]): NodeJS.EventEmitter; + + (task: string|string[], ...fn: Function[]): NodeJS.EventEmitter; + + //TODO: TypeScript cannot express varargs followed by callback as a last argument... + (task1: Strings, task2: Strings, cb?: (error?: any) => any): Function; + (task1: Strings, task2: Strings, task3: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + (task1: Strings, task2: Strings, task3: Strings, task4: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + (task1: Strings, task2: Strings, task3: Strings, task4: Strings, task5: Strings, task6: Strings, cb?: (error?: any) => any): NodeJS.EventEmitter; + + } /** * Options to pass to node-glob through glob-stream. diff --git a/gulp/tsconfig.json b/gulp/tsconfig.json index f6670453d1..01afedbf29 100644 --- a/gulp/tsconfig.json +++ b/gulp/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/hammerjs/v1/hammerjs-tests.ts b/hammerjs/v1/hammerjs-tests.ts index bb006241fe..60d990c0bd 100644 --- a/hammerjs/v1/hammerjs-tests.ts +++ b/hammerjs/v1/hammerjs-tests.ts @@ -1,6 +1,3 @@ -/// - - // plugin check if (!Hammer.HAS_TOUCHEVENTS && !Hammer.HAS_POINTEREVENTS) { Hammer.plugins.fakeMultitouch(); diff --git a/handlebars/index.d.ts b/handlebars/index.d.ts index 96b0491040..d3ab2c80e3 100644 --- a/handlebars/index.d.ts +++ b/handlebars/index.d.ts @@ -10,6 +10,9 @@ declare namespace Handlebars { export function registerPartial(name: string, str: any): void; export function unregisterHelper(name: string): void; export function unregisterPartial(name: string): void; + export function registerDecorator(name: string, fn: Function): void; + export function unregisterDecorator(name: string): void; + export function K(): void; export function createFrame(object: any): any; export function Exception(message: string): void; @@ -26,7 +29,9 @@ declare namespace Handlebars { export var Utils: typeof hbs.Utils; export var logger: Logger; export var templates: HandlebarsTemplates; - export var helpers: any; + export var helpers: { [name: string]: Function }; + export var partials: { [name: string]: any }; + export var decorators: { [name: string]: Function }; export function registerDecorator(name: string, fn: Function): void; export function registerDecorator(obj: {[name: string] : Function}): void; diff --git a/handsontable/handsontable-tests.ts b/handsontable/handsontable-tests.ts index eb48441244..f744c10483 100644 --- a/handsontable/handsontable-tests.ts +++ b/handsontable/handsontable-tests.ts @@ -16,7 +16,7 @@ function test_HandsontableInit() { autoWrapRow: true, bindRowsWithHeaders: 'foo', cell: [], - cells: function() {}, + cells: () => { return; }, checkedTemplate: true, className: [], colHeaders: true, @@ -99,7 +99,7 @@ function test_HandsontableInit() { selectOptions: [], skipColumnOnPaste: true, sortByRelevance: true, - sortFunction: function() {}, + sortFunction: () => { return; }, sortIndicator: true, source: [], startCols: 123, @@ -114,7 +114,7 @@ function test_HandsontableInit() { type: 'foo', uncheckedTemplate: true, undo: true, - validator: function() {}, + validator: () => {return; }, viewportColumnRenderingOffset: 123, viewportRowRenderingOffset: 123, visibleRows: 123, @@ -122,86 +122,86 @@ function test_HandsontableInit() { wordWrap: true, // Hooks - afterAutofillApplyValues: function() {}, - afterCellMetaReset: function() {}, - afterChange: function() {}, - afterChangesObserved: function() {}, - afterColumnMove: function() {}, - afterColumnResize: function() {}, - afterColumnSort: function() {}, - afterContextMenuDefaultOptions: function() {}, - afterContextMenuHide: function() {}, - afterContextMenuShow: function() {}, - afterCopyLimit: function() {}, - afterCreateCol: function() {}, - afterCreateRow: function() {}, - afterDeselect: function() {}, - afterDestroy: function() {}, - afterDocumentKeyDown: function() {}, - afterFilter: function() {}, - afterGetCellMeta: function() {}, - afterGetColHeader: function() {}, - afterGetColumnHeaderRenderers: function() {}, - afterGetRowHeader: function() {}, - afterGetRowHeaderRenderers: function() {}, - afterInit: function() {}, - afterLoadData: function() {}, - afterMomentumScroll: function() {}, - afterOnCellCornerMouseDown: function() {}, - afterOnCellMouseDown: function() {}, - afterOnCellMouseOver: function() {}, - afterRemoveCol: function() {}, - afterRemoveRow: function() {}, - afterRender: function() {}, - afterRenderer: function() {}, - afterRowMove: function() {}, - afterRowResize: function() {}, - afterScrollHorizontally: function() {}, - afterScrollVertically: function() {}, - afterSelection: function() {}, - afterSelectionByProp: function() {}, - afterSelectionEnd: function() {}, - afterSelectionEndByProp: function() {}, - afterSetCellMeta: function() {}, - afterUpdateSettings: function() {}, - afterValidate: function() {}, - beforeAutofill: function() {}, - beforeCellAlignment: function() {}, - beforeChange: function() {}, - beforeChangeRender: function() {}, - beforeColumnMove: function() {}, - beforeColumnResize: function() {}, - beforeColumnSort: function() {}, - beforeDrawBorders: function() {}, - beforeFilter: function() {}, - beforeGetCellMeta: function() {}, - beforeInit: function() {}, - beforeInitWalkontable: function() {}, - beforeKeyDown: function() {}, - beforeOnCellMouseDown: function() {}, - beforeRemoveCol: function() {}, - beforeRemoveRow: function() {}, - beforeRender: function() {}, - beforeRenderer: function() {}, - beforeRowMove: function() {}, - beforeRowResize: function() {}, - beforeSetRangeEnd: function() {}, - beforeStretchingColumnWidth: function() {}, - beforeTouchScroll: function() {}, - beforeValidate: function() {}, - construct: function() {}, - init: function() {}, - modifyCol: function() {}, - modifyColHeader: function() {}, - modifyColWidth: function() {}, - modifyCopyableRange: function() {}, - modifyRow: function() {}, - modifyRowHeader: function() {}, - modifyRowHeight: function() {}, - persistentStateLoad: function() {}, - persistentStateReset: function() {}, - persistentStateSave: function() {}, - unmodifyCol: function() {} + afterAutofillApplyValues: () => {return; }, + afterCellMetaReset: () => {return; }, + afterChange: () => {return; }, + afterChangesObserved: () => {return; }, + afterColumnMove: () => {return; }, + afterColumnResize: () => {return; }, + afterColumnSort: () => {return; }, + afterContextMenuDefaultOptions: () => {return; }, + afterContextMenuHide: () => {return; }, + afterContextMenuShow: () => {return; }, + afterCopyLimit: () => {return; }, + afterCreateCol: () => {return; }, + afterCreateRow: () => {return; }, + afterDeselect: () => {return; }, + afterDestroy: () => {return; }, + afterDocumentKeyDown: () => {return; }, + afterFilter: () => {return; }, + afterGetCellMeta: () => {return; }, + afterGetColHeader: () => {return; }, + afterGetColumnHeaderRenderers: () => {return; }, + afterGetRowHeader: () => {return; }, + afterGetRowHeaderRenderers: () => {return; }, + afterInit: () => {return; }, + afterLoadData: () => {return; }, + afterMomentumScroll: () => {return; }, + afterOnCellCornerMouseDown: () => {return; }, + afterOnCellMouseDown: () => {return; }, + afterOnCellMouseOver: () => {return; }, + afterRemoveCol: () => {return; }, + afterRemoveRow: () => {return; }, + afterRender: () => {return; }, + afterRenderer: () => {return; }, + afterRowMove: () => {return; }, + afterRowResize: () => {return; }, + afterScrollHorizontally: () => {return; }, + afterScrollVertically: () => {return; }, + afterSelection: () => {return; }, + afterSelectionByProp: () => {return; }, + afterSelectionEnd: () => {return; }, + afterSelectionEndByProp: () => {return; }, + afterSetCellMeta: () => {return; }, + afterUpdateSettings: () => {return; }, + afterValidate: () => {return; }, + beforeAutofill: () => {return; }, + beforeCellAlignment: () => {return; }, + beforeChange: () => {return; }, + beforeChangeRender: () => {return; }, + beforeColumnMove: () => {return; }, + beforeColumnResize: () => {return; }, + beforeColumnSort: () => {return; }, + beforeDrawBorders: () => {return; }, + beforeFilter: () => {return; }, + beforeGetCellMeta: () => {return; }, + beforeInit: () => {return; }, + beforeInitWalkontable: () => {return; }, + beforeKeyDown: () => {return; }, + beforeOnCellMouseDown: () => {return; }, + beforeRemoveCol: () => {return; }, + beforeRemoveRow: () => {return; }, + beforeRender: () => {return; }, + beforeRenderer: () => {return; }, + beforeRowMove: () => {return; }, + beforeRowResize: () => {return; }, + beforeSetRangeEnd: () => {return; }, + beforeStretchingColumnWidth: () => {return; }, + beforeTouchScroll: () => {return; }, + beforeValidate: () => {return; }, + construct: () => {return; }, + init: () => {return; }, + modifyCol: () => {return; }, + modifyColHeader: () => {return; }, + modifyColWidth: () => {return; }, + modifyCopyableRange: () => {return; }, + modifyRow: () => {return; }, + modifyRowHeader: () => {return; }, + modifyRowHeight: () => {return; }, + persistentStateLoad: () => {return; }, + persistentStateReset: () => {return; }, + persistentStateSave: () => {return; }, + unmodifyCol: () => {return; } }); } @@ -269,10 +269,10 @@ function test_HandsontableMethods() { hot.propToCol('foo'); hot.propToCol(123); hot.removeCellMeta(123, 123, 'foo'); - hot.removeHook('foo', function() {}); + hot.removeHook('foo', () => {return; }); hot.render(); hot.rowOffset(); - hot.runHooks('foo', 123, 'foo', true, {}, [], function() {}); + hot.runHooks('foo', 123, 'foo', true, {}, [], () => {return; }); hot.selectCell(123, 123, 123, 123, true, true); hot.selectCellByProp(123, 'foo', 123, 'foo', true); hot.setCellMeta(123, 123, 'foo', 'foo'); @@ -281,11 +281,21 @@ function test_HandsontableMethods() { hot.setDataAtRowProp(123, 'foo', 'foo', 'foo'); hot.spliceCol(123, 123, 123, 'foo'); hot.spliceRow(123, 123, 123, 'foo'); + hot.toPhysicalRow(123); + hot.toPhysicalColumn(123); + hot.toVisualRow(123); + hot.toVisualColumn(123); hot.unlisten(); hot.updateSettings({}, true); - hot.validateCells(function() {}); - + hot.validateCells(() => {return; }); + Handsontable.renderers.NumericRenderer(hot, new HTMLTableDataCellElement(), 0, 0, "prop", 1.235, {}); Handsontable.renderers.TextRenderer(hot, new HTMLTableDataCellElement(), 0, 0, "prop", 1.235, {}); - Handsontable.Dom.addEvent(new HTMLElement(), "eventName", () => {}); + Handsontable.Dom.addEvent(new HTMLElement(), "eventName", () => { return; }); } + +class MyCustomHotPlugin extends Handsontable.plugins.BasePlugin { + isEnabled(): boolean { + return !!this.hot.getSettings().manualRowMove; + } +} \ No newline at end of file diff --git a/handsontable/index.d.ts b/handsontable/index.d.ts index eeef57394e..e569ee58f7 100644 --- a/handsontable/index.d.ts +++ b/handsontable/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Handsontable 0.24.3 +// Type definitions for Handsontable 0.30 // Project: https://handsontable.com/ // Definitions by: Handsoncode sp. z o.o. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\ @@ -251,7 +251,7 @@ declare namespace ht { getSchema(): Object; getSelected(): any[]; getSelectedRange(): Range; - getSettings(): Object; + getSettings(): Options; getSourceData(r?: number, c?: number, r2?: number, c2?: number): any[]; getSourceDataAtCell(row: number, column: number): any; getSourceDataAtCol(column: number): any[]; @@ -280,8 +280,12 @@ declare namespace ht { setDataAtRowProp(row: number|any[], prop: string, value: string, source?: string): void; spliceCol(col: number, index: number, amount: number, elements?: any): void; spliceRow(row: number, index: number, amount: number, elements?: any): void; + toPhysicalRow(row: number): number; + toPhysicalColumn(column: number): number; + toVisualRow(row: number): number; + toVisualColumn(column: number): number; unlisten(): void; - updateSettings(settings: Object, init: boolean): void; + updateSettings(settings: Object, init?: boolean): void; validateCells(callback: Function): void; } @@ -302,61 +306,215 @@ declare namespace ht { } interface ColumnProperties extends CellProperties { - data?: string; - editor?: string; + data?: string | number; + title?: string; + editor?: string | EditorConstructor; selectOptions?: any[]; + width?: number; + } interface CellProperties { - renderer?: ( - instance: Methods, - td: HTMLTableDataCellElement, - row: number, - col: number, - prop: string, - value: any, - tdCellProperties: Object) => void; + renderer?: CellRenderer; type?: string; readOnly?: boolean; language?: string; format?: string; - validator?: (value: string, callback: (condition: boolean) => void) => void; + validator?: Validator; + allowInvalid?: boolean; + className?: string; } interface CellPosition { row: number; col: number; } + + // so that you can write custom plugins in typescript + interface BasePlugin { + init(): void; + enablePlugin(): void; + disablePlugin(): void; + addHook(name: string, callback: Function): void; + removeHooks(name: string): void; + clearHooks(): void; + callOnPluginsReady(callback: Function): void; + updatePlugin(): void; + destroy(): void; + enabled: boolean; + hot: Methods; + } + + interface PluginConstructor { + new (hotInstance: Methods): BasePlugin; + } + + interface ContextMenuPluginConstructor extends PluginConstructor { + SEPARATOR: string; + } + + interface Plugins { + AutoColumnSize: PluginConstructor; + AutoRowSizeAutoRowSize: PluginConstructor; + BasePlugin: PluginConstructor; + BindRowsWithHeaders: PluginConstructor; + CollapsibleColumns: PluginConstructor; + ColumnSorting: PluginConstructor; + ColumnSummary: PluginConstructor; + Comments: PluginConstructor; + ContextMenu: ContextMenuPluginConstructor; + ContextMenuCopyPaste: PluginConstructor; + DragToScroll: PluginConstructor; + DropdownMenu: PluginConstructor; + ExportFile: PluginConstructor; + Filters: PluginConstructor; + Formulas: PluginConstructor; + GanttChart: PluginConstructor; + HeaderTooltips: PluginConstructor; + HiddenColumns: PluginConstructor; + HiddenRows: PluginConstructor; + ManualColumnFreeze: PluginConstructor; + ManualColumnMove: PluginConstructor; + ManualColumnResize: PluginConstructor; + ManualRowMove: PluginConstructor; + ManualRowResize: PluginConstructor; + MultipleSelectionHandles: PluginConstructor; + NestedHeaders: PluginConstructor; + NestedRows: PluginConstructor; + ObserveChanges: PluginConstructor; + TouchScroll: PluginConstructor; + TrimRows: PluginConstructor; + registerPlugin(pluginName: string, PluginClass: PluginConstructor): void; + } + + interface Hooks { + register(key: string): void; + run(instace: ht.Methods, hookName: string, key?: any, value?: any): any; + } + + interface Dom { + addEvent(element: HTMLElement, eventName: string, callback: Function): void; + addClass(element: HTMLElement, className: string | string[]): void; + removeClass(element: HTMLElement, className: string | string[]): void; + offset(element: HTMLElement): any; + getWindowScrollLeft(): number; + getWindowScrollTop(): number; + outerHeight(element: HTMLElement): number; + hasClass(element: HTMLElement, className: string): boolean | undefined; + } + + interface ArrayMapper { + clearMap(): void; + getIndexByValue(value: any): number; + getValueByIndex(index: number): any; + insertItems(index: number, amount?: number): number[]; + removeItems(index: number | number[], amount?: number): number[]; + unshiftItems(index: number | number[], amount?: number): void; + shiftItems(index: number, amount?: number): void; + } + + interface Utils { + arrayMapper: ArrayMapper; + } + + interface Helper { + arrayFilter(array: any[], predicate: Function): any[]; + arrayEach(array: any[], predicate: Function): void; + arrayMap(array: any[], predicate: Function): any[]; + arrayReduce(array: any[], predicate: Function, initialValue?: any): any; + objectEach(obj: any, predicate: Function): void; + rangeEach(rangeFrom: number, rangeTo: number | Function, iteratee?: Function): void; + mixin(Base: any, ...mixins: any[]): void; + isNumeric(number: any): boolean; + createSpreadsheetData(rows: number, columns: number): any; + } + + type CellRenderer = ( + instance: Methods, + td: HTMLTableCellElement, + row: number, + col: number, + prop: string, + value: any, + cellProperties: any) => void; + + interface Editor { + open(): void; + } + + interface EditorConstructor { + new (instance: Methods): Editor; + } + + interface Editors { + TextEditor: EditorConstructor; + } + + type Validator = (value: string, callback: (condition: boolean) => void) => void; + + interface Renderers { + TextRenderer: CellRenderer; + NumericRenderer: CellRenderer; + AutocompleteRenderer: CellRenderer; + } + + type AsyncAutocompleteSourceFunction = (query: string, process: (values: any[]) => void) => void; + + interface AutocompleteColumn extends ColumnProperties { + source?: any[] | AsyncAutocompleteSourceFunction; + strict?: boolean; + trimDropdown?: boolean; + } + + interface DateColumn extends ColumnProperties { + dateFormat?: string; + correctFormat?: boolean; + } + + interface NumericColumn extends ColumnProperties { + format?: string; + language?: string; + } + + interface CheckboxColumnLabel { + position?: 'before' | 'after'; + property?: string; + value: string; + } + + interface CheckboxColumn extends ColumnProperties { + checkedTemplate?: any; + uncheckedTemplate?: any; + label?: CheckboxColumnLabel; + } + + type CellMetaFunction = (row: number, column: number, prop: string) => void; + + type DropdownColumn = AutocompleteColumn; } - declare var Handsontable: { - new (element: Element, options: ht.Options): ht.Methods; - renderers: { - TextRenderer( - instance: any, - td: HTMLTableCellElement, - row: number, - col: number, - prop: string, - value: any, - cellProperties: any): void; - NumericRenderer( - instance: any, - td: HTMLTableCellElement, - row: number, - col: number, - prop: string, - value: any, - cellProperties: any): void; - } - Dom: { - addEvent(element: HTMLElement, eventName: string, callback: Function): void; - } + new (element: Element, options: ht.Options): ht.Methods; + plugins: ht.Plugins; + hooks: ht.Hooks; + Dom: ht.Dom; + dom: ht.Dom; + helper: ht.Helper; + utils: ht.Utils; + renderers: ht.Renderers; + editors: ht.Editors; }; declare module "handsontable" { export var Handsontable: { new (element: Element, options: ht.Options): ht.Methods; + plugins: ht.Plugins; + hooks: ht.Hooks; + Dom: ht.Dom; + dom: ht.Dom; + helper: ht.Helper; + utils: ht.Utils; + renderers: ht.Renderers; + editors: ht.Editors; }; } diff --git a/handsontable/tslint.json b/handsontable/tslint.json new file mode 100644 index 0000000000..14c6526bd1 --- /dev/null +++ b/handsontable/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../tslint.json", + "rules": { + "forbidden-types": false, + "no-single-declare-module": false + } +} \ No newline at end of file diff --git a/hapi-auth-jwt2/tsconfig.json b/hapi-auth-jwt2/tsconfig.json index 3bbd249dc8..727deb9122 100644 --- a/hapi-auth-jwt2/tsconfig.json +++ b/hapi-auth-jwt2/tsconfig.json @@ -19,4 +19,4 @@ "index.d.ts", "hapi-auth-jwt2-tests.ts" ] -} \ No newline at end of file +} diff --git a/har-format/har-format-tests.ts b/har-format/har-format-tests.ts new file mode 100644 index 0000000000..9a226d150c --- /dev/null +++ b/har-format/har-format-tests.ts @@ -0,0 +1,101 @@ +import * as harFormat from "har-format"; + +const testCreator: harFormat.Creator = { + name: "WebInspector", + version: "537.36" +}; + +const testPageTiming: harFormat.PageTiming = { + onContentLoad: 1995.6460000003062, + onLoad: 4262.566999999763 +}; + +const testPage: harFormat.Page = { + startedDateTime: "2017-02-11T09:36:22.868Z", + id: "page_1", + title: "https://github.com/", + pageTimings: testPageTiming +}; + +const testHeader: harFormat.Header = { + name: "Accept", + value: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" +}; + +const testRequest: harFormat.Request = { + method: "GET", + url: "https://github.com/", + httpVersion: "HTTP/1.1", + headers: [testHeader], + queryString: [], + cookies: [], + headersSize: 425, + bodySize: 0 +}; + +const testHeaders: harFormat.Header = { + name: "Content-Encoding", + value: "gzip" +}; + +const testCookie: harFormat.Cookie = { + name: "logged_in", + value: "no", + path: "/", + domain: ".github.com", + expires: "2037-02-11T09:36:23.000Z", + httpOnly: true, + secure: true +}; + +const testContent: harFormat.Content = { + size: 26915, + mimeType: "text/html", + compression: 18635 +}; + +const testResponse: harFormat.Response = { + status: 200, + statusText: "OK", + httpVersion: "HTTP/1.1", + headers: [testHeaders], + cookies: [testCookie], + content: testContent, + redirectURL: "", + headersSize: 2084, + bodySize: 8280, + _transferSize: 10364 +}; + +const testTimings: harFormat.Timings = { + blocked: 0.439999999798602, + dns: 39.6150000005946, + connect: 483.8799999997718, + send: 0.06899999971199122, + wait: 287.516999999753, + receive: 5.289000000629585, + ssl: 244.02999999983808 +}; + +const testEntry: harFormat.Entry = { + startedDateTime: "2017-02-11T09:36:22.868Z", + time: 816.8100000002596, + request: testRequest, + response: testResponse, + cache: {}, + timings: testTimings, + serverIPAddress: "192.30.253.113", + connection: "26487", + pageref: "page_1" +}; + +const testLog: harFormat.Log = { + version: "1.2", + creator: testCreator, + pages: [testPage], + entries: [testEntry] +}; + +const harFile: harFormat.Har = { + log: testLog +}; diff --git a/har-format/index.d.ts b/har-format/index.d.ts new file mode 100644 index 0000000000..7aaf479891 --- /dev/null +++ b/har-format/index.d.ts @@ -0,0 +1,811 @@ +// Type definitions for HAR 1.2 +// Project: https://w3c.github.io/web-performance/specs/HAR/Overview.html +// Definitions by: Michael Mrowetz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +/** + * HTTP Archive 1.2 + * + * http://www.softwareishard.com/blog/har-12-spec + */ +export interface Har { + /** This object represents the root of exported data. */ + "log": Log; +} +/** + * This object (`log`) represents the root of exported data. + * + * http://www.softwareishard.com/blog/har-12-spec/#log + */ +export interface Log { + /** + * Version number of the format. + * + * _If empty, string "1.1" is assumed by default._ + */ + version: string; + /** Name and version info of the log creator application. */ + creator: Creator; + /** Name and version info of used browser. */ + browser?: Browser; + /** + * List of all exported (tracked) pages. + * + * _Leave out this field if the application + * does not support grouping by pages._ + * + * There is one `` object for every exported web page and one + * `` object for every HTTP request. + * In case when an HTTP trace tool isn't able to group requests by a page, + * the `` object is empty and individual requests doesn't have a + * parent page. + */ + pages?: Page[]; + /** List of all exported (tracked) requests. */ + entries: Entry[]; + /** A comment provided by the user or the application. */ + comment?: string; +} +/** + * Infos about application/browser used to export the log. + * + * `Creator` and `Browser` objects share the same structure. + * + * http://www.softwareishard.com/blog/har-12-spec/#creator + */ +export interface Creator { + /** Name of the application/browser used to export the log. */ + name: string; + /** Version of the application/browser used to export the log. */ + version: string; + /** A comment provided by the user or the application. */ + comment?: string; +} +/** + * Infos about application/browser used to export the log. + * + * `Browser` and `Creator` objects share the same structure. + * + * http://www.softwareishard.com/blog/har-12-spec/#browser + */ +export interface Browser { + /** Name of the application/browser used to export the log. */ + name: string; + /** Version of the application/browser used to export the log. */ + version: string; + /** A comment provided by the user or the application. */ + comment?: string; +} +/** + * This object represents list of exported pages. + * + * http://www.softwareishard.com/blog/har-12-spec/#pages + */ +export interface Page { + /** Date and time stamp for the beginning of the page load + * + * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`, + * e.g. `2009-07-24T19:20:30.45+01:00`). + */ + startedDateTime: string; + /** + * Unique identifier of a page within the `` (HAR doc). + * Entries use it to refer the parent page. + */ + id: string; + /** Page title. */ + title: string; + /** Detailed timing info about page load */ + pageTimings: PageTiming; + /** A comment provided by the user or the application */ + comment?: string; + /** _non-standard_ */ + /** _non-standard_ */ + _adult_site?: number; + /** _non-standard_ */ + _aft?: number; + /** _non-standard_ */ + _base_page_cdn?: string; + /** _non-standard_ */ + _base_page_redirects?: number; + /** _non-standard_ */ + _base_page_ttfb?: number; + /** _non-standard_ */ + _browser_main_memory_kb?: number; + /** _non-standard_ */ + _browser_name?: string; + /** _non-standard_ */ + _browser_other_private_memory_kb?: number; + /** _non-standard_ */ + _browser_process_count?: number; + /** _non-standard_ */ + _browser_version?: string; + /** _non-standard_ */ + _browser_working_set_kb?: number; + /** _non-standard_ */ + _bytesIn?: number; + /** _non-standard_ */ + _bytesInDoc?: number; + /** _non-standard_ */ + _bytesOut?: number; + /** _non-standard_ */ + _bytesOutDoc?: number; + /** _non-standard_ */ + _cached?: number; + /** _non-standard_ */ + _certificate_bytes?: number; + /** _non-standard_ */ + _connections?: number; + /** _non-standard_ */ + _date?: number; + /** _non-standard_ */ + _docCPUms?: number; + /** _non-standard_ */ + _docCPUpct?: number; + /** _non-standard_ */ + _docTime?: number; + /** _non-standard_ */ + _domContentLoadedEventEnd?: number; + /** _non-standard_ */ + _domContentLoadedEventStart?: number; + /** _non-standard_ */ + _domElements?: number; + /** _non-standard_ */ + _domInteractive?: number; + /** _non-standard_ */ + _domLoading?: number; + /** _non-standard_ */ + _domTime?: number; + /** _non-standard_ */ + _effectiveBps?: number; + /** _non-standard_ */ + _effectiveBpsDoc?: number; + /** _non-standard_ */ + _eventName?: string; + /** _non-standard_ */ + _firstPaint?: number; + /** _non-standard_ */ + _fixed_viewport?: number; + /** _non-standard_ */ + _fullyLoaded?: number; + /** _non-standard_ */ + _fullyLoadedCPUms?: number; + /** _non-standard_ */ + _fullyLoadedCPUpct?: number; + /** _non-standard_ */ + _gzip_savings?: number; + /** _non-standard_ */ + _gzip_total?: number; + /** _non-standard_ */ + _image_savings?: number; + /** _non-standard_ */ + _image_total?: number; + /** _non-standard_ */ + _isResponsive?: number; + /** _non-standard_ */ + _lastVisualChange?: number; + /** _non-standard_ */ + _loadEventEnd?: number; + /** _non-standard_ */ + _loadEventStart?: number; + /** _non-standard_ */ + _loadTime?: number; + /** _non-standard_ */ + _minify_savings?: number; + /** _non-standard_ */ + _minify_total?: number; + /** _non-standard_ */ + _optimization_checked?: number; + /** _non-standard_ */ + _pageSpeedVersion?: string; + /** _non-standard_ */ + _render?: number; + /** _non-standard_ */ + _requests?: number; + /** _non-standard_ */ + _requestsDoc?: number; + /** _non-standard_ */ + _requestsFull?: number; + /** _non-standard_ */ + _responses_200?: number; + /** _non-standard_ */ + _responses_404?: number; + /** _non-standard_ */ + _responses_other?: number; + /** _non-standard_ */ + _result?: number; + /** _non-standard_ */ + _run?: number; + /** _non-standard_ */ + _score_cache?: number; + /** _non-standard_ */ + _score_cdn?: number; + /** _non-standard_ */ + _score_combine?: number; + /** _non-standard_ */ + _score_compress?: number; + /** _non-standard_ */ + _score_cookies?: number; + /** _non-standard_ */ + _score_etags?: number; + /** _non-standard_ */ + _score_gzip?: number; + /** _non-standard_ */ + "_score_keep-alive"?: number; + /** _non-standard_ */ + _score_minify?: number; + /** _non-standard_ */ + _score_progressive_jpeg?: number; + /** _non-standard_ */ + _server_count?: number; + /** _non-standard_ */ + _server_rtt?: number; + /** _non-standard_ */ + _SpeedIndex?: number; + /** _non-standard_ */ + _step?: number; + /** _non-standard_ */ + _title?: string; + /** _non-standard_ */ + _titleTime?: number; + /** _non-standard_ */ + _TTFB?: number; + /** _non-standard_ */ + _URL?: string; + /** _non-standard_ */ + _visualComplete?: number; +} +/** + * This object describes timings for various events (states) fired during the + * page load. + * + * All times are specified in milliseconds. + * + * If a time info is not available appropriate field is set to `-1`. + * + * http://www.softwareishard.com/blog/har-12-spec/#pageTimings + */ +export interface PageTiming { + /** Content of the page loaded. Number of milliseconds since page load + * started (`page.startedDateTime`). + * + * Use `-1` if the timing does not apply to the current request. + */ + onContentLoad?: number; + /** Page is loaded (`onLoad` event fired). Number of milliseconds since + * page load started (`page.startedDateTime`). + * + * Use `-1` if the timing does not apply to the current request. + */ + onLoad?: number; + /** A comment provided by the user or the application */ + comment?: string; + _startRender?: number; +} +/** + * This object represents an array with all exported HTTP requests. Sorting + * entries by `startedDateTime` (starting from the oldest) is preferred way how + * to export data since it can make importing faster. + * However the reader application should always make sure the array is sorted + * (if required for the import). + * + * http://www.softwareishard.com/blog/har-12-spec/#entries + */ +export interface Entry { + /** + * Reference to the parent page. Leave out this field if the application + * does not support grouping by pages. + */ + pageref?: string; + /** + * Date and time stamp of the request start + * + * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`). + */ + startedDateTime: string; + /** + * Total elapsed time of the request in milliseconds. + * + * This is the sum of all timings available in the timings object + * (i.e. not including `-1` values). + */ + time: number; + /** Detailed info about the request. */ + request: Request; + /** Detailed info about the response. */ + response: Response; + /** Info about cache usage. */ + cache: Cache; + /** Detailed timing info about request/response round trip. */ + timings: Timings; + /** + * IP address of the server that was connected + * (result of DNS resolution). + */ + serverIPAddress?: string; + /** + * Unique ID of the parent TCP/IP connection, can be the client or server + * port number. + * + * Note that a port number doesn't have to be unique identifier + * in cases where the port is shared for more connections. + * + * If the port isn't available for the application, any other unique + * connection ID can be used instead (e.g. connection index). Leave out + * this field if the application doesn't support this info. + */ + connection?: string; + /** A comment provided by the user or the application */ + comment?: string; + /** _non-standard_ */ + _all_end?: number | string; + /** _non-standard_ */ + _all_ms?: number | string; + /** _non-standard_ */ + _all_start?: number | string; + /** _non-standard_ */ + _bytesIn?: number | string; + /** _non-standard_ */ + _bytesOut?: number | string; + /** _non-standard_ */ + _cacheControl?: string; + /** _non-standard_ */ + _cache_time?: number | string; + /** _non-standard_ */ + _cdn_provider?: string; + /** _non-standard_ */ + _certificate_bytes?: number | string; + /** _non-standard_ */ + _client_port?: number | string; + /** _non-standard_ */ + _connect_end?: number | string; + /** _non-standard_ */ + _connect_ms?: number | string; + /** _non-standard_ */ + _connect_start?: number | string; + /** _non-standard_ */ + _contentEncoding?: string; + /** _non-standard_ */ + _contentType?: string; + /** _non-standard_ */ + _dns_end?: number | string; + /** _non-standard_ */ + _dns_ms?: number | string; + /** _non-standard_ */ + _dns_start?: number | string; + /** _non-standard_ */ + _download_end?: number | string; + /** _non-standard_ */ + _download_ms?: number | string; + /** _non-standard_ */ + _download_start?: number | string; + /** _non-standard_ */ + _expires?: string; + /** _non-standard_ */ + _full_url?: string; + /** _non-standard_ */ + _gzip_save?: number | string; + /** _non-standard_ */ + _gzip_total?: number | string; + /** _non-standard_ */ + _host?: string; + /** _non-standard_ */ + _http2_stream_dependency?: number | string; + /** _non-standard_ */ + _http2_stream_exclusive?: number | string; + /** _non-standard_ */ + _http2_stream_id?: number | string; + /** _non-standard_ */ + _http2_stream_weight?: number | string; + /** _non-standard_ */ + _image_save?: number | string; + /** _non-standard_ */ + _image_total?: number | string; + /** _non-standard_ */ + _index?: number; + /** _non-standard_ */ + _initiator?: string; + /** _non-standard_ */ + _initiator_column?: string; + /** _non-standard_ */ + _initiator_detail?: string; + /** _non-standard_ */ + _initiator_function?: string; + /** _non-standard_ */ + _initiator_line?: string; + /** _non-standard_ */ + _initiator_type?: string; + /** _non-standard_ */ + _ip_addr?: string; + /** _non-standard_ */ + _is_secure?: number | string; + /** _non-standard_ */ + _jpeg_scan_count?: number | string; + /** _non-standard_ */ + _load_end?: number | string; + /** _non-standard_ */ + _load_ms?: number | string; + /** _non-standard_ */ + _load_start?: number | string; + /** _non-standard_ */ + _method?: string; + /** _non-standard_ */ + _minify_save?: number | string; + /** _non-standard_ */ + _minify_total?: number | string; + /** _non-standard_ */ + _number?: number; + /** _non-standard_ */ + _objectSize?: number | string; + /** _non-standard_ */ + _objectSizeUncompressed?: number | string; + /** _non-standard_ */ + _priority?: string; + /** _non-standard_ */ + _protocol?: number | string; + /** _non-standard_ */ + _request_id?: number | string; + /** _non-standard_ */ + _responseCode?: number | string; + /** _non-standard_ */ + _score_cache?: number | string; + /** _non-standard_ */ + _score_cdn?: number | string; + /** _non-standard_ */ + _score_combine?: number | string; + /** _non-standard_ */ + _score_compress?: number | string; + /** _non-standard_ */ + _score_cookies?: number | string; + /** _non-standard_ */ + _score_etags?: number | string; + /** _non-standard_ */ + _score_gzip?: number | string; + /** _non-standard_ */ + "_score_keep-alive"?: number | string; + /** _non-standard_ */ + _score_minify?: number | string; + /** _non-standard_ */ + _score_progressive_jpeg?: number; + /** _non-standard_ */ + _server_count?: number | string; + /** _non-standard_ */ + _server_rtt?: number | string; + /** _non-standard_ */ + _socket?: number | string; + /** _non-standard_ */ + _ssl_end?: number | string; + /** _non-standard_ */ + _ssl_ms?: number | string; + /** _non-standard_ */ + _ssl_start?: number | string; + /** _non-standard_ */ + _ttfb_end?: number | string; + /** _non-standard_ */ + _ttfb_ms?: number | string; + /** _non-standard_ */ + _ttfb_start?: number | string; + /** _non-standard_ */ + _type?: number | string; + /** _non-standard_ */ + _url?: string; + /** _non-standard_ */ + _was_pushed?: number | string; + /** _non-standard_ */ + _initialPriority?: string; +} +/** + * This object contains detailed info about performed request. + * + * http://www.softwareishard.com/blog/har-12-spec/#request + */ +export interface Request { + /** Request method (`GET`, `POST`, ...). */ + method: string; + /** Absolute URL of the request (fragments are not included). */ + url: string; + /** Request HTTP Version. */ + httpVersion: string; + /** List of cookie objects. */ + cookies: Cookie[]; + /** List of header objects. */ + headers: Header[]; + /** List of query parameter objects. */ + queryString: QueryString[]; + /** Posted data info. */ + postData?: PostData; + /** + * Total number of bytes from the start of the HTTP request message until + * (and including) the double CRLF before the body. + * + * Set to `-1` if the info is not available. + */ + headersSize: number; + /** + * Size of the request body (POST data payload) in bytes. + * + * Set to `-1` if the info is not available. + */ + bodySize: number; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * This object contains detailed info about the response. + * + * http://www.softwareishard.com/blog/har-12-spec/#response + */ +export interface Response { + /** Response status. */ + status: number; + /** Response status description. */ + statusText: string; + /** Response HTTP Version. */ + httpVersion: string; + /** List of cookie objects. */ + cookies: Cookie[]; + /** List of header objects. */ + headers: Header[]; + /** Details about the response body. */ + content: Content; + /** Redirection target URL from the Location response header. */ + redirectURL: string; + /** + * Total number of bytes from the start of the HTTP response message until + * (and including) the double CRLF before the body. + * + * Set to `-1` if the info is not available. + * + * _The size of received response-headers is computed only from headers + * that are really received from the server. Additional headers appended by + * the browser are not included in this number, but they appear in the list + * of header objects._ + */ + headersSize: number; + /** Size of the received response body in bytes. + * + * - Set to zero in case of responses coming from the cache (`304`). + * - Set to `-1` if the info is not available. + */ + bodySize: number; + /** A comment provided by the user or the application */ + comment?: string; + /** _non-standard_ */ + _transferSize?: number; +} +/** + * This object contains list of all cookies (used in `request` and `response` + * objects). + * + * http://www.softwareishard.com/blog/har-12-spec/#cookies + */ +export interface Cookie { + /** The name of the cookie. */ + name: string; + /** The cookie value. */ + value: string; + /** The path pertaining to the cookie. */ + path?: string; + /** The host of the cookie. */ + domain?: string; + /** + * Cookie expiration time. + * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`, + * e.g. `2009-07-24T19:20:30.123+02:00`). + */ + expires?: string | Date | null; + /** Set to true if the cookie is HTTP only, false otherwise. */ + httpOnly?: boolean; + /** True if the cookie was transmitted over ssl, false otherwise. */ + secure?: boolean; + /** A comment provided by the user or the application */ + comment?: string; +} + +/** + * This object represents a headers (used in `request` and `response` objects). + * + * http://www.softwareishard.com/blog/har-12-spec/#headers + */ +export interface Header { + name: string; + value: string; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * This object represents a parameter & value parsed from a query string, + * if any (embedded in `request` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#queryString + */ +export interface QueryString { + name: string; + value: string; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * This object describes posted data, if any (embedded in `request` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#postData + */ +export interface PostData { + /** Mime type of posted data. */ + mimeType: string; + /** List of posted parameters (in case of URL encoded parameters). + * + * _`text` and `params` fields are mutually exclusive._ + */ + params: Param[]; + /** Plain text posted data + * + * _`params` and `text` fields are mutually exclusive._ + */ + text: string; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * List of posted parameters, if any (embedded in `postData` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#params + */ +export interface Param { + /** name of a posted parameter. */ + name: string; + /** value of a posted parameter or content of a posted file */ + value?: string; + /** name of a posted file. */ + fileName?: string; + /** content type of a posted file. */ + contentType?: string; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * This object describes details about response content + * (embedded in `response` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#content + */ +export interface Content { + /** + * Length of the returned content in bytes. + * + * Should be equal to `response.bodySize` if there is no compression and + * bigger when the content has been compressed. + */ + size: number; + /** + * Number of bytes saved. Leave out this field if the information is not + * available. + */ + compression?: number; + /** + * MIME type of the response text (value of the Content-Type response + * header). + * + * The charset attribute of the MIME type is included (if available). + */ + mimeType: string; + /** + * Response body sent from the server or loaded from the browser cache. + * + * This field is populated with textual content only. + * + * The text field is either HTTP decoded text or a encoded (e.g. `base64`) + * representation of the response body. + * + * Leave out this field if the information is not available. + */ + text?: string; + /** + * Encoding used for response text field e.g `base64`. + * + * Leave out this field if the text field is HTTP decoded + * (decompressed & unchunked), than trans-coded from its original character + * set into UTF-8. + */ + encoding?: string; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * This objects contains info about a request coming from browser cache. + * + * http://www.softwareishard.com/blog/har-12-spec/#cache + */ +export interface Cache { + /** + * State of a cache entry before the request. + * + * Leave out this field if the information is not available. + */ + beforeRequest?: CacheDetails; + /** + * State of a cache entry after the request. + * + * Leave out this field if the information is not available. + */ + afterRequest?: CacheDetails; + /** A comment provided by the user or the application */ + comment?: string; +} +export interface CacheDetails { + /** Expiration time of the cache entry. + * + * _(Format not documente but assumingly ISO 8601 - + * `YYYY-MM-DDThh:mm:ss.sTZD`)_ + */ + expires?: string; + /** The last time the cache entry was opened. + * * + * _(Format not documente but assumingly ISO 8601 - + * `YYYY-MM-DDThh:mm:ss.sTZD`)_ + */ + lastAccess: string; + /** Etag */ + eTag: string; + /** The number of times the cache entry has been opened. */ + hitCount: number; + /** A comment provided by the user or the application */ + comment?: string; +} +/** + * This object describes various phases within request-response round trip. + * + * All times are specified in milliseconds. + * + * http://www.softwareishard.com/blog/har-12-spec/#timings + */ +export interface Timings { + /** + * Time spent in a queue waiting for a network connection. + * + * Use `-1` if the timing does not apply to the current request. + */ + blocked?: number; + /** + * DNS resolution time. The time required to resolve a host name. + * + * Use `-1` if the timing does not apply to the current request. + */ + dns?: number; + /** + * Time required to create TCP connection. + * + * Use `-1` if the timing does not apply to the current request. + */ + connect?: number; + /** + * Time required to send HTTP request to the server. + * + * _Not optional and must have non-negative values._ + */ + send?: number; + /** + * Waiting for a response from the server. + * + * _Not optional and must have non-negative values._ + */ + wait: number; + /** + * Time required to read entire response from the server (or cache). + * + * _Not optional and must have non-negative values._ + */ + receive: number; + /** + * Time required for SSL/TLS negotiation. + * + * If this field is defined then the time is also included in the connect + * field (to ensure backward compatibility with HAR 1.1). + * + * Use `-1` if the timing does not apply to the current request. + */ + ssl?: number; + /** A comment provided by the user or the application */ + comment?: string; +} diff --git a/har-format/tsconfig.json b/har-format/tsconfig.json new file mode 100644 index 0000000000..7a22f7eb17 --- /dev/null +++ b/har-format/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "har-format-tests.ts" + ] +} \ No newline at end of file diff --git a/har-format/tslint.json b/har-format/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/har-format/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/helmet/index.d.ts b/helmet/index.d.ts index 9e5f30f554..1dc8882608 100644 --- a/helmet/index.d.ts +++ b/helmet/index.d.ts @@ -81,7 +81,7 @@ declare namespace helmet { } export interface IHelmetHstsConfiguration { - maxAge: number; + maxAge?: number; includeSubdomains?: boolean; preload?: boolean; setIf?: IHelmetSetIfFunction, diff --git a/highcharts/index.d.ts b/highcharts/index.d.ts index 58f2a97a5e..968b5975fb 100644 --- a/highcharts/index.d.ts +++ b/highcharts/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Highcharts 4.2.7 +// Type definitions for Highcharts 4.2 // Project: http://www.highcharts.com/ -// Definitions by: Damiano Gambarotto , Dan Lewi Harkestad +// Definitions by: Damiano Gambarotto , Dan Lewi Harkestad , Albert Ozimek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Highcharts { @@ -799,7 +799,7 @@ declare namespace Highcharts { * @since 2.1.5 */ y?: number; - } + }; /** * For datetime axes, this decides where to put the tick between weeks. 0 = Sunday, 1 = Monday. * @default 1 @@ -813,8 +813,8 @@ declare namespace Highcharts { */ startOnTick?: boolean; /** - * Solid gauge series only. Color stops for the solid gauge. - * Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. + * Solid gauge series only. Color stops for the solid gauge. + * Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. * The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color. */ stops?: [number, string][]; @@ -2059,7 +2059,7 @@ declare namespace Highcharts { * @since 3.0.8 */ theme?: ButtonStatesTheme; - } + }; /** * An array of series configurations for the drill down. Each series configuration uses the same syntax as the * series option set. These drilldown series are hidden by default. The drilldown series is linked to the parent @@ -4585,7 +4585,7 @@ declare namespace Highcharts { * Options for the hovered series */ hover?: BarStates; - } + }; } interface LineChart extends SeriesChart { @@ -4897,7 +4897,7 @@ declare namespace Highcharts { * Options for the hovered series */ hover?: BarStates; - } + }; } interface WaterFallChart extends BarChart { diff --git a/highcharts/modules/map/index.d.ts b/highcharts/modules/map/index.d.ts new file mode 100644 index 0000000000..9818729a62 --- /dev/null +++ b/highcharts/modules/map/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for Highmaps 4.2.7 +// Project: http://www.highcharts.com/products/highmaps +// Definitions by: Albert Ozimek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Static } from 'highcharts'; + +declare module 'highcharts' { + export interface Static { + mapChart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; + } +} + diff --git a/highcharts/tsconfig.json b/highcharts/tsconfig.json index 3526f42da7..93645d284b 100644 --- a/highcharts/tsconfig.json +++ b/highcharts/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", + "modules/map/index.d.ts", "modules/boost.d.ts", "modules/exporting.d.ts", "modules/no-data-to-display.d.ts", @@ -32,4 +33,4 @@ "test/no-data-to-display.ts", "test/offline-exporting.ts" ] -} \ No newline at end of file +} diff --git a/highcharts/tslint.json b/highcharts/tslint.json new file mode 100644 index 0000000000..6fb4f705cf --- /dev/null +++ b/highcharts/tslint.json @@ -0,0 +1,10 @@ +{ + "extends": "../tslint.json", + "rules": { + "forbidden-types": false, + "unified-signatures": false, + "array-type": false, + "no-empty-interface": false, + "dt-header": false + } +} diff --git a/history.js/index.d.ts b/history.js/index.d.ts index 5a24bd5d73..13d66b8cf6 100644 --- a/history.js/index.d.ts +++ b/history.js/index.d.ts @@ -20,9 +20,11 @@ interface Historyjs { enabled: boolean; - pushState(data: any, title: string, url: string): void; - replaceState(data: any, title: string, url: string): void; - getState(): HistoryState; + pushState(data: any, title: string, url: string, queue?: boolean): boolean; + replaceState(data: any, title: string, url: string, queue?: boolean): boolean; + getState(friendly?: boolean, create?: boolean): HistoryState; + getStateId (passedState: HistoryState): string; + getStateById (id: string): HistoryState; getStateByIndex(index: number): HistoryState; getCurrentIndex(): number; getHash(): string; @@ -37,12 +39,30 @@ interface Historyjs { debug(...messages: any[]): void; options: HistoryOptions; + + /** + * History.setTitle(title) + * Applies the title to the document + * @param {HistoryState} newState + * @return {Boolean} + */ + setTitle (newState: HistoryState): boolean + clearQueue(): Historyjs; + clearAllIntervals(): void; + getRootUrl(): string; + + emulated: { + hashChange?: any; + pushState?: any; + } } interface HistoryState { data?: any; title?: string; url: string; + hashedUrl?: string; + cleanUrl?: string; } interface HistoryOptions { @@ -56,6 +76,4 @@ interface HistoryOptions { initialTitle?: string; html4Mode?: boolean; delayInit?: number; - - } diff --git a/history/v2/index.d.ts b/history/v2/index.d.ts index 6b61fa1b77..c2278d07fa 100644 --- a/history/v2/index.d.ts +++ b/history/v2/index.d.ts @@ -75,10 +75,10 @@ export namespace History { export type LocationDescriptor = LocationDescriptorObject | Path; export type LocationKey = string; export type LocationListener = (location: Location) => void; - export type LocationState = Object; + export type LocationState = any; export type Path = string // Pathname + QueryString; export type Pathname = string; - export type Query = Object; + export type Query = any; export type QueryString = string; export type Search = string; export type TransitionHook = (location: Location, callback: (result: any) => void) => any diff --git a/htmlescape/htmlescape-tests.ts b/htmlescape/htmlescape-tests.ts new file mode 100644 index 0000000000..c3e174787c --- /dev/null +++ b/htmlescape/htmlescape-tests.ts @@ -0,0 +1,8 @@ +import * as htmlescape from "htmlescape"; +import { sanitize } from "htmlescape"; + +// === '{"x":"a\\u0026\\u003c\\u003e\\u2028\\u2029"}' +htmlescape({ x: "a&<>\u2028\u2029" }); + +// === 'a&<>\\u2028\\u2029' +sanitize("a&<>\u2028\u2029"); diff --git a/htmlescape/index.d.ts b/htmlescape/index.d.ts new file mode 100644 index 0000000000..51d8eae58d --- /dev/null +++ b/htmlescape/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for htmlescape 1.1 +// Project: https://github.com/zertosh/htmlescape +// Definitions by: bouzuya +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function htmlescape(o: any): string; +declare namespace htmlescape { + export function sanitize(s: string): string; +} + +export = htmlescape; +export as namespace htmlescape; diff --git a/htmlescape/tsconfig.json b/htmlescape/tsconfig.json new file mode 100644 index 0000000000..6ba5d9819a --- /dev/null +++ b/htmlescape/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "htmlescape-tests.ts" + ] +} diff --git a/htmlescape/tslint.json b/htmlescape/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/htmlescape/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/htmlhint/htmlhint-tests.ts b/htmlhint/htmlhint-tests.ts new file mode 100644 index 0000000000..2eecf5d60d --- /dev/null +++ b/htmlhint/htmlhint-tests.ts @@ -0,0 +1,18 @@ +import { HTMLHint, RuleSet } from "htmlhint"; + +const htmlHintRules: RuleSet = { + "tagname-lowercase": true, + "attr-lowercase": true, + "attr-value-double-quotes": true, + "doctype-first": true, + "tag-pair": true, + "spec-char-escape": true, + "id-unique": true, + "src-not-empty": true, + "attr-no-duplication": true, + "title-require": true, + "space-tab-mixed-disabled": "tab" +}; + +const result = HTMLHint.verify('', htmlHintRules); +const formatted = HTMLHint.format(result, { indent: 2 }); diff --git a/htmlhint/index.d.ts b/htmlhint/index.d.ts new file mode 100644 index 0000000000..0afcff80f1 --- /dev/null +++ b/htmlhint/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for HTMLHint 0.9 +// Project: https://github.com/yaniswang/HTMLHint +// Definitions by: Alan Agius +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface LintResult { + evidence: string; + line: number; + col: number; + message: string; + rule: Rule; +} + +export interface FormatOptions { + indent?: number; + colors?: boolean; +} + +export interface Rule { + id: string; + description: string; + link: string; +} + +export interface RuleSet { + [id: string]: boolean | string; +} + +export namespace HTMLHint { + function verify(fileContent: string, ruleSet?: RuleSet): LintResult[]; + function format(arrMessages: LintResult[], options?: FormatOptions): string[]; +} diff --git a/htmlhint/tsconfig.json b/htmlhint/tsconfig.json new file mode 100644 index 0000000000..1ae3c23f81 --- /dev/null +++ b/htmlhint/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "htmlhint-tests.ts" + ] +} diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index e8c12126b4..51017828a1 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -83,3 +83,4 @@ var err = new createError.MisdirectedRequest(); var err = new createError.MisdirectedRequest('Where should this go?'); let error: createError.HttpError; +console.log(error instanceof createError.HttpError); diff --git a/http-errors/index.d.ts b/http-errors/index.d.ts index 176703f23f..aff5b312dd 100644 --- a/http-errors/index.d.ts +++ b/http-errors/index.d.ts @@ -23,6 +23,8 @@ declare module 'http-errors' { [code: string]: new (msg?: string) => HttpError; (...args: Array): HttpError; + + HttpError: HttpErrorConstructor; Continue: HttpErrorConstructor; SwitchingProtocols: HttpErrorConstructor; diff --git a/hystrixjs/hystrixjs-tests.ts b/hystrixjs/hystrixjs-tests.ts index b7f10a27d8..676015be06 100644 --- a/hystrixjs/hystrixjs-tests.ts +++ b/hystrixjs/hystrixjs-tests.ts @@ -1,6 +1,3 @@ - -/// - import hystrixjs = require('hystrixjs'); import q = require('q'); diff --git a/hystrixjs/index.d.ts b/hystrixjs/index.d.ts index d4a738b999..39fef977e1 100644 --- a/hystrixjs/index.d.ts +++ b/hystrixjs/index.d.ts @@ -3,146 +3,141 @@ // Definitions by: Igor Sechyn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +import * as Q from "q"; +import * as RX from "rx"; -declare namespace HystrixJS { +export as namespace hystrixjs; +export as namespace HystrixJS; - interface HystrixProperties { - "hystrix.force.circuit.open"?: boolean, - "hystrix.force.circuit.closed"?: boolean, - "hystrix.circuit.sleepWindowInMilliseconds"?:number, - "hystrix.circuit.errorThresholdPercentage"?: number, - "hystrix.circuit.volumeThreshold"?:number, - "hystrix.circuit.volumeThreshold.forceOverride"?: boolean, - "hystrix.circuit.volumeThreshold.override"?: number, - "hystrix.execution.timeoutInMilliseconds"?: number, - "hystrix.metrics.statistical.window.timeInMilliseconds"?: number, - "hystrix.metrics.statistical.window.bucketsNumber"?: number, - "hystrix.metrics.percentile.window.timeInMilliseconds"?: number, - "hystrix.metrics.percentile.window.bucketsNumber"?: number, - "hystrix.request.volume.rejectionThreshold"?: number - } - - interface HystrixConfig { - metricsPercentileWindowBuckets(): number; - circuitBreakerForceClosed(): boolean; - circuitBreakerForceOpened(): boolean; - circuitBreakerSleepWindowInMilliseconds(): number; - circuitBreakerErrorThresholdPercentage(): number; - circuitBreakerRequestVolumeThreshold(): number; - circuitBreakerRequestVolumeThresholdForceOverride(): boolean; - circuitBreakerRequestVolumeThresholdOverride(): number; - executionTimeoutInMilliseconds(): number; - metricsStatisticalWindowBuckets(): number; - metricsStatisticalWindowInMilliseconds(): number; - metricsPercentileWindowInMilliseconds(): number; - metricsPercentileWindowBuckets(): number; - requestVolumeRejectionThreshold(): number; - resetProperties(): void; - init(properties: HystrixProperties): void; - } - - interface Command { - execute(...args: any[]): Q.Promise; - } - - interface CommandBuilder { - circuitBreakerSleepWindowInMilliseconds(value: number): CommandBuilder; - errorHandler(value: (error: any) => boolean): CommandBuilder; - timeout(value: number): CommandBuilder; - circuitBreakerRequestVolumeThreshold(value: number): CommandBuilder; - requestVolumeRejectionThreshold(value: number): CommandBuilder; - circuitBreakerForceOpened(value: boolean): CommandBuilder; - circuitBreakerForceClosed(value: boolean): CommandBuilder; - statisticalWindowNumberOfBuckets(value: number): CommandBuilder; - statisticalWindowLength(value: number): CommandBuilder; - percentileWindowNumberOfBuckets(value: number): CommandBuilder; - percentileWindowLength(value: number): CommandBuilder; - circuitBreakerErrorThresholdPercentage(value: number): CommandBuilder; - run(value: (args: any) => Q.Promise): CommandBuilder; - fallbackTo(value: (...args: any[]) => Q.Promise): CommandBuilder; - context(value: any): CommandBuilder; - build(): Command; - } - - interface CommandFactory { - getOrCreate(commandKey: string, commandGroup?: string): CommandBuilder; - resetCache(): void; - } - - interface HealthCounts { - totalCount: number; - errorCount: number; - errorPercentage: number; - } - - interface CommandMetrics { - markSuccess(): void; - markRejected(): void; - markFailure(): void; - markTimeout(): void; - markShortCircuited(): void; - incrementExecutionCount(): void; - decrementExecutionCount(): void; - getCurrentExecutionCount(): number; - addExecutionTime(value: number): void; - getRollingCount(type: any): number; - getExecutionTime(percentile: any): number; - getHealthCounts(): HealthCounts; - reset(): void; - } - - interface MetricsProperties { - commandKey: string, - commandGroup: string, - statisticalWindowTimeInMilliSeconds?: number, - statisticalWindowNumberOfBuckets?: number, - percentileWindowTimeInMilliSeconds?: number, - percentileWindowNumberOfBuckets?: number - } - - interface MetricsFactory { - getOrCreate(config: MetricsProperties): CommandMetrics; - resetCache(): void; - getAllMetrics(): Array; - } - - interface CirctuiBreakerConfig { - circuitBreakerSleepWindowInMilliseconds: number, - commandKey: string, - circuitBreakerErrorThresholdPercentage: number, - circuitBreakerRequestVolumeThreshold: number, - commandGroup: string, - circuitBreakerForceClosed: boolean, - circuitBreakerForceOpened: boolean - } - - interface CircuitBreaker { - allowRequest(): boolean; - allowSingleTest(): boolean; - isOpen(): boolean; - markSuccess(): void; - } - - interface CircuitFactory { - getOrCreate(config: CirctuiBreakerConfig): CircuitBreaker; - getCache(): Array; - resetCache(): void; - } - - interface HystrixSSEStream { - toObservable(): Rx.Observable - } +export interface HystrixProperties { + "hystrix.force.circuit.open"?: boolean, + "hystrix.force.circuit.closed"?: boolean, + "hystrix.circuit.sleepWindowInMilliseconds"?: number, + "hystrix.circuit.errorThresholdPercentage"?: number, + "hystrix.circuit.volumeThreshold"?: number, + "hystrix.circuit.volumeThreshold.forceOverride"?: boolean, + "hystrix.circuit.volumeThreshold.override"?: number, + "hystrix.execution.timeoutInMilliseconds"?: number, + "hystrix.metrics.statistical.window.timeInMilliseconds"?: number, + "hystrix.metrics.statistical.window.bucketsNumber"?: number, + "hystrix.metrics.percentile.window.timeInMilliseconds"?: number, + "hystrix.metrics.percentile.window.bucketsNumber"?: number, + "hystrix.request.volume.rejectionThreshold"?: number } -declare var hystrixjs: { - commandFactory: HystrixJS.CommandFactory, - metricsFactory: HystrixJS.MetricsFactory, - circuitFactory: HystrixJS.CircuitFactory, - hystrixSSEStream: HystrixJS.HystrixSSEStream, - hystrixConfig: HystrixJS.HystrixConfig -}; -declare module "hystrixjs" { - export = hystrixjs; +export interface HystrixConfig { + metricsPercentileWindowBuckets(): number; + circuitBreakerForceClosed(): boolean; + circuitBreakerForceOpened(): boolean; + circuitBreakerSleepWindowInMilliseconds(): number; + circuitBreakerErrorThresholdPercentage(): number; + circuitBreakerRequestVolumeThreshold(): number; + circuitBreakerRequestVolumeThresholdForceOverride(): boolean; + circuitBreakerRequestVolumeThresholdOverride(): number; + executionTimeoutInMilliseconds(): number; + metricsStatisticalWindowBuckets(): number; + metricsStatisticalWindowInMilliseconds(): number; + metricsPercentileWindowInMilliseconds(): number; + metricsPercentileWindowBuckets(): number; + requestVolumeRejectionThreshold(): number; + resetProperties(): void; + init(properties: HystrixProperties): void; } + +export interface Command { + execute(...args: any[]): Q.Promise; +} + +export interface CommandBuilder { + circuitBreakerSleepWindowInMilliseconds(value: number): CommandBuilder; + errorHandler(value: (error: any) => boolean): CommandBuilder; + timeout(value: number): CommandBuilder; + circuitBreakerRequestVolumeThreshold(value: number): CommandBuilder; + requestVolumeRejectionThreshold(value: number): CommandBuilder; + circuitBreakerForceOpened(value: boolean): CommandBuilder; + circuitBreakerForceClosed(value: boolean): CommandBuilder; + statisticalWindowNumberOfBuckets(value: number): CommandBuilder; + statisticalWindowLength(value: number): CommandBuilder; + percentileWindowNumberOfBuckets(value: number): CommandBuilder; + percentileWindowLength(value: number): CommandBuilder; + circuitBreakerErrorThresholdPercentage(value: number): CommandBuilder; + run(value: (args: any) => Q.Promise): CommandBuilder; + fallbackTo(value: (...args: any[]) => Q.Promise): CommandBuilder; + context(value: any): CommandBuilder; + build(): Command; +} + +export interface CommandFactory { + getOrCreate(commandKey: string, commandGroup?: string): CommandBuilder; + resetCache(): void; +} + +export interface HealthCounts { + totalCount: number; + errorCount: number; + errorPercentage: number; +} + +export interface CommandMetrics { + markSuccess(): void; + markRejected(): void; + markFailure(): void; + markTimeout(): void; + markShortCircuited(): void; + incrementExecutionCount(): void; + decrementExecutionCount(): void; + getCurrentExecutionCount(): number; + addExecutionTime(value: number): void; + getRollingCount(type: any): number; + getExecutionTime(percentile: any): number; + getHealthCounts(): HealthCounts; + reset(): void; +} + +export interface MetricsProperties { + commandKey: string, + commandGroup: string, + statisticalWindowTimeInMilliSeconds?: number, + statisticalWindowNumberOfBuckets?: number, + percentileWindowTimeInMilliSeconds?: number, + percentileWindowNumberOfBuckets?: number +} + +export interface MetricsFactory { + getOrCreate(config: MetricsProperties): CommandMetrics; + resetCache(): void; + getAllMetrics(): Array; +} + +export interface CirctuiBreakerConfig { + circuitBreakerSleepWindowInMilliseconds: number, + commandKey: string, + circuitBreakerErrorThresholdPercentage: number, + circuitBreakerRequestVolumeThreshold: number, + commandGroup: string, + circuitBreakerForceClosed: boolean, + circuitBreakerForceOpened: boolean +} + +export interface CircuitBreaker { + allowRequest(): boolean; + allowSingleTest(): boolean; + isOpen(): boolean; + markSuccess(): void; +} + +export interface CircuitFactory { + getOrCreate(config: CirctuiBreakerConfig): CircuitBreaker; + getCache(): Array; + resetCache(): void; +} + +export interface HystrixSSEStream { + toObservable(): Rx.Observable +} + +export var commandFactory: CommandFactory; +export var metricsFactory: MetricsFactory; +export var circuitFactory: CircuitFactory; +export var hystrixSSEStream: HystrixSSEStream; +export var hystrixConfig: HystrixConfig; \ No newline at end of file diff --git a/hystrixjs/tsconfig.json b/hystrixjs/tsconfig.json index c23c0c6875..e1cb1a7c4d 100644 --- a/hystrixjs/tsconfig.json +++ b/hystrixjs/tsconfig.json @@ -12,6 +12,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts b/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts index bca7aee3b7..9f36a7d538 100644 --- a/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts +++ b/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts @@ -1,5 +1,3 @@ -/// - import * as i18next from 'i18next'; import LngDetector from 'i18next-browser-languagedetector'; diff --git a/i18next-xhr-backend/i18next-xhr-backend-tests.ts b/i18next-xhr-backend/i18next-xhr-backend-tests.ts index b4e71467f1..9c12809271 100644 --- a/i18next-xhr-backend/i18next-xhr-backend-tests.ts +++ b/i18next-xhr-backend/i18next-xhr-backend-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as i18next from 'i18next'; import XHR from 'i18next-xhr-backend'; diff --git a/ibm-mobilefirst/ibm-mobilefirst-tests.ts b/ibm-mobilefirst/ibm-mobilefirst-tests.ts index 92dbee824d..498c9c3d7f 100644 --- a/ibm-mobilefirst/ibm-mobilefirst-tests.ts +++ b/ibm-mobilefirst/ibm-mobilefirst-tests.ts @@ -1,5 +1,3 @@ -/// - // Tests // Test WL.Client @@ -126,7 +124,7 @@ WL.SimpleDialog.show( WL.Logger.debug("First button pressed"); } }]); - + // Test WL.TabBar // iOS var creditTab = WL.TabBar.addItem("CREDIT", function() { diff --git a/imagemagick-native/imagemagick-native-tests.ts b/imagemagick-native/imagemagick-native-tests.ts index c872634ab2..94d8fd05bb 100644 --- a/imagemagick-native/imagemagick-native-tests.ts +++ b/imagemagick-native/imagemagick-native-tests.ts @@ -1,6 +1,3 @@ - -/// - import imagemagick = require('imagemagick-native'); import fs = require('fs'); diff --git a/imagemagick/imagemagick-tests.ts b/imagemagick/imagemagick-tests.ts index 87ead6307a..5bc9d9cc93 100644 --- a/imagemagick/imagemagick-tests.ts +++ b/imagemagick/imagemagick-tests.ts @@ -1,6 +1,3 @@ - -/// - import imagemagick = require('imagemagick'); import child_process = require('child_process'); diff --git a/imagesloaded/imagesloaded-tests.ts b/imagesloaded/imagesloaded-tests.ts index 3f5ead2831..385df7b052 100644 --- a/imagesloaded/imagesloaded-tests.ts +++ b/imagesloaded/imagesloaded-tests.ts @@ -1,5 +1,3 @@ - - function test_ctor() { // element imagesLoaded(document.querySelector('#container'), function(instance) { @@ -12,6 +10,14 @@ function test_ctor() { // multiple elements var posts = document.querySelectorAll('.post'); imagesLoaded(posts, function() { console.log('all images are loaded'); }); + + // options + imagesLoaded('#container', { background: true }, function() { + console.log('all images are loaded'); + }); + imagesLoaded('#container', { background: '.item' }, function() { + console.log('all images are loaded'); + }); } function test_events_basic() { @@ -25,6 +31,8 @@ function test_events_basic() { imgLoad.on('always', onAlways); // unbind with .off() imgLoad.off('always', onAlways); + // bind once with .once() + imgLoad.once('always', onAlways); } function test_events_full() { diff --git a/imagesloaded/index.d.ts b/imagesloaded/index.d.ts index 507f082367..9a48a18e19 100644 --- a/imagesloaded/index.d.ts +++ b/imagesloaded/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for imagesLoaded 3.1.8 +// Type definitions for imagesLoaded 4.1.1 // Project: https://github.com/desandro/imagesloaded -// Definitions by: Chris Charabaruk +// Definitions by: Chris Charabaruk , Cameron Little // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace ImagesLoaded { type ElementSelector = Element | NodeList | Array | string; @@ -30,14 +30,21 @@ declare namespace ImagesLoaded { // event listeners on(event: string, listener: ImagesLoadedListener): void; off(event: string, listener: ImagesLoadedListener): void; + once(event: string, listener: ImagesLoadedListener): void; + } + + interface ImagesLoadedOptions { + background: true | string; } interface ImagesLoadedConstructor { /** * Creates a new ImagesLoaded object with the provided callback * @param elem Element, NodeList, Element array, or selector string for images to watch + * @param options object that can tell imagesloaded to watch background images as well * @param callback function triggered after all images have been loaded */ + (elem: ElementSelector, options: ImagesLoadedOptions, callback?: ImagesLoadedCallback): ImagesLoaded; (elem: ElementSelector, callback?: ImagesLoadedCallback): ImagesLoaded; } } diff --git a/intro.js/index.d.ts b/intro.js/index.d.ts index d7893018c2..b0925cd41a 100644 --- a/intro.js/index.d.ts +++ b/intro.js/index.d.ts @@ -21,6 +21,8 @@ declare namespace IntroJs { prevLabel?: string; skipLabel?: string; doneLabel?: string; + hidePrev?: boolean; + hideNext?: boolean; tooltipPosition?: string; tooltipClass?: string; highlightClass?: string; @@ -33,10 +35,12 @@ declare namespace IntroJs { showProgress?: boolean; scrollToElement?: boolean; overlayOpacity?: number; + scrollPadding?: number; positionPrecedence?: string[]; disableInteraction?: boolean; hintPosition?: string; hintButtonLabel?: string; + hintAnimation?: boolean; steps?: Step[]; hints?: Hint[]; } diff --git a/intro.js/intro.js-tests.ts b/intro.js/intro.js-tests.ts index 0d79c1bd21..19267a94a3 100644 --- a/intro.js/intro.js-tests.ts +++ b/intro.js/intro.js-tests.ts @@ -8,6 +8,10 @@ intro.setOption('doneLabel', 'Next page'); intro.setOption('overlayOpacity', 50); intro.setOption('showProgress', true); intro.setOptions({ + hidePrev: true, + hideNext: false, + scrollPadding: 30, + hintAnimation: false, steps: [ { intro: "Hello world!" diff --git a/is-array/is-array-tests.ts b/is-array/is-array-tests.ts index 9a8e252e05..327c2ea3d0 100644 --- a/is-array/is-array-tests.ts +++ b/is-array/is-array-tests.ts @@ -7,7 +7,7 @@ isArray(true); isArray([]); isArray({}); -var x = {} +var x = {}; if (isArray(x)) { x.push(0); } diff --git a/isbn-utils/index.d.ts b/isbn-utils/index.d.ts new file mode 100644 index 0000000000..fe2ac4dae9 --- /dev/null +++ b/isbn-utils/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for isbn-utils 1.1 +// Project: https://github.com/GitbookIO/isbn-utils +// Definitions by: Jørgen Elgaard Larsen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +type IGroups = any; + +export class ISBNcodes { + readonly source: string; + readonly prefix: string; + readonly group: string; + readonly publisher: string; + readonly article: string; + readonly check: string; + readonly check10: string; + readonly check13: string; + readonly groupname: string; +} + +export class ISBN { + constructor(val: string, groups: IGroups); + asIsbn10(hyphenate?: boolean): string; + asIsbn13(hyphenate?: boolean): string; + codes: ISBNcodes; + isIsbn10(): boolean; + isIsbn13(): boolean; + isValid(): boolean; +} + +export function asIsbn10(isbn: string, hyphenate?: boolean): string; +export function asIsbn13(isbn: string, hyphenate?: boolean): string; +export function parse(isbn: string, groups?: IGroups): ISBN|null; +export function hyphenate(isbn: string): string; +export function isValid(isbn: string, groups?: IGroups): boolean; diff --git a/isbn-utils/isbn-utils-tests.ts b/isbn-utils/isbn-utils-tests.ts new file mode 100644 index 0000000000..91f72a0359 --- /dev/null +++ b/isbn-utils/isbn-utils-tests.ts @@ -0,0 +1,36 @@ +import * as isbn from 'isbn-utils'; + + +const isbn10a: isbn.ISBN|null = isbn.parse('4873113369'); +let b: boolean; +let s: string; + +if (isbn10a !== null) { + b = isbn10a.isIsbn10(); + b = isbn10a.isIsbn13(); + s = isbn10a.asIsbn10(); + s = isbn10a.asIsbn10(true); + s = isbn10a.asIsbn13(); + s = isbn10a.asIsbn13(true); + s = isbn10a.codes.source; + s = isbn10a.codes.prefix; + s = isbn10a.codes.group; + s = isbn10a.codes.publisher; + s = isbn10a.codes.article; + s = isbn10a.codes.check; + s = isbn10a.codes.check10; + s = isbn10a.codes.check13; + s = isbn10a.codes.groupname; +} + +const bad: isbn.ISBN|null = isbn.parse('invalid format'); +if (bad === null) { + s = 'Bummer.'; +} + +s = isbn.asIsbn13('4-87311-336-9'); +s = isbn.asIsbn13('4-87311-336-9', true); +s = isbn.asIsbn10('978-4-87311-336-4'); +s = isbn.asIsbn10('978-4-87311-336-4', true); + +s = isbn.hyphenate('9784873113364'); diff --git a/isbn-utils/tsconfig.json b/isbn-utils/tsconfig.json new file mode 100644 index 0000000000..b061bf6192 --- /dev/null +++ b/isbn-utils/tsconfig.json @@ -0,0 +1,23 @@ +{ + "files": [ + "index.d.ts", + "isbn-utils-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/isbn-utils/tslint.json b/isbn-utils/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/isbn-utils/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/jasmine-data_driven_tests/index.d.ts b/jasmine-data_driven_tests/index.d.ts index a2a7415093..827539a3a9 100644 --- a/jasmine-data_driven_tests/index.d.ts +++ b/jasmine-data_driven_tests/index.d.ts @@ -2,6 +2,38 @@ // Project: https://github.com/gburghardt/jasmine-data_driven_tests // Definitions by: Anthony MacKinnon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 -declare function all(description: string, dataset: any[], assertion: (...args: any[]) => void): void; -declare function xall(description: string, dataset: any[], assertion: (...args: any[]) => void): void; \ No newline at end of file +declare var all: JasmineDataDrivenTest; +declare var xall: JasmineDataDrivenTest; + +interface JasmineDataDrivenTest { + ( + description: string, + dataset: Array<[T, U, V, W, X, Y, Z]>, + assertion: (arg0: T, arg1: U, arg2: V, arg3: W, arg4: X, arg5: Y, arg6: Z, done: () => void) => void): void; + ( + description: string, + dataset: Array<[T, U, V, W, X, Y]>, + assertion: (arg0: T, arg1: U, arg2: V, arg3: W, arg4: X, arg5: Y, done: () => void) => void): void; + ( + description: string, + dataset: Array<[T, U, V, W, X]>, + assertion: (arg0: T, arg1: U, arg2: V, arg3: W, arg4: X, done: () => void) => void): void; + ( + description: string, + dataset: Array<[T, U, V, W]>, + assertion: (arg0: T, arg1: U, arg2: V, arg3: W, done: () => void) => void): void; + ( + description: string, + dataset: Array<[T, U, V]>, + assertion: (arg0: T, arg1: U, arg2: V, done: () => void) => void): void; + ( + description: string, + dataset: Array<[T, U]>, + assertion: (arg0: T, arg1: U, done: () => void) => void): void; + ( + description: string, + dataset: T[], + assertion: (value: T, done: () => void) => void): void; +} diff --git a/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts b/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts index 27509d7383..727c253ad3 100644 --- a/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts +++ b/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts @@ -1,9 +1,8 @@ - /// all("A data driven test is a suite with multiple specs", ['a', 'b', 'c'], - (value: string) => { + value => { expect(value).not.toBe('d'); } ); @@ -13,7 +12,7 @@ all("A data driven test can have many arguments", [1, 2, 3], [2, 4, 6] ], - (a: number, b: number, c: number) => { + (a, b, c) => { expect(c - (a + b)).toBe(0); } ); @@ -23,7 +22,7 @@ all("A data driven test can be asynchronous", [3, 1], [5, 2] ], - (a: number, b: number, done: () => void) => { + (a, b, done) => { setTimeout(() => { expect(a - b > 0).toBe(true); done(); @@ -33,7 +32,7 @@ all("A data driven test can be asynchronous", xall("A data driven test can be pending", [1, 2, 3], - (value: number) => { + value => { expect(value < 4).toBe(true); } ); @@ -47,7 +46,7 @@ describe("A suite", () => { all("can contain data driven tests", [1, 2, 3], - (b: number) => { + b => { expect(a - b > 0).toBe(true); } ); diff --git a/jasmine-es6-promise-matchers/index.d.ts b/jasmine-es6-promise-matchers/index.d.ts index 89e3146c2c..7d61d4d660 100644 --- a/jasmine-es6-promise-matchers/index.d.ts +++ b/jasmine-es6-promise-matchers/index.d.ts @@ -13,7 +13,7 @@ declare namespace JasminePromiseMatchers { declare namespace jasmine { - interface Matchers { + interface Matchers { /** * Verifies that a Promise is (or has been) rejected. */ diff --git a/jasmine-expect/index.d.ts b/jasmine-expect/index.d.ts index c2ee7e0ee5..ca5c2dbfc3 100644 --- a/jasmine-expect/index.d.ts +++ b/jasmine-expect/index.d.ts @@ -1,93 +1,154 @@ -// Type definitions for jasmine-expect 2.0 +// Type definitions for jasmine-expect 3.6.0 // Project: https://github.com/JamieMason/Jasmine-Matchers -// Definitions by: UserPixel +// Definitions by: GeneralCss // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 /// declare namespace jasmine { - interface Matchers { - // These functions are written in the order defined in the src directory of jasmine-matchers - // The type system is used smartly whenever it can provide value (by looking at the code of every matcher) - toBeAfter(otherDate: Date): boolean; // - toBeArray(): boolean; // - toBeArrayOfBooleans(): boolean; // - toBeArrayOfNumbers(): boolean; - toBeArrayOfObjects(): boolean; - toBeArrayOfSize(size: number): boolean; - toBeArrayOfStrings(): boolean; - toBeBefore(otherDate: Date): boolean; // - toBeBoolean(): boolean; - toBeCalculable(): boolean; - toBeDate(): boolean; - toBeEmptyArray(): boolean; - toBeEmptyObject(): boolean; - toBeEmptyString(): boolean; - toBeEvenNumber(): boolean; - toBeFalse(): boolean; - toBeFunction(): boolean; - toBeHtmlString(): boolean; - toBeIso8601(): boolean; - toBeJsonString(): boolean; - toBeLongerThan(other: string): boolean; - toBeNonEmptyArray(): boolean; - toBeNonEmptyObject(): boolean; - toBeNonEmptyString(): boolean; - toBeNumber(): boolean; - toBeObject(): boolean; - toBeOddNumber(): boolean; - toBeSameLengthAs(other: string): boolean; - toBeShorterThan(other: string): boolean; - toBeString(): boolean; - toBeTrue(): boolean; - toBeWhitespace(): boolean; - toBeWholeNumber(): boolean; - toBeWithinRange(floor: number, ceiling: number): boolean; + interface Matchers { + // toBe + toBeArray(): boolean; + toBeArrayOfBooleans(): boolean; + toBeArrayOfNumbers(): boolean; + toBeArrayOfObjects(): boolean; + toBeArrayOfSize(size: number): boolean; + toBeArrayOfStrings(): boolean; + toBeEmptyArray(): boolean; + toBeNonEmptyArray(): boolean; - toEndWith(subString: string): boolean; + // Booleans + toBeBoolean(): boolean; + toBeFalse(): boolean; + toBeTrue(): boolean; - toHaveArray(key: string): boolean; - toHaveArrayOfBooleans(key: string): boolean; - toHaveArrayOfNumbers(key: string): boolean; - toHaveArrayOfObjects(key: string): boolean; - toHaveArrayOfSize(key: string, size?: number): boolean; - toHaveArrayOfStrings(key: string): boolean; - toHaveBoolean(key: string): boolean; - toHaveCalculable(key: string): boolean; - toHaveDate(key: string): boolean; - toHaveDateAfter(key: string, otherDate: Date): boolean; - toHaveDateBefore(key: string, otherDate: Date): boolean; - toHaveEmptyArray(key: string): boolean; - toHaveEmptyObject(key: string): boolean; - toHaveEmptyString(key: string): boolean; - toHaveEvenNumber(key: string): boolean; - toHaveFalse(key: string): boolean; - toHaveHtmlString(key: string): boolean; - toHaveIso8601(key: string): boolean; - toHaveJsonString(key: string): boolean; - toHaveMember(key: string): boolean; - toHaveMethod(key: string): boolean; - toHaveNonEmptyArray(key: string): boolean; - toHaveNonEmptyObject(key: string): boolean; - toHaveNonEmptyString(key: string): boolean; - toHaveNumber(key: string): boolean; - toHaveNumberWithinRange(key: string, floor: number, ceiling: number): boolean; - toHaveObject(key: string): boolean; - toHaveOddNumber(key: string): boolean; - toHaveString(key: string): boolean; - toHaveStringLongerThan(key: string, other: string): boolean; - toHaveStringSameLengthAs(key: string, other: string): boolean; - toHaveStringShorterThan(key: string, other: string): boolean; - toHaveTrue(key: string): boolean; - toHaveWhitespaceString(key: string): boolean; - toHaveWholeNumber(key: string): boolean; + // Dates + toBeAfter(date: Date): boolean + toBeBefore(date: Date): boolean + toBeDate(): boolean; + toBeValidDate(): boolean; - toImplement(api: {}): boolean; + // Functions + toBeFunction(): boolean; + toThrowAnyError(): boolean; + toThrowErrorOfType(constructorName: string): boolean - toStartWith(subString: string): boolean; + // Numbers + toBeCalculable(): boolean; + toBeEvenNumber(): boolean; + toBeGreaterThanOrEqualTo(number: number): boolean; + toBeLessThanOrEqualTo(number: number): boolean; + toBeNear(number: number, epsilon: number): boolean; + toBeNumber(): boolean; + toBeOddNumber(): boolean + toBeWholeNumber(): boolean; + toBeWithinRange(floor: number, ceiling: number): boolean; - toThrowAnyError(): boolean; - toThrowErrorOfType(type: string): boolean; - } + // Strings + toBeEmptyString(): boolean; + toBeHtmlString(): boolean; + toBeIso8601(): boolean; + toBeJsonString(): boolean; + toBeLongerThan(string: string): boolean; + toBeNonEmptyString(): boolean; + toBeSameLengthAs(string: string): boolean; + toBeShorterThan(string: string): boolean; + toBeString(): boolean; + toBeWhitespace(): boolean; + toEndWith(string: string): boolean; + toStartWith(string: string): boolean; + + // Objects + toBeEmptyObject(): boolean; + toBeNonEmptyObject(): boolean; + toBeObject(): boolean; + + // Regular Expression + toBeRegExp(): boolean; + + // Members, Properties, Methods + toHaveArray(memberName: string): boolean; + toHaveArrayOfBooleans(memberName: string): boolean; + toHaveArrayOfNumbers(memberName: string): boolean; + toHaveArrayOfObjects(memberName: string): boolean; + toHaveArrayOfSize(memberName: string, size: number): boolean; + toHaveArrayOfStrings(memberName: string): boolean; + toHaveBoolean(memberName: string): boolean; + toHaveCalculable(memberName: string): boolean; + toHaveDate(memberName: string): boolean; + toHaveDateAfter(memberName: string, date: Date): boolean; + toHaveDateBefore(memberName: string, date: Date): boolean; + toHaveEmptyArray(memberName: string): boolean; + toHaveEmptyObject(memberName: string): boolean; + toHaveEmptyString(memberName: string): boolean; + toHaveEvenNumber(memberName: string): boolean; + toHaveFalse(memberName: string): boolean; + toHaveHtmlString(memberName: string): boolean; + toHaveIso8601(memberName: string): boolean; + toHaveJsonString(memberName: string): boolean; + toHaveMember(memberName: string): boolean; + toHaveMethod(memberName: string): boolean; + toHaveNonEmptyArray(memberName: string): boolean; + toHaveNonEmptyObject(memberName: string): boolean; + toHaveNonEmptyString(memberName: string): boolean; + toHaveNumber(memberName: string): boolean; + toHaveNumberWithinRange(memberName: string, floor: number, ceiling: number): boolean; + toHaveObject(memberName: string): boolean; + toHaveOddNumber(memberName: string): boolean; + toHaveString(memberName: string): boolean; + toHaveStringLongerThan(memberName: string, string: string): boolean; + toHaveStringSameLengthAs(memberName: string, string: string): boolean; + toHaveStringShorterThan(memberName: string, string: string): boolean; + toHaveTrue(memberName: string): boolean; + toHaveUndefined(memberName: string): boolean; + toHaveWhitespaceString(memberName: string): boolean; + toHaveWholeNumber(memberName: string): boolean; + } + + interface AssymetricMatchers { + + // Arrays + arrayOfBooleans(): boolean; + arrayOfNumbers(): boolean; + arrayOfObjects(): boolean; + arrayOfSize(number: number): boolean; + arrayOfStrings(): boolean; + emptyArray(): boolean; + nonEmptyArray(): boolean; + + // Dates + after(date: Date): boolean; + before(date: Date): boolean; + + // Numbers + calculable(): boolean; + evenNumber(): boolean; + greaterThanOrEqualTo(number: number): boolean; + lessThanOrEqualTo(number: number): boolean; + oddNumber(): boolean; + wholeNumber(): boolean; + withinRange(floor: number, ceiling: number): boolean; + + // Strings + endingWith(string: string): boolean; + iso8601(): boolean; + jsonString(): boolean; + longerThan(string: string): boolean; + nonEmptyString(string: string): boolean; + sameLengthAs(string: string): boolean; + shorterThan(string: string): boolean; + startingWith(string: string): boolean; + whitespace(): boolean; + + //Objects + emptyObject(): boolean; + nonEmptyObject(): boolean; + + // Regular expressions + regExp(): boolean; + } } + +declare var any: jasmine.AssymetricMatchers; + diff --git a/jasmine-expect/jasmine-expect-tests.ts b/jasmine-expect/jasmine-expect-tests.ts index 7753cc7381..4a8cbb3855 100644 --- a/jasmine-expect/jasmine-expect-tests.ts +++ b/jasmine-expect/jasmine-expect-tests.ts @@ -1,6 +1,3 @@ -/// - - // Taken directly from the test directory of the original repo declare var describeWhenNotArray: (arr: string) => void; @@ -873,9 +870,11 @@ describe('toHaveArrayOfSize', function() { describeToHaveArrayX('toHaveArrayOfSize', function() { describe('when number of expected items does not match', function() { it('should deny', function() { - expect({ + var xpToFail = expect; + xpToFail({ memberName: '' }).not.toHaveArrayOfSize('memberName'); + expect({ memberName: ['bar'] }).not.toHaveArrayOfSize('memberName', 0); @@ -1877,40 +1876,6 @@ describe('toHaveWholeNumber', function() { }); }); -describe('toImplement', function() { - describe('when invoked', function() { - describe('when subject IS an Object containing all of the supplied members', function() { - it('should confirm', function() { - expect({ - a: 1, - b: 2 - }).toImplement({ - a: 1, - b: 2 - }); - expect({ - a: 1, - b: 2 - }).toImplement({ - a: 1 - }); - }); - }); - describe('when subject is NOT an Object containing all of the supplied members', function() { - it('should deny', function() { - expect({ - a: 1 - }).not.toImplement({ - c: 3 - }); - expect(null).not.toImplement({ - a: 1 - }); - }); - }); - }); -}); - describe('toStartWith', function() { describe('when invoked', function() { describe('when subject is NOT an undefined or empty string', function() { diff --git a/jasmine-fixture/index.d.ts b/jasmine-fixture/index.d.ts index 8ea5956f1e..9a8c7b98b2 100644 --- a/jasmine-fixture/index.d.ts +++ b/jasmine-fixture/index.d.ts @@ -2,10 +2,14 @@ // Project: https://github.com/searls/jasmine-fixture // Definitions by: Craig Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 -/** 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 -*/ +/// + +/** + * 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 + */ declare function affix(selector: string): JQuery; interface JQuery { diff --git a/jasmine-fixture/jasmine-fixture-tests.ts b/jasmine-fixture/jasmine-fixture-tests.ts index b0ec42d512..74eb750590 100644 --- a/jasmine-fixture/jasmine-fixture-tests.ts +++ b/jasmine-fixture/jasmine-fixture-tests.ts @@ -1,8 +1,6 @@ -/// /// /// - describe("Jasmine fixture extension", () => { describe("Affixes dom elements to body", () => { it("Inserts a new element on affix", () => { diff --git a/jasmine-jquery/index.d.ts b/jasmine-jquery/index.d.ts index fb91e0c37b..14eb26b380 100644 --- a/jasmine-jquery/index.d.ts +++ b/jasmine-jquery/index.d.ts @@ -81,7 +81,7 @@ declare namespace jasmine { proxyCallTo_(methodName: string, passedArguments: any): any; } - interface Matchers { + interface Matchers { /** * Check if DOM element has class. * @@ -232,7 +232,7 @@ declare namespace jasmine { * */ toHaveData(key : string, expectedValue : string): boolean; - toBe(selector: JQuery): boolean; + toBe(selector: T): boolean; /** * Check if DOM element is matched by the given selector. @@ -241,7 +241,7 @@ declare namespace jasmine { * // returns true * expect($('
    ')).toContain('some-class') */ - toContain(selector: JQuery): boolean; + toContain(selector: any): boolean; /** * Check if DOM element exists inside the given parent element. diff --git a/jasmine-jquery/jasmine-jquery-tests.ts b/jasmine-jquery/jasmine-jquery-tests.ts index 67b349d45e..440dff1b6c 100644 --- a/jasmine-jquery/jasmine-jquery-tests.ts +++ b/jasmine-jquery/jasmine-jquery-tests.ts @@ -1,18 +1,15 @@ -/// -/// - - describe("Jasmine jQuery extension", () => { it("Adds jQuery matchers", () => { - expect($('
    ')).toBe('div'); - expect($('
    ')).toBe('div#some-id'); + expect($('
    ')).toBe($('div')); + expect($('
    ')).toBe($('div#some-id')); expect($('')).toBeChecked(); expect($('
    ')).toBeHidden(); expect($('
    ')).toHaveCss({ display: "none", margin: "10px" }); expect($('
    ')).toHaveCss({ margin: "10px" }); expect($('')).toBeSelected(); expect($('
    ')).toBeVisible(); - expect($('
    ')).toContain('span.some-class'); + // NOTE: It is now necessary to explicitly add the generic parameter when using `toContain` + expect($('
    ')).toContain('span.some-class'); expect($('').addClass('js-something')).toBeMatchedBy('.js-something'); expect($('')).toExist(); expect($('
    ')).toHaveAttr('id', 'some-id'); diff --git a/jasmine-matchers/index.d.ts b/jasmine-matchers/index.d.ts index ac44d25c1c..d4cad3b77c 100644 --- a/jasmine-matchers/index.d.ts +++ b/jasmine-matchers/index.d.ts @@ -23,7 +23,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI /// declare namespace jasmine { - interface Matchers { + interface Matchers { //toBe toBeArray(): boolean; diff --git a/jasmine-matchers/jasmine-matchers-tests.ts b/jasmine-matchers/jasmine-matchers-tests.ts index dc92e809dc..4ef032062d 100644 --- a/jasmine-matchers/jasmine-matchers-tests.ts +++ b/jasmine-matchers/jasmine-matchers-tests.ts @@ -14,9 +14,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/// - - describe('toBeArray', function () { describe('matches', function () { it('should pass for []', function () { diff --git a/jasmine-promise-matchers/index.d.ts b/jasmine-promise-matchers/index.d.ts index c511019b62..ffe4f65142 100644 --- a/jasmine-promise-matchers/index.d.ts +++ b/jasmine-promise-matchers/index.d.ts @@ -10,7 +10,7 @@ declare function installPromiseMatchers(): void; declare namespace jasmine { - interface Matchers { + interface Matchers { /** * Verifies that a Promise is (or has been) rejected. */ diff --git a/jasmine/index.d.ts b/jasmine/index.d.ts index e18361dec4..caa1d12635 100644 --- a/jasmine/index.d.ts +++ b/jasmine/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Jasmine 2.5 +// Type definitions for Jasmine 2.5.2 // Project: http://jasmine.github.io/ // Definitions by: Boris Yankov , Theodore Brown , David Pärsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -24,8 +24,9 @@ declare function afterEach(action: (done: DoneFn) => void, timeout?: number): vo declare function beforeAll(action: (done: DoneFn) => void, timeout?: number): void; declare function afterAll(action: (done: DoneFn) => void, timeout?: number): void; -declare function expect(spy: Function): jasmine.Matchers; -declare function expect(actual: any): jasmine.Matchers; +declare function expect(spy: Function): jasmine.Matchers; +declare function expect(actual: ArrayLike): jasmine.ArrayLikeMatchers; +declare function expect(actual: T): jasmine.Matchers; declare function fail(e?: any): void; /** Action method that should be called when the async work is complete */ @@ -38,28 +39,40 @@ interface DoneFn extends Function { declare function spyOn(object: T, method: keyof T): jasmine.Spy; +declare function spyOnProperty(object: T, property: keyof T, accessType: string): jasmine.Spy; + declare function runs(asyncMethod: Function): void; declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void; declare function waits(timeout?: number): void; declare namespace jasmine { + type Expected = T | ObjectContaining | Any | Spy; var clock: () => Clock; function any(aclass: any): Any; + function anything(): Any; + function arrayContaining(sample: any[]): ArrayContaining; - function objectContaining(sample: any): ObjectContaining; + function objectContaining(sample: Partial): ObjectContaining; function createSpy(name: string, originalFn?: Function): Spy; + function createSpyObj(baseName: string, methodNames: any[]): any; function createSpyObj(baseName: string, methodNames: any[]): T; + function pp(value: any): string; + function getEnv(): Env; + function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; + function addMatchers(matchers: CustomMatcherFactories): void; + function stringMatching(str: string): Any; function stringMatching(str: RegExp): Any; - function formatErrorMsg(domain: string, usage: string) : (msg: string) => string + + function formatErrorMsg(domain: string, usage: string): (msg: string) => string; interface Any { @@ -82,8 +95,8 @@ declare namespace jasmine { jasmineToString(): string; } - interface ObjectContaining { - new (sample: any): any; + interface ObjectContaining { + new (sample: Partial): Partial; jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; jasmineToString(): string; @@ -113,18 +126,14 @@ declare namespace jasmine { withMock(func: () => void): void; } - interface CustomEqualityTester { - (first: any, second: any): boolean; - } + type CustomEqualityTester = (first: any, second: any) => boolean; interface CustomMatcher { compare(actual: T, expected: T): CustomMatcherResult; compare(actual: any, expected: any): CustomMatcherResult; } - interface CustomMatcherFactory { - (util: MatchersUtil, customEqualityTesters: Array): CustomMatcher; - } + type CustomMatcherFactory = (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]) => CustomMatcher; interface CustomMatcherFactories { [index: string]: CustomMatcherFactory; @@ -136,9 +145,9 @@ declare namespace jasmine { } interface MatchersUtil { - equals(a: any, b: any, customTesters?: Array): boolean; - contains(haystack: ArrayLike | string, needle: any, customTesters?: Array): boolean; - buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array): string; + equals(a: any, b: any, customTesters?: CustomEqualityTester[]): boolean; + contains(haystack: ArrayLike | string, needle: any, customTesters?: CustomEqualityTester[]): boolean; + buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: any[]): string; } interface Env { @@ -150,7 +159,7 @@ declare namespace jasmine { currentSpec: Spec; - matchersClass: Matchers; + matchersClass: Matchers; version(): any; versionString(): string; @@ -224,12 +233,12 @@ declare namespace jasmine { passed(): boolean; } - interface MessageResult extends Result { + interface MessageResult extends Result { values: any; trace: Trace; } - interface ExpectationResult extends Result { + interface ExpectationResult extends Result { matcherName: string; passed(): boolean; expected: any; @@ -242,12 +251,13 @@ declare namespace jasmine { new (options: {random: boolean, seed: string}): any; random: boolean; seed: string; - sort(items: T[]) : T[]; + sort(items: T[]): T[]; } namespace errors { class ExpectationFailed extends Error { constructor(); + stack: any; } } @@ -255,7 +265,7 @@ declare namespace jasmine { interface TreeProcessor { new (attrs: any): any; execute: (done: Function) => void; - processTree() : any; + processTree(): any; } interface Trace { @@ -301,18 +311,18 @@ declare namespace jasmine { results(): NestedResults; } - interface Matchers { + interface Matchers { - new (env: Env, actual: any, spec: Env, isNot?: boolean): any; + new (env: Env, actual: T, spec: Env, isNot?: boolean): any; env: Env; - actual: any; + actual: T; spec: Env; isNot?: boolean; message(): any; - toBe(expected: any, expectationFailOutput?: any): boolean; - toEqual(expected: any, expectationFailOutput?: any): boolean; + toBe(expected: Expected, expectationFailOutput?: any): boolean; + toEqual(expected: Expected, expectationFailOutput?: any): boolean; toMatch(expected: string | RegExp, expectationFailOutput?: any): boolean; toBeDefined(expectationFailOutput?: any): boolean; toBeUndefined(expectationFailOutput?: any): boolean; @@ -332,11 +342,18 @@ declare namespace jasmine { toThrow(expected?: any): boolean; toThrowError(message?: string | RegExp): boolean; toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean; - not: Matchers; + not: Matchers; Any: Any; } + interface ArrayLikeMatchers extends Matchers> { + toBe(expected: Expected>, expectationFailOutput?: any): boolean; + toEqual(expected: Expected>, expectationFailOutput?: any): boolean; + toContain(expected: T, expectationFailOutput?: any): boolean; + not: ArrayLikeMatchers; + } + interface Reporter { reportRunnerStarting(runner: Runner): void; reportRunnerResults(runner: Runner): void; @@ -371,18 +388,18 @@ declare namespace jasmine { } interface CustomReporterResult { - description: string, - failedExpectations?: FailedExpectation[], - fullName: string, + description: string; + failedExpectations?: FailedExpectation[]; + fullName: string; id: string; - passedExpectations?: PassedExpectation[], + passedExpectations?: PassedExpectation[]; pendingReason?: string; status?: string; } interface RunDetails { failedExpectations: ExpectationResult[]; - order: jasmine.Order + order: jasmine.Order; } interface CustomReporter { @@ -412,9 +429,7 @@ declare namespace jasmine { results(): NestedResults; } - interface SpecFunction { - (spec?: Spec): void; - } + type SpecFunction = (spec?: Spec) => void; interface SuiteOrSpec { id: number; @@ -433,7 +448,7 @@ declare namespace jasmine { spies_: Spy[]; results_: NestedResults; - matchersClass: Matchers; + matchersClass: Matchers; getFullName(): string; results(): NestedResults; @@ -446,7 +461,7 @@ declare namespace jasmine { waits(timeout: number): Spec; waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec; fail(e?: any): void; - getMatchersClass_(): Matchers; + getMatchersClass_(): Matchers; addMatchers(matchersPrototype: CustomMatcherFactories): void; finishCallback(): void; finish(onComplete?: () => void): void; @@ -455,6 +470,7 @@ declare namespace jasmine { addBeforesAndAftersToQueue(): void; explodes(): void; spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy; + spyOnProperty(object: any, property: string, accessType: string): Spy; removeAllSpies(): void; throwOnExpectationFailure: boolean; } @@ -494,7 +510,7 @@ declare namespace jasmine { identity: string; and: SpyAnd; calls: Calls; - mostRecentCall: { args: any[]; }; + mostRecentCall: {args: any[]; }; argsForCall: any[]; } @@ -555,7 +571,7 @@ declare namespace jasmine { finished: boolean; result: any; messages: any; - runDetails: RunDetails + runDetails: RunDetails; new (): any; diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts index 4632eb8b4c..1c9d5366e1 100644 --- a/jasmine/jasmine-tests.ts +++ b/jasmine/jasmine-tests.ts @@ -1,34 +1,34 @@ // tests based on http://jasmine.github.io/2.2/introduction.html -describe("A suite", function () { - it("contains spec with an expectation", function () { +describe("A suite", () => { + it("contains spec with an expectation", () => { expect(true).toBe(true); }); }); -describe("A suite is just a function", function () { +describe("A suite is just a function", () => { var a: boolean; - it("and so is a spec", function () { + it("and so is a spec", () => { a = true; expect(a).toBe(true); }); }); -describe("The 'toBe' matcher compares with ===", function () { +describe("The 'toBe' matcher compares with ===", () => { - it("and has a positive case", function () { + it("and has a positive case", () => { expect(true).toBe(true); }); - it("and can have a negative case", function () { + it("and can have a negative case", () => { expect(false).not.toBe(true); }); }); -describe("Included matchers:", function () { +describe("Included matchers:", () => { - it("The 'toBe' matcher compares with ===", function () { + it("The 'toBe' matcher compares with ===", () => { var a = 12; var b = a; @@ -36,14 +36,14 @@ describe("Included matchers:", function () { expect(a).not.toBe(null); }); - describe("The 'toEqual' matcher", function () { + describe("The 'toEqual' matcher", () => { - it("works for simple literals and variables", function () { + it("works for simple literals and variables", () => { var a = 12; expect(a).toEqual(12); }); - it("should work for objects", function () { + it("should work for objects", () => { var foo = { a: 12, b: 34 @@ -56,7 +56,7 @@ describe("Included matchers:", function () { }); }); - it("The 'toMatch' matcher is for regular expressions", function () { + it("The 'toMatch' matcher is for regular expressions", () => { var message = "foo bar baz"; expect(message).toMatch(/bar/); @@ -64,25 +64,25 @@ describe("Included matchers:", function () { expect(message).not.toMatch(/quux/); }); - it("The 'toBeDefined' matcher compares against `undefined`", function () { + it("The 'toBeDefined' matcher compares against `undefined`", () => { var a = { foo: "foo" }; expect(a.foo).toBeDefined(); - expect((a).bar).not.toBeDefined(); + expect((a as any).bar).not.toBeDefined(); }); - it("The `toBeUndefined` matcher compares against `undefined`", function () { + it("The `toBeUndefined` matcher compares against `undefined`", () => { var a = { foo: "foo" }; expect(a.foo).not.toBeUndefined(); - expect((a).bar).toBeUndefined(); + expect((a as any).bar).toBeUndefined(); }); - it("The 'toBeNull' matcher compares against null", function () { + it("The 'toBeNull' matcher compares against null", () => { var a: string = null; var foo = "foo"; @@ -91,28 +91,28 @@ describe("Included matchers:", function () { expect(foo).not.toBeNull(); }); - it("The 'toBeTruthy' matcher is for boolean casting testing", function () { + it("The 'toBeTruthy' matcher is for boolean casting testing", () => { var a: string, foo = "foo"; expect(foo).toBeTruthy(); expect(a).not.toBeTruthy(); }); - it("The 'toBeFalsy' matcher is for boolean casting testing", function () { + it("The 'toBeFalsy' matcher is for boolean casting testing", () => { var a: string, foo = "foo"; expect(a).toBeFalsy(); expect(foo).not.toBeFalsy(); }); - it("The 'toContain' matcher is for finding an item in an Array", function () { + it("The 'toContain' matcher is for finding an item in an Array", () => { var a = ["foo", "bar", "baz"]; - expect(a).toContain("bar"); + expect(a).toContain('foo'); expect(a).not.toContain("quux"); }); - it("The 'toBeLessThan' matcher is for mathematical comparisons", function () { + it("The 'toBeLessThan' matcher is for mathematical comparisons", () => { var pi = 3.1415926, e = 2.78; @@ -120,7 +120,7 @@ describe("Included matchers:", function () { expect(pi).not.toBeLessThan(e); }); - it("The 'toBeGreaterThan' is for mathematical comparisons", function () { + it("The 'toBeGreaterThan' is for mathematical comparisons", () => { var pi = 3.1415926, e = 2.78; @@ -128,7 +128,7 @@ describe("Included matchers:", function () { expect(e).not.toBeGreaterThan(pi); }); - it("The 'toBeCloseTo' matcher is for precision math comparison", function () { + it("The 'toBeCloseTo' matcher is for precision math comparison", () => { var pi = 3.1415926, e = 2.78; @@ -136,12 +136,12 @@ describe("Included matchers:", function () { expect(pi).toBeCloseTo(e, 0); }); - it("The 'toThrow' matcher is for testing if a function throws an exception", function () { - var foo = function () { + it("The 'toThrow' matcher is for testing if a function throws an exception", () => { + var foo = () => { return 1 + 2; }; - var bar = function () { - var a: any = undefined; + var bar = () => { + var a: any; return a + 1; }; @@ -149,8 +149,8 @@ describe("Included matchers:", function () { expect(bar).toThrow(); }); - it("The 'toThrowError' matcher is for testing a specific thrown exception", function() { - var foo = function() { + it("The 'toThrowError' matcher is for testing a specific thrown exception", () => { + var foo = () => { throw new TypeError("foo bar baz"); }; @@ -161,15 +161,15 @@ describe("Included matchers:", function () { }); }); -describe("A spec", function () { - it("is just a function, so it can contain any code", function () { +describe("A spec", () => { + it("is just a function, so it can contain any code", () => { var foo = 0; foo += 1; expect(foo).toEqual(1); }); - it("can have more than one expectation", function () { + it("can have more than one expectation", () => { var foo = 0; foo += 1; @@ -178,96 +178,96 @@ describe("A spec", function () { }); }); -describe("A spec (with setup and tear-down)", function () { +describe("A spec (with setup and tear-down)", () => { var foo: number; - beforeEach(function () { + beforeEach(() => { foo = 0; foo += 1; }); - afterEach(function () { + afterEach(() => { foo = 0; }); - it("is just a function, so it can contain any code", function () { + it("is just a function, so it can contain any code", () => { expect(foo).toEqual(1); }); - it("can have more than one expectation", function () { + it("can have more than one expectation", () => { expect(foo).toEqual(1); expect(true).toEqual(true); }); }); -describe("A spec", function () { +describe("A spec", () => { var foo: number; - beforeEach(function () { + beforeEach(() => { foo = 0; foo += 1; }); - afterEach(function () { + afterEach(() => { foo = 0; }); - it("is just a function, so it can contain any code", function () { + it("is just a function, so it can contain any code", () => { expect(foo).toEqual(1); }); - it("can have more than one expectation", function () { + it("can have more than one expectation", () => { expect(foo).toEqual(1); expect(true).toEqual(true); }); - describe("nested inside a second describe", function () { + describe("nested inside a second describe", () => { var bar: number; - beforeEach(function () { + beforeEach(() => { bar = 1; }); - it("can reference both scopes as needed", function () { + it("can reference both scopes as needed", () => { expect(foo).toEqual(bar); }); }); }); -xdescribe("A spec", function () { +xdescribe("A spec", () => { var foo: number; - beforeEach(function () { + beforeEach(() => { foo = 0; foo += 1; }); - it("is just a function, so it can contain any code", function () { + it("is just a function, so it can contain any code", () => { expect(foo).toEqual(1); }); }); -describe("Pending specs", function () { +describe("Pending specs", () => { - xit("can be declared 'xit'", function () { + xit("can be declared 'xit'", () => { expect(true).toBe(false); }); it("can be declared with 'it' but without a function"); - it("can be declared by calling 'pending' in the spec body", function () { + it("can be declared by calling 'pending' in the spec body", () => { expect(true).toBe(false); pending(); // without reason pending('this is why it is pending'); }); }); -describe("A spy", function () { +describe("A spy", () => { var foo: any, bar: any = null; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; } }; @@ -278,29 +278,29 @@ describe("A spy", function () { foo.setBar(456, 'another param'); }); - it("tracks that the spy was called", function () { + it("tracks that the spy was called", () => { expect(foo.setBar).toHaveBeenCalled(); }); - it("tracks all the arguments of its calls", function () { + it("tracks all the arguments of its calls", () => { expect(foo.setBar).toHaveBeenCalledWith(123); expect(foo.setBar).toHaveBeenCalledWith(456, 'another param'); }); - it("stops all execution on a function", function () { + it("stops all execution on a function", () => { expect(bar).toBeNull(); }); }); -describe("A spy, when configured to call through", function () { +describe("A spy, when configured to call through", () => { var foo: any, bar: any, fetchedBar: any; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, - getBar: function () { + getBar: () => { return bar; } }; @@ -311,28 +311,28 @@ describe("A spy, when configured to call through", function () { fetchedBar = foo.getBar(); }); - it("tracks that the spy was called", function () { + it("tracks that the spy was called", () => { expect(foo.getBar).toHaveBeenCalled(); }); - it("should not effect other functions", function () { + it("should not effect other functions", () => { expect(bar).toEqual(123); }); - it("when called returns the requested value", function () { + it("when called returns the requested value", () => { expect(fetchedBar).toEqual(123); }); }); -describe("A spy, when configured to fake a return value", function () { +describe("A spy, when configured to fake a return value", () => { var foo: any, bar: any, fetchedBar: any; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, - getBar: function () { + getBar: () => { return bar; } }; @@ -343,28 +343,28 @@ describe("A spy, when configured to fake a return value", function () { fetchedBar = foo.getBar(); }); - it("tracks that the spy was called", function () { + it("tracks that the spy was called", () => { expect(foo.getBar).toHaveBeenCalled(); }); - it("should not effect other functions", function () { + it("should not effect other functions", () => { expect(bar).toEqual(123); }); - it("when called returns the requested value", function () { + it("when called returns the requested value", () => { expect(fetchedBar).toEqual(745); }); }); -describe("A spy, when configured to fake a series of return values", function() { +describe("A spy, when configured to fake a series of return values", () => { var foo: any, bar: any; - beforeEach(function() { + beforeEach(() => { foo = { - setBar: function(value: any) { + setBar: (value: any) => { bar = value; }, - getBar: function() { + getBar: () => { return bar; } }; @@ -374,36 +374,36 @@ describe("A spy, when configured to fake a series of return values", function() foo.setBar(123); }); - it("tracks that the spy was called", function() { + it("tracks that the spy was called", () => { foo.getBar(123); expect(foo.getBar).toHaveBeenCalled(); }); - it("should not affect other functions", function() { + it("should not affect other functions", () => { expect(bar).toEqual(123); }); - it("when called multiple times returns the requested values in order", function() { + it("when called multiple times returns the requested values in order", () => { expect(foo.getBar()).toEqual("fetched first"); expect(foo.getBar()).toEqual("fetched second"); expect(foo.getBar()).toBeUndefined(); }); }); -describe("A spy, when configured with an alternate implementation", function () { +describe("A spy, when configured with an alternate implementation", () => { var foo: any, bar: any, fetchedBar: any; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, - getBar: function () { + getBar: () => { return bar; } }; - spyOn(foo, "getBar").and.callFake(function () { + spyOn(foo, "getBar").and.callFake(() => { return 1001; }); @@ -411,25 +411,25 @@ describe("A spy, when configured with an alternate implementation", function () fetchedBar = foo.getBar(); }); - it("tracks that the spy was called", function () { + it("tracks that the spy was called", () => { expect(foo.getBar).toHaveBeenCalled(); }); - it("should not effect other functions", function () { + it("should not effect other functions", () => { expect(bar).toEqual(123); }); - it("when called returns the requested value", function () { + it("when called returns the requested value", () => { expect(fetchedBar).toEqual(1001); }); }); -describe("A spy, when configured to throw a value", function () { +describe("A spy, when configured to throw a value", () => { var foo: any, bar: any; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; } }; @@ -437,57 +437,57 @@ describe("A spy, when configured to throw a value", function () { spyOn(foo, "setBar").and.throwError("quux"); }); - it("throws the value", function () { - expect(function () { - foo.setBar(123) - }).toThrowError("quux"); + it("throws the value", () => { + expect(() => { + foo.setBar(123); + }).toThrowError("quux"); }); }); -describe("A spy, when configured with multiple actions", function () { +describe("A spy, when configured with multiple actions", () => { var foo: any, bar: any, fetchedBar: any; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, - getBar: function () { + getBar: () => { return bar; } }; spyOn(foo, 'getBar').and.callThrough().and.callFake(() => { - this.fakeCalled = true; + this.fakeCalled = true; }); foo.setBar(123); fetchedBar = foo.getBar(); }); - it("tracks that the spy was called", function () { + it("tracks that the spy was called", () => { expect(foo.getBar).toHaveBeenCalled(); }); - it("should not effect other functions", function () { + it("should not effect other functions", () => { expect(bar).toEqual(123); }); - it("when called returns the requested value", function () { + it("when called returns the requested value", () => { expect(fetchedBar).toEqual(123); }); - it("should have called the fake implementation", function () { + it("should have called the fake implementation", () => { expect(this.fakeCalled).toEqual(true); }); }); -describe("A spy", function () { +describe("A spy", () => { var foo: any, bar: any = null; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; } }; @@ -495,7 +495,7 @@ describe("A spy", function () { spyOn(foo, 'setBar').and.callThrough(); }); - it("can call through and then stub in the same spec", function () { + it("can call through and then stub in the same spec", () => { foo.setBar(123); expect(bar).toEqual(123); @@ -507,12 +507,12 @@ describe("A spy", function () { }); }); -describe("A spy", function () { +describe("A spy", () => { var foo: any, bar: any = null; - beforeEach(function () { + beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; } }; @@ -520,7 +520,7 @@ describe("A spy", function () { spyOn(foo, 'setBar'); }); - it("tracks if it was called at all", function () { + it("tracks if it was called at all", () => { expect(foo.setBar.calls.any()).toEqual(false); foo.setBar(); @@ -528,7 +528,7 @@ describe("A spy", function () { expect(foo.setBar.calls.any()).toEqual(true); }); - it("tracks the number of times it was called", function () { + it("tracks the number of times it was called", () => { expect(foo.setBar.calls.count()).toEqual(0); foo.setBar(); @@ -537,7 +537,7 @@ describe("A spy", function () { expect(foo.setBar.calls.count()).toEqual(2); }); - it("tracks the arguments of each call", function () { + it("tracks the arguments of each call", () => { foo.setBar(123); foo.setBar(456, "baz"); @@ -545,34 +545,34 @@ describe("A spy", function () { expect(foo.setBar.calls.argsFor(1)).toEqual([456, "baz"]); }); - it("tracks the arguments of all calls", function () { + it("tracks the arguments of all calls", () => { foo.setBar(123); foo.setBar(456, "baz"); expect(foo.setBar.calls.allArgs()).toEqual([[123], [456, "baz"]]); }); - it("can provide the context and arguments to all calls", function () { + it("can provide the context and arguments to all calls", () => { foo.setBar(123); expect(foo.setBar.calls.all()).toEqual([{ object: foo, args: [123], returnValue: undefined }]); }); - it("has a shortcut to the most recent call", function () { + it("has a shortcut to the most recent call", () => { foo.setBar(123); foo.setBar(456, "baz"); expect(foo.setBar.calls.mostRecent()).toEqual({ object: foo, args: [456, "baz"], returnValue: undefined }); }); - it("has a shortcut to the first call", function () { + it("has a shortcut to the first call", () => { foo.setBar(123); foo.setBar(456, "baz"); expect(foo.setBar.calls.first()).toEqual({ object: foo, args: [123], returnValue: undefined }); }); - it("can be reset", function () { + it("can be reset", () => { foo.setBar(123); foo.setBar(456, "baz"); @@ -584,40 +584,40 @@ describe("A spy", function () { }); }); -describe("A spy, when created manually", function () { +describe("A spy, when created manually", () => { var whatAmI: any; - beforeEach(function () { + beforeEach(() => { whatAmI = jasmine.createSpy('whatAmI'); whatAmI("I", "am", "a", "spy"); }); - it("is named, which helps in error reporting", function () { + it("is named, which helps in error reporting", () => { expect(whatAmI.and.identity()).toEqual('whatAmI'); }); - it("tracks that the spy was called", function () { + it("tracks that the spy was called", () => { expect(whatAmI).toHaveBeenCalled(); }); - it("tracks its number of calls", function () { + it("tracks its number of calls", () => { expect(whatAmI.calls.count()).toEqual(1); }); - it("tracks all the arguments of its calls", function () { + it("tracks all the arguments of its calls", () => { expect(whatAmI).toHaveBeenCalledWith("I", "am", "a", "spy"); }); - it("allows access to the most recent call", function () { + it("allows access to the most recent call", () => { expect(whatAmI.calls.mostRecent().args[0]).toEqual("I"); }); }); -describe("Multiple spies, when created manually", function () { +describe("Multiple spies, when created manually", () => { var tape: any; - beforeEach(function () { + beforeEach(() => { tape = jasmine.createSpyObj('tape', ['play', 'pause', 'stop', 'rewind']); tape.play(); @@ -625,35 +625,35 @@ describe("Multiple spies, when created manually", function () { tape.rewind(0); }); - it("creates spies for each requested function", function () { + it("creates spies for each requested function", () => { expect(tape.play).toBeDefined(); expect(tape.pause).toBeDefined(); expect(tape.stop).toBeDefined(); expect(tape.rewind).toBeDefined(); }); - it("tracks that the spies were called", function () { + it("tracks that the spies were called", () => { expect(tape.play).toHaveBeenCalled(); expect(tape.pause).toHaveBeenCalled(); expect(tape.rewind).toHaveBeenCalled(); expect(tape.stop).not.toHaveBeenCalled(); }); - it("tracks all the arguments of its calls", function () { + it("tracks all the arguments of its calls", () => { expect(tape.rewind).toHaveBeenCalledWith(0); }); }); -describe("jasmine.any", function () { - it("matches any value", function () { +describe("jasmine.any", () => { + it("matches any value", () => { expect({}).toEqual(jasmine.any(Object)); expect(12).toEqual(jasmine.any(Number)); }); - describe("when used with a spy", function () { - it("is useful for comparing arguments", function () { + describe("when used with a spy", () => { + it("is useful for comparing arguments", () => { var foo = jasmine.createSpy('foo'); - foo(12, function () { + foo(12, () => { return true; }); @@ -662,10 +662,15 @@ describe("jasmine.any", function () { }); }); -describe("jasmine.objectContaining", function () { - var foo: any; +describe("jasmine.objectContaining", () => { + interface fooType { + a: number; + b: number; + bar: string; + } + var foo: fooType; - beforeEach(function () { + beforeEach(() => { foo = { a: 1, b: 2, @@ -673,17 +678,25 @@ describe("jasmine.objectContaining", function () { }; }); - it("matches objects with the expect key/value pairs", function () { - expect(foo).toEqual(jasmine.objectContaining({ - bar: "baz" - })); + it("matches objects with the expect key/value pairs", () => { + // not explictly providing the type on objectContaining only guards against + // missmatching types on know properties expect(foo).not.toEqual(jasmine.objectContaining({ - c: 37 + a: 37, + foo: 2, // <-- this does not cause an error as the compiler cannot infer the type completely + // b: '123', <-- this would cause an error as `b` defined as number in fooType + })); + + // explictly providing the type on objectContaining makes the guard more precise + // as misspelled properties are detected as well + expect(foo).not.toEqual(jasmine.objectContaining({ + bar: '', + // foo: 1, <-- this would cause an error as `foo` is not defined in fooType })); }); - describe("when used with a spy", function () { - it("is useful for comparing arguments", function () { + describe("when used with a spy", () => { + it("is useful for comparing arguments", () => { var callback = jasmine.createSpy('callback'); callback({ @@ -700,44 +713,44 @@ describe("jasmine.objectContaining", function () { }); }); -describe("jasmine.arrayContaining", function() { - var foo: any; +describe("jasmine.arrayContaining", () => { + var foo: any; - beforeEach(function() { - foo = [1, 2, 3, 4]; - }); + beforeEach(() => { + foo = [1, 2, 3, 4]; + }); - it("matches arrays with some of the values", function() { - expect(foo).toEqual(jasmine.arrayContaining([3, 1])); - expect(foo).not.toEqual(jasmine.arrayContaining([6])); - }); + it("matches arrays with some of the values", () => { + expect(foo).toEqual(jasmine.arrayContaining([3, 1])); + expect(foo).not.toEqual(jasmine.arrayContaining([6])); + }); - describe("when used with a spy", function() { - it("is useful when comparing arguments", function() { - var callback = jasmine.createSpy('callback'); + describe("when used with a spy", () => { + it("is useful when comparing arguments", () => { + var callback = jasmine.createSpy('callback'); - callback([1, 2, 3, 4]); + callback([1, 2, 3, 4]); - expect(callback).toHaveBeenCalledWith(jasmine.arrayContaining([4, 2, 3])); - expect(callback).not.toHaveBeenCalledWith(jasmine.arrayContaining([5, 2])); + expect(callback).toHaveBeenCalledWith(jasmine.arrayContaining([4, 2, 3])); + expect(callback).not.toHaveBeenCalledWith(jasmine.arrayContaining([5, 2])); + }); }); - }); }); -describe("Manually ticking the Jasmine Clock", function () { +describe("Manually ticking the Jasmine Clock", () => { var timerCallback: any; - beforeEach(function () { + beforeEach(() => { timerCallback = jasmine.createSpy("timerCallback"); jasmine.clock().install(); }); - afterEach(function () { + afterEach(() => { jasmine.clock().uninstall(); }); - it("causes a timeout to be called synchronously", function () { - setTimeout(function () { + it("causes a timeout to be called synchronously", () => { + setTimeout(() => { timerCallback(); }, 100); @@ -748,8 +761,8 @@ describe("Manually ticking the Jasmine Clock", function () { expect(timerCallback).toHaveBeenCalled(); }); - it("causes an interval to be called synchronously", function () { - setInterval(function () { + it("causes an interval to be called synchronously", () => { + setInterval(() => { timerCallback(); }, 100); @@ -765,8 +778,8 @@ describe("Manually ticking the Jasmine Clock", function () { expect(timerCallback.calls.count()).toEqual(2); }); - describe("Mocking the Date object", function(){ - it("mocks the Date object and sets it to a given time", function() { + describe("Mocking the Date object", () => { + it("mocks the Date object and sets it to a given time", () => { var baseTime = new Date(2013, 9, 23); jasmine.clock().mockDate(baseTime); @@ -777,82 +790,82 @@ describe("Manually ticking the Jasmine Clock", function () { }); }); -describe("Asynchronous specs", function () { +describe("Asynchronous specs", () => { var value: number; - beforeEach(function (done: DoneFn) { - setTimeout(function () { + beforeEach((done: DoneFn) => { + setTimeout(() => { value = 0; done(); }, 1); }); - it("should support async execution of test preparation and expectations", function (done: DoneFn) { + it("should support async execution of test preparation and expectations", (done: DoneFn) => { value++; expect(value).toBeGreaterThan(0); done(); }); - describe("long asynchronous specs", function() { - beforeEach(function(done: DoneFn) { - done(); + describe("long asynchronous specs", () => { + beforeEach((done: DoneFn) => { + done(); }, 1000); - it("takes a long time", function(done: DoneFn) { - setTimeout(function() { - done(); - }, 9000); + it("takes a long time", (done: DoneFn) => { + setTimeout(() => { + done(); + }, 9000); }, 10000); - afterEach(function(done: DoneFn) { - done(); + afterEach((done: DoneFn) => { + done(); }, 1000); }); }); -describe("Fail", function () { +describe("Fail", () => { - it("should fail test when called without arguments", function () { - fail(); - }); + it("should fail test when called without arguments", () => { + fail(); + }); - it("should fail test when called with a fail message", function () { - fail("The test failed"); - }); + it("should fail test when called with a fail message", () => { + fail("The test failed"); + }); - it("should fail test when called an error", function () { - fail(new Error("The test failed with this error")); - }); + it("should fail test when called an error", () => { + fail(new Error("The test failed with this error")); + }); }); // test based on http://jasmine.github.io/2.2/custom_equality.html -describe("custom equality", function() { +describe("custom equality", () => { var myCustomEquality: jasmine.CustomEqualityTester = function(first: any, second: any): boolean { - if (typeof first == "string" && typeof second == "string") { - return first[0] == second[1]; + if (typeof first === "string" && typeof second === "string") { + return first[0] === second[1]; } }; - beforeEach(function() { + beforeEach(() => { jasmine.addCustomEqualityTester(myCustomEquality); }); - it("should be custom equal", function() { + it("should be custom equal", () => { expect("abc").toEqual("aaa"); }); - it("should be custom not equal", function() { + it("should be custom not equal", () => { expect("abc").not.toEqual("abc"); }); }); // test based on http://jasmine.github.io/2.2/custom_matcher.html var customMatchers: jasmine.CustomMatcherFactories = { - toBeGoofy: function (util: jasmine.MatchersUtil, customEqualityTesters: Array) { + toBeGoofy: (util: jasmine.MatchersUtil, customEqualityTesters: jasmine.CustomEqualityTester[]) => { return { - compare: function (actual: any, expected: any): jasmine.CustomMatcherResult { + compare: (actual: any, expected: any): jasmine.CustomMatcherResult => { if (expected === undefined) { expected = ''; } @@ -881,29 +894,29 @@ var customMatchers: jasmine.CustomMatcherFactories = { // } // } declare namespace jasmine { - interface Matchers { - toBeGoofy(expected?: any): boolean; + interface Matchers { + toBeGoofy(expected?: jasmine.Expected): boolean; } } -describe("Custom matcher: 'toBeGoofy'", function () { - beforeEach(function () { +describe("Custom matcher: 'toBeGoofy'", () => { + beforeEach(() => { jasmine.addMatchers(customMatchers); }); - it("is available on an expectation", function () { + it("is available on an expectation", () => { expect({ hyuk: 'gawrsh' }).toBeGoofy(); }); - it("can take an 'expected' parameter", function () { + it("can take an 'expected' parameter", () => { expect({ hyuk: 'gawrsh is fun' - }).toBeGoofy(' is fun'); + }).toBeGoofy({ hyuk: ' is fun' }); }); - it("can be negated", function () { + it("can be negated", () => { expect({ hyuk: 'this is fun' }).not.toBeGoofy(); @@ -912,20 +925,21 @@ describe("Custom matcher: 'toBeGoofy'", function () { // test based on http://jasmine.github.io/2.5/custom_reporter.html var myReporter: jasmine.CustomReporter = { - jasmineStarted: function (suiteInfo: jasmine.SuiteInfo ) { + jasmineStarted: (suiteInfo: jasmine.SuiteInfo) => { console.log("Running suite with " + suiteInfo.totalSpecsDefined); }, - suiteStarted: function (result: jasmine.CustomReporterResult) { + suiteStarted: (result: jasmine.CustomReporterResult) => { console.log("Suite started: " + result.description + " whose full description is: " + result.fullName); }, - specStarted: function (result: jasmine.CustomReporterResult) { + specStarted: (result: jasmine.CustomReporterResult) => { console.log("Spec started: " + result.description + " whose full description is: " + result.fullName); }, - specDone: function (result: jasmine.CustomReporterResult) { + specDone: (result: jasmine.CustomReporterResult) => { console.log("Spec: " + result.description + " was " + result.status); + //tslint:disable-next-line:prefer-for-of for (var i = 0; i < result.failedExpectations.length; i++) { console.log("Failure: " + result.failedExpectations[i].message); console.log("Actual: " + result.failedExpectations[i].actual); @@ -935,15 +949,16 @@ var myReporter: jasmine.CustomReporter = { console.log(result.passedExpectations.length); }, - suiteDone: function (result: jasmine.CustomReporterResult) { + suiteDone: (result: jasmine.CustomReporterResult) => { console.log('Suite: ' + result.description + ' was ' + result.status); + //tslint:disable-next-line:prefer-for-of for (var i = 0; i < result.failedExpectations.length; i++) { console.log('AfterAll ' + result.failedExpectations[i].message); console.log(result.failedExpectations[i].stack); } }, - jasmineDone: function(runDetails: jasmine.RunDetails) { + jasmineDone: (runDetails: jasmine.RunDetails) => { console.log('Finished suite'); console.log('Random:', runDetails.order.random); } @@ -951,21 +966,21 @@ var myReporter: jasmine.CustomReporter = { jasmine.getEnv().addReporter(myReporter); -describe("Randomize Tests", function() { - it("should allow randomization of the order of tests", function() { - expect(function() { - var env = jasmine.getEnv(); - return env.randomizeTests(true); - }).not.toThrow(); - }); +describe("Randomize Tests", () => { + it("should allow randomization of the order of tests", () => { + expect(() => { + var env = jasmine.getEnv(); + return env.randomizeTests(true); + }).not.toThrow(); + }); - it("should allow a seed to be passed in for randomization", function() { - expect(function() { - var env = jasmine.getEnv(); - env.randomizeTests(true); - return env.seed(1234); - }).not.toThrow(); - }); + it("should allow a seed to be passed in for randomization", () => { + expect(() => { + var env = jasmine.getEnv(); + env.randomizeTests(true); + return env.seed(1234); + }).not.toThrow(); + }); }); (() => { @@ -976,14 +991,14 @@ describe("Randomize Tests", function() { env.addReporter(htmlReporter); var specFilter = new jasmine.HtmlSpecFilter(); - env.specFilter = function (spec) { + env.specFilter = (spec) => { return specFilter.matches(spec.getFullName()); }; var currentWindowOnload = window.onload; - window.onload = function () { + window.onload = () => { if (currentWindowOnload) { - (currentWindowOnload)(null); + (currentWindowOnload as any)(null); } htmlReporter.initialize(); env.execute(); diff --git a/jasmine/package.json b/jasmine/package.json deleted file mode 100644 index 7e47d54c61..0000000000 --- a/jasmine/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "typescript": ">=2.1.4" - } -} \ No newline at end of file diff --git a/jasmine/v1/index.d.ts b/jasmine/v1/index.d.ts index 5cbb2a9f83..3f51240f63 100644 --- a/jasmine/v1/index.d.ts +++ b/jasmine/v1/index.d.ts @@ -16,9 +16,9 @@ declare function xit(expectation: string, assertion: () => void): void; declare function beforeEach(action: () => void): void; declare function afterEach(action: () => void): void; -declare function expect(spy: Function): jasmine.Matchers; -//declare function expect(spy: jasmine.Spy): jasmine.Matchers; -declare function expect(actual: any): jasmine.Matchers; +declare function expect(spy: Function): jasmine.Matchers; +//declare function expect(spy: jasmine.Spy): jasmine.Matchers; +declare function expect(actual: any): jasmine.Matchers; declare function spyOn(object: any, method: string): jasmine.Spy; @@ -91,7 +91,7 @@ declare namespace jasmine { currentSpec: Spec; - matchersClass: Matchers; + matchersClass: Matchers; version(): any; versionString(): string; @@ -204,7 +204,7 @@ declare namespace jasmine { results(): NestedResults; } - interface Matchers { + interface Matchers { new (env: Env, actual: any, spec: Env, isNot?: boolean): any; @@ -232,7 +232,7 @@ declare namespace jasmine { toContainHtml(expected: string): boolean; toContainText(expected: string): boolean; toThrow(expected?: any): boolean; - not: Matchers; + not: Matchers; Any: Any; } @@ -287,7 +287,7 @@ declare namespace jasmine { spies_: Spy[]; results_: NestedResults; - matchersClass: Matchers; + matchersClass: Matchers; getFullName(): string; results(): NestedResults; @@ -299,7 +299,7 @@ declare namespace jasmine { waits(timeout: number): Spec; waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec; fail(e?: any): void; - getMatchersClass_(): Matchers; + getMatchersClass_(): Matchers; addMatchers(matchersPrototype: any): void; finishCallback(): void; finish(onComplete?: () => void): void; diff --git a/jasmine/v1/jasmine-tests.ts b/jasmine/v1/jasmine-tests.ts index 9177679f8a..c47fc84007 100644 --- a/jasmine/v1/jasmine-tests.ts +++ b/jasmine/v1/jasmine-tests.ts @@ -60,7 +60,7 @@ describe("Included matchers:", () => { foo: 'foo' }; expect(a.foo).toBeDefined(); - expect((a).bar).not.toBeDefined(); + expect((a as any).bar).not.toBeDefined(); }); it("The `toBeUndefined` matcher compares against `undefined`", () => { @@ -68,7 +68,7 @@ describe("Included matchers:", () => { foo: 'foo' }; expect(a.foo).not.toBeUndefined(); - expect((a).bar).toBeUndefined(); + expect((a as any).bar).toBeUndefined(); }); it("The 'toBeNull' matcher compares against null", () => { @@ -202,7 +202,7 @@ describe("A spy", () => { var foo: any, bar: any = null; beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; } }; @@ -235,7 +235,7 @@ describe("A spy, when configured to call through", () => { var foo: any, bar: any, fetchedBar: any; beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, getBar: () => { @@ -261,7 +261,7 @@ describe("A spy, when faking a return value", () => { var foo: any, bar: any, fetchedBar: any; beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, getBar: () => { @@ -287,7 +287,7 @@ describe("A spy, when faking a return value", () => { var foo: any, bar: any, fetchedBar: any; beforeEach(() => { foo = { - setBar: function (value: any) { + setBar: (value: any) => { bar = value; }, getBar: () => { @@ -319,7 +319,7 @@ describe("A spy, when created manually", () => { whatAmI("I", "am", "a", "spy"); }); it("is named, which helps in error reporting", () => { - expect(whatAmI.identity).toEqual('whatAmI') + expect(whatAmI.identity).toEqual('whatAmI'); }); it("tracks that the spy was called", () => { expect(whatAmI).toHaveBeenCalled(); @@ -369,7 +369,7 @@ describe("jasmine.any", () => { it("is useful for comparing arguments", () => { var foo = jasmine.createSpy('foo'); foo(12, () => { - return true + return true; }); expect(foo).toHaveBeenCalledWith(jasmine.any(Number), jasmine.any(Function)); }); @@ -430,7 +430,7 @@ describe("Asynchronous specs", () => { jasmineEnv.updateInterval = 250; var htmlReporter = new jasmine.HtmlReporter(); jasmineEnv.addReporter(htmlReporter); - jasmineEnv.specFilter = function (spec) { + jasmineEnv.specFilter = (spec) => { return htmlReporter.specFilter(spec); }; var currentWindowOnload = (arg: any) => window.onload(arg); @@ -439,11 +439,11 @@ describe("Asynchronous specs", () => { currentWindowOnload(null); } - (document.querySelector('.version')).innerHTML = jasmineEnv.versionString(); + (document.querySelector('.version') as HTMLElement).innerHTML = jasmineEnv.versionString(); execJasmine(); }; function execJasmine() { jasmineEnv.execute(); } -})(); \ No newline at end of file +})(); diff --git a/jasminewd2/index.d.ts b/jasminewd2/index.d.ts index 9d8ecde76e..3b8760709c 100644 --- a/jasminewd2/index.d.ts +++ b/jasminewd2/index.d.ts @@ -17,10 +17,10 @@ declare function afterAll(action: () => Promise, timeout?: number): void; declare namespace jasmine { // The global `Promise` type is too strict and kinda wrong interface Promise { - then(onFulfill?: (value: T) => U | Promise, onReject?: (error: any) => U | Promise): Promise; + then(onFulfill?: (value: T) => U | Promise, onReject?: (error: any) => U | Promise): Promise; } - interface Matchers { + interface Matchers { toBe(expected: any, expectationFailOutput?: any): Promise; toEqual(expected: any, expectationFailOutput?: any): Promise; toMatch(expected: string | RegExp | Promise, expectationFailOutput?: any): Promise; @@ -44,6 +44,13 @@ declare namespace jasmine { toThrowError(expected?: new (...args: any[]) => Error | Promise Error>, message?: string | RegExp | Promise): Promise; } + interface ArrayLikeMatchers extends Matchers> { + toBe(expected: Expected>, expectationFailOutput?: any): Promise; + toEqual(expected: Expected>, expectationFailOutput?: any): Promise; + toContain(expected: T, expectationFailOutput?: any): Promise; + not: ArrayLikeMatchers; + } + function addMatchers(matchers: AsyncCustomMatcherFactories): void; interface Env { @@ -59,12 +66,12 @@ declare namespace jasmine { } interface AsyncCustomMatcherFactory { - (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]): AsyncCustomMatcher; + (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]): AsyncCustomMatcher; } interface AsyncCustomMatcher { - compare(actual: T, expected: T): AsyncCustomMatcherResult; - compare(actual: any, expected: any): AsyncCustomMatcherResult; + compare(actual: T, expected: T): AsyncCustomMatcherResult; + compare(actual: any, expected: any): AsyncCustomMatcherResult; } interface AsyncCustomMatcherResult { diff --git a/jest/index.d.ts b/jest/index.d.ts old mode 100644 new mode 100755 index 9f945ba426..595a42ea2b --- a/jest/index.d.ts +++ b/jest/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Jest 18.1.0 +// Type definitions for Jest 19.2.0 // Project: http://facebook.github.io/jest/ -// Definitions by: Asana , Ivo Stratev , jwbay , Alexey Svetliakov +// Definitions by: Asana , Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -77,6 +77,8 @@ declare namespace jest { function runTimersToTime(msToRun: number): typeof jest; /** Explicitly supplies the mock object that the module system should return for the specified module. */ function setMock(moduleName: string, moduleExports: T): typeof jest; + /** Creates a mock function similar to jest.fn but also tracks calls to object[methodName] */ + function spyOn(object: T, method: M): SpyInstance; /** Indicates that the module system should never return a mocked version of the specified module from require() (e.g. that it should always return the real module). */ function unmock(moduleName: string): typeof jest; /** Instructs Jest to use fake versions of the standard timer functions. */ @@ -158,19 +160,19 @@ declare namespace jest { * @param {any} actual The value to apply matchers against. */ (actual: any): Matchers; - anything(): void; + anything(): any; /** Matches anything that was created with the given constructor. You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. */ - any(classType: any): void; + any(classType: any): any; /** Matches any array made up entirely of elements in the provided array. You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. */ - arrayContaining(arr: any[]): void; + arrayContaining(arr: any[]): any; /** Verifies that a certain number of assertions are called during a test. This is often useful when testing asynchronous code, in order to make sure that assertions in a callback actually got called. */ assertions(num: number): void; /** You can use `expect.extend` to add your own matchers to Jest. */ extend(obj: ExpectExtendMap): void; /** Matches any object that recursively matches the provided keys. This is often handy in conjunction with other asymmetric matchers. */ - objectContaining(obj: {}): void; + objectContaining(obj: {}): any; /** Matches any string that contains the exact provided string */ - stringMatching(str: string | RegExp): void; + stringMatching(str: string | RegExp): any; } interface Matchers { @@ -229,7 +231,7 @@ declare namespace jest { /** This ensures that a value matches the most recent snapshot. Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. */ toMatchSnapshot(snapshotName?: string): void; /** Used to test that a function throws when it is called. */ - toThrow(): void; + toThrow(error?: string | Constructable | RegExp): void; /** If you want to test that a specific error is thrown inside a function. */ toThrowError(error?: string | Constructable | RegExp): void; /** Used to test that a function throws a error matching the most recent snapshot when it is called. */ @@ -245,6 +247,10 @@ declare namespace jest { (...args: any[]): any; } + interface SpyInstance extends MockInstance { + mockRestore(): void; + } + /** * Wrap module with mock definitions * @example diff --git a/jest/jest-tests.ts b/jest/jest-tests.ts index a3d84a09e3..d951153842 100644 --- a/jest/jest-tests.ts +++ b/jest/jest-tests.ts @@ -160,17 +160,21 @@ describe('toThrow API', function () { it('throws', function () { expect(throwTypeError()).toThrow(); + expect(throwTypeError()).toThrowError(); }); it('throws TypeError', function () { + expect(throwTypeError()).toThrow(TypeError); expect(throwTypeError()).toThrowError(TypeError); }); it('throws \'Definition was out of date\'', function () { + expect(throwTypeError()).toThrow(/Definition was out of date/); expect(throwTypeError()).toThrowError(/Definition was out of date/); }); it('throws \'toThorow Definition was out of date\'', function () { + expect(throwTypeError()).toThrow('toThrow Definition was out of date'); expect(throwTypeError()).toThrowError('toThrow Definition was out of date'); }); }); @@ -199,6 +203,19 @@ describe('Assymetric matchers', function () { })); expect.assertions(4); + + interface Test { + a: number; + b: string; + } + + // It's useful to create expected objects before the test call for refactoring purposes + // Assymetric matchers must return any in this case to constrain the required type + const test: Test = { + a: expect.any(Number), + b: expect.anything() + } + expect(callback).toHaveBeenCalledWith(test); }); }); diff --git a/jimp/jimp-tests.ts b/jimp/jimp-tests.ts index 180ce27d7f..a312cd4586 100644 --- a/jimp/jimp-tests.ts +++ b/jimp/jimp-tests.ts @@ -1,7 +1,7 @@ -import Jimp = require('jimp') +import Jimp = require('jimp'); // All code below is from node-jimp document -Jimp.read("lenna.png", function (err, data) { +Jimp.read("lenna.png", (err, data) => { if (err) throw err; data.resize(256, 256) // resize .quality(60) // set JPEG quality @@ -9,93 +9,98 @@ Jimp.read("lenna.png", function (err, data) { .write("lena-small-bw.jpg"); // save }); -Jimp.read("lenna.png").then(function (lenna) { +Jimp.read("lenna.png").then(lenna => { lenna.resize(256, 256) // resize .quality(60) // set JPEG quality .greyscale() // set greyscale .write("lena-small-bw.jpg"); // save -}).catch(function (err) { +}).catch(err => { console.error(err); }); -Jimp.read("./path/to/image.jpg", function (err, image) { +Jimp.read("./path/to/image.jpg", (err, image) => { // do stuff with the image (if no exception) }); -Jimp.read("./path/to/image.jpg").then(function (image) { +Jimp.read("./path/to/image.jpg").then(image => { // do stuff with the image -}).catch(function (err) { +}).catch(err => { // handle an exception }); -Jimp.read(new Buffer(''), function (err, image) { +Jimp.read(new Buffer(''), (err, image) => { // do stuff with the image (if no exception) }); -Jimp.read("http://www.example.com/path/to/lenna.jpg", function (err, image) { +Jimp.read("http://www.example.com/path/to/lenna.jpg", (err, image) => { // do stuff with the image (if no exception) }); -var image = new Jimp(1, 2) -var w = 0 -var h = 0 -var x = 0 -var y = 0 -var f = 0 -var src = '' -var horz = Jimp.HORIZONTAL_ALIGN_CENTER -var vert = Jimp.VERTICAL_ALIGN_BOTTOM -var deg = 90 -var val = 0.5 -var hex = 0xFFFFFFFF -var r = 0 -var n = 1 +var image = new Jimp(1, 2); +var w = 0; +var h = 0; +var x = 0; +var y = 0; +var f = 0; +var src = ''; +var horz = Jimp.HORIZONTAL_ALIGN_CENTER; +var vert = Jimp.VERTICAL_ALIGN_BOTTOM; +var deg = 90; +var val = 0.5; +var hex = 0xFFFFFFFF; +var r = 0; +var n = 1; /* Resize */ -image.contain( w, h); // scale the image to the given width and height, some parts of the image may be letter boxed -image.cover( w, h); // scale the image to the given width and height, some parts of the image may be clipped -image.resize( w, h); // resize the image. Jimp.AUTO can be passed as one of the values. -image.scale(f ); // scale the image by the factor f -image.scaleToFit( w, h ); // scale the image to the largest size that fits inside the given width and height +image.contain(w, h); // scale the image to the given width and height, some parts of the image may be letter boxed +image.cover(w, h); // scale the image to the given width and height, some parts of the image may be clipped +image.resize(w, h); // resize the image. Jimp.AUTO can be passed as one of the values. +image.scale(f); // scale the image by the factor f +image.scaleToFit(w, h); // scale the image to the largest size that fits inside the given width and height // An optional resize mode can be passed with all resize methods. /* Crop */ image.autocrop(); // automatically crop same-color borders from image (if any) -image.crop( x, y, w, h ); // crop to the given region +image.crop(x, y, w, h); // crop to the given region /* Composing */ -image.blit( src, x, y ); +image.blit(src, x, y); // blit the image with another Jimp image at x, y, optionally cropped. -image.composite( src, x, y ); // composites another Jimp image over this image at x, y -image.mask( src, x, y ); // masks the image with another Jimp image at x, y using average pixel value +image.composite(src, x, y); // composites another Jimp image over this image at x, y +image.mask(src, x, y); // masks the image with another Jimp image at x, y using average pixel value /* Flip and rotate */ -image.flip( horz, vert ); // flip the image horizontally or vertically -image.mirror( horz, vert ); // an alias for flip -image.rotate( deg ); // rotate the image clockwise by a number of degrees. Optionally, a resize mode can be passed. If `false` is passed as the second parameter, the image width and height will not be resized. +image.flip(horz, vert); // flip the image horizontally or vertically +image.mirror(horz, vert); // an alias for flip + +// rotate the image clockwise by a number of degrees. +// Optionally, a resize mode can be passed. +// If `false` is passed as the second parameter, +// the image width and height will not be resized. +image.rotate(deg); // JPEG images with EXIF orientation data will be automatically re-orientated as appropriate. /* Colour */ -image.brightness( val ); // adjust the brighness by a value -1 to +1 -image.contrast( val ); // adjust the contrast by a value -1 to +1 +image.brightness(val); // adjust the brighness by a value -1 to +1 +image.contrast(val); // adjust the contrast by a value -1 to +1 image.dither565(); // ordered dithering of the image and reduce color space to 16-bits (RGB565) image.greyscale(); // remove colour from the image image.invert(); // invert the image colours image.normalize(); // normalize the channels in an image /* Alpha channel */ -image.fade( f ); // an alternative to opacity, fades the image by a factor 0 - 1. 0 will haven no effect. 1 will turn the image -image.opacity( f ); // multiply the alpha channel by each pixel by the factor f, 0 - 1 +image.fade(f); // an alternative to opacity, fades the image by a factor 0 - 1. 0 will haven no effect. 1 will turn the image +image.opacity(f); // multiply the alpha channel by each pixel by the factor f, 0 - 1 image.opaque(); // set the alpha channel on every pixel to fully opaque -image.background( hex ); // set the default new pixel colour (e.g. 0xFFFFFFFF or 0x00000000) for by some operations (e.g. image.contain and +image.background(hex); // set the default new pixel colour (e.g. 0xFFFFFFFF or 0x00000000) for by some operations (e.g. image.contain and /* Blurs */ -image.gaussian( r ); // Gaussian blur the image by r pixels (VERY slow) -image.blur( r ); // fast blur the image by r pixels +image.gaussian(r); // Gaussian blur the image by r pixels (VERY slow) +image.blur(r); // fast blur the image by r pixels /* Effects */ -image.posterize( n ); // apply a posterization effect with n level +image.posterize(n); // apply a posterization effect with n level image.sepia(); // apply a sepia wash to the image image.clone(); // returns a clone of the image @@ -107,50 +112,50 @@ image.resize(250, 250, Jimp.RESIZE_BEZIER); image.contain(250, 250, Jimp.HORIZONTAL_ALIGN_LEFT | Jimp.VERTICAL_ALIGN_TOP); -var path = '' -var str = '' -var width = 0 -Jimp.loadFont( path ).then(function (font) { // load font from .fnt file +var path = ''; +var str = ''; +var width = 0; +Jimp.loadFont(path).then(font => { // load font from .fnt file image.print(font, x, y, str); // print a message on an image image.print(font, x, y, str, width); // print a message on an image with text wrapped at width }); -var cb = (err: Error, data: any) => {} -Jimp.loadFont( path, cb ); // using a callback pattern +var cb = (err: Error, data: any) => {}; +Jimp.loadFont(path, cb); // using a callback pattern -Jimp.loadFont(Jimp.FONT_SANS_32_BLACK).then(function (font) { +Jimp.loadFont(Jimp.FONT_SANS_32_BLACK).then(font => { image.print(font, 10, 10, "Hello world!"); }); -image.write( path, cb ); // Node-style callback will be fired when write is successful +image.write(path, cb); // Node-style callback will be fired when write is successful var file = "new_name." + image.getExtension(); -image.write(file) +image.write(file); -var mime = 'image/png' -image.getBuffer( mime, cb ); // Node-style callback will be fired with result -image.getBase64( mime, cb ); // Node-style callback will be fired with result -image.quality( n ); // set the quality of saved JPEG, 0 - 100 +var mime = 'image/png'; +image.getBuffer(mime, cb); // Node-style callback will be fired with result +image.getBase64(mime, cb); // Node-style callback will be fired with result +image.quality(n); // set the quality of saved JPEG, 0 - 100 -var bool = true -var number = 0 -image.rgba( bool ); // set whether PNGs are saved as RGBA (true, default) or RGB (false) -image.filterType( number ); // set the filter type for the saved PNG -image.deflateLevel( number ); // set the deflate level for the saved PNG -Jimp.deflateStrategy( number ); // set the deflate for the saved PNG (0-3) +var bool = true; +var number = 0; +image.rgba(bool); // set whether PNGs are saved as RGBA (true, default) or RGB (false) +image.filterType(number); // set the filter type for the saved PNG +image.deflateLevel(number); // set the deflate level for the saved PNG +Jimp.deflateStrategy(number); // set the deflate for the saved PNG (0-3) image.color([ { apply: 'hue', params: [ -90 ] }, { apply: 'lighten', params: [ 50 ] }, { apply: 'xor', params: [ '#06D' ] } ]); - image.convolution([ - [-2,-1, 0], +image.convolution([ + [-2, -1, 0], [-1, 1, 1], [ 0, 1, 2] - ]) -image.scan(0, 0, image.bitmap.width, image.bitmap.height, function (x, y, idx) { +]); +image.scan(0, 0, image.bitmap.width, image.bitmap.height, function(x, y, idx) { // x, y is the position of this pixel on the image // idx is the position start position of this rgba tuple in the bitmap Buffer // this is the image @@ -166,28 +171,28 @@ image.scan(0, 0, image.bitmap.width, image.bitmap.height, function (x, y, idx) { image.getPixelColor(x, y); // returns the colour of that pixel e.g. 0xFFFFFFFF image.setPixelColor(hex, x, y); // sets the colour of that pixel -var g = 0 -var b = 0 -var a = 0 +var g = 0; +var b = 0; +var a = 0; Jimp.rgbaToInt(r, g, b, a); // e.g. converts 255, 255, 255, 255 to 0xFFFFFFFF Jimp.intToRGBA(hex); // e.g. converts 0xFFFFFFFF to {r: 255, g: 255, b: 255, a:255} -var image = new Jimp(256, 256, function (err, image) { +var image = new Jimp(256, 256, (err, image) => { // this image is 256 x 256, every pixel is set to 0x00000000 }); -var image = new Jimp(256, 256, 0xFF0000FF, function (err, image) { +var image = new Jimp(256, 256, 0xFF0000FF, (err, image) => { // this image is 256 x 256, every pixel is set to 0xFF0000FF }); image.hash(); // aHgG4GgoFjA image.hash(2); // 1010101011010000101010000100101010010000011001001001010011100100 -var image1 = new Jimp(0, 1) -var image2 = new Jimp(0, 1) +var image1 = new Jimp(0, 1); +var image2 = new Jimp(0, 1); Jimp.distance(image1, image2); // returns a number 0-1, where 0 means the two images are perceived to be identical -var threshold = 0 +var threshold = 0; var diff = Jimp.diff(image1, image2, threshold); // threshold ranges 0-1 (default: 0.1) diff.image; // a Jimp image showing differences diff.percent; // the proportion of different pixels (0-1), where 0 means the images are pixel identical @@ -202,13 +207,13 @@ if (distance < 0.15 || diff.percent < 0.15) { // not a match } -Jimp.read("lenna.png", function (err, image) { +Jimp.read("lenna.png", function(err, image) { this.greyscale().scale(0.5).write("lena-half-bw.png"); }); -Jimp.read("lenna.png", function (err, image) { - image.greyscale(function(err, image) { - image.scale(0.5, function (err, image) { +Jimp.read("lenna.png", (err, image) => { + image.greyscale((err, image) => { + image.scale(0.5, (err, image) => { image.write("lena-half-bw.png"); }); }); diff --git a/jmespath/index.d.ts b/jmespath/index.d.ts new file mode 100644 index 0000000000..a460fd6a4d --- /dev/null +++ b/jmespath/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for jmespath 0.15 +// Project: https://github.com/jmespath/jmespath.js +// Definitions by: Jeffery Grajkowski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Take a JSON document and transform it into another JSON document + * through a JMESPath expression. See: http://jmespath.org/ + * @param jsonDoc the document to transform + * @param query a JMESPath expression + * @return the transformed document + */ +export function search(jsonDoc: any, query: string): any; diff --git a/jmespath/jmespath-tests.ts b/jmespath/jmespath-tests.ts new file mode 100644 index 0000000000..04034acf67 --- /dev/null +++ b/jmespath/jmespath-tests.ts @@ -0,0 +1,6 @@ +import jmespath = require("jmespath"); + +const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]"); +const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar") +const c = jmespath.search({"foo": [{"first": "a", "last": "b"}, {"first": "c", "last": "d"}]}, "foo[*].first"); +const d = jmespath.search({"foo": [{"age": 20}, {"age": 25}, {"age": 30}, {"age": 35}, {"age": 40}]}, "foo[?age > `30`]"); diff --git a/jmespath/tsconfig.json b/jmespath/tsconfig.json new file mode 100644 index 0000000000..7db8ecc248 --- /dev/null +++ b/jmespath/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jmespath-tests.ts" + ] +} diff --git a/jmespath/tslint.json b/jmespath/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/jmespath/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/joi/index.d.ts b/joi/index.d.ts index 55e6b9c75f..fe1f0e39f8 100644 --- a/joi/index.d.ts +++ b/joi/index.d.ts @@ -91,6 +91,12 @@ export interface IpOptions { cidr?: string; } +export type GuidVersions = 'uuidv1' | 'uuidv2' | 'uuidv3' | 'uuidv4' | 'uuidv5' + +export interface GuidOptions { + version: GuidVersions[] | GuidVersions +} + export interface UriOptions { /** * Specifies one or more acceptable Schemes, should only include the scheme name. @@ -443,7 +449,7 @@ export interface StringSchema extends AnySchema { /** * Requires the string value to be a valid GUID. */ - guid(): StringSchema; + guid(options?: GuidOptions): StringSchema; /** * Requires the string value to be a valid hexadecimal string. diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index 59eb446b2f..3a222ff832 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -691,6 +691,8 @@ strSchema = strSchema.ip(ipOpts); strSchema = strSchema.uri(); strSchema = strSchema.uri(uriOpts); strSchema = strSchema.guid(); +strSchema = strSchema.guid({version: ['uuidv1', 'uuidv2', 'uuidv3', 'uuidv4', 'uuidv5']}); +strSchema = strSchema.guid({version: 'uuidv4'}); strSchema = strSchema.hex(); strSchema = strSchema.hostname(); strSchema = strSchema.isoDate(); diff --git a/joi/v6/joi-tests.ts b/joi/v6/joi-tests.ts index 265bbd045c..03ca5ffac0 100644 --- a/joi/v6/joi-tests.ts +++ b/joi/v6/joi-tests.ts @@ -1,4 +1,3 @@ -/// /// import Joi = require('joi'); diff --git a/jointjs/index.d.ts b/jointjs/index.d.ts index c8ef9ae302..5ce0f187f0 100644 --- a/jointjs/index.d.ts +++ b/jointjs/index.d.ts @@ -6,835 +6,892 @@ /// +import * as Backbone from "backbone"; -declare namespace joint { - export var g: any; - export var V: any; +export as namespace joint; - namespace dia { - interface Size { - width: number; - height: number; - } +export var g: any; +export var V: any; - interface Point { - x: number; - y: number; - } +export namespace dia { + interface Size { + width: number; + height: number; + } - interface BBox extends Point, Size { } + interface Point { + x: number; + y: number; + } - interface TranslateOptions { - restrictedArea?: BBox; - transition?: TransitionOptions; - } + interface BBox extends Point, Size { } - interface TransitionOptions { - delay?: number; - duration?: number; - timingFunction?: (t: number) => number; - valueFunction?: (a: any, b: any) => (t: number) => any; - } + interface TranslateOptions { + restrictedArea?: BBox; + transition?: TransitionOptions; + } - interface DfsBfsOptions { - inbound?: boolean; - outbound?: boolean; - deep?: boolean; - } + interface TransitionOptions { + delay?: number; + duration?: number; + timingFunction?: (t: number) => number; + valueFunction?: (a: any, b: any) => (t: number) => any; + } - interface ExploreOptions { - breadthFirst?: boolean; - deep?: boolean; - } + interface DfsBfsOptions { + inbound?: boolean; + outbound?: boolean; + deep?: boolean; + } - class Graph extends Backbone.Model { - constructor(attributes?: any, options?: { cellNamespace: any }); - addCell(cell: Cell | Cell[]): this; - addCells(cells: Cell[]): this; - resetCells(cells: Cell[], options?: any): this; - getCell(id: string): Cell; - getElements(): Element[]; - getLinks(): Link[]; - getCells(): Cell[]; - getFirstCell(): Cell; - getLastCell(): Cell; - getConnectedLinks(element: Cell, options?: { inbound?: boolean, outbound?: boolean, deep?: boolean }): Link[]; - disconnectLinks(cell: Cell, options?: any): void; - removeLinks(cell: Cell, options?: any): void; - translate(tx: number, ty?: number, options?: TranslateOptions): void; - cloneCells(cells: Cell[]): { [id: string]: Cell }; - getSubgraph(cells: Cell[], options?: { deep?: boolean }): Cell[]; - cloneSubgraph(cells: Cell[], options?: { deep?: boolean }): { [id: string]: Cell }; - dfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions, visited?: Object, distance?: number): void; - bfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions): void; - search(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: { breadthFirst?: boolean }): void; - getSuccessors(element: Element, options?: ExploreOptions): Element[]; - getPredecessors(element: Element, options?: ExploreOptions): Element[]; - isSuccessor(elementA: Element, elementB: Element): boolean; - isPredecessor(elementA: Element, elementB: Element): boolean; - isSource(element: Element): boolean; - isSink(element: Element): boolean; - getSources(): Element[]; - getSinks(): Element[]; - getNeighbors(element: Element, options?: DfsBfsOptions): Element[]; - isNeighbor(elementA: Element, elementB: Element, options?: { inbound?: boolean, outbound?: boolean; }): boolean; - getCommonAncestor(...cells: Cell[]): Element; - toJSON(): any; - fromJSON(json: any, options?: any): this; - clear(options?: any): this; - findModelsFromPoint(rect: BBox): Element[]; - findModelsUnderElement(element: Element, options?: { searchBy?: 'bbox' | 'center' | 'origin' | 'corner' | 'topRight' | 'bottomLeft' }): Element[]; - getBBox(elements: Element[], options?: any): BBox; - toGraphLib(): any; // graphlib graph object - findModelsInArea(rect: BBox, options?: any): BBox | boolean; - getCellsBBox(cells: Cell[], options?: any): BBox; - getInboundEdges(node: string): Object; - getOutboundEdges(node: string): Object; - hasActiveBatch(name?: string): number | boolean; - maxZIndex(): number; - removeCells(cells: Cell[], options?: any): this; - resize(width: number, height: number, options?: number): this; - resizeCells(width: number, height: number, cells: Cell[], options?: number): this; - set(key: Object | string, value: any, options?: any): this; - startBatch(name: string, data?: Object): any; - stopBatch(name: string, data?: Object): any; - } + interface ExploreOptions { + breadthFirst?: boolean; + deep?: boolean; + } - class Cell extends Backbone.Model { - id: string; - toJSON(): any; - remove(options?: { disconnectLinks?: boolean }): this; - toFront(options?: { deep?: boolean }): this; - toBack(options?: { deep?: boolean }): this; - getAncestors(): Cell[]; - isEmbeddedIn(element: Element, options?: { deep: boolean }): boolean; - prop(key: string): any; - prop(object: any): this; - prop(key: string, value: any, options?: any): this; - removeProp(path: string, options?: any): this; - attr(key: string): any; - attr(object: SVGAttributes): this; - attr(key: string, value: any): this; - clone(): Cell; - clone(opt: { deep?: boolean }): Cell | Cell[]; - removeAttr(path: string | string[], options?: any): this; - transition(path: string, value?: any, options?: TransitionOptions, delim?: string): number; - getTransitions(): string[]; - stopTransitions(path?: string, delim?: string): this; - addTo(graph: Graph, options?: any): this; - isLink(): boolean; - embed(cell: Cell, options?: any): this; - findView(paper: Paper): CellView; - getEmbeddedCells(options?: any): Cell[]; - initialize(options?: any): void; - isElement(): boolean; - isEmbedded(): boolean; - processPorts(): void; - startBatch(name: string, options?: any): this; - stopBatch(name: string, options?: any): this; - unembed(cell: Cell, options?: any): this; - } + class Graph extends Backbone.Model { + constructor(attributes?: any, options?: { cellNamespace: any }); + addCell(cell: Cell | Cell[]): this; + addCells(cells: Cell[]): this; + resetCells(cells: Cell[], options?: any): this; + getCell(id: string): Cell; + getElements(): Element[]; + getLinks(): Link[]; + getCells(): Cell[]; + getFirstCell(): Cell; + getLastCell(): Cell; + getConnectedLinks(element: Cell, options?: { inbound?: boolean, outbound?: boolean, deep?: boolean }): Link[]; + disconnectLinks(cell: Cell, options?: any): void; + removeLinks(cell: Cell, options?: any): void; + translate(tx: number, ty?: number, options?: TranslateOptions): void; + cloneCells(cells: Cell[]): { [id: string]: Cell }; + getSubgraph(cells: Cell[], options?: { deep?: boolean }): Cell[]; + cloneSubgraph(cells: Cell[], options?: { deep?: boolean }): { [id: string]: Cell }; + dfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions, visited?: Object, distance?: number): void; + bfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions): void; + search(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: { breadthFirst?: boolean }): void; + getSuccessors(element: Element, options?: ExploreOptions): Element[]; + getPredecessors(element: Element, options?: ExploreOptions): Element[]; + isSuccessor(elementA: Element, elementB: Element): boolean; + isPredecessor(elementA: Element, elementB: Element): boolean; + isSource(element: Element): boolean; + isSink(element: Element): boolean; + getSources(): Element[]; + getSinks(): Element[]; + getNeighbors(element: Element, options?: DfsBfsOptions): Element[]; + isNeighbor(elementA: Element, elementB: Element, options?: { inbound?: boolean, outbound?: boolean; }): boolean; + getCommonAncestor(...cells: Cell[]): Element; + toJSON(): any; + fromJSON(json: any, options?: any): this; + clear(options?: any): this; + findModelsFromPoint(rect: BBox): Element[]; + findModelsUnderElement(element: Element, options?: { searchBy?: 'bbox' | 'center' | 'origin' | 'corner' | 'topRight' | 'bottomLeft' }): Element[]; + getBBox(elements: Element[], options?: any): BBox; + toGraphLib(): any; // graphlib graph object + findModelsInArea(rect: BBox, options?: any): BBox | boolean; + getCellsBBox(cells: Cell[], options?: any): BBox; + getInboundEdges(node: string): Object; + getOutboundEdges(node: string): Object; + hasActiveBatch(name?: string): number | boolean; + maxZIndex(): number; + removeCells(cells: Cell[], options?: any): this; + resize(width: number, height: number, options?: number): this; + resizeCells(width: number, height: number, cells: Cell[], options?: number): this; + set(key: Object | string, value: any, options?: any): this; + startBatch(name: string, data?: Object): any; + stopBatch(name: string, data?: Object): any; + } - type Padding = number | { - top?: number; - right?: number; - bottom?: number; - left?: number - }; + class Cell extends Backbone.Model { + id: string; + toJSON(): any; + remove(options?: { disconnectLinks?: boolean }): this; + toFront(options?: { deep?: boolean }): this; + toBack(options?: { deep?: boolean }): this; + getAncestors(): Cell[]; + isEmbeddedIn(element: Element, options?: { deep: boolean }): boolean; + prop(key: string): any; + prop(object: any): this; + prop(key: string, value: any, options?: any): this; + removeProp(path: string, options?: any): this; + attr(key: string): any; + attr(object: SVGAttributes): this; + attr(key: string, value: any): this; + clone(): Cell; + clone(opt: { deep?: boolean }): Cell | Cell[]; + removeAttr(path: string | string[], options?: any): this; + transition(path: string, value?: any, options?: TransitionOptions, delim?: string): number; + getTransitions(): string[]; + stopTransitions(path?: string, delim?: string): this; + addTo(graph: Graph, options?: any): this; + isLink(): boolean; + embed(cell: Cell, options?: any): this; + findView(paper: Paper): CellView; + getEmbeddedCells(options?: any): Cell[]; + initialize(options?: any): void; + isElement(): boolean; + isEmbedded(): boolean; + processPorts(): void; + startBatch(name: string, options?: any): this; + stopBatch(name: string, options?: any): this; + unembed(cell: Cell, options?: any): this; + } - class Element extends Cell { - translate(tx: number, ty?: number, options?: TranslateOptions): this; - position(options?: { parentRelative: boolean }): Point; - position(x: number, y: number, options?: { parentRelative?: boolean }): this; - resize(width: number, height: number, options?: { direction?: 'left' | 'right' | 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' }): this; - rotate(deg: number, absolute?: boolean, origin?: Point): this; - embed(cell: Cell): this; - unembed(cell: Cell): this; - getEmbeddedCells(options?: ExploreOptions): Cell[]; - fitEmbeds(options?: { deep?: boolean, padding?: Padding }): this; - getBBox(options?: any): BBox; - findView(paper: Paper): ElementView; - isElement(): boolean; - scale(scaleX: number, scaleY: number, origin?: Point, options?: any): this; - } + type Padding = number | { + top?: number; + right?: number; + bottom?: number; + left?: number + }; - interface CSSSelector { - [key: string]: string | number | Object; // Object added to support special attributes like filter http://jointjs.com/api#SpecialAttributes:filter - } + class Element extends Cell { + translate(tx: number, ty?: number, options?: TranslateOptions): this; + position(options?: { parentRelative: boolean }): Point; + position(x: number, y: number, options?: { parentRelative?: boolean }): this; + resize(width: number, height: number, options?: { direction?: 'left' | 'right' | 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' }): this; + rotate(deg: number, absolute?: boolean, origin?: Point): this; + embed(cell: Cell): this; + unembed(cell: Cell): this; + getEmbeddedCells(options?: ExploreOptions): Cell[]; + fitEmbeds(options?: { deep?: boolean, padding?: Padding }): this; + getBBox(options?: any): BBox; + findView(paper: Paper): ElementView; + isElement(): boolean; + scale(scaleX: number, scaleY: number, origin?: Point, options?: any): this; + addPort(port: any, opt?: any): this; + addPorts(ports: any[], opt?: any): this; + removePort(port: any, opt?: any): this; + hasPorts(): boolean; + hasPort(id: string): boolean; + getPorts(): any[]; + getPort(id: string): any; + getPortIndex(port: any): number; + portProp(portId: string, path: any, value?: any, opt?: any): joint.dia.Element; + } - interface SVGAttributes { - [selector: string]: CSSSelector; - } + interface CSSSelector { + [key: string]: string | number | Object; // Object added to support special attributes like filter http://jointjs.com/api#SpecialAttributes:filter + } - interface CellAttributes { - [key: string]: any; - } + interface SVGAttributes { + [selector: string]: CSSSelector; + } - interface TextAttrs extends SVGAttributes { - text?: { - [key: string]: string | number; - text?: string; - }; - } + interface CellAttributes { + [key: string]: any; + } - interface Label { - position: number; - attrs?: TextAttrs; - } - interface LinkAttributes extends CellAttributes { - source?: Point | { id: string, selector?: string, port?: string }; - target?: Point | { id: string, selector?: string, port?: string }; - labels?: Label[]; - vertices?: Point[]; - smooth?: boolean; - attrs?: TextAttrs; - z?: number; - } - - class Link extends Cell { - markup: string; - labelMarkup: string; - toolMakup: string; - vertexMarkup: string; - arrowHeadMarkup: string; - - constructor(attributes?: LinkAttributes, options?: Object); - disconnect(): this; - label(index?: number): any; - label(index: number, value: Label): this; - reparent(options?: any): Element; - findView(paper: Paper): LinkView; - getSourceElement(): Element; - getTargetElement(): Element; - hasLoop(options?: { deep?: boolean }): boolean; - applyToPoints(fn: Function, options?: any): this; - getRelationshipAncestor(): Element; - isLink(): boolean; - isRelationshipEmbeddedIn(element: Element): boolean; - scale(sx: number, sy: number, origin: Point, optionts?: any): this; - translate(tx: number, ty: number, options?: any): this; - } - - interface ManhattanRouterArgs { - excludeTypes?: string[]; - excludeEnds?: 'source' | 'target'; - startDirections?: ['left' | 'right' | 'top' | 'bottom']; - endDirections?: ['left' | 'right' | 'top' | 'bottom']; - } - - interface PaperOptions extends Backbone.ViewOptions { - el?: string | JQuery | HTMLElement; - width?: number; - height?: number; - origin?: Point; - gridSize?: number; - perpendicularLinks?: boolean; - elementView?: (element: Element) => ElementView | ElementView; - linkView?: (link: Link) => LinkView | LinkView; - defaultLink?: ((cellView: CellView, magnet: SVGElement) => Link) | Link; - defaultRouter?: ((vertices: Point[], args: Object, linkView: LinkView) => Point[]) | { name: string, args?: ManhattanRouterArgs }; - defaultConnector?: ((sourcePoint: Point, targetPoint: Point, vertices: Point[], args: Object, linkView: LinkView) => string) | { name: string, args?: { radius?: number } }; - interactive?: ((cellView: CellView, event: string) => boolean) | boolean | { vertexAdd?: boolean, vertexMove?: boolean, vertexRemove?: boolean, arrowheadMove?: boolean }; - validateMagnet?: (cellView: CellView, magnet: SVGElement) => boolean; - validateConnection?: (cellViewS: CellView, magnetS: SVGElement, cellViewT: CellView, magnetT: SVGElement, end: 'source' | 'target', linkView: LinkView) => boolean; - linkConnectionPoint?: (linkView: LinkView, view: ElementView, magnet: SVGElement, reference: Point) => Point; - snapLinks?: boolean | { radius: number }; - linkPinning?: boolean; - markAvailable?: boolean; - async?: boolean | { batchZise: number }; - embeddingMode?: boolean; - validateEmbedding?: (childView: ElementView, parentView: ElementView) => boolean; - restrictTranslate?: ((elementView: ElementView) => BBox) | boolean; - guard?: (evt: Event, view: CellView) => boolean; - multiLinks?: boolean; - cellViewNamespace?: Object; - /** useful undocumented option */ - clickThreshold?: number; - highlighting?: any; - } - - interface ScaleContentOptions { - padding?: number; - preserveAspectRatio?: boolean; - minScale?: number; - minScaleX?: number; - minScaleY?: number; - maxScale?: number; - maxScaleX?: number; - maxScaleY?: number; - scaleGrid?: number; - fittingBBox?: BBox; - } - - interface FitToContentOptions { - gridWidth?: number; - gridHeight?: number; - padding?: Padding; - allowNewOrigin?: 'negative' | 'positive' | 'any'; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - } - - class Paper extends Backbone.View { - constructor(options?: PaperOptions); - options: PaperOptions; - svg: SVGElement; - viewport: SVGGElement; - defs: SVGDefsElement; - setDimensions(width: number, height: number): void; - setOrigin(x: number, y: number): void; - scale(sx: number, sy?: number, ox?: number, oy?: number): this; - findView(element: any): CellView; - findViewByModel(model: Cell | string): CellView; - findViewsFromPoint(point: Point): ElementView[]; - findViewsInArea(rect: BBox, options?: { strict?: boolean }): CellView[]; - fitToContent(options?: FitToContentOptions): void; - scaleContentToFit(options?: ScaleContentOptions): void; - getContentBBox(): BBox; - clientToLocalPoint(p: Point): Point; - - rotate(deg: number, ox?: number, oy?: number): Paper; // @todo not released yet though it's in the source code already - - afterRenderViews(): void; - asyncRenderViews(cells: Cell[], options?: any): void; - beforeRenderViews(cells: Cell[]): Cell[]; - cellMouseout(evt: Event): void; - cellMouseover(evt: Event): void; - clearGrid(): this; - contextmenu(evt: Event): void; - createViewForModel(cell: Cell): CellView; - drawGrid(options?: any): this; - fitToContent(gridWidth?: number, gridHeight?: number, padding?: number, options?: any): void; - getArea(): BBox; - getDefaultLink(cellView: CellView, magnet: HTMLElement): Link; - getModelById(id: string): Cell; - getRestrictedArea(): BBox; - guard(evt: Event, view: CellView): boolean; - linkAllowed(linkViewOrModel: LinkView | Link): boolean; - mouseclick(evt: Event): void; - mousedblclick(evt: Event): void; - mousewheel(evt: Event): void; - onCellAdded(cell: Cell, graph: Graph, options: Object): void; - onCellHighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; - onCellUnhighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; - onRemove(): void; - pointerdown(evt: Event): void; - pointermove(evt: Event): void; - pointerup(evt: Event): void; - remove(): this; - removeView(cell: Cell): CellView; - removeViews(): void; - renderView(cell: Cell): CellView; - resetViews(cellsCollection: Cell[], options: any): void; - resolveHighlighter(options?: any): boolean | Object; - setGridSize(gridSize: number): this; - setInteractivity(value: any): void; - snapToGrid(p: Point): Point; - sortViews(): void; - } - - - interface GradientOptions { - type: 'linearGradient' | 'radialGradient'; - stops: Array<{ - offset: string; - color: string; - opacity?: number; - }>; - } - class CellViewGeneric extends Backbone.View { - getBBox(options?: { useModelGeometry?: boolean }): BBox; - highlight(el?: any, options?: any): this; - unhighlight(el?: any, options?: any): this; - applyFilter(selector: string | HTMLElement, filter: Object): void; - applyGradient(selector: string | HTMLElement, attr: 'fill' | 'stroke', gradient: GradientOptions): void; - can(feature: string): boolean; - findBySelector(selector: string): JQuery; - findMagnet(el: any): HTMLElement; - getSelector(el: HTMLElement, prevSelector: string): string; - getStrokeBBox(el: any): BBox; // string|HTMLElement|Vectorizer - mouseout(evt: Event): void; - mouseover(evt: Event): void; - mousewheel(evt: Event, x: number, y: number, delta: number): void - notify(eventName: string): void; - onChangeAttrs(cell: Cell, attrs: Backbone.ViewOptions, options?: any): this; - onSetTheme(oldTheme: string, newTheme: string): void; - pointerclick(evt: Event, x: number, y: number): void; - pointerdblclick(evt: Event, x: number, y: number): void; - pointerdown(evt: Event, x: number, y: number): void; - pointermove(evt: Event, x: number, y: number): void; - pointerup(evt: Event, x: number, y: number): void; - remove(): this; - setInteractivity(value: any): void; - setTheme(theme: string, options?: any): this; - } - - class CellView extends CellViewGeneric { } - - interface ElementViewAttributes { - style?: string; + interface TextAttrs extends SVGAttributes { + text?: { + [key: string]: string | number; text?: string; - html?: string; - "ref-x"?: string | number; - "ref-y"?: string | number; - "ref-dx"?: number; - "ref-dy"?: number; - "ref-width"?: string | number; - "ref-height"?: string | number; + }; + } + + interface Label { + position: number; + attrs?: TextAttrs; + } + interface LinkAttributes extends CellAttributes { + source?: Point | { id: string, selector?: string, port?: string }; + target?: Point | { id: string, selector?: string, port?: string }; + labels?: Label[]; + vertices?: Point[]; + smooth?: boolean; + attrs?: TextAttrs; + z?: number; + } + + class Link extends Cell { + markup: string; + labelMarkup: string; + toolMakup: string; + vertexMarkup: string; + arrowHeadMarkup: string; + + constructor(attributes?: LinkAttributes, options?: Object); + disconnect(): this; + label(index?: number): any; + label(index: number, value: Label): this; + reparent(options?: any): Element; + findView(paper: Paper): LinkView; + getSourceElement(): Element; + getTargetElement(): Element; + hasLoop(options?: { deep?: boolean }): boolean; + applyToPoints(fn: Function, options?: any): this; + getRelationshipAncestor(): Element; + isLink(): boolean; + isRelationshipEmbeddedIn(element: Element): boolean; + scale(sx: number, sy: number, origin: Point, optionts?: any): this; + translate(tx: number, ty: number, options?: any): this; + } + + interface ManhattanRouterArgs { + excludeTypes?: string[]; + excludeEnds?: 'source' | 'target'; + startDirections?: ['left' | 'right' | 'top' | 'bottom']; + endDirections?: ['left' | 'right' | 'top' | 'bottom']; + } + + interface PaperOptions extends Backbone.ViewOptions { + el?: string | JQuery | HTMLElement; + width?: number; + height?: number; + origin?: Point; + gridSize?: number; + perpendicularLinks?: boolean; + elementView?: (element: Element) => ElementView | ElementView; + linkView?: (link: Link) => LinkView | LinkView; + defaultLink?: ((cellView: CellView, magnet: SVGElement) => Link) | Link; + defaultRouter?: ((vertices: Point[], args: Object, linkView: LinkView) => Point[]) | { name: string, args?: ManhattanRouterArgs }; + defaultConnector?: ((sourcePoint: Point, targetPoint: Point, vertices: Point[], args: Object, linkView: LinkView) => string) | { name: string, args?: { radius?: number } }; + interactive?: ((cellView: CellView, event: string) => boolean) | boolean | { vertexAdd?: boolean, vertexMove?: boolean, vertexRemove?: boolean, arrowheadMove?: boolean }; + validateMagnet?: (cellView: CellView, magnet: SVGElement) => boolean; + validateConnection?: (cellViewS: CellView, magnetS: SVGElement, cellViewT: CellView, magnetT: SVGElement, end: 'source' | 'target', linkView: LinkView) => boolean; + linkConnectionPoint?: (linkView: LinkView, view: ElementView, magnet: SVGElement, reference: Point) => Point; + snapLinks?: boolean | { radius: number }; + linkPinning?: boolean; + markAvailable?: boolean; + async?: boolean | { batchZise: number }; + embeddingMode?: boolean; + validateEmbedding?: (childView: ElementView, parentView: ElementView) => boolean; + restrictTranslate?: ((elementView: ElementView) => BBox) | boolean; + guard?: (evt: Event, view: CellView) => boolean; + multiLinks?: boolean; + cellViewNamespace?: Object; + /** useful undocumented option */ + clickThreshold?: number; + highlighting?: any; + } + + interface ScaleContentOptions { + padding?: number; + preserveAspectRatio?: boolean; + minScale?: number; + minScaleX?: number; + minScaleY?: number; + maxScale?: number; + maxScaleX?: number; + maxScaleY?: number; + scaleGrid?: number; + fittingBBox?: BBox; + } + + interface FitToContentOptions { + gridWidth?: number; + gridHeight?: number; + padding?: Padding; + allowNewOrigin?: 'negative' | 'positive' | 'any'; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + } + + class Paper extends Backbone.View { + constructor(options?: PaperOptions); + options: PaperOptions; + svg: SVGElement; + viewport: SVGGElement; + defs: SVGDefsElement; + setDimensions(width: number, height: number): void; + setOrigin(x: number, y: number): void; + scale(sx: number, sy?: number, ox?: number, oy?: number): this; + findView(element: any): CellView; + findViewByModel(model: Cell | string): CellView; + findViewsFromPoint(point: Point): ElementView[]; + findViewsInArea(rect: BBox, options?: { strict?: boolean }): CellView[]; + fitToContent(options?: FitToContentOptions): void; + scaleContentToFit(options?: ScaleContentOptions): void; + getContentBBox(): BBox; + clientToLocalPoint(p: Point): Point; + + rotate(deg: number, ox?: number, oy?: number): Paper; // @todo not released yet though it's in the source code already + + afterRenderViews(): void; + asyncRenderViews(cells: Cell[], options?: any): void; + beforeRenderViews(cells: Cell[]): Cell[]; + cellMouseout(evt: Event): void; + cellMouseover(evt: Event): void; + clearGrid(): this; + contextmenu(evt: Event): void; + createViewForModel(cell: Cell): CellView; + drawGrid(options?: any): this; + fitToContent(gridWidth?: number, gridHeight?: number, padding?: number, options?: any): void; + getArea(): BBox; + getDefaultLink(cellView: CellView, magnet: HTMLElement): Link; + getModelById(id: string): Cell; + getRestrictedArea(): BBox; + guard(evt: Event, view: CellView): boolean; + linkAllowed(linkViewOrModel: LinkView | Link): boolean; + mouseclick(evt: Event): void; + mousedblclick(evt: Event): void; + mousewheel(evt: Event): void; + onCellAdded(cell: Cell, graph: Graph, options: Object): void; + onCellHighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; + onCellUnhighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; + onRemove(): void; + pointerdown(evt: Event): void; + pointermove(evt: Event): void; + pointerup(evt: Event): void; + remove(): this; + removeView(cell: Cell): CellView; + removeViews(): void; + renderView(cell: Cell): CellView; + resetViews(cellsCollection: Cell[], options: any): void; + resolveHighlighter(options?: any): boolean | Object; + setGridSize(gridSize: number): this; + setInteractivity(value: any): void; + snapToGrid(p: Point): Point; + sortViews(): void; + } + + + interface GradientOptions { + type: 'linearGradient' | 'radialGradient'; + stops: Array<{ + offset: string; + color: string; + opacity?: number; + }>; + } + class CellViewGeneric extends Backbone.View { + getBBox(options?: { useModelGeometry?: boolean }): BBox; + highlight(el?: any, options?: any): this; + unhighlight(el?: any, options?: any): this; + applyFilter(selector: string | HTMLElement, filter: Object): void; + applyGradient(selector: string | HTMLElement, attr: 'fill' | 'stroke', gradient: GradientOptions): void; + can(feature: string): boolean; + findBySelector(selector: string): JQuery; + findMagnet(el: any): HTMLElement; + getSelector(el: HTMLElement, prevSelector: string): string; + getStrokeBBox(el: any): BBox; // string|HTMLElement|Vectorizer + mouseout(evt: Event): void; + mouseover(evt: Event): void; + mousewheel(evt: Event, x: number, y: number, delta: number): void + notify(eventName: string): void; + onChangeAttrs(cell: Cell, attrs: Backbone.ViewOptions, options?: any): this; + onSetTheme(oldTheme: string, newTheme: string): void; + pointerclick(evt: Event, x: number, y: number): void; + pointerdblclick(evt: Event, x: number, y: number): void; + pointerdown(evt: Event, x: number, y: number): void; + pointermove(evt: Event, x: number, y: number): void; + pointerup(evt: Event, x: number, y: number): void; + remove(): this; + setInteractivity(value: any): void; + setTheme(theme: string, options?: any): this; + } + + class CellView extends CellViewGeneric { } + + interface ElementViewAttributes { + style?: string; + text?: string; + html?: string; + "ref-x"?: string | number; + "ref-y"?: string | number; + "ref-dx"?: number; + "ref-dy"?: number; + "ref-width"?: string | number; + "ref-height"?: string | number; + ref?: string; + "x-alignment"?: 'middle' | 'right' | number; + "y-alignment"?: 'middle' | 'bottom' | number; + port?: string; + } + class ElementView extends CellViewGeneric { + scale(sx: number, sy: number): void; // @todo Documented in source but not released + finalizeEmbedding(options?: any): void; + getBBox(options?: any): BBox; + pointerdown(evt: Event, x: number, y: number): void; + pointermove(evt: Event, x: number, y: number): void; + pointerup(evt: Event, x: number, y: number): void; + positionRelative(vel: any, bbox: BBox, attributes: ElementViewAttributes, nodesBySelector?: Object): void; // Vectorizer + prepareEmbedding(options?: any): void; + processEmbedding(options?: any): void; + render(): this; + renderMarkup(): void; + resize(): void; + rotate(): void; + translate(model: Backbone.Model, changes?: any, options?: any): void; + update(cell: Cell, renderingOnlyAttrs?: Object): void; + } + + class LinkView extends CellViewGeneric { + options: { + shortLinkLength?: number, + doubleLinkTools?: boolean, + longLinkLength?: number, + linkToolsOffset?: number, + doubleLinkToolsOffset?: number, + sampleInterval: number + }; + getConnectionLength(): number; + sendToken(token: SVGElement, duration?: number, callback?: () => void): void; + addVertex(vertex: Point): number; + getPointAtLength(length: number): Point; // Marked as public api in source but not in the documents + createWatcher(endType: { id: string }): Function; + findRoute(oldVertices: Point[]): Point[]; + getConnectionPoint(end: 'source' | 'target', selectorOrPoint: Element | Point, referenceSelectorOrPoint: Element | Point): Point; + getPathData(vertices: Point[]): any; + onEndModelChange(endType: 'source' | 'target', endModel?: Element, opt?: any): void; + onLabelsChange(): void; + onSourceChange(cell: Cell, sourceEnd: { id: string }, options: any): void; + onTargetChange(cell: Cell, targetEnd: { id: string }, options: any): void; + onToolsChange(): void; + onVerticesChange(cell: Cell, changed: any, options: any): void; + pointerdown(evt: Event, x: number, y: number): void; + pointermove(evt: Event, x: number, y: number): void; + pointerup(evt: Event, x: number, y: number): void; + removeVertex(idx: number): this; + render(): this; + renderArrowheadMarkers(): this; + renderLabels(): this; + renderTools(): this; + renderVertexMarkers(): this; + startArrowheadMove(end: 'source' | 'target', options?: any): void; + startListening(): void; + update(model: any, attributes: any, options?: any): this; + updateArrowheadMarkers(): this; + updateAttributes(): void; + updateConnection(options?: any): void; + updateLabelPositions(): this; + updateToolsPosition(): this; + } +} + +export namespace ui { } + +export namespace shapes { + interface GenericAttributes extends dia.CellAttributes { + position?: dia.Point; + size?: dia.Size; + angle?: number; + attrs?: T; + } + interface ShapeAttrs extends dia.CSSSelector { + fill?: string; + stroke?: string; + r?: string | number; + rx?: string | number; + ry?: string | number; + cx?: string | number; + cy?: string | number; + height?: string | number; + width?: string | number; + transform?: string; + points?: string; + 'stroke-width'?: string | number; + 'ref-x'?: string | number; + 'ref-y'?: string | number; + ref?: string + } + + namespace basic { + class Generic extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface RectAttrs extends dia.TextAttrs { + rect?: ShapeAttrs; + } + class Rect extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Text extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface CircleAttrs extends dia.TextAttrs { + circle?: ShapeAttrs; + } + class Circle extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface EllipseAttrs extends dia.TextAttrs { + ellipse?: ShapeAttrs; + } + class Ellipse extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface PolygonAttrs extends dia.TextAttrs { + polygon?: ShapeAttrs; + } + class Polygon extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface PolylineAttrs extends dia.TextAttrs { + polyline?: ShapeAttrs; + } + class Polyline extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Image extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface PathAttrs extends dia.TextAttrs { + path?: ShapeAttrs; + } + class Path extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface RhombusAttrs extends dia.TextAttrs { + path?: ShapeAttrs; + } + class Rhombus extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface TextBlockAttrs extends dia.TextAttrs { + rect?: ShapeAttrs; + } + class TextBlock extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + updateSize(cell: dia.Cell, size: dia.Size): void; + updateContent(cell: dia.Cell, content: string): void; + } + } + + namespace chess { + class KingWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class KingBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class QueenWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class QueenBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class RookWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class RookBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class BishopWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class BishopBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class KnightWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class KnightBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class PawnWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class PawnBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + } + + namespace devs { + interface ModelAttributes extends GenericAttributes { + inPorts?: string[]; + outPorts?: string[]; + ports?: Object; + } + class Model extends basic.Generic { + constructor(attributes?: ModelAttributes, options?: Object); + changeInGroup(properties: any, opt?: any): boolean; + changeOutGroup(properties: any, opt?: any): boolean; + createPortItem(group: string, port: string): any; + createPortItems(group: string, ports: string[]): any[]; + addOutPort(port: string, opt?: any): this; + addInPort(port: string, opt?: any): this; + removeOutPort(port: string, opt?: any): this; + removeInPort(port: string, opt?: any): this; + } + class Coupled extends Model { + constructor(attributes?: ModelAttributes, options?: Object); + } + class Atomic extends Model { + constructor(attributes?: ModelAttributes, options?: Object); + } + class Link extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } + + namespace erd { + class Entity extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class WeakEntity extends Entity { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Relationship extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class IdentifyingRelationship extends Relationship { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface AttributeAttrs extends dia.TextAttrs { + ellipse?: ShapeAttrs; + } + class Attribute extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Multivalued extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Derived extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Key extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Normal extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface ISAAttrs extends dia.Element { + polygon?: ShapeAttrs; + } + class ISA extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Line extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + cardinality(value: string | number): void; + } + } + + namespace fsa { + class State extends basic.Circle { + constructor(attributes?: GenericAttributes, options?: Object); + } + class StartState extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class EndState extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Arrow extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } + + namespace logic { + interface LogicAttrs extends ShapeAttrs { ref?: string; - "x-alignment"?: 'middle' | 'right' | number; - "y-alignment"?: 'middle' | 'bottom' | number; + 'ref-x'?: number | string; + 'ref-dx'?: number | string; + 'ref-y'?: number | string; + 'ref-dy'?: number | string; + magnet?: boolean; + 'class'?: string; port?: string; } - class ElementView extends CellViewGeneric { - scale(sx: number, sy: number): void; // @todo Documented in source but not released - finalizeEmbedding(options?: any): void; - getBBox(options?: any): BBox; - pointerdown(evt: Event, x: number, y: number): void; - pointermove(evt: Event, x: number, y: number): void; - pointerup(evt: Event, x: number, y: number): void; - positionRelative(vel: any, bbox: BBox, attributes: ElementViewAttributes, nodesBySelector?: Object): void; // Vectorizer - prepareEmbedding(options?: any): void; - processEmbedding(options?: any): void; - render(): this; - renderMarkup(): void; - resize(): void; - rotate(): void; - translate(model: Backbone.Model, changes?: any, options?: any): void; - update(cell: Cell, renderingOnlyAttrs?: Object): void; + interface IOAttrs extends dia.TextAttrs { + circle?: LogicAttrs; } - - class LinkView extends CellViewGeneric { - options: { - shortLinkLength?: number, - doubleLinkTools?: boolean, - longLinkLength?: number, - linkToolsOffset?: number, - doubleLinkToolsOffset?: number, - sampleInterval: number - }; - getConnectionLength(): number; - sendToken(token: SVGElement, duration?: number, callback?: () => void): void; - addVertex(vertex: Point): number; - getPointAtLength(length: number): Point; // Marked as public api in source but not in the documents - createWatcher(endType: { id: string }): Function; - findRoute(oldVertices: Point[]): Point[]; - getConnectionPoint(end: 'source' | 'target', selectorOrPoint: Element | Point, referenceSelectorOrPoint: Element | Point): Point; - getPathData(vertices: Point[]): any; - onEndModelChange(endType: 'source' | 'target', endModel?: Element, opt?: any): void; - onLabelsChange(): void; - onSourceChange(cell: Cell, sourceEnd: { id: string }, options: any): void; - onTargetChange(cell: Cell, targetEnd: { id: string }, options: any): void; - onToolsChange(): void; - onVerticesChange(cell: Cell, changed: any, options: any): void; - pointerdown(evt: Event, x: number, y: number): void; - pointermove(evt: Event, x: number, y: number): void; - pointerup(evt: Event, x: number, y: number): void; - removeVertex(idx: number): this; - render(): this; - renderArrowheadMarkers(): this; - renderLabels(): this; - renderTools(): this; - renderVertexMarkers(): this; - startArrowheadMove(end: 'source' | 'target', options?: any): void; - startListening(): void; - update(model: any, attributes: any, options?: any): this; - updateArrowheadMarkers(): this; - updateAttributes(): void; - updateConnection(options?: any): void; - updateLabelPositions(): this; - updateToolsPosition(): this; + class Gate extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class IO extends Gate { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Input extends IO { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Output extends IO { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Gate11 extends Gate { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Gate21 extends Gate { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface Image { + 'xlink:href'?: string; + } + interface ImageAttrs extends LogicAttrs { + image?: Image; + } + class Repeater extends Gate11 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input: any): any; + } + class Note extends Gate11 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input: any): boolean; + } + class Or extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class And extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Nor extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Nand extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Xor extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Xnor extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + interface WireArgs extends dia.LinkAttributes { + router?: Object; + connector?: Object; + } + class Wire extends dia.Link { + constructor(attributes?: WireArgs, options?: Object); } } - namespace ui { } - - namespace shapes { - interface GenericAttributes extends dia.CellAttributes { - position?: dia.Point; - size?: dia.Size; - angle?: number; - attrs?: T; + namespace org { + interface MemberAttrs { + rect?: ShapeAttrs; + image?: ShapeAttrs; } - interface ShapeAttrs extends dia.CSSSelector { - fill?: string; - stroke?: string; - r?: string | number; - rx?: string | number; - ry?: string | number; - cx?: string | number; - cy?: string | number; - height?: string | number; - width?: string | number; - transform?: string; - points?: string; - 'stroke-width'?: string | number; - 'ref-x'?: string | number; - 'ref-y'?: string | number; - ref?: string + class Member extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); } - - namespace basic { - class Generic extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface RectAttrs extends dia.TextAttrs { - rect?: ShapeAttrs; - } - class Rect extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Text extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface CircleAttrs extends dia.TextAttrs { - circle?: ShapeAttrs; - } - class Circle extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface EllipseAttrs extends dia.TextAttrs { - ellipse?: ShapeAttrs; - } - class Ellipse extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface PolygonAttrs extends dia.TextAttrs { - polygon?: ShapeAttrs; - } - class Polygon extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface PolylineAttrs extends dia.TextAttrs { - polyline?: ShapeAttrs; - } - class Polyline extends Generic { - } - class Image extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface PathAttrs extends dia.TextAttrs { - path?: ShapeAttrs; - } - class Path extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface RhombusAttrs extends dia.TextAttrs { - path?: ShapeAttrs; - } - class Rhombus extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface TextBlockAttrs extends dia.TextAttrs { - rect?: ShapeAttrs; - } - class TextBlock extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - updateSize(cell: dia.Cell, size: dia.Size): void; - updateContent(cell: dia.Cell, content: string): void; - } - } - - namespace chess { - class KingWhite extends basic.Generic { - } - class KingBlack extends basic.Generic { - } - class QueenWhite extends basic.Generic { - } - class QueenBlack extends basic.Generic { - } - class RookWhite extends basic.Generic { - } - class RookBlack extends basic.Generic { - } - class BishopWhite extends basic.Generic { - } - class BishopBlack extends basic.Generic { - } - class KnightWhite extends basic.Generic { - } - class KnightBlack extends basic.Generic { - } - class PawnWhite extends basic.Generic { - } - class PawnBlack extends basic.Generic { - } - } - - namespace devs { - interface ModelAttributes extends GenericAttributes { - inPorts?: string[]; - outPorts?: string[]; - ports?: Object; - } - class Model extends basic.Generic { - constructor(attributes?: ModelAttributes, options?: Object); - changeInGroup(properties: any, opt?: any): boolean; - changeOutGroup(properties: any, opt?: any): boolean; - createPortItem(group: string, port: string): any; - createPortItems(group: string, ports: string[]): any[]; - addOutPort(port: string, opt?: any): this; - addInPort(port: string, opt?: any): this; - removeOutPort(port: string, opt?: any): this; - removeInPort(port: string, opt?: any): this; - } - class Coupled extends Model { - } - class Atomic extends Model { - } - class Link extends dia.Link { - } - } - - namespace erd { - class Entity extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class WeakEntity extends Entity { - } - class Relationship extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class IdentifyingRelationship extends Relationship { - } - interface AttributeAttrs extends dia.TextAttrs { - ellipse?: ShapeAttrs; - } - class Attribute extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Multivalued extends Attribute { - } - class Derived extends Attribute { - } - class Key extends Attribute { - } - class Normal extends Attribute { - } - interface ISAAttrs extends dia.Element { - polygon?: ShapeAttrs; - } - class ISA extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Line extends dia.Link { - cardinality(value: string | number): void; - } - } - - namespace fsa { - class State extends basic.Circle { - } - class StartState extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class EndState extends dia.Element { - } - class Arrow extends dia.Link { - } - } - - namespace logic { - interface LogicAttrs extends ShapeAttrs { - ref?: string; - 'ref-x'?: number | string; - 'ref-dx'?: number | string; - 'ref-y'?: number | string; - 'ref-dy'?: number | string; - magnet?: boolean; - 'class'?: string; - port?: string; - } - interface IOAttrs extends dia.TextAttrs { - circle?: LogicAttrs; - } - class Gate extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class IO extends Gate { - } - class Input extends IO { - } - class Output extends IO { - } - class Gate11 extends Gate { - } - class Gate21 extends Gate { - } - interface Image { - 'xlink:href'?: string; - } - interface ImageAttrs extends LogicAttrs { - image?: Image; - } - class Repeater extends Gate11 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input: any): any; - } - class Note extends Gate11 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input: any): boolean; - } - class Or extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class And extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Nor extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Nand extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Xor extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Xnor extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - interface WireArgs extends dia.LinkAttributes { - router?: Object; - connector?: Object; - } - class Wire extends dia.Link { - constructor(attributes?: WireArgs, options?: Object); - } - } - - namespace org { - interface MemberAttrs { - rect?: ShapeAttrs; - image?: ShapeAttrs; - } - class Member extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Arrow extends dia.Link { - } - } - - namespace pn { - class Place extends basic.Generic { - } - class PlaceView extends dia.ElementView { - renderTokens(): void; - } - class Transition extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Link extends dia.Link { - } - } - - namespace uml { - interface ClassAttributes extends GenericAttributes { - name: string[]; - attributes: string[]; - methods: string[]; - } - class Class extends basic.Generic { - constructor(attributes?: ClassAttributes, options?: Object); - getClassName(): string[]; - updateRectangles(): void; - } - class ClassView extends dia.ElementView { - } - class Abstract extends Class { - } - class AbstractView extends ClassView { - } - class Interface extends Class { - } - class InterfaceView extends ClassView { - } - class Generalization extends dia.Link { - } - class Implementation extends dia.Link { - } - class Aggregation extends dia.Link { - } - class Composition extends dia.Link { - } - class Association extends dia.Link { - } - interface StateAttributes extends GenericAttributes { - events?: string[]; - } - class State extends basic.Generic { - updateName(): void; - updateEvents(): void; - updatePath(): void; - } - class StartState extends basic.Circle { - } - class EndState extends basic.Generic { - } - class Transition extends dia.Link { - } + class Arrow extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); } } - namespace util { - - namespace format { - export function number(specifier: string, value: number): string; + namespace pn { + class Place extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class PlaceView extends dia.ElementView { + renderTokens(): void; + } + class Transition extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Link extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); } - - export function uuid(): string; - export function guid(obj?: Object): string; - export function nextFrame(callback: () => void, context?: Object): number; - export function cancelFrame(requestId: number): void; - export function flattenObject(object: Object, delim: string, stop: (node: any) => boolean): any; - export function getByPath(object: Object, path: string, delim: string): any; - export function setByPath(object: Object, path: string, value: Object, delim: string): any; - export function unsetByPath(object: Object, path: string, delim: string): any; - export function breakText(text: string, size: dia.Size, attrs?: dia.SVGAttributes, options?: { svgDocument?: SVGElement }): string; - export function normalizeSides(box: number | { x?: number, y?: number, height?: number, width?: number }): dia.BBox; - export function getElementBBox(el: Element): dia.BBox; - export function setAttributesBySelector(el: Element, attrs: dia.SVGAttributes): void; - export function sortElements(elements: Element[] | string | JQuery, comparator: (a: Element, b: Element) => number): Element[]; - export function shapePerimeterConnectionPoint(linkView: dia.LinkView, view: dia.ElementView, magnet: SVGElement, ref: dia.Point): dia.Point; - export function imageToDataUri(url: string, callback: (err: Error, dataUri: string) => void): void; - - // Not documented but used in examples - /** @deprecated use lodash _.defaultsDeep */ - export function deepSupplement(objects: any, defaultIndicator?: any): any; - - // Private functions - /** @deprecated use lodash _.assign */ - export function mixin(objects: any[]): any; - /** @deprecated use lodash _.defaults */ - export function supplement(objects: any[]): any; - /** @deprecated use lodash _.mixin */ - export function deepMixin(objects: any[]): any; } - namespace layout { - - interface LayoutOptions { - nodeSep?: number; - edgeSep?: number; - rankSep?: number; - rankDir?: 'TB' | 'BT' | 'LR' | 'RL'; - marginX?: number; - marginY?: number; - resizeCluster?: boolean; - setPosition?: (element: dia.Element, position: dia.BBox) => void; - setLinkVertices?: (link: dia.Link, vertices: Position[]) => void; + namespace uml { + interface ClassAttributes extends GenericAttributes { + name: string[]; + attributes: string[]; + methods: string[]; } - - class DirectedGraph { - static layout(graph: dia.Graph | dia.Cell[], options?: LayoutOptions): dia.BBox; + class Class extends basic.Generic { + constructor(attributes?: ClassAttributes, options?: Object); + getClassName(): string[]; + updateRectangles(): void; + } + class ClassView extends dia.ElementView { + } + class Abstract extends Class { + constructor(attributes?: ClassAttributes, options?: Object); + } + class AbstractView extends ClassView { + constructor(attributes?: ClassAttributes, options?: Object); + } + class Interface extends Class { + constructor(attributes?: ClassAttributes, options?: Object); + } + class InterfaceView extends ClassView { + constructor(attributes?: ClassAttributes, options?: Object); + } + class Generalization extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Implementation extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Aggregation extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Composition extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Association extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + interface StateAttributes extends GenericAttributes { + events?: string[]; + } + class State extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + updateName(): void; + updateEvents(): void; + updatePath(): void; + } + class StartState extends basic.Circle { + constructor(attributes?: GenericAttributes, options?: Object); + } + class EndState extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Transition extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); } } } + +export namespace util { + + namespace format { + export function number(specifier: string, value: number): string; + } + + export function uuid(): string; + export function guid(obj?: Object): string; + export function nextFrame(callback: () => void, context?: Object): number; + export function cancelFrame(requestId: number): void; + export function flattenObject(object: Object, delim: string, stop: (node: any) => boolean): any; + export function getByPath(object: Object, path: string, delim: string): any; + export function setByPath(object: Object, path: string, value: Object, delim: string): any; + export function unsetByPath(object: Object, path: string, delim: string): any; + export function breakText(text: string, size: dia.Size, attrs?: dia.SVGAttributes, options?: { svgDocument?: SVGElement }): string; + export function normalizeSides(box: number | { x?: number, y?: number, height?: number, width?: number }): dia.BBox; + export function getElementBBox(el: Element): dia.BBox; + export function setAttributesBySelector(el: Element, attrs: dia.SVGAttributes): void; + export function sortElements(elements: Element[] | string | JQuery, comparator: (a: Element, b: Element) => number): Element[]; + export function shapePerimeterConnectionPoint(linkView: dia.LinkView, view: dia.ElementView, magnet: SVGElement, ref: dia.Point): dia.Point; + export function imageToDataUri(url: string, callback: (err: Error, dataUri: string) => void): void; + + // Not documented but used in examples + /** @deprecated use lodash _.defaultsDeep */ + export function deepSupplement(objects: any, defaultIndicator?: any): any; + + // Private functions + /** @deprecated use lodash _.assign */ + export function mixin(objects: any[]): any; + /** @deprecated use lodash _.defaults */ + export function supplement(objects: any[]): any; + /** @deprecated use lodash _.mixin */ + export function deepMixin(objects: any[]): any; +} + +export namespace layout { + + interface LayoutOptions { + nodeSep?: number; + edgeSep?: number; + rankSep?: number; + rankDir?: 'TB' | 'BT' | 'LR' | 'RL'; + marginX?: number; + marginY?: number; + resizeCluster?: boolean; + setPosition?: (element: dia.Element, position: dia.BBox) => void; + setLinkVertices?: (link: dia.Link, vertices: Position[]) => void; + } + + class DirectedGraph { + static layout(graph: dia.Graph | dia.Cell[], options?: LayoutOptions): dia.BBox; + } +} diff --git a/jqgrid/jqgrid-tests.ts b/jqgrid/jqgrid-tests.ts index 7354f527dc..832a94d909 100644 --- a/jqgrid/jqgrid-tests.ts +++ b/jqgrid/jqgrid-tests.ts @@ -2,8 +2,6 @@ // Definitions by: Lokesh Peta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - var mydata: any[] = []; $('#jqGrid') diff --git a/jqrangeslider/jqrangeslider-tests.ts b/jqrangeslider/jqrangeslider-tests.ts index 1af815806f..cb6b417656 100644 --- a/jqrangeslider/jqrangeslider-tests.ts +++ b/jqrangeslider/jqrangeslider-tests.ts @@ -1,5 +1,3 @@ -/// - // Arrows $("#arrowsExample").rangeSlider({ arrows: false }); $("#arrowsExample").editRangeSlider({ arrows: false }); @@ -133,7 +131,7 @@ $("#rulersExample").rangeSlider({ next: function(val){ return val + 10; }, stop: function(val){ return false; }, label: function(val){ return val; }, - format: function(tickContainer, tickStart, tickEnd){ + format: function(tickContainer, tickStart, tickEnd){ tickContainer.addClass("myCustomClass"); } }, @@ -179,7 +177,7 @@ $("#rangeExample").dateRangeSlider({ // Symmetric Positionning $("#symmetricExample").rangeSlider({ symmetricPositionning: true, - range: {min: 0} + range: {min: 0} }); // Type $("#typeExample").editRangeSlider({type: "number"}); diff --git a/jquery-ajax-chain/jquery-ajax-chain-tests.ts b/jquery-ajax-chain/jquery-ajax-chain-tests.ts index e5cbb8a26f..56ea354543 100644 --- a/jquery-ajax-chain/jquery-ajax-chain-tests.ts +++ b/jquery-ajax-chain/jquery-ajax-chain-tests.ts @@ -1,6 +1,3 @@ -/// -/// - function test_public_methods(): void { let ajaxChain: ajaxChain.JQueryAjaxChain, @@ -171,7 +168,7 @@ function test_optional_parameters(): void { }, hasCache: function (xmlResponse): XMLDocument { - + let $tempXmlResponse: JQuery, itemId: String; diff --git a/jquery-alertable/jquery-alertable-tests.ts b/jquery-alertable/jquery-alertable-tests.ts index a61dca01b4..61d6e2c06c 100644 --- a/jquery-alertable/jquery-alertable-tests.ts +++ b/jquery-alertable/jquery-alertable-tests.ts @@ -1,6 +1,3 @@ -/// -/// - // // Examples from https://github.com/claviska/jquery-alertable // diff --git a/jquery-backstretch/jquery-backstretch-tests.ts b/jquery-backstretch/jquery-backstretch-tests.ts index 7220458769..22835b4e43 100644 --- a/jquery-backstretch/jquery-backstretch-tests.ts +++ b/jquery-backstretch/jquery-backstretch-tests.ts @@ -1,5 +1,3 @@ -/// - var backstretch = jQuery.backstretch(['image.png'], { centeredX: false, centeredY: false, diff --git a/jquery-cropbox/jquery-cropbox-tests.ts b/jquery-cropbox/jquery-cropbox-tests.ts index ddc5389625..eadb754088 100644 --- a/jquery-cropbox/jquery-cropbox-tests.ts +++ b/jquery-cropbox/jquery-cropbox-tests.ts @@ -1,5 +1,3 @@ -/// - var cropboxWithDefaultSettings = $("#element").cropbox(); var cropboxOptions: jQueryCropBox.CropboxOptions = { @@ -38,7 +36,7 @@ cropboxWithOptions.getBlob(); cropboxWithOptions.remove(); cropboxWithOptions.on("cropbox",(e: Event, data: any, img: jQueryCropBox.Cropbox) => { - - //DoStuff - + + //DoStuff + }); diff --git a/jquery-easy-loading/jquery-easy-loading-tests.ts b/jquery-easy-loading/jquery-easy-loading-tests.ts index 7a59d3d617..ece98fd6d0 100644 --- a/jquery-easy-loading/jquery-easy-loading-tests.ts +++ b/jquery-easy-loading/jquery-easy-loading-tests.ts @@ -1,6 +1,3 @@ - -/// - function test_options() { const jqElement: JQuery = $("body").loading({ diff --git a/jquery-handsontable/jquery-handsontable-tests.ts b/jquery-handsontable/jquery-handsontable-tests.ts index 267ab30d8a..a2e10b4827 100644 --- a/jquery-handsontable/jquery-handsontable-tests.ts +++ b/jquery-handsontable/jquery-handsontable-tests.ts @@ -1,6 +1,3 @@ -/// - - var data = [ ["", "Maserati", "Mazda", "Mercedes", "Mini", "Mitsubishi"], ["2009", 0, 2941, 4303, 354, 5814], diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts b/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts index f680dbb688..0e42508202 100644 --- a/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts +++ b/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts @@ -1,5 +1,3 @@ -/// - var foo = new $.JsonRpcClient({ ajaxUrl: '/backend/jsonrpc' }); foo.call( 'bar', ['A parameter', 'B parameter'], diff --git a/jquery-mockjax/jquery-mockjax-tests.ts b/jquery-mockjax/jquery-mockjax-tests.ts index 7688645f8e..3090a1c3cc 100644 --- a/jquery-mockjax/jquery-mockjax-tests.ts +++ b/jquery-mockjax/jquery-mockjax-tests.ts @@ -1,4 +1,3 @@ -/// /// class Tests { diff --git a/jquery-steps/index.d.ts b/jquery-steps/index.d.ts index 6abe640417..7670245480 100644 --- a/jquery-steps/index.d.ts +++ b/jquery-steps/index.d.ts @@ -1,8 +1,9 @@ // Type definitions for jQuery Steps v1.1.1 // Project: http://www.jquery-steps.com/ -// Definitions by: Joseph Blank +// Definitions by: Joseph Blank , Nicholas Wong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Updated by: Nicholas Wong + +/// interface JQuery { steps(param?: JQuerySteps.Settings): JQuerySteps.JQuerySteps; diff --git a/jquery-steps/jquery-steps-tests.ts b/jquery-steps/jquery-steps-tests.ts index 35346d1f7b..6659212e20 100644 --- a/jquery-steps/jquery-steps-tests.ts +++ b/jquery-steps/jquery-steps-tests.ts @@ -1,6 +1,3 @@ -/// -/// - var labels: JQuerySteps.LabelSettings = { cancel: 'Cancel', current: 'Current:', diff --git a/jquery-timeentry/jquery-timeentry-tests.ts b/jquery-timeentry/jquery-timeentry-tests.ts index ccfe0794a3..8910487c65 100644 --- a/jquery-timeentry/jquery-timeentry-tests.ts +++ b/jquery-timeentry/jquery-timeentry-tests.ts @@ -1,5 +1,3 @@ -/// - var selector = '#example'; // basic diff --git a/jquery-toastmessage-plugin/index.d.ts b/jquery-toastmessage-plugin/index.d.ts new file mode 100644 index 0000000000..2666ecbd0b --- /dev/null +++ b/jquery-toastmessage-plugin/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for jquery-toastmessage-plugin 0.2 +// Project: https://github.com/akquinet/jquery-toastmessage-plugin +// Definitions by: Joe Skeen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare interface JQuery { + toastmessage: JQueryToastmessage.ToastmessageStatic; +} + +/** jQuery Toastmessage (http://akquinet.github.io/jquery-toastmessage-plugin/) */ +declare namespace JQueryToastmessage { + interface ToastmessageStatic { + /* shows a toast message of the specified type */ + (command: ShowToastCommand, message: string): JQuery; + /** shows a custom toast */ + (command: 'showToast', toastOpts: ToastOptions): JQuery; + /** removes the specified toast and returns it */ + (command: 'removeToast', toast: JQuery, closeOpts?: ToastOptions): void; + /** configures the default toast options */ + (toastOpts: ToastOptions): void; + } + + type ShowToastCommand = 'showNoticeToast' | 'showSuccessToast' | 'showWarningToast' | 'showErrorToast'; + type ToastType = 'notice' | 'warning' | 'error' | 'success'; + type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'middle-left' | 'middle-center' | 'middle-right'; + + interface ToastOptions { + /** in effect duration in miliseconds @default 600 */ + inEffectDuration?: number; + /** + * time in miliseconds before the item has to disappear @default 3000 */ + stayTime?: number; + /** content of the item @default '' */ + text?: string; + /** should the toast item sticky or not? @default false */ + sticky?: boolean; + /** the type of toast @default 'notice' */ + type?: ToastType; + /** + * Position of the toast container holding different toast. + * Position can be set only once at the very first call, + * changing the position after the first call does nothing + * @default 'top-right' + */ + position?: ToastPosition; + /** + * text which will be shown as close button, + * set to '' when you want to introduce an image via css + * @default '' + */ + closeText?: string; + /** callback function when the toastmessage is closed @default null */ + close?: () => void; + } +} \ No newline at end of file diff --git a/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts b/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts new file mode 100644 index 0000000000..f11813cfbb --- /dev/null +++ b/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts @@ -0,0 +1,85 @@ +/* code examples from documentation */ + +$().toastmessage('showNoticeToast', 'some message here'); +$().toastmessage('showSuccessToast', "some message here"); +$().toastmessage('showWarningToast', "some message here"); +$().toastmessage('showErrorToast', "some message here"); + +// user configured toastmessage: +const toastObject = $().toastmessage('showToast', { + text : 'Hello World', + sticky : true, + position : 'top-right', + type : 'success', + close : function () {console.log("toast is closed ...");} +}); + +$().toastmessage('removeToast', toastObject); + +// reconfiguring the toasts as sticky +$().toastmessage({sticky : true}); + +// saving the newly created toast into a variable +var myToast = $().toastmessage('showNoticeToast', 'some message here'); + +// removing the toast +$().toastmessage('removeToast', myToast); + +// user configuration of all toastmessages to come: +$().toastmessage({ + text : 'Hello World', + sticky : true, + position : 'top-right', + type : 'success', + close : function () {console.log("toast is closed ...");} +}); + +$().toastmessage({ + inEffectDuration: 600, // in effect duration in miliseconds + stayTime: 3000, // time in miliseconds before the item has to disappear + text: '', // content of the item + sticky: false, // should the toast item sticky or not? + type: 'notice', // notice, warning, error, success + position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right + // Position of the toast container holding different toast. + // Position can be set only once at the very first call, + // changing the position after the first call does nothing + closeText: '', // text which will be shown as close button, + // set to '' when you want to introduce an image via css + close: undefined // callback function when the toastmessage is closed +}); + +/* code examples from tests */ + +$('.toast-container').remove(); + +$().toastmessage('showSuccessToast', "SUCCESS"); +$().toastmessage('showNoticeToast', "NOTICE"); +$().toastmessage('showWarningToast', "WARNING"); +$().toastmessage('showErrorToast', "ERROR"); +$().toastmessage({ + sticky : true, + position : 'top-right', + closeText: '' +}); +$().toastmessage('showToast', { + text : 'Success Dialog', + type : 'success' +}); +$().toastmessage('showToast', { + text : 'Success Dialog', + sticky : true, + position : 'top-right', + type : 'success', + closeText: '', + close : () => {} +}); +var toast = $().toastmessage('showToast', { + text : 'Success Dialog', + sticky : true, + position : 'top-right', + type : 'success', + closeText: '', + close : () => {} +}); +$().toastmessage('removeToast', toast, { close : () => {} }); diff --git a/jquery-toastmessage-plugin/tsconfig.json b/jquery-toastmessage-plugin/tsconfig.json new file mode 100644 index 0000000000..193619fa0a --- /dev/null +++ b/jquery-toastmessage-plugin/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "lib": ["es6", "dom"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jquery-toastmessage-plugin-tests.ts" + ] +} \ No newline at end of file diff --git a/jquery-toastmessage-plugin/tslint.json b/jquery-toastmessage-plugin/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/jquery-toastmessage-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/jquery-urlparam/jquery-urlparam-tests.ts b/jquery-urlparam/jquery-urlparam-tests.ts index a8ca144bb3..8d855e0e35 100644 --- a/jquery-urlparam/jquery-urlparam-tests.ts +++ b/jquery-urlparam/jquery-urlparam-tests.ts @@ -1,4 +1 @@ -/// - - console.log($.urlParam('variable')); diff --git a/jquery.ajaxfile/jquery.ajaxfile-tests.ts b/jquery.ajaxfile/jquery.ajaxfile-tests.ts index 364220325a..73bc6662dc 100644 --- a/jquery.ajaxfile/jquery.ajaxfile-tests.ts +++ b/jquery.ajaxfile/jquery.ajaxfile-tests.ts @@ -1,7 +1,3 @@ - -/// -/// - function testRawApi(){ var inputElement:HTMLInputElement = null; var resultPromise = AjaxFile.send({ diff --git a/jquery.are-you-sure/jquery.are-you-sure-tests.ts b/jquery.are-you-sure/jquery.are-you-sure-tests.ts index cd400f90c1..37cb487602 100644 --- a/jquery.are-you-sure/jquery.are-you-sure-tests.ts +++ b/jquery.are-you-sure/jquery.are-you-sure-tests.ts @@ -1,10 +1,3 @@ -// Type definitions for jquery.are-you-sure.js -// Project: https://github.com/codedance/jquery.AreYouSure -// Definitions by: Jon Egerton -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - //Use defaults $("test").areYouSure(); diff --git a/jquery.base64/jquery.base64-tests.ts b/jquery.base64/jquery.base64-tests.ts index 447a917620..c9c6955716 100644 --- a/jquery.base64/jquery.base64-tests.ts +++ b/jquery.base64/jquery.base64-tests.ts @@ -1,6 +1,3 @@ -/// - - var encoded = $.base64.encode(""); $.base64.decode(encoded); diff --git a/jquery.cleditor/jquery.cleditor-tests.ts b/jquery.cleditor/jquery.cleditor-tests.ts index 7fe997c4c5..b4f4917551 100644 --- a/jquery.cleditor/jquery.cleditor-tests.ts +++ b/jquery.cleditor/jquery.cleditor-tests.ts @@ -1,5 +1,3 @@ -/// - // cribbed from http://premiumsoftware.net/CLEditor/GettingStarted $(document).ready(function () { $("#input").cleditor(); }); diff --git a/jquery.color/jquery.color-tests.ts b/jquery.color/jquery.color-tests.ts index c94a1cffed..e1439f4cd4 100644 --- a/jquery.color/jquery.color-tests.ts +++ b/jquery.color/jquery.color-tests.ts @@ -1,5 +1,3 @@ -/// - var color = $.Color("rgba(255, 255, 255, 0.4)"); var color1 = $.Color({red: 255, green: 255, blue: 255}); var color2 = $.Color({hue: 359, saturation: 0.5, lightness: 0.5}); diff --git a/jquery.colorbox/jquery.colorbox-tests.ts b/jquery.colorbox/jquery.colorbox-tests.ts index 66d54240db..3c05f213c9 100644 --- a/jquery.colorbox/jquery.colorbox-tests.ts +++ b/jquery.colorbox/jquery.colorbox-tests.ts @@ -1,5 +1,3 @@ -/// - //Image gallery var gallery : JQuery = $('a.gallery').colorbox({ rel: 'gal' }); diff --git a/jquery.cookie/jquery.cookie-tests.ts b/jquery.cookie/jquery.cookie-tests.ts index e93d29110c..998d7bf2df 100644 --- a/jquery.cookie/jquery.cookie-tests.ts +++ b/jquery.cookie/jquery.cookie-tests.ts @@ -1,5 +1,3 @@ -/// - class TestObject { text: string; value: number; diff --git a/jquery.customselect/jquery.customselect-tests.ts b/jquery.customselect/jquery.customselect-tests.ts index b0dc9554a9..5cb28a9f05 100644 --- a/jquery.customselect/jquery.customselect-tests.ts +++ b/jquery.customselect/jquery.customselect-tests.ts @@ -1,6 +1,3 @@ -/// - - class CustomSelectOptions implements JQueryCustomSelectOption { "customClass": string; "mapClass": boolean; diff --git a/jquery.cycle/jquery.cycle-tests.ts b/jquery.cycle/jquery.cycle-tests.ts index e93be101f6..df8ed24b22 100644 --- a/jquery.cycle/jquery.cycle-tests.ts +++ b/jquery.cycle/jquery.cycle-tests.ts @@ -1,5 +1,3 @@ -/// - // As basic as it can be $('#element').cycle(); @@ -284,7 +282,7 @@ $('#s2').cycle({ $('#slideshow2').cycle({ fx: 'scrollLeft,scrollDown,scrollRight,scrollUp', randomizeEffects: false, - easing: 'easeInBack' // easing supported via the easing plugin + easing: 'easeInBack' // easing supported via the easing plugin }); // Another Advanced "pager" Demo @@ -294,7 +292,7 @@ $('#slideshow').cycle({ timeout: 0, pager: '#nav', pagerAnchorBuilder: function (idx, slide) { - // return selector string for existing anchor + // return selector string for existing anchor return '#nav li:eq(' + idx + ') a'; } }); @@ -304,7 +302,7 @@ $('#slideshow').cycle({ slideExpr: 'img' }); // Defeating IE's ClearType bug $('#slideshow').cycle({ - cleartype: false // disable cleartype corrections + cleartype: false // disable cleartype corrections }); // Using the 'nowrap' option (manual slideshow) diff --git a/jquery.cycle2/jquery.cycle2-tests.ts b/jquery.cycle2/jquery.cycle2-tests.ts index 0e16629a3e..9d88e92532 100644 --- a/jquery.cycle2/jquery.cycle2-tests.ts +++ b/jquery.cycle2/jquery.cycle2-tests.ts @@ -1,5 +1,3 @@ -/// - // basic $('#element').cycle(); diff --git a/jquery.fancytree/index.d.ts b/jquery.fancytree/index.d.ts index 5533e89cb7..c5e84d69f7 100644 --- a/jquery.fancytree/index.d.ts +++ b/jquery.fancytree/index.d.ts @@ -21,18 +21,21 @@ interface JQuery { declare namespace Fancytree { interface Fancytree { $div: JQuery; - + widget: any; //JQueryUI.Widget; rootNode: FancytreeNode; + $container: JQuery; + focusNode: FancytreeNode; + options: FancytreeOptions; /** Activate node with a given key and fire focus and - * activate events. A prevously activated node will be + * activate events. A previously activated node will be * deactivated. If activeVisible option is set, all parents * will be expanded as necessary. Pass key = false, to deactivate * the current node only. * * @returns {FancytreeNode} activate node (null, if not found) */ - activateKey(key: string): FancytreeNode; + activateKey(key: string | boolean): FancytreeNode; /** (experimental) * @@ -199,7 +202,7 @@ declare namespace Fancytree { /** Display name (may contain HTML) */ title: string; /** Contains all extra data that was passed on node creation */ - data: Object; + data: any; /** Array of child nodes. For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array to define a node that has no children. */ children: FancytreeNode[]; /** Use isExpanded(), setExpanded() to access this property. */ @@ -214,6 +217,10 @@ declare namespace Fancytree { lazy: boolean; /** Alternative description used as hover banner */ tooltip: string; + /** Outer element of single nodes */ + span: HTMLElement; + /** Outer element of single nodes for table extension */ + tr: HTMLElement; //#endregion //#region Methods @@ -639,7 +646,7 @@ declare namespace Fancytree { /** The tree instance */ tree: Fancytree; /** The jQuery UI tree widget */ - widget: Object; + widget: any; // JQueryUI.Widget; /** Shortcut to tree.options */ options: FancytreeOptions; /** The jQuery Event that initially triggered this call */ @@ -773,7 +780,7 @@ declare namespace Fancytree { /** Add tabindex='0' to node title span, so it can receive keyboard focus */ titlesTabbable?: boolean; /** Animation options, false:off (default: { effect: "blind", options: {direction: "vertical", scale: "box"}, duration: 200 }) */ - toggleEffect?: Object; + toggleEffect?: JQueryUI.EffectOptions; } /** Data object passed to FancytreeNode() constructor. Note: typically these attributes are accessed by meber methods, e.g. `node.isExpanded()` and `node.setSelected(false)`. */ diff --git a/jquery.finger/jquery.finger-tests.ts b/jquery.finger/jquery.finger-tests.ts index 3f35e7322c..c4734610b2 100644 --- a/jquery.finger/jquery.finger-tests.ts +++ b/jquery.finger/jquery.finger-tests.ts @@ -1,5 +1,3 @@ -/// - $.Finger.doubleTapInterval = 400; $.Finger.flickDuration = 250; $.Finger.pressDuration = 100; diff --git a/jquery.flagstrap/jquery.flagstrap-tests.ts b/jquery.flagstrap/jquery.flagstrap-tests.ts index 3bfcf0294e..6d262dc17f 100644 --- a/jquery.flagstrap/jquery.flagstrap-tests.ts +++ b/jquery.flagstrap/jquery.flagstrap-tests.ts @@ -1,14 +1,11 @@ -/// -/// - class TestObject { - + } $(function () { - // basic test - // written in according to basic example from documentation - var htmlSelect = '
    ' + + // basic test + // written in according to basic example from documentation + var htmlSelect = '' + '
    ' + '
    ' + '
    ' + @@ -21,7 +18,7 @@ $(function () { console.log('characters count: ' + $('#flagstrap').html().length + '\n' + $('#flagstrap').html()); // options test - // options -> data attributes + // options -> data attributes // written in according to options -> data attributes example from documentation htmlSelect = '' + '
    ' + @@ -42,7 +39,7 @@ $(function () { console.log('\n\ncharacters count: ' + $('#flagstrap2').html().length + '\n' + $('#flagstrap2').html()); // options test - // options -> instance options + // options -> instance options // written in according to options -> instance options example from documentation htmlSelect = '' + '
    ' + diff --git a/jquery.form/jquery.form-tests.ts b/jquery.form/jquery.form-tests.ts index f115a97f57..c4d3d636bf 100644 --- a/jquery.form/jquery.form-tests.ts +++ b/jquery.form/jquery.form-tests.ts @@ -1,5 +1,3 @@ -/// - // Basic usage jQuery('#myFormId').ajaxForm(); @@ -30,112 +28,112 @@ jQuery.fn.ajaxSubmit.debug = true; // ajaxForm -// bind form using 'ajaxForm' +// bind form using 'ajaxForm' $('#myForm1').ajaxForm({ - target: '#output1', // target element(s) to be updated with server response + target: '#output1', // target element(s) to be updated with server response beforeSubmit: function (formData, jqForm, options) { // pre-submit callback - // formData is an array; here we use $.param to convert it to a string to display it - // but the form plugin does this for you automatically when it submits the data + // formData is an array; here we use $.param to convert it to a string to display it + // but the form plugin does this for you automatically when it submits the data var queryString = $.param(formData); - // jqForm is a jQuery object encapsulating the form element. To access the - // DOM element for the form do this: - // var formElement = jqForm[0]; + // jqForm is a jQuery object encapsulating the form element. To access the + // DOM element for the form do this: + // var formElement = jqForm[0]; alert('About to submit: \n\n' + queryString); - // here we could return false to prevent the form from being submitted; - // returning anything other than false will allow the form submit to continue + // here we could return false to prevent the form from being submitted; + // returning anything other than false will allow the form submit to continue return true; }, success: function (responseText, statusText, xhr) { // post-submit callback - // for normal html responses, the first argument to the success callback - // is the XMLHttpRequest object's responseText property - - // if the ajaxForm method was passed an Options Object with the dataType - // property set to 'xml' then the first argument to the success callback - // is the XMLHttpRequest object's responseXML property - - // if the ajaxForm method was passed an Options Object with the dataType - // property set to 'json' then the first argument to the success callback - // is the json data object returned by the server - + // for normal html responses, the first argument to the success callback + // is the XMLHttpRequest object's responseText property + + // if the ajaxForm method was passed an Options Object with the dataType + // property set to 'xml' then the first argument to the success callback + // is the XMLHttpRequest object's responseXML property + + // if the ajaxForm method was passed an Options Object with the dataType + // property set to 'json' then the first argument to the success callback + // is the json data object returned by the server + alert('status: ' + statusText + '\n\nresponseText: \n' + responseText + '\n\nThe output div should have already been updated with the responseText.'); } - // other available options: - //url: url // override for form's 'action' attribute - //type: type // 'get' or 'post', override for form's 'method' attribute - //dataType: null // 'xml', 'script', or 'json' (expected server response type) - //clearForm: true // clear all form fields after successful submit - //resetForm: true // reset the form after successful submit + // other available options: + //url: url // override for form's 'action' attribute + //type: type // 'get' or 'post', override for form's 'method' attribute + //dataType: null // 'xml', 'script', or 'json' (expected server response type) + //clearForm: true // clear all form fields after successful submit + //resetForm: true // reset the form after successful submit - // $.ajax options can be used here too, for example: - //timeout: 3000 + // $.ajax options can be used here too, for example: + //timeout: 3000 }); // ajaxSubmit $('#myForm2').ajaxSubmit({ - target: '#output2', // target element(s) to be updated with server response + target: '#output2', // target element(s) to be updated with server response beforeSubmit: function (formData, jqForm, options) { // pre-submit callback - // formData is an array; here we use $.param to convert it to a string to display it - // but the form plugin does this for you automatically when it submits the data + // formData is an array; here we use $.param to convert it to a string to display it + // but the form plugin does this for you automatically when it submits the data var queryString = $.param(formData); - // jqForm is a jQuery object encapsulating the form element. To access the - // DOM element for the form do this: - // var formElement = jqForm[0]; + // jqForm is a jQuery object encapsulating the form element. To access the + // DOM element for the form do this: + // var formElement = jqForm[0]; alert('About to submit: \n\n' + queryString); - // here we could return false to prevent the form from being submitted; - // returning anything other than false will allow the form submit to continue + // here we could return false to prevent the form from being submitted; + // returning anything other than false will allow the form submit to continue return true; }, success: function showResponse(responseText, statusText, xhr) { // post-submit callback - // for normal html responses, the first argument to the success callback - // is the XMLHttpRequest object's responseText property + // for normal html responses, the first argument to the success callback + // is the XMLHttpRequest object's responseText property - // if the ajaxSubmit method was passed an Options Object with the dataType - // property set to 'xml' then the first argument to the success callback - // is the XMLHttpRequest object's responseXML property + // if the ajaxSubmit method was passed an Options Object with the dataType + // property set to 'xml' then the first argument to the success callback + // is the XMLHttpRequest object's responseXML property - // if the ajaxSubmit method was passed an Options Object with the dataType - // property set to 'json' then the first argument to the success callback - // is the json data object returned by the server + // if the ajaxSubmit method was passed an Options Object with the dataType + // property set to 'json' then the first argument to the success callback + // is the json data object returned by the server alert('status: ' + statusText + '\n\nresponseText: \n' + responseText + '\n\nThe output div should have already been updated with the responseText.'); } - // other available options: - //url: url // override for form's 'action' attribute - //type: type // 'get' or 'post', override for form's 'method' attribute - //dataType: null // 'xml', 'script', or 'json' (expected server response type) - //clearForm: true // clear all form fields after successful submit - //resetForm: true // reset the form after successful submit + // other available options: + //url: url // override for form's 'action' attribute + //type: type // 'get' or 'post', override for form's 'method' attribute + //dataType: null // 'xml', 'script', or 'json' (expected server response type) + //clearForm: true // clear all form fields after successful submit + //resetForm: true // reset the form after successful submit - // $.ajax options can be used here too, for example: - //timeout: 3000 + // $.ajax options can be used here too, for example: + //timeout: 3000 }); // Validation $('#myForm2').ajaxForm({ beforeSubmit: function (formData, jqForm, options) { - // formData is an array of objects representing the name and value of each field - // that will be sent to the server; it takes the following form: - // - // [ - // { name: username, value: valueOfUsernameInput }, - // { name: password, value: valueOfPasswordInput } - // ] - // - // To validate, we can examine the contents of this array to see if the - // username and password fields have values. If either value evaluates - // to false then we return false from this method. + // formData is an array of objects representing the name and value of each field + // that will be sent to the server; it takes the following form: + // + // [ + // { name: username, value: valueOfUsernameInput }, + // { name: password, value: valueOfPasswordInput } + // ] + // + // To validate, we can examine the contents of this array to see if the + // username and password fields have values. If either value evaluates + // to false then we return false from this method. for (var i = 0; i < formData.length; i++) { if (!formData[i].value) { @@ -150,13 +148,13 @@ $('#myForm2').ajaxForm({ // JSON $('#jsonForm').ajaxForm({ - // dataType identifies the expected content type of the server response + // dataType identifies the expected content type of the server response dataType: 'json', - // success identifies the function to invoke when the server response - // has been received + // success identifies the function to invoke when the server response + // has been received success: function (data) { - // 'data' is the json object returned from the server + // 'data' is the json object returned from the server alert(data.message); } }); @@ -164,14 +162,14 @@ $('#jsonForm').ajaxForm({ // XML $('#xmlForm').ajaxForm({ - // dataType identifies the expected content type of the server response + // dataType identifies the expected content type of the server response dataType: 'xml', - // success identifies the function to invoke when the server response - // has been received + // success identifies the function to invoke when the server response + // has been received success: function (responseXML) { - // 'responseXML' is the XML document returned by the server; we use - // jQuery to extract the content of the message node from the XML doc + // 'responseXML' is the XML document returned by the server; we use + // jQuery to extract the content of the message node from the XML doc var message = $('message', responseXML).text(); alert(message); } @@ -180,11 +178,11 @@ $('#xmlForm').ajaxForm({ // HTML $('#htmlForm').ajaxForm({ - // target identifies the element(s) to update with the server response + // target identifies the element(s) to update with the server response target: '#htmlExampleTarget', - // success identifies the function to invoke when the server response - // has been received; here we apply a fade-in effect to the new content + // success identifies the function to invoke when the server response + // has been received; here we apply a fade-in effect to the new content success: function () { $('#htmlExampleTarget').fadeIn('slow'); } diff --git a/jquery.jnotify/jquery.jnotify-tests.ts b/jquery.jnotify/jquery.jnotify-tests.ts index b5ad3927e2..f38a99760a 100644 --- a/jquery.jnotify/jquery.jnotify-tests.ts +++ b/jquery.jnotify/jquery.jnotify-tests.ts @@ -1,5 +1,3 @@ -/// - $(document).ready(function () { $('#StatusBar').jnotifyInizialize({ oneAtTime: true diff --git a/jquery.joyride/jquery.joyride-tests.ts b/jquery.joyride/jquery.joyride-tests.ts index f0a51b5270..c7324dd6c9 100644 --- a/jquery.joyride/jquery.joyride-tests.ts +++ b/jquery.joyride/jquery.joyride-tests.ts @@ -1,6 +1,3 @@ -/// - - var options: JoyrideOptions; options.autoStart = true; options.postStepCallback = (index, tip)=> { diff --git a/jquery.jsignature/jquery.jsignature-tests.ts b/jquery.jsignature/jquery.jsignature-tests.ts index 5ec4bc486d..58d73fe24b 100644 --- a/jquery.jsignature/jquery.jsignature-tests.ts +++ b/jquery.jsignature/jquery.jsignature-tests.ts @@ -1,8 +1,6 @@ -/// - /* * Taken from the tests section on jSignature - */ + */ $(document).ready(function () { var $sigdiv = $('#signature'); @@ -10,7 +8,7 @@ $(document).ready(function () { $sigdiv.jSignature(); $sigdiv.jSignature("reset"); - + var data = $sigdiv.jSignature("getData", "svgbase64"); $sigdiv.jSignature("setData", "data:" + data); diff --git a/jquery.leanmodal/jquery.leanmodal-tests.ts b/jquery.leanmodal/jquery.leanmodal-tests.ts index fb6c4ae344..1884cb25d9 100644 --- a/jquery.leanmodal/jquery.leanmodal-tests.ts +++ b/jquery.leanmodal/jquery.leanmodal-tests.ts @@ -1,6 +1,3 @@ -/// - - class LeanModalOptions implements JQueryLeanModalOption { top : number; overlay : number; diff --git a/jquery.livestampjs/jquery.livestampjs-tests.ts b/jquery.livestampjs/jquery.livestampjs-tests.ts index dc713819c9..6b5bd01835 100644 --- a/jquery.livestampjs/jquery.livestampjs-tests.ts +++ b/jquery.livestampjs/jquery.livestampjs-tests.ts @@ -1,4 +1,3 @@ -/// import * as moment from 'moment'; $('#test1').livestamp(new Date('June 18, 1987')); diff --git a/jquery.menuaim/jquery.menuaim-tests.ts b/jquery.menuaim/jquery.menuaim-tests.ts index e2a1b36aff..01baa59e03 100644 --- a/jquery.menuaim/jquery.menuaim-tests.ts +++ b/jquery.menuaim/jquery.menuaim-tests.ts @@ -1,5 +1,3 @@ -/// - $('div').menuAim({ activate: function () { }, deactivate: function () { }, diff --git a/jquery.mmenu/jquery.mmenu-tests.ts b/jquery.mmenu/jquery.mmenu-tests.ts index 385f479507..a08f4371ec 100644 --- a/jquery.mmenu/jquery.mmenu-tests.ts +++ b/jquery.mmenu/jquery.mmenu-tests.ts @@ -1,7 +1,3 @@ -/// -/// - - // -------------------------------------------------------- // ---------------- TEST DEFAULT OPTIONS ------------------ // -------------------------------------------------------- diff --git a/jquery.payment/index.d.ts b/jquery.payment/index.d.ts index 341e695a9a..88ecd255a5 100644 --- a/jquery.payment/index.d.ts +++ b/jquery.payment/index.d.ts @@ -3,6 +3,8 @@ // Definitions by: Eric J. Smith , John Rutherford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + declare namespace JQueryPayment { interface Payment { diff --git a/jquery.payment/jquery.payment-tests.ts b/jquery.payment/jquery.payment-tests.ts index db02b96d90..9eaad853cb 100644 --- a/jquery.payment/jquery.payment-tests.ts +++ b/jquery.payment/jquery.payment-tests.ts @@ -1,6 +1,3 @@ -/// -/// - $.payment.cards.push({ // Card type, as returned by $.payment.cardType. type: 'mastercard', diff --git a/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts b/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts index 8bfb91a27e..b215b02b35 100644 --- a/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts +++ b/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts @@ -1,6 +1,3 @@ - -/// - function test_pjax() { $.pjax(); } diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 25422922d8..91cc9391a2 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -1,6 +1,3 @@ - -/// - function test_fn_pjax() { $(document).pjax("a"); $(document).pjax("a", "#pjax-container"); diff --git a/jquery.placeholder/jquery.placeholder-tests.ts b/jquery.placeholder/jquery.placeholder-tests.ts index edaf3ea111..04c526b352 100644 --- a/jquery.placeholder/jquery.placeholder-tests.ts +++ b/jquery.placeholder/jquery.placeholder-tests.ts @@ -1,5 +1,3 @@ -/// - $('input').placeholder(); // specify custom class diff --git a/jquery.pnotify/jquery.pnotify-tests.ts b/jquery.pnotify/jquery.pnotify-tests.ts index 41cd7d3fda..f1b8ffb73e 100644 --- a/jquery.pnotify/jquery.pnotify-tests.ts +++ b/jquery.pnotify/jquery.pnotify-tests.ts @@ -1,6 +1,3 @@ -/// - - function test_pnotify() { diff --git a/jquery.prettyphoto/jquery.prettyphoto-tests.ts b/jquery.prettyphoto/jquery.prettyphoto-tests.ts index 4fcbf9ecdf..888d68ada4 100644 --- a/jquery.prettyphoto/jquery.prettyphoto-tests.ts +++ b/jquery.prettyphoto/jquery.prettyphoto-tests.ts @@ -1,8 +1,3 @@ -// Tests for prettyPhoto library - -/// - - // JQUERY $('#id').prettyPhoto(); diff --git a/jquery.qrcode/jquery.qrcode-tests.ts b/jquery.qrcode/jquery.qrcode-tests.ts index a634bd6f07..d007b203da 100644 --- a/jquery.qrcode/jquery.qrcode-tests.ts +++ b/jquery.qrcode/jquery.qrcode-tests.ts @@ -1,5 +1,3 @@ -/// - // Examples from website (note: the examples use color instead of fill, which is not supported) $('.container').qrcode(); diff --git a/jquery.rowgrid/jquery.rowgrid-tests.ts b/jquery.rowgrid/jquery.rowgrid-tests.ts index ba3e5f822d..3f1427c94a 100644 --- a/jquery.rowgrid/jquery.rowgrid-tests.ts +++ b/jquery.rowgrid/jquery.rowgrid-tests.ts @@ -1,12 +1,10 @@ -/// - /* * Test different options */ var options = { - minMargin: 10, - maxMargin: 35, + minMargin: 10, + maxMargin: 35, itemSelector: ".item" }; diff --git a/jquery.scrollto/jquery.scrollto-tests.ts b/jquery.scrollto/jquery.scrollto-tests.ts index 303ce0cd01..fcdc2f50bb 100644 --- a/jquery.scrollto/jquery.scrollto-tests.ts +++ b/jquery.scrollto/jquery.scrollto-tests.ts @@ -1,5 +1,3 @@ -/// - $('div').scrollTo(340); $('div').scrollTo('+=340px', { axis: 'y' }); diff --git a/jquery.simplemodal/jquery.simplemodal-tests.ts b/jquery.simplemodal/jquery.simplemodal-tests.ts index 8e73e057cc..0784f0eeeb 100644 --- a/jquery.simplemodal/jquery.simplemodal-tests.ts +++ b/jquery.simplemodal/jquery.simplemodal-tests.ts @@ -1,7 +1,5 @@ // Tests taken from documentation: http://www.ericmmartin.com/projects/simplemodal/ -/// - // Chained call with no options $("#sample").modal(); diff --git a/jquery.simplepagination/jquery.simplepagination-tests.ts b/jquery.simplepagination/jquery.simplepagination-tests.ts index b35a6f42a0..075fe02628 100644 --- a/jquery.simplepagination/jquery.simplepagination-tests.ts +++ b/jquery.simplepagination/jquery.simplepagination-tests.ts @@ -1,5 +1,3 @@ -/// - var selector = '#elementId'; $(function () { diff --git a/jquery.slimscroll/jquery.slimscroll-tests.ts b/jquery.slimscroll/jquery.slimscroll-tests.ts index 0d4be5af94..a0368d07e9 100644 --- a/jquery.slimscroll/jquery.slimscroll-tests.ts +++ b/jquery.slimscroll/jquery.slimscroll-tests.ts @@ -1,5 +1,3 @@ -/// - $("div").slimScroll(); $("div").slimScroll({ diff --git a/jquery.tagsmanager/jquery.tagsmanager-tests.ts b/jquery.tagsmanager/jquery.tagsmanager-tests.ts index 33af6a8b7b..26a75e8310 100644 --- a/jquery.tagsmanager/jquery.tagsmanager-tests.ts +++ b/jquery.tagsmanager/jquery.tagsmanager-tests.ts @@ -1,6 +1,3 @@ -/// - - var options: ITagsManagerOptions = { prefilled: ["Pisa", "Rome"], CapitalizeFirstLetter: true, diff --git a/jquery.timeago/jquery.timeago-tests.ts b/jquery.timeago/jquery.timeago-tests.ts index 2a852331be..f77b40b121 100644 --- a/jquery.timeago/jquery.timeago-tests.ts +++ b/jquery.timeago/jquery.timeago-tests.ts @@ -1,5 +1,3 @@ -/// - // Basic usage var jQueryElement: JQuery = jQuery("abbr.timeago").timeago(); diff --git a/jquery.timepicker/jquery.timepicker-tests.ts b/jquery.timepicker/jquery.timepicker-tests.ts index cbb14dfe7c..52329cf11a 100644 --- a/jquery.timepicker/jquery.timepicker-tests.ts +++ b/jquery.timepicker/jquery.timepicker-tests.ts @@ -1,5 +1,3 @@ -/// - var beforeShowCallback, onSelectCallback, onCloseCallback, onHourShow, onMinuteShow; $('#timepicker').timepicker({ timeSeparator: ':', diff --git a/jquery.timer/jquery.timer-tests.ts b/jquery.timer/jquery.timer-tests.ts index e5d1cdaa3a..1c6653bfdb 100644 --- a/jquery.timer/jquery.timer-tests.ts +++ b/jquery.timer/jquery.timer-tests.ts @@ -1,31 +1,28 @@ -/// +// Create the timer +$("body").timer( + function () { + console.log("This function just got called"); + }, 10000, true +); +$("body").timer.set({ time: 5000 }); // Change the time from 10000 millseconds to 5000 milliseconds +$("body").timer.toggle(false); // Reset the timer +$("body").timer.stop(); // Stop the timer +$("body").timer.play(); // Start / play the timer - // Create the timer - $("body").timer( - function () { - console.log("This function just got called"); - }, 10000, true - ); +// #region Outputting if timer is active or not +var isTimerActive = $("body").timer.isActive; // Define boolean isActive as isTimerActive +if (isTimerActive == true){ + console.log("Timer is active!"); +} +else{ + console.log("Timer is not active!"); +} +// #endregion - $("body").timer.set({ time: 5000 }); // Change the time from 10000 millseconds to 5000 milliseconds - $("body").timer.toggle(false); // Reset the timer - $("body").timer.stop(); // Stop the timer - $("body").timer.play(); // Start / play the timer +// #region Get time remaining +console.log("Time remaining on timer: " + $("body").timer.remaining.toString); +// #endregion - // #region Outputting if timer is active or not - var isTimerActive = $("body").timer.isActive; // Define boolean isActive as isTimerActive - if (isTimerActive == true){ - console.log("Timer is active!"); - } - else{ - console.log("Timer is not active!"); - } - // #endregion - - // #region Get time remaining - console.log("Time remaining on timer: " + $("body").timer.remaining.toString); - // #endregion - - $("body").timer.stop(); // Stop the timer once more for the purpose of the tests (to test once()) - $("body").timer.once(1000); // Run the timer ONCE in 1 second \ No newline at end of file +$("body").timer.stop(); // Stop the timer once more for the purpose of the tests (to test once()) +$("body").timer.once(1000); // Run the timer ONCE in 1 second \ No newline at end of file diff --git a/jquery.tipsy/jquery.tipsy-tests.ts b/jquery.tipsy/jquery.tipsy-tests.ts index e307e5d364..09ba7f2d68 100644 --- a/jquery.tipsy/jquery.tipsy-tests.ts +++ b/jquery.tipsy/jquery.tipsy-tests.ts @@ -1,5 +1,3 @@ -/// - // basic $('#example-1').tipsy(); diff --git a/jquery.tools/jquery.tools-tests.ts b/jquery.tools/jquery.tools-tests.ts index f8a4e39f90..443425e76b 100644 --- a/jquery.tools/jquery.tools-tests.ts +++ b/jquery.tools/jquery.tools-tests.ts @@ -1,5 +1,3 @@ -/// - /* from documentation at http://jquerytools.github.io/documentation/overlay/index.html */ $("img[rel]").overlay(); @@ -40,7 +38,7 @@ $("#prompt form").submit(function(this: JQuery, e: JQueryEventObject) {   // close the overlay triggers.eq(1).overlay().close(); - //or more straightforward: + // or more straightforward: triggers.data('overlay').close();   // get user input @@ -53,7 +51,7 @@ $("#prompt form").submit(function(this: JQuery, e: JQueryEventObject) { return e.preventDefault(); }); -$.tools.overlay.addEffect('', function() {}, function() {}); +$.tools.overlay.addEffect('', () => {}, () => {}); /* custom effects */ $.tools.overlay.addEffect("myEffect", function(position, done) { @@ -101,8 +99,7 @@ $(function() { mask: 'darkred', effect: 'apple',   - onBeforeLoad: function() { -  + onBeforeLoad() { // grab wrapper element inside content var wrap = this.getOverlay().find(".contentWrap");   @@ -113,7 +110,7 @@ $(function() { }); }); -$(function() { +$(() => { // positions for each overlay var positions = [ [0, 530], @@ -169,7 +166,7 @@ $.tools.overlay.addEffect("drop", function(css, done) { /* closing animation */ }, function(done) { this.getOverlay().animate( - {top:'-=55', opacity:0, width:'-=20'}, 300, 'drop', + { top: '-=55', opacity: 0, width: '-=20' }, 300, 'drop', function(this: JQuery) { $(this).hide(); done.call(null); diff --git a/jquery.total-storage/jquery.total-storage-tests.ts b/jquery.total-storage/jquery.total-storage-tests.ts index 0a23dd67cf..37ebb1ca73 100644 --- a/jquery.total-storage/jquery.total-storage-tests.ts +++ b/jquery.total-storage/jquery.total-storage-tests.ts @@ -1,10 +1,3 @@ -// Type definitions for jQueryTotalStorage 1.1.2 -// Project: https://github.com/Upstatement/jquery-total-storage -// Definitions by: Jeremy Brooks -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - //direct call $.totalStorage("test_key1", "test_value"); var val1:string = $.totalStorage("test_key"); diff --git a/jquery.transit/jquery.transit-tests.ts b/jquery.transit/jquery.transit-tests.ts index 2a672ec979..4f3b41f228 100644 --- a/jquery.transit/jquery.transit-tests.ts +++ b/jquery.transit/jquery.transit-tests.ts @@ -1,5 +1,3 @@ -/// - class TransitOptions implements JQueryTransitOptions { opacity: number; duration: number; diff --git a/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts b/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts index 44996637da..00ba4fe297 100644 --- a/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts +++ b/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts @@ -1,9 +1,6 @@ -/// - - // basic no options $('#datetimepicker').datetimepicker({ - + }); // basic with some options diff --git a/jquery.validation/jquery.validation-tests.ts b/jquery.validation/jquery.validation-tests.ts index 0b2de520f2..68062d6e1c 100644 --- a/jquery.validation/jquery.validation-tests.ts +++ b/jquery.validation/jquery.validation-tests.ts @@ -1,6 +1,4 @@ -/// -/// - +/// function test_validate() { $("#commentForm").validate(); @@ -264,4 +262,3 @@ function test_static_methods() { jQuery.validator.format('{0} {1}', 'a', 2); jQuery.validator.format('{0} {1}', ['a', 2]); } - \ No newline at end of file diff --git a/jquery.watermark/jquery.watermark-tests.ts b/jquery.watermark/jquery.watermark-tests.ts index 225ba0a482..e92ec0df11 100644 --- a/jquery.watermark/jquery.watermark-tests.ts +++ b/jquery.watermark/jquery.watermark-tests.ts @@ -1,5 +1,3 @@ -/// - $('#inputId').watermark('Required information'); $('#inputId').watermark('Required information', { className: 'myClassName' }); $('#inputId').watermark('Search', { useNative: false }); diff --git a/jquery.window/jquery.window-tests.ts b/jquery.window/jquery.window-tests.ts index 4b1b9b6eb2..15021cad7d 100644 --- a/jquery.window/jquery.window-tests.ts +++ b/jquery.window/jquery.window-tests.ts @@ -1,5 +1,3 @@ -/// - function example_1() { $.window({ title: "Cyclops Studio", @@ -20,13 +18,13 @@ function example_2() { function example_3() { // prepare customerized static attributes, see static attributes - // Note: you should call this method before starting to create window instances, or windows might display wrong. + // Note: you should call this method before starting to create window instances, or windows might display wrong. $.window.prepare({ dock: 'bottom', // change the dock direction: 'left', 'right', 'top', 'bottom' animationSpeed: 200, // set animation speed minWinLong: 180 // set minimized window long dimension width in pixel }); - + // limit window within body $.window({ icon: 'http://www.fstoke.me/favicon.ico', @@ -51,7 +49,7 @@ function example_3() { x: 80, y: 80 }); - + // assign the dock area $.window.prepare({ dock: 'bottom', // change the dock direction: 'left', 'right', 'top', 'bottom' diff --git a/jquery/index.d.ts b/jquery/index.d.ts index 3a785530aa..0a47546193 100644 --- a/jquery/index.d.ts +++ b/jquery/index.d.ts @@ -1166,25 +1166,28 @@ interface JQueryStatic { * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. * * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. + * @param callback The function that will be executed on every object. Will break the loop by returning false. + * @returns the first argument, the object that is iterated. * @see {@link https://api.jquery.com/jQuery.each/#jQuery-each-array-callback} */ each( collection: T[], - callback: (indexInArray: number, valueOfElement: T) => any - ): any; + callback: (indexInArray: number, valueOfElement: T) => boolean | void + ): T[]; /** * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. * * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. + * @param callback The function that will be executed on every object. Will break the loop by returning false. + * @returns the first argument, the object that is iterated. * @see {@link https://api.jquery.com/jQuery.each/#jQuery-each-object-callback} */ - each( - collection: any, - callback: (indexInArray: any, valueOfElement: any) => any - ): any; + each( + collection: T, + // TODO: `(keyInObject: keyof T, valueOfElement: T[keyof T])`, when TypeScript 2.1 allowed in repository + callback: (keyInObject: string, valueOfElement: any) => boolean | void + ): T; /** * Merge the contents of two or more objects together into the first object. @@ -1240,7 +1243,7 @@ interface JQueryStatic { * @param obj Object to test whether or not it is an array. * @see {@link https://api.jquery.com/jQuery.isArray/} */ - isArray(obj: any): boolean; + isArray(obj: any): obj is Array; /** * Check to see if an object is empty (contains no enumerable properties). * @@ -1254,7 +1257,7 @@ interface JQueryStatic { * @param obj Object to test whether or not it is a function. * @see {@link https://api.jquery.com/jQuery.isFunction/} */ - isFunction(obj: any): boolean; + isFunction(obj: any): obj is Function; /** * Determines whether its argument is a number. * @@ -1275,7 +1278,7 @@ interface JQueryStatic { * @param obj Object to test whether or not it is a window. * @see {@link https://api.jquery.com/jQuery.isWindow/} */ - isWindow(obj: any): boolean; + isWindow(obj: any): obj is Window; /** * Check to see if a DOM node is within an XML document (or is an XML document). * @@ -1360,7 +1363,7 @@ interface JQueryStatic { * @param obj Object to get the internal JavaScript [[Class]] of. * @see {@link https://api.jquery.com/jQuery.type/} */ - type(obj: any): string; + type(obj: any): "array" | "boolean" | "date" | "error" | "function" | "null" | "number" | "object" | "regexp" | "string" | "symbol" | "undefined"; /** * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. @@ -1368,7 +1371,7 @@ interface JQueryStatic { * @param array The Array of DOM elements. * @see {@link https://api.jquery.com/jQuery.unique/} */ - unique(array: Element[]): Element[]; + unique(array: T[]): T[]; /** * Parses a string into an array of DOM nodes. @@ -3301,10 +3304,10 @@ interface JQuery { /** * Iterate over a jQuery object, executing a function for each matched element. * - * @param func A function to execute for each matched element. + * @param func A function to execute for each matched element. Can stop the loop by returning false. * @see {@link https://api.jquery.com/each/} */ - each(func: (index: number, elem: Element) => any): JQuery; + each(func: (index: number, elem: Element) => boolean | void): JQuery; /** * Retrieve one of the elements matched by the jQuery object. @@ -3457,7 +3460,7 @@ interface JQuery { * @param func A function used as a test for each element in the set. this is the current DOM element. * @see {@link https://api.jquery.com/filter/#filter-function} */ - filter(func: (index: number, element: Element) => any): JQuery; + filter(func: (index: number, element: Element) => boolean): JQuery; /** * Reduce the set of matched elements to those that match the selector or pass the function's test. * diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index e11a8b806f..d2d58aa2a2 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -100,16 +100,18 @@ function test_ajax() { if (getAllResponseHeaders()) { return getAllResponseHeaders(); } - var allHeaders = ""; - $(["Cache-Control", "Content-Language", "Content-Type", - "Expires", "Last-Modified", "Pragma"]).each(function (i, header_name) { - if (xhr.getResponseHeader(header_name)) { - allHeaders += header_name + ": " + xhr.getResponseHeader(header_name) + "\n"; - } - return allHeaders; - }); + var allHeaders = ""; + var headersFieldNames = ["Cache-Control", "Content-Language", "Content-Type", + "Expires", "Last-Modified", "Pragma"]; + $(headersFieldNames).each(function (i, header_name) { + if (xhr.getResponseHeader(header_name)) { + allHeaders += header_name + ": " + xhr.getResponseHeader(header_name) + "\n"; + } + }); + return allHeaders; }; + return xhr; }; $.ajax({ @@ -1392,9 +1394,24 @@ function test_detach() { } function test_each() { - $.each([52, 97], function (index, value) { + var numArray: number[]; + numArray = $.each([1, 2, 3, 4], function (index: number, value: number) { alert(index + ': ' + value); }); + numArray = $.each([1, 2, 3, 4], function (index: number, value: number) { + alert(index + ': ' + value); + return value < 2; + }); + + var res: {one: number, 2: string}; + res = $.each({ one: 1, 2: "two" }, function(key: string, value: any) { + alert(key + ': ' + value); + }); + res = $.each({ one: 1, 2: "two" }, function(key: string, value: any) { + alert(key + ': ' + value); + return key === "2"; + }); + var map = { 'flammable': 'inflammable', 'duh': 'no duh' @@ -1404,8 +1421,7 @@ function test_each() { }); var arr = ["one", "two", "three", "four", "five"]; var obj = { one: 1, two: 2, three: 3, four: 4, five: 5 }; - // TODO: Should not need explicit type annotation https://github.com/Microsoft/TypeScript/issues/10072 - jQuery.each(arr, function () { + jQuery.each(arr, function () { $("#" + this).text("Mine is " + this + "."); return (this != "three"); }); @@ -1482,9 +1498,10 @@ function test_error() { $(this).hide(); }) .attr("src", "missing.png"); + jQuery.error("Oups"); jQuery.error = (message?: string) => { console.error(message); return this; - } + }; } function test_eventParams() { @@ -1516,7 +1533,7 @@ function test_eventParams() { function propStopped(e) { var msg = ""; if (e.isPropagationStopped()) { - msg = "called" + msg = "called"; } else { msg = "not called"; } @@ -1703,11 +1720,11 @@ function test_fadeToggle() { function test_filter() { $('li').filter(':even').css('background-color', 'red'); $('li').filter(function (index) { - return index % 3 == 2; + return index % 3 === 2; }).css('background-color', 'red'); $("div").css("background", "#b4b0da") .filter(function (index) { - return index == 1 || $(this).attr("id") == "fourth"; + return index === 1 || $(this).attr("id") === "fourth"; }) .css("border", "3px double red"); $("div").filter(document.getElementById("unique")); @@ -1879,7 +1896,7 @@ function test_getJSON() { function (data) { $.each(data.items, function (i, item) { $("").attr("src", item.media.m).appendTo("#images"); - if (i == 3) return false; + if (i === "3") return false; }); }); $.getJSON("test.js", function (json) { @@ -2524,6 +2541,17 @@ function test_is() { }); } +function test_isTypeGuards() { + var foo: number[] | ((x: string) => number) | Window; + if (jQuery.isArray(foo)) { + foo.push(1515); + } else if (jQuery.isWindow(foo)) { + foo.close(); + } else if (jQuery.isFunction(foo)) { + foo("hello world"); + } +} + function test_isArray() { $("b").append("" + $.isArray([])); } @@ -2582,6 +2610,16 @@ function test_isXMLDoc() { jQuery.isXMLDoc(document.body); } +function test_unique() { + jQuery.unique($('div.foo, div.bar').get()); + jQuery.unique($('div.foo, div.bar').toArray()); + + var divs: HTMLDivElement[]; + var unique: HTMLDivElement[]; + unique = jQuery.unique(divs); + unique = jQuery.unique(divs); +} + function test_jQuery() { $('div.foo'); $('div.foo').click(function () { diff --git a/jquerymobile/jquerymobile-tests.ts b/jquerymobile/jquerymobile-tests.ts index 105edc3f88..e7fbf3bfff 100644 --- a/jquerymobile/jquerymobile-tests.ts +++ b/jquerymobile/jquerymobile-tests.ts @@ -1,6 +1,3 @@ -/// - - function test_api() { $.mobile.changePage("about/us.html", { transition: "slideup" }); $.mobile.changePage("searchresults.php", { diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 2cce742f86..5755738622 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1,6 +1,3 @@ -/// - - function test_draggable() { $("#draggable").draggable({ axis: "y" }); diff --git a/js-quantities/js-quantities-tests.ts b/js-quantities/js-quantities-tests.ts index 95819381b5..ed69816dc3 100644 --- a/js-quantities/js-quantities-tests.ts +++ b/js-quantities/js-quantities-tests.ts @@ -1,6 +1,21 @@ -/// import Qty from "js-quantities"; +declare function describe(desc: string, fn: () => void): void; +declare function it(desc: string, fn: () => void): void; +interface Expect { + not: this; + toBe(y: T): void; + toEqual(y: T): void; + toBeTruthy(): void; + toBeNull(): void; + toBeCloseTo(this: Expect, x: number, sigFigs: number): void; + toThrow(this: Expect<() => void>, msg?: string): void; + toContain(this: Expect, x: U): void; +}; +declare function expect(x: T): Expect; +declare function beforeEach(f: () => void): void; +declare function afterEach(f: () => void): void; + // From project readme let qty: Qty; diff --git a/jsonschema/index.d.ts b/jsonschema/index.d.ts deleted file mode 100644 index 8d182b50b9..0000000000 --- a/jsonschema/index.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -// Type definitions for jsonschema -// Project: https://github.com/tdegrunt/jsonschema -// Definitions by: Vlado Tešanovic , kinesivan -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module "jsonschema" { - - export interface IJSONSchemaResult { - errors: Array; - instance: any; - arguments: Array<{}>; - propertyPath: string; - name: string; - schema: {}; - valid: boolean; - throwError: any; - disableFormat: boolean; - } - - export interface IJSONSchemaValidationError { - message: string; - property: string; - stack: string; - schema: {}; - name: string; - instance: any; - argument: {}; - } - - export interface IJSONSchemaOptions { - propertyName?: string; - base?: string; - } - - /** - * How to; - * - * const v: Validator = new Validator(); - * - * const schema: {} = { - * "type": "object", - * "properties": { - * "key": { - * "type": "string", - * "required": true - * }, - * "value": { - * "type": "string", - * "required": true - * } - * } - * }; - * - * const validationResults: { errors: Array } = - * v.validate({ key: "Name", value: "A10" }, {"type": "string"}); - * - */ - export class Validator { - - /** - * Creates a new Validator object - * @name Validator - * @constructor - */ - new(): this; - - /** - * Validates instance against the provided schema - * @param instance - * @param schema - * @param [options] - * @param [ctx] - * @return {Array} - */ - validate(instance: any, schema: {}, options?: IJSONSchemaOptions, ctx?: {}): IJSONSchemaResult; - - /** - * Adds a schema with a certain urn to the Validator instance. - * @param schema - * @param urn - * @return {Object} - */ - addSchema(schema: {}, urn: string): {}; - - /** - * Add Sub schema to existing one - * @param baseuri - * @param schema - */ - addSubSchema(baseuri: string, schema: {}): {} - - /** - * Sets all the schemas of the Validator instance. - * @param schemas - */ - setSchemas (schemas: Array<{}>): void; - - /** - * Returns the schema of a certain urn - * @param urn - */ - getSchema(urn: string): {}; - } -} - diff --git a/jsonschema/jsonschema-tests.ts b/jsonschema/jsonschema-tests.ts deleted file mode 100644 index 83e81b2027..0000000000 --- a/jsonschema/jsonschema-tests.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Validator, IJSONSchemaValidationError } from "jsonschema"; - -const v: Validator = new Validator(); - -const validationResults: { errors: Array } = v.validate("Smith", {"type": "string"}); diff --git a/jsonwebtoken/jsonwebtoken-tests.ts b/jsonwebtoken/jsonwebtoken-tests.ts index 4a939becbc..e591f31159 100644 --- a/jsonwebtoken/jsonwebtoken-tests.ts +++ b/jsonwebtoken/jsonwebtoken-tests.ts @@ -1,10 +1,8 @@ -/** - * Test suite created by Maxime LUCE - * +/** + * Test suite created by Maxime LUCE + * * Created by using code samples from https://github.com/auth0/node-jsonwebtoken. - */ - -/// + */ import jwt = require("jsonwebtoken"); import fs = require("fs"); @@ -49,7 +47,7 @@ jwt.verify(token, 'shhhhh', function(err, decoded) { // invalid token jwt.verify(token, 'wrong-secret', function(err, decoded) { - // err + // err // decoded undefined }); diff --git a/jsrender/jsrender-tests.ts b/jsrender/jsrender-tests.ts index d728f968ae..7b5bf5a525 100644 --- a/jsrender/jsrender-tests.ts +++ b/jsrender/jsrender-tests.ts @@ -1,5 +1,3 @@ -/// - $.views.converters("upper", function(val) { return val.toUpperCase(); }); diff --git a/jsx-chai/jsx-chai-tests.ts b/jsx-chai/jsx-chai-tests.ts index d421ae0874..48c49e7b25 100644 --- a/jsx-chai/jsx-chai-tests.ts +++ b/jsx-chai/jsx-chai-tests.ts @@ -1,5 +1,3 @@ -/// - import chai = require('chai'); import jsxChai = require('jsx-chai'); diff --git a/jwt-simple/index.d.ts b/jwt-simple/index.d.ts index 1ae8f18519..b70aa8c720 100644 --- a/jwt-simple/index.d.ts +++ b/jwt-simple/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jwt-simple v0.5.0 +// Type definitions for jwt-simple v0.5.1 // Project: https://github.com/hokaccha/node-jwt-simple // Definitions by: Ken Fukuyama , Gael Magnan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -11,7 +11,7 @@ * @param algorithm default is HS256 * @api public */ -export function decode(token: any, key: string, noVerify?: boolean): any; +export function decode(token: any, key: string, noVerify?: boolean, algorithm?: string): any; /** * Encode jwt * @param payload diff --git a/kafka-node/index.d.ts b/kafka-node/index.d.ts index 018b1a6f9e..a9992ccc52 100644 --- a/kafka-node/index.d.ts +++ b/kafka-node/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for kafka-node 1.3.3 // Project: https://github.com/SOHU-Co/kafka-node/ -// Definitions by: Daniel Imrie-Situnayake +// Definitions by: Daniel Imrie-Situnayake , Bill // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -9,22 +9,26 @@ export declare class Client { constructor(connectionString: string, clientId: string, options?: ZKOptions); close(callback?: Function): void; topicExists(topics: Array, callback: Function): void; + refreshMetadata(topics: Array, cb?: (error: any, data: any) => any): void; + close(cb: (error: any) => any): void; } export declare class Producer { - constructor(client: Client); + constructor(client: Client, options?: any, customPartitioner?: any); on(eventName: string, cb: () => any): void; on(eventName: string, cb: (error: any) => any): void; send(payloads: Array, cb: (error: any, data: any) => any): void; createTopics(topics: Array, async: boolean, cb?: (error: any, data: any) => any): void; + close(cb: (error: any) => any): void; } export declare class HighLevelProducer { - constructor(client: Client, options?: any); + constructor(client: Client, options?: any, customPartitioner?: any); on(eventName: string, cb: () => any): void; on(eventName: string, cb: (error: any) => any): void; send(payloads: Array, cb: (error: any, data: any) => any): void; createTopics(topics: Array, async: boolean, cb?: (error: any, data: any) => any): void; + close(cb: (error: any) => any): void; } export declare class Consumer { @@ -96,7 +100,7 @@ export interface ZKOptions { export interface ProduceRequest { topic: string; messages: any; // Array | Array | string | KeyedMessage - key?: string; + key?: any; partition?: number; attributes?: number; } diff --git a/karma-coverage/tsconfig.json b/karma-coverage/tsconfig.json index 57290fb7be..404aa4ec66 100644 --- a/karma-coverage/tsconfig.json +++ b/karma-coverage/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/karma/tsconfig.json b/karma/tsconfig.json index 2c74d40398..b2d5e469ba 100644 --- a/karma/tsconfig.json +++ b/karma/tsconfig.json @@ -11,6 +11,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/kendo-ui/index.d.ts b/kendo-ui/index.d.ts index ecdbffae66..86f9624227 100644 --- a/kendo-ui/index.d.ts +++ b/kendo-ui/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Kendo UI Professional v2016.3.1029 +// Type definitions for Kendo UI Professional v2017.1.118 // Project: http://www.telerik.com/kendo-ui // Definitions by: Telerik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -678,8 +678,8 @@ declare namespace kendo.data { static fields: DataSourceSchemaModelFields; id: any; - predecessorId: any; - successorId: any; + predecessorId: number; + successorId: number; type: number; static define(options: DataSourceSchemaModelWithFieldsObject): typeof GanttDependency; @@ -1135,7 +1135,7 @@ declare namespace kendo.data { interface DataSourceFilters extends DataSourceFilter { logic?: string; - filters?: DataSourceFilter[]; + filters?: DataSourceFilter[]; } interface DataSourceGroupItemAggregate { @@ -1656,6 +1656,7 @@ declare namespace kendo.ui { interface AutoCompleteOptions { name?: string; animation?: boolean|AutoCompleteAnimation; + autoWidth?: boolean; dataSource?: any|any|kendo.data.DataSource; clearButton?: boolean; dataTextField?: string; @@ -1790,6 +1791,7 @@ declare namespace kendo.ui { interface CalendarMonth { content?: string; + weekNumber?: string; empty?: string; } @@ -1804,6 +1806,7 @@ declare namespace kendo.ui { max?: Date; min?: Date; month?: CalendarMonth; + weekNumber?: boolean; start?: string; value?: Date; change?(e: CalendarEvent): void; @@ -1898,6 +1901,7 @@ declare namespace kendo.ui { interface ColorPickerOptions { name?: string; buttons?: boolean; + clearButton?: boolean; columns?: number; tileSize?: ColorPickerTileSize; messages?: ColorPickerMessages; @@ -2000,6 +2004,7 @@ declare namespace kendo.ui { name?: string; animation?: ComboBoxAnimation; autoBind?: boolean; + autoWidth?: boolean; cascadeFrom?: string; cascadeFromField?: string; clearButton?: boolean; @@ -2022,6 +2027,7 @@ declare namespace kendo.ui { placeholder?: string; popup?: ComboBoxPopup; suggest?: boolean; + syncValueAndText?: boolean; headerTemplate?: string|Function; template?: string|Function; text?: string; @@ -2159,6 +2165,7 @@ declare namespace kendo.ui { name?: string; alignToAnchor?: boolean; animation?: boolean|ContextMenuAnimation; + appendTo?: string|JQuery; closeOnClick?: boolean; dataSource?: any|any; direction?: string; @@ -2263,6 +2270,7 @@ declare namespace kendo.ui { interface DatePickerMonth { content?: string; + weekNumber?: string; empty?: string; } @@ -2279,6 +2287,7 @@ declare namespace kendo.ui { max?: Date; min?: Date; month?: DatePickerMonth; + weekNumber?: boolean; parseFormats?: any; start?: string; value?: Date; @@ -2353,6 +2362,7 @@ declare namespace kendo.ui { interface DateTimePickerMonth { content?: string; + weekNumber?: string; empty?: string; } @@ -2370,6 +2380,7 @@ declare namespace kendo.ui { max?: Date; min?: Date; month?: DateTimePickerMonth; + weekNumber?: boolean; parseFormats?: any; start?: string; timeFormat?: string; @@ -2558,6 +2569,7 @@ declare namespace kendo.ui { name?: string; animation?: boolean|DropDownListAnimation; autoBind?: boolean; + autoWidth?: boolean; cascadeFrom?: string; cascadeFromField?: string; dataSource?: any|any|kendo.data.DataSource; @@ -2986,6 +2998,7 @@ declare namespace kendo.ui { tooltip?: string; exec?: Function; items?: EditorToolItem[]; + palette?: string|any; template?: string; } @@ -3065,6 +3078,9 @@ declare namespace kendo.ui { clear?: string; filter?: string; info?: string; + additionalValue?: string; + additionalOperator?: string; + logic?: string; isFalse?: string; isTrue?: string; or?: string; @@ -3625,6 +3641,7 @@ declare namespace kendo.ui { } interface GridColumnCommandItem { + visible?: Function; name?: string; text?: GridColumnCommandItemText; className?: string; @@ -3659,6 +3676,7 @@ declare namespace kendo.ui { interface GridColumnSortable { compare?: Function; + initialDirection?: string; } interface GridColumn { @@ -3666,6 +3684,7 @@ declare namespace kendo.ui { attributes?: any; columns?: any; command?: GridColumnCommandItem[]; + editable?: Function; encoded?: boolean; field?: string; filterable?: boolean|GridColumnFilterable; @@ -3680,6 +3699,7 @@ declare namespace kendo.ui { hidden?: boolean; locked?: boolean; lockable?: boolean; + minResizableWidth?: number; minScreenWidth?: number; sortable?: boolean|GridColumnSortable; template?: string|Function; @@ -3779,8 +3799,8 @@ declare namespace kendo.ui { interface GridFilterable { extra?: boolean; messages?: GridFilterableMessages; - operators?: GridFilterableOperators; mode?: string; + operators?: GridFilterableOperators; } interface GridGroupableMessages { @@ -3873,6 +3893,7 @@ declare namespace kendo.ui { interface GridSortable { allowUnsort?: boolean; + initialDirection?: string; mode?: string; } @@ -4428,6 +4449,7 @@ declare namespace kendo.ui { animation?: boolean|MultiSelectAnimation; autoBind?: boolean; autoClose?: boolean; + autoWidth?: boolean; clearButton?: boolean; dataSource?: any|any|kendo.data.DataSource; dataTextField?: string; @@ -4797,15 +4819,30 @@ declare namespace kendo.ui { expand?: PanelBarAnimationExpand; } + interface PanelBarMessages { + loading?: string; + requestFailed?: string; + retry?: string; + } + interface PanelBarOptions { name?: string; animation?: boolean|PanelBarAnimation; + autoBind?: boolean; contentUrls?: any; - dataSource?: any|any; + dataImageUrlField?: string; + dataSource?: any|any|kendo.data.HierarchicalDataSource; + dataSpriteCssClassField?: string; + dataTextField?: string|any; + dataUrlField?: string; expandMode?: string; + loadOnDemand?: boolean; + messages?: PanelBarMessages; + template?: string|Function; activate?(e: PanelBarActivateEvent): void; collapse?(e: PanelBarCollapseEvent): void; contentLoad?(e: PanelBarContentLoadEvent): void; + dataBound?(e: PanelBarDataBoundEvent): void; error?(e: PanelBarErrorEvent): void; expand?(e: PanelBarExpandEvent): void; select?(e: PanelBarSelectEvent): void; @@ -4829,6 +4866,10 @@ declare namespace kendo.ui { contentElement?: Element; } + interface PanelBarDataBoundEvent extends PanelBarEvent { + node?: JQuery; + } + interface PanelBarErrorEvent extends PanelBarEvent { xhr?: JQueryXHR; status?: string; @@ -5629,6 +5670,7 @@ declare namespace kendo.ui { eventTemplate?: string|Function; footer?: boolean|SchedulerFooter; group?: SchedulerGroup; + groupHeaderTemplate?: string|Function; height?: number|string; majorTick?: number; majorTimeHeaderTemplate?: string|Function; @@ -5647,7 +5689,6 @@ declare namespace kendo.ui { timezone?: string; toolbar?: SchedulerToolbarItem[]; views?: SchedulerView[]; - groupHeaderTemplate?: string|Function; width?: number|string; workDayStart?: Date; workDayEnd?: Date; @@ -6021,6 +6062,9 @@ declare namespace kendo.ui { activeSheet(): kendo.spreadsheet.Sheet; activeSheet(sheet?: kendo.spreadsheet.Sheet): void; + cellContextMenu(): kendo.ui.ContextMenu; + rowHeaderContextMenu(): kendo.ui.ContextMenu; + colHeaderContextMenu(): kendo.ui.ContextMenu; sheets(): any; fromFile(blob: Blob): JQueryPromise; fromFile(blob: File): JQueryPromise; @@ -6040,6 +6084,17 @@ declare namespace kendo.ui { } + interface SpreadsheetDefaultCellStyle { + background?: string; + color?: string; + fontFamily?: string; + fontSize?: string; + Italic?: boolean; + bold?: boolean; + underline?: boolean; + wrap?: boolean; + } + interface SpreadsheetExcel { fileName?: string; forceProxy?: boolean; @@ -6209,6 +6264,7 @@ declare namespace kendo.ui { activeSheet?: string; columnWidth?: number; columns?: number; + defaultCellStyle?: SpreadsheetDefaultCellStyle; headerHeight?: number; headerWidth?: number; excel?: SpreadsheetExcel; @@ -6218,6 +6274,20 @@ declare namespace kendo.ui { sheets?: SpreadsheetSheet[]; sheetsbar?: boolean; toolbar?: boolean|SpreadsheetToolbar; + insertSheet?(e: SpreadsheetInsertSheetEvent): void; + removeSheet?(e: SpreadsheetRemoveSheetEvent): void; + renameSheet?(e: SpreadsheetRenameSheetEvent): void; + selectSheet?(e: SpreadsheetSelectSheetEvent): void; + unhideColumn?(e: SpreadsheetUnhideColumnEvent): void; + unhideRow?(e: SpreadsheetUnhideRowEvent): void; + hideColumn?(e: SpreadsheetHideColumnEvent): void; + hideRow?(e: SpreadsheetHideRowEvent): void; + deleteColumn?(e: SpreadsheetDeleteColumnEvent): void; + deleteRow?(e: SpreadsheetDeleteRowEvent): void; + insertColumn?(e: SpreadsheetInsertColumnEvent): void; + insertRow?(e: SpreadsheetInsertRowEvent): void; + select?(e: SpreadsheetSelectEvent): void; + changeFormat?(e: SpreadsheetChangeFormatEvent): void; change?(e: SpreadsheetChangeEvent): void; render?(e: SpreadsheetRenderEvent): void; excelExport?(e: SpreadsheetExcelExportEvent): void; @@ -6230,6 +6300,70 @@ declare namespace kendo.ui { isDefaultPrevented(): boolean; } + interface SpreadsheetInsertSheetEvent extends SpreadsheetEvent { + } + + interface SpreadsheetRemoveSheetEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + } + + interface SpreadsheetRenameSheetEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + newSheetName?: string; + } + + interface SpreadsheetSelectSheetEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + } + + interface SpreadsheetUnhideColumnEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetUnhideRowEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetHideColumnEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetHideRowEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetDeleteColumnEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetDeleteRowEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetInsertColumnEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetInsertRowEvent extends SpreadsheetEvent { + sheet?: kendo.spreadsheet.Sheet; + index?: number; + } + + interface SpreadsheetSelectEvent extends SpreadsheetEvent { + range?: kendo.spreadsheet.Range; + } + + interface SpreadsheetChangeFormatEvent extends SpreadsheetEvent { + range?: kendo.spreadsheet.Range; + } + interface SpreadsheetChangeEvent extends SpreadsheetEvent { range?: kendo.spreadsheet.Range; } @@ -6616,6 +6750,7 @@ declare namespace kendo.ui { options: TooltipOptions; + popup: kendo.ui.Popup; element: JQuery; wrapper: JQuery; @@ -6774,6 +6909,7 @@ declare namespace kendo.ui { interface TouchSwipeEvent extends TouchEvent { touch?: kendo.mobile.ui.TouchEventOptions; event?: JQueryEventObject; + direction?: string; } interface TouchGesturestartEvent extends TouchEvent { @@ -6873,6 +7009,7 @@ declare namespace kendo.ui { interface TreeListColumnCommandItem { className?: string; + imageClass?: string; click?: Function; name?: string; text?: string; @@ -7344,15 +7481,16 @@ declare namespace kendo.ui { clearAllFiles(): void; - clearFile(): void; + clearFile(callback: Function): void; clearFileByUid(uid: string): void; destroy(): void; disable(): void; enable(enable?: boolean): void; + focus(): void; getFiles(): any; removeAllFiles(): void; - removeFile(): void; - removeFileByUid(): void; + removeFile(callback: Function): void; + removeFileByUid(uid: string): void; toggle(enable: boolean): void; upload(): void; @@ -7412,6 +7550,7 @@ declare namespace kendo.ui { template?: string|Function; validation?: UploadValidation; cancel?(e: UploadCancelEvent): void; + clear?(e: UploadClearEvent): void; complete?(e: UploadEvent): void; error?(e: UploadErrorEvent): void; progress?(e: UploadProgressEvent): void; @@ -7427,39 +7566,43 @@ declare namespace kendo.ui { } interface UploadCancelEvent extends UploadEvent { - files?: UploadFile[]; + files?: any[]; + } + + interface UploadClearEvent extends UploadEvent { + e?: any; } interface UploadErrorEvent extends UploadEvent { - files?: UploadFile[]; + files?: any[]; operation?: string; XMLHttpRequest?: any; } interface UploadProgressEvent extends UploadEvent { - files?: UploadFile[]; + files?: any[]; percentComplete?: number; } interface UploadRemoveEvent extends UploadEvent { - files?: UploadFile[]; + files?: any[]; data?: any; } interface UploadSelectEvent extends UploadEvent { e?: any; - files?: UploadFile[]; + files?: any[]; } interface UploadSuccessEvent extends UploadEvent { - files?: UploadFile[]; + files?: any[]; operation?: string; response?: any; XMLHttpRequest?: any; } interface UploadUploadEvent extends UploadEvent { - files?: UploadFile[]; + files?: any[]; data?: any; formData?: any; XMLHttpRequest?: any; @@ -7496,6 +7639,7 @@ declare namespace kendo.ui { rules?: any; validateOnBlur?: boolean; validate?(e: ValidatorValidateEvent): void; + validateInput?(e: ValidatorValidateInputEvent): void; } interface ValidatorEvent { sender: Validator; @@ -7507,6 +7651,11 @@ declare namespace kendo.ui { valid?: boolean; } + interface ValidatorValidateInputEvent extends ValidatorEvent { + input?: JQuery; + valid?: boolean; + } + class Window extends kendo.ui.Widget { @@ -7629,6 +7778,274 @@ declare namespace kendo.ui { } +} +declare namespace kendo.geometry { + class Arc extends Observable { + + + options: ArcOptions; + + anticlockwise: boolean; + center: kendo.geometry.Point; + endAngle: number; + radiusX: number; + radiusY: number; + startAngle: number; + + constructor(center: any|kendo.geometry.Point, options?: ArcOptions); + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; + getAnticlockwise(): boolean; + getCenter(): kendo.geometry.Point; + getEndAngle(): number; + getRadiusX(): number; + getRadiusY(): number; + getStartAngle(): number; + pointAt(angle: number): kendo.geometry.Point; + setAnticlockwise(value: boolean): kendo.geometry.Arc; + setCenter(value: kendo.geometry.Point): kendo.geometry.Arc; + setEndAngle(value: number): kendo.geometry.Arc; + setRadiusX(value: number): kendo.geometry.Arc; + setRadiusY(value: number): kendo.geometry.Arc; + setStartAngle(value: number): kendo.geometry.Arc; + + } + + interface ArcOptions { + name?: string; + } + interface ArcEvent { + sender: Arc; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Circle extends Observable { + + + options: CircleOptions; + + center: kendo.geometry.Point; + radius: number; + + constructor(center: any|kendo.geometry.Point, radius: number); + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; + clone(): kendo.geometry.Circle; + equals(other: kendo.geometry.Circle): boolean; + getCenter(): kendo.geometry.Point; + getRadius(): number; + pointAt(angle: number): kendo.geometry.Point; + setCenter(value: kendo.geometry.Point): kendo.geometry.Point; + setCenter(value: any): kendo.geometry.Point; + setRadius(value: number): kendo.geometry.Circle; + + } + + interface CircleOptions { + name?: string; + } + interface CircleEvent { + sender: Circle; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Matrix extends Observable { + + + options: MatrixOptions; + + a: number; + b: number; + c: number; + d: number; + e: number; + f: number; + + + static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; + static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; + static translate(x: number, y: number): kendo.geometry.Matrix; + static unit(): kendo.geometry.Matrix; + + clone(): kendo.geometry.Matrix; + equals(other: kendo.geometry.Matrix): boolean; + round(digits: number): kendo.geometry.Matrix; + multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; + toArray(digits: number): any; + toString(digits: number, separator: string): string; + + } + + interface MatrixOptions { + name?: string; + } + interface MatrixEvent { + sender: Matrix; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Point extends Observable { + + + options: PointOptions; + + x: number; + y: number; + + constructor(x: number, y: number); + + static create(x: number, y: number): kendo.geometry.Point; + static create(x: any, y: number): kendo.geometry.Point; + static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; + static min(): kendo.geometry.Point; + static max(): kendo.geometry.Point; + static minPoint(): kendo.geometry.Point; + static maxPoint(): kendo.geometry.Point; + + clone(): kendo.geometry.Point; + distanceTo(point: kendo.geometry.Point): number; + equals(other: kendo.geometry.Point): boolean; + getX(): number; + getY(): number; + move(x: number, y: number): kendo.geometry.Point; + rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Point; + rotate(angle: number, center: any): kendo.geometry.Point; + round(digits: number): kendo.geometry.Point; + scale(scaleX: number, scaleY: number): kendo.geometry.Point; + scaleCopy(scaleX: number, scaleY: number): kendo.geometry.Point; + setX(value: number): kendo.geometry.Point; + setY(value: number): kendo.geometry.Point; + toArray(digits: number): any; + toString(digits: number, separator: string): string; + transform(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; + transformCopy(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; + translate(dx: number, dy: number): kendo.geometry.Point; + translateWith(vector: kendo.geometry.Point): kendo.geometry.Point; + translateWith(vector: any): kendo.geometry.Point; + + } + + interface PointOptions { + name?: string; + } + interface PointEvent { + sender: Point; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Rect extends Observable { + + + options: RectOptions; + + origin: kendo.geometry.Point; + size: kendo.geometry.Size; + + constructor(origin: kendo.geometry.Point|any, size: kendo.geometry.Size|any); + + static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; + static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; + bottomLeft(): kendo.geometry.Point; + bottomRight(): kendo.geometry.Point; + center(): kendo.geometry.Point; + clone(): kendo.geometry.Rect; + equals(other: kendo.geometry.Rect): boolean; + getOrigin(): kendo.geometry.Point; + getSize(): kendo.geometry.Size; + height(): number; + setOrigin(value: kendo.geometry.Point): kendo.geometry.Rect; + setOrigin(value: any): kendo.geometry.Rect; + setSize(value: kendo.geometry.Size): kendo.geometry.Rect; + setSize(value: any): kendo.geometry.Rect; + topLeft(): kendo.geometry.Point; + topRight(): kendo.geometry.Point; + width(): number; + + } + + interface RectOptions { + name?: string; + } + interface RectEvent { + sender: Rect; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Size extends Observable { + + + options: SizeOptions; + + width: number; + height: number; + + + static create(width: number, height: number): kendo.geometry.Size; + static create(width: any, height: number): kendo.geometry.Size; + static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; + + clone(): kendo.geometry.Size; + equals(other: kendo.geometry.Size): boolean; + getWidth(): number; + getHeight(): number; + setWidth(value: number): kendo.geometry.Size; + setHeight(value: number): kendo.geometry.Size; + + } + + interface SizeOptions { + name?: string; + } + interface SizeEvent { + sender: Size; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Transformation extends Observable { + + + options: TransformationOptions; + + + + + clone(): kendo.geometry.Transformation; + equals(other: kendo.geometry.Transformation): boolean; + matrix(): kendo.geometry.Matrix; + multiply(transformation: kendo.geometry.Transformation): kendo.geometry.Transformation; + rotate(angle: number, center: any): kendo.geometry.Transformation; + rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Transformation; + scale(scaleX: number, scaleY: number): kendo.geometry.Transformation; + translate(x: number, y: number): kendo.geometry.Transformation; + + } + + interface TransformationOptions { + name?: string; + } + interface TransformationEvent { + sender: Transformation; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + } declare namespace kendo.drawing { class Arc extends kendo.drawing.Element { @@ -8419,274 +8836,6 @@ declare namespace kendo.drawing { -} -declare namespace kendo.geometry { - class Arc extends Observable { - - - options: ArcOptions; - - anticlockwise: boolean; - center: kendo.geometry.Point; - endAngle: number; - radiusX: number; - radiusY: number; - startAngle: number; - - constructor(center: any|kendo.geometry.Point, options?: ArcOptions); - - - bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; - getAnticlockwise(): boolean; - getCenter(): kendo.geometry.Point; - getEndAngle(): number; - getRadiusX(): number; - getRadiusY(): number; - getStartAngle(): number; - pointAt(angle: number): kendo.geometry.Point; - setAnticlockwise(value: boolean): kendo.geometry.Arc; - setCenter(value: kendo.geometry.Point): kendo.geometry.Arc; - setEndAngle(value: number): kendo.geometry.Arc; - setRadiusX(value: number): kendo.geometry.Arc; - setRadiusY(value: number): kendo.geometry.Arc; - setStartAngle(value: number): kendo.geometry.Arc; - - } - - interface ArcOptions { - name?: string; - } - interface ArcEvent { - sender: Arc; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Circle extends Observable { - - - options: CircleOptions; - - center: kendo.geometry.Point; - radius: number; - - constructor(center: any|kendo.geometry.Point, radius: number); - - - bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; - clone(): kendo.geometry.Circle; - equals(other: kendo.geometry.Circle): boolean; - getCenter(): kendo.geometry.Point; - getRadius(): number; - pointAt(angle: number): kendo.geometry.Point; - setCenter(value: kendo.geometry.Point): kendo.geometry.Point; - setCenter(value: any): kendo.geometry.Point; - setRadius(value: number): kendo.geometry.Circle; - - } - - interface CircleOptions { - name?: string; - } - interface CircleEvent { - sender: Circle; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Matrix extends Observable { - - - options: MatrixOptions; - - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - - - static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; - static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; - static translate(x: number, y: number): kendo.geometry.Matrix; - static unit(): kendo.geometry.Matrix; - - clone(): kendo.geometry.Matrix; - equals(other: kendo.geometry.Matrix): boolean; - round(digits: number): kendo.geometry.Matrix; - multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; - toArray(digits: number): any; - toString(digits?: number, separator?: string): string; - - } - - interface MatrixOptions { - name?: string; - } - interface MatrixEvent { - sender: Matrix; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Point extends Observable { - - - options: PointOptions; - - x: number; - y: number; - - constructor(x: number, y: number); - - static create(x: number, y: number): kendo.geometry.Point; - static create(x: any, y: number): kendo.geometry.Point; - static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; - static min(): kendo.geometry.Point; - static max(): kendo.geometry.Point; - static minPoint(): kendo.geometry.Point; - static maxPoint(): kendo.geometry.Point; - - clone(): kendo.geometry.Point; - distanceTo(point: kendo.geometry.Point): number; - equals(other: kendo.geometry.Point): boolean; - getX(): number; - getY(): number; - move(x: number, y: number): kendo.geometry.Point; - rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Point; - rotate(angle: number, center: any): kendo.geometry.Point; - round(digits: number): kendo.geometry.Point; - scale(scaleX: number, scaleY: number): kendo.geometry.Point; - scaleCopy(scaleX: number, scaleY: number): kendo.geometry.Point; - setX(value: number): kendo.geometry.Point; - setY(value: number): kendo.geometry.Point; - toArray(digits: number): any; - toString(digits?: number, separator?: string): string; - transform(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; - transformCopy(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; - translate(dx: number, dy: number): kendo.geometry.Point; - translateWith(vector: kendo.geometry.Point): kendo.geometry.Point; - translateWith(vector: any): kendo.geometry.Point; - - } - - interface PointOptions { - name?: string; - } - interface PointEvent { - sender: Point; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Rect extends Observable { - - - options: RectOptions; - - origin: kendo.geometry.Point; - size: kendo.geometry.Size; - - constructor(origin: kendo.geometry.Point|any, size: kendo.geometry.Size|any); - - static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; - static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; - - bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; - bottomLeft(): kendo.geometry.Point; - bottomRight(): kendo.geometry.Point; - center(): kendo.geometry.Point; - clone(): kendo.geometry.Rect; - equals(other: kendo.geometry.Rect): boolean; - getOrigin(): kendo.geometry.Point; - getSize(): kendo.geometry.Size; - height(): number; - setOrigin(value: kendo.geometry.Point): kendo.geometry.Rect; - setOrigin(value: any): kendo.geometry.Rect; - setSize(value: kendo.geometry.Size): kendo.geometry.Rect; - setSize(value: any): kendo.geometry.Rect; - topLeft(): kendo.geometry.Point; - topRight(): kendo.geometry.Point; - width(): number; - - } - - interface RectOptions { - name?: string; - } - interface RectEvent { - sender: Rect; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Size extends Observable { - - - options: SizeOptions; - - width: number; - height: number; - - - static create(width: number, height: number): kendo.geometry.Size; - static create(width: any, height: number): kendo.geometry.Size; - static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; - - clone(): kendo.geometry.Size; - equals(other: kendo.geometry.Size): boolean; - getWidth(): number; - getHeight(): number; - setWidth(value: number): kendo.geometry.Size; - setHeight(value: number): kendo.geometry.Size; - - } - - interface SizeOptions { - name?: string; - } - interface SizeEvent { - sender: Size; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Transformation extends Observable { - - - options: TransformationOptions; - - - - - clone(): kendo.geometry.Transformation; - equals(other: kendo.geometry.Transformation): boolean; - matrix(): kendo.geometry.Matrix; - multiply(transformation: kendo.geometry.Transformation): kendo.geometry.Transformation; - rotate(angle: number, center: any): kendo.geometry.Transformation; - rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Transformation; - scale(scaleX: number, scaleY: number): kendo.geometry.Transformation; - translate(x: number, y: number): kendo.geometry.Transformation; - - } - - interface TransformationOptions { - name?: string; - } - interface TransformationEvent { - sender: Transformation; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - } declare namespace kendo.dataviz.ui { class Barcode extends kendo.ui.Widget { @@ -9681,6 +9830,7 @@ declare namespace kendo.dataviz.ui { margin?: ChartSeriesItemLabelsMargin; padding?: ChartSeriesItemLabelsPadding; position?: string|Function; + rotation?: string|number; template?: string|Function; visible?: boolean|Function; visual?: Function; @@ -9833,6 +9983,7 @@ declare namespace kendo.dataviz.ui { aggregate?: string|Function; axis?: string; border?: ChartSeriesItemBorder; + categoryAxis?: string; categoryField?: string; closeField?: string; color?: string|Function; @@ -10009,6 +10160,7 @@ declare namespace kendo.dataviz.ui { format?: string; margin?: ChartSeriesDefaultsLabelsMargin; padding?: ChartSeriesDefaultsLabelsPadding; + rotation?: string|number; template?: string|Function; visible?: boolean; visual?: Function; @@ -14295,7 +14447,7 @@ declare namespace kendo.dataviz.ui { inactiveItems?: StockChartLegendInactiveItems; } - interface StockChartNavigatorCategoryAxisItemAutoBaseUnitSteps { + interface StockChartNavigatorCategoryAxisAutoBaseUnitSteps { seconds?: any; minutes?: any; hours?: any; @@ -14305,45 +14457,45 @@ declare namespace kendo.dataviz.ui { years?: any; } - interface StockChartNavigatorCategoryAxisItemCrosshairTooltipBorder { + interface StockChartNavigatorCategoryAxisCrosshairTooltipBorder { color?: string; dashType?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemCrosshairTooltipPadding { + interface StockChartNavigatorCategoryAxisCrosshairTooltipPadding { bottom?: number; left?: number; right?: number; top?: number; } - interface StockChartNavigatorCategoryAxisItemCrosshairTooltip { + interface StockChartNavigatorCategoryAxisCrosshairTooltip { background?: string; - border?: StockChartNavigatorCategoryAxisItemCrosshairTooltipBorder; + border?: StockChartNavigatorCategoryAxisCrosshairTooltipBorder; color?: string; font?: string; format?: string; - padding?: StockChartNavigatorCategoryAxisItemCrosshairTooltipPadding; + padding?: StockChartNavigatorCategoryAxisCrosshairTooltipPadding; template?: string|Function; visible?: boolean; } - interface StockChartNavigatorCategoryAxisItemCrosshair { + interface StockChartNavigatorCategoryAxisCrosshair { color?: string; opacity?: number; - tooltip?: StockChartNavigatorCategoryAxisItemCrosshairTooltip; + tooltip?: StockChartNavigatorCategoryAxisCrosshairTooltip; visible?: boolean; width?: number; } - interface StockChartNavigatorCategoryAxisItemLabelsBorder { + interface StockChartNavigatorCategoryAxisLabelsBorder { color?: string; dashType?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemLabelsDateFormats { + interface StockChartNavigatorCategoryAxisLabelsDateFormats { days?: string; hours?: string; months?: string; @@ -14351,31 +14503,31 @@ declare namespace kendo.dataviz.ui { years?: string; } - interface StockChartNavigatorCategoryAxisItemLabelsMargin { + interface StockChartNavigatorCategoryAxisLabelsMargin { bottom?: number; left?: number; right?: number; top?: number; } - interface StockChartNavigatorCategoryAxisItemLabelsPadding { + interface StockChartNavigatorCategoryAxisLabelsPadding { bottom?: number; left?: number; right?: number; top?: number; } - interface StockChartNavigatorCategoryAxisItemLabels { + interface StockChartNavigatorCategoryAxisLabels { background?: string; - border?: StockChartNavigatorCategoryAxisItemLabelsBorder; + border?: StockChartNavigatorCategoryAxisLabelsBorder; color?: string; culture?: string; - dateFormats?: StockChartNavigatorCategoryAxisItemLabelsDateFormats; + dateFormats?: StockChartNavigatorCategoryAxisLabelsDateFormats; font?: string; format?: string; - margin?: StockChartNavigatorCategoryAxisItemLabelsMargin; + margin?: StockChartNavigatorCategoryAxisLabelsMargin; mirror?: boolean; - padding?: StockChartNavigatorCategoryAxisItemLabelsPadding; + padding?: StockChartNavigatorCategoryAxisLabelsPadding; rotation?: number; skip?: number; step?: number; @@ -14383,14 +14535,14 @@ declare namespace kendo.dataviz.ui { visible?: boolean; } - interface StockChartNavigatorCategoryAxisItemLine { + interface StockChartNavigatorCategoryAxisLine { color?: string; dashType?: string; visible?: boolean; width?: number; } - interface StockChartNavigatorCategoryAxisItemMajorGridLines { + interface StockChartNavigatorCategoryAxisMajorGridLines { color?: string; dashType?: string; visible?: boolean; @@ -14399,7 +14551,7 @@ declare namespace kendo.dataviz.ui { skip?: number; } - interface StockChartNavigatorCategoryAxisItemMajorTicks { + interface StockChartNavigatorCategoryAxisMajorTicks { color?: string; size?: number; visible?: boolean; @@ -14408,7 +14560,7 @@ declare namespace kendo.dataviz.ui { skip?: number; } - interface StockChartNavigatorCategoryAxisItemMinorGridLines { + interface StockChartNavigatorCategoryAxisMinorGridLines { color?: string; dashType?: string; visible?: boolean; @@ -14417,7 +14569,7 @@ declare namespace kendo.dataviz.ui { skip?: number; } - interface StockChartNavigatorCategoryAxisItemMinorTicks { + interface StockChartNavigatorCategoryAxisMinorTicks { color?: string; size?: number; visible?: boolean; @@ -14426,28 +14578,28 @@ declare namespace kendo.dataviz.ui { skip?: number; } - interface StockChartNavigatorCategoryAxisItemNotesDataItemIconBorder { + interface StockChartNavigatorCategoryAxisNotesDataItemIconBorder { color?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemNotesDataItemIcon { + interface StockChartNavigatorCategoryAxisNotesDataItemIcon { background?: string; - border?: StockChartNavigatorCategoryAxisItemNotesDataItemIconBorder; + border?: StockChartNavigatorCategoryAxisNotesDataItemIconBorder; size?: number; type?: string; visible?: boolean; } - interface StockChartNavigatorCategoryAxisItemNotesDataItemLabelBorder { + interface StockChartNavigatorCategoryAxisNotesDataItemLabelBorder { color?: string; dashType?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemNotesDataItemLabel { + interface StockChartNavigatorCategoryAxisNotesDataItemLabel { background?: string; - border?: StockChartNavigatorCategoryAxisItemNotesDataItemLabelBorder; + border?: StockChartNavigatorCategoryAxisNotesDataItemLabelBorder; color?: string; font?: string; template?: string|Function; @@ -14458,42 +14610,42 @@ declare namespace kendo.dataviz.ui { position?: string; } - interface StockChartNavigatorCategoryAxisItemNotesDataItemLine { + interface StockChartNavigatorCategoryAxisNotesDataItemLine { width?: number; color?: string; length?: number; } - interface StockChartNavigatorCategoryAxisItemNotesDataItem { + interface StockChartNavigatorCategoryAxisNotesDataItem { value?: any; position?: string; - icon?: StockChartNavigatorCategoryAxisItemNotesDataItemIcon; - label?: StockChartNavigatorCategoryAxisItemNotesDataItemLabel; - line?: StockChartNavigatorCategoryAxisItemNotesDataItemLine; + icon?: StockChartNavigatorCategoryAxisNotesDataItemIcon; + label?: StockChartNavigatorCategoryAxisNotesDataItemLabel; + line?: StockChartNavigatorCategoryAxisNotesDataItemLine; } - interface StockChartNavigatorCategoryAxisItemNotesIconBorder { + interface StockChartNavigatorCategoryAxisNotesIconBorder { color?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemNotesIcon { + interface StockChartNavigatorCategoryAxisNotesIcon { background?: string; - border?: StockChartNavigatorCategoryAxisItemNotesIconBorder; + border?: StockChartNavigatorCategoryAxisNotesIconBorder; size?: number; type?: string; visible?: boolean; } - interface StockChartNavigatorCategoryAxisItemNotesLabelBorder { + interface StockChartNavigatorCategoryAxisNotesLabelBorder { color?: string; dashType?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemNotesLabel { + interface StockChartNavigatorCategoryAxisNotesLabel { background?: string; - border?: StockChartNavigatorCategoryAxisItemNotesLabelBorder; + border?: StockChartNavigatorCategoryAxisNotesLabelBorder; color?: string; font?: string; template?: string|Function; @@ -14503,87 +14655,87 @@ declare namespace kendo.dataviz.ui { position?: string; } - interface StockChartNavigatorCategoryAxisItemNotesLine { + interface StockChartNavigatorCategoryAxisNotesLine { width?: number; color?: string; length?: number; } - interface StockChartNavigatorCategoryAxisItemNotes { + interface StockChartNavigatorCategoryAxisNotes { position?: string; - icon?: StockChartNavigatorCategoryAxisItemNotesIcon; - label?: StockChartNavigatorCategoryAxisItemNotesLabel; - line?: StockChartNavigatorCategoryAxisItemNotesLine; - data?: StockChartNavigatorCategoryAxisItemNotesDataItem[]; + icon?: StockChartNavigatorCategoryAxisNotesIcon; + label?: StockChartNavigatorCategoryAxisNotesLabel; + line?: StockChartNavigatorCategoryAxisNotesLine; + data?: StockChartNavigatorCategoryAxisNotesDataItem[]; } - interface StockChartNavigatorCategoryAxisItemPlotBand { + interface StockChartNavigatorCategoryAxisPlotBand { color?: string; from?: number; opacity?: number; to?: number; } - interface StockChartNavigatorCategoryAxisItemTitleBorder { + interface StockChartNavigatorCategoryAxisTitleBorder { color?: string; dashType?: string; width?: number; } - interface StockChartNavigatorCategoryAxisItemTitleMargin { + interface StockChartNavigatorCategoryAxisTitleMargin { bottom?: number; left?: number; right?: number; top?: number; } - interface StockChartNavigatorCategoryAxisItemTitlePadding { + interface StockChartNavigatorCategoryAxisTitlePadding { bottom?: number; left?: number; right?: number; top?: number; } - interface StockChartNavigatorCategoryAxisItemTitle { + interface StockChartNavigatorCategoryAxisTitle { background?: string; - border?: StockChartNavigatorCategoryAxisItemTitleBorder; + border?: StockChartNavigatorCategoryAxisTitleBorder; color?: string; font?: string; - margin?: StockChartNavigatorCategoryAxisItemTitleMargin; - padding?: StockChartNavigatorCategoryAxisItemTitlePadding; + margin?: StockChartNavigatorCategoryAxisTitleMargin; + padding?: StockChartNavigatorCategoryAxisTitlePadding; position?: string; rotation?: number; text?: string; visible?: boolean; } - interface StockChartNavigatorCategoryAxisItem { - autoBaseUnitSteps?: StockChartNavigatorCategoryAxisItemAutoBaseUnitSteps; + interface StockChartNavigatorCategoryAxis { + autoBaseUnitSteps?: StockChartNavigatorCategoryAxisAutoBaseUnitSteps; axisCrossingValue?: any|Date|any; background?: string; baseUnit?: string; baseUnitStep?: any; categories?: any; color?: string; - crosshair?: StockChartNavigatorCategoryAxisItemCrosshair; + crosshair?: StockChartNavigatorCategoryAxisCrosshair; field?: string; justified?: boolean; - labels?: StockChartNavigatorCategoryAxisItemLabels; - line?: StockChartNavigatorCategoryAxisItemLine; - majorGridLines?: StockChartNavigatorCategoryAxisItemMajorGridLines; - majorTicks?: StockChartNavigatorCategoryAxisItemMajorTicks; + labels?: StockChartNavigatorCategoryAxisLabels; + line?: StockChartNavigatorCategoryAxisLine; + majorGridLines?: StockChartNavigatorCategoryAxisMajorGridLines; + majorTicks?: StockChartNavigatorCategoryAxisMajorTicks; max?: any; maxDateGroups?: number; min?: any; - minorGridLines?: StockChartNavigatorCategoryAxisItemMinorGridLines; - minorTicks?: StockChartNavigatorCategoryAxisItemMinorTicks; - plotBands?: StockChartNavigatorCategoryAxisItemPlotBand[]; + minorGridLines?: StockChartNavigatorCategoryAxisMinorGridLines; + minorTicks?: StockChartNavigatorCategoryAxisMinorTicks; + plotBands?: StockChartNavigatorCategoryAxisPlotBand[]; reverse?: boolean; roundToBaseUnit?: boolean; - title?: StockChartNavigatorCategoryAxisItemTitle; + title?: StockChartNavigatorCategoryAxisTitle; visible?: boolean; weekStartDay?: number; - notes?: StockChartNavigatorCategoryAxisItemNotes; + notes?: StockChartNavigatorCategoryAxisNotes; } interface StockChartNavigatorHint { @@ -14781,7 +14933,7 @@ declare namespace kendo.dataviz.ui { } interface StockChartNavigator { - categoryAxis?: StockChartNavigatorCategoryAxisItem[]; + categoryAxis?: StockChartNavigatorCategoryAxis; dataSource?: any; autoBind?: boolean; dateField?: string; @@ -16959,6 +17111,27 @@ declare namespace kendo { } + namespace date { + function setDayOfWeek(targetDate: Date, dayOfWeek: number, direction: number): void; + function dayOfWeek(targetDate: Date, dayOfWeek: number, direction: number): Date; + function weekInYear(date: Date, weekStart?: Date): number; + function getDate(date: Date): Date; + function isInDateRange(targetDate: Date, lowerLimitDate: Date, upperLimitDate: Date): boolean; + function isInTimeRange(targetDate: Date, lowerLimitDate: Date, upperLimitDate: Date): boolean; + function isToday(targetDate: Date): boolean; + function nextDay(targetDate: Date): Date; + function previousDay(targetDate: Date): Date; + function toUtcTime(targetDate: Date): number; + function setTime(targetDate: Date, millisecondsToAdd: number, ignoreDST: boolean): void; + function setHours(targetDate: Date, sourceDate: number): Date; + function addDays(targetDate: Date, numberOfDaysToAdd: number): Date; + function today(): Date; + function toInvariantTime(targetDate: Date): Date; + function firstDayOfMonth(targetDate: Date): Date; + function lastDayOfMonth(targetDate: Date): Date; + function getMilliseconds(targetDate: Date): Date; + } + namespace drawing { function align(elements: any, rect: kendo.geometry.Rect, alignment: string): void; function drawDOM(element: JQuery, options: any): JQueryPromise; @@ -17022,6 +17195,22 @@ declare namespace kendo { function defineFont(map: any): void; } + namespace timezone { + function offset(utcTime: Date, timezone: string): number; + function offset(utcTime: number, timezone: string): number; + function convert(targetDate: Date, fromOffset: number, toOffset: number): Date; + function convert(targetDate: Date, fromOffset: number, toOffset: string): Date; + function convert(targetDate: Date, fromOffset: string, toOffset: number): Date; + function convert(targetDate: Date, fromOffset: string, toOffset: string): Date; + function apply(targetDate: Date, offset: number): Date; + function apply(targetDate: Date, offset: string): Date; + function remove(targetDate: Date, offset: number): Date; + function remove(targetDate: Date, offset: string): Date; + function abbr(targetDate: Date, timezone: string): string; + function toLocalDate(targetDate: Date): Date; + function toLocalDate(targetDate: number): Date; + } + } declare namespace kendo.spreadsheet { class CustomFilter extends Observable { @@ -18306,7 +18495,7 @@ declare namespace kendo.ooxml { interface WorkbookSheetRow { cells?: WorkbookSheetRowCell[]; index?: number; - height?: number; + height?: number; type?: "header" | "footer" | "group-header" | "group-footer" | "data"; } @@ -18337,6 +18526,268 @@ declare namespace kendo.ooxml { } +declare namespace kendo.dataviz.geometry { + class Arc extends Observable { + + + options: ArcOptions; + + anticlockwise: boolean; + center: kendo.geometry.Point; + endAngle: number; + radiusX: number; + radiusY: number; + startAngle: number; + + constructor(center: any|kendo.geometry.Point, options?: ArcOptions); + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; + getAnticlockwise(): boolean; + getCenter(): kendo.geometry.Point; + getEndAngle(): number; + getRadiusX(): number; + getRadiusY(): number; + getStartAngle(): number; + pointAt(angle: number): kendo.geometry.Point; + setAnticlockwise(value: boolean): kendo.geometry.Arc; + setCenter(value: kendo.geometry.Point): kendo.geometry.Arc; + setEndAngle(value: number): kendo.geometry.Arc; + setRadiusX(value: number): kendo.geometry.Arc; + setRadiusY(value: number): kendo.geometry.Arc; + setStartAngle(value: number): kendo.geometry.Arc; + + } + + interface ArcOptions { + name?: string; + } + interface ArcEvent { + sender: Arc; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Circle extends Observable { + + + options: CircleOptions; + + center: kendo.geometry.Point; + radius: number; + + constructor(center: any|kendo.geometry.Point, radius: number); + + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; + clone(): kendo.geometry.Circle; + equals(other: kendo.geometry.Circle): boolean; + getCenter(): kendo.geometry.Point; + getRadius(): number; + pointAt(angle: number): kendo.geometry.Point; + setCenter(value: kendo.geometry.Point): kendo.geometry.Point; + setCenter(value: any): kendo.geometry.Point; + setRadius(value: number): kendo.geometry.Circle; + + } + + interface CircleOptions { + name?: string; + } + interface CircleEvent { + sender: Circle; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Matrix extends Observable { + + + options: MatrixOptions; + + a: number; + b: number; + c: number; + d: number; + e: number; + f: number; + + + static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; + static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; + static translate(x: number, y: number): kendo.geometry.Matrix; + static unit(): kendo.geometry.Matrix; + + clone(): kendo.geometry.Matrix; + equals(other: kendo.geometry.Matrix): boolean; + round(digits: number): kendo.geometry.Matrix; + multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; + toArray(digits: number): any; + toString(digits: number, separator: string): string; + + } + + interface MatrixOptions { + name?: string; + } + interface MatrixEvent { + sender: Matrix; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Point extends Observable { + + + options: PointOptions; + + x: number; + y: number; + + constructor(x: number, y: number); + + static create(x: number, y: number): kendo.geometry.Point; + static create(x: any, y: number): kendo.geometry.Point; + static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; + static min(): kendo.geometry.Point; + static max(): kendo.geometry.Point; + static minPoint(): kendo.geometry.Point; + static maxPoint(): kendo.geometry.Point; + + clone(): kendo.geometry.Point; + distanceTo(point: kendo.geometry.Point): number; + equals(other: kendo.geometry.Point): boolean; + getX(): number; + getY(): number; + move(x: number, y: number): kendo.geometry.Point; + rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Point; + rotate(angle: number, center: any): kendo.geometry.Point; + round(digits: number): kendo.geometry.Point; + scale(scaleX: number, scaleY: number): kendo.geometry.Point; + scaleCopy(scaleX: number, scaleY: number): kendo.geometry.Point; + setX(value: number): kendo.geometry.Point; + setY(value: number): kendo.geometry.Point; + toArray(digits: number): any; + toString(digits: number, separator: string): string; + transform(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; + transformCopy(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; + translate(dx: number, dy: number): kendo.geometry.Point; + translateWith(vector: kendo.geometry.Point): kendo.geometry.Point; + translateWith(vector: any): kendo.geometry.Point; + + } + + interface PointOptions { + name?: string; + } + interface PointEvent { + sender: Point; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Rect extends Observable { + + + options: RectOptions; + + origin: kendo.geometry.Point; + size: kendo.geometry.Size; + + constructor(origin: kendo.geometry.Point|any, size: kendo.geometry.Size|any); + + static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; + static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; + + bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; + bottomLeft(): kendo.geometry.Point; + bottomRight(): kendo.geometry.Point; + center(): kendo.geometry.Point; + clone(): kendo.geometry.Rect; + equals(other: kendo.geometry.Rect): boolean; + getOrigin(): kendo.geometry.Point; + getSize(): kendo.geometry.Size; + height(): number; + setOrigin(value: kendo.geometry.Point): kendo.geometry.Rect; + setOrigin(value: any): kendo.geometry.Rect; + setSize(value: kendo.geometry.Size): kendo.geometry.Rect; + setSize(value: any): kendo.geometry.Rect; + topLeft(): kendo.geometry.Point; + topRight(): kendo.geometry.Point; + width(): number; + + } + + interface RectOptions { + name?: string; + } + interface RectEvent { + sender: Rect; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + + class Size extends Observable { + + + options: SizeOptions; + + width: number; + height: number; + + + static create(width: number, height: number): kendo.geometry.Size; + static create(width: any, height: number): kendo.geometry.Size; + static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; + + clone(): kendo.geometry.Size; + equals(other: kendo.geometry.Size): boolean; + getWidth(): number; + getHeight(): number; + setWidth(value: number): kendo.geometry.Size; + setHeight(value: number): kendo.geometry.Size; + + } + + interface SizeOptions { + name?: string; + } + + class Transformation extends Observable { + + + options: TransformationOptions; + + + + + clone(): kendo.geometry.Transformation; + equals(other: kendo.geometry.Transformation): boolean; + matrix(): kendo.geometry.Matrix; + multiply(transformation: kendo.geometry.Transformation): kendo.geometry.Transformation; + rotate(angle: number, center: any): kendo.geometry.Transformation; + rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Transformation; + scale(scaleX: number, scaleY: number): kendo.geometry.Transformation; + translate(x: number, y: number): kendo.geometry.Transformation; + + } + + interface TransformationOptions { + name?: string; + } + interface TransformationEvent { + sender: Transformation; + preventDefault: Function; + isDefaultPrevented(): boolean; + } + + +} declare namespace kendo.dataviz.drawing { class Arc extends kendo.drawing.Element { @@ -19126,274 +19577,6 @@ declare namespace kendo.dataviz.drawing { -} -declare namespace kendo.dataviz.geometry { - class Arc extends Observable { - - - options: ArcOptions; - - anticlockwise: boolean; - center: kendo.geometry.Point; - endAngle: number; - radiusX: number; - radiusY: number; - startAngle: number; - - constructor(center: any|kendo.geometry.Point, options?: ArcOptions); - - - bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; - getAnticlockwise(): boolean; - getCenter(): kendo.geometry.Point; - getEndAngle(): number; - getRadiusX(): number; - getRadiusY(): number; - getStartAngle(): number; - pointAt(angle: number): kendo.geometry.Point; - setAnticlockwise(value: boolean): kendo.geometry.Arc; - setCenter(value: kendo.geometry.Point): kendo.geometry.Arc; - setEndAngle(value: number): kendo.geometry.Arc; - setRadiusX(value: number): kendo.geometry.Arc; - setRadiusY(value: number): kendo.geometry.Arc; - setStartAngle(value: number): kendo.geometry.Arc; - - } - - interface ArcOptions { - name?: string; - } - interface ArcEvent { - sender: Arc; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Circle extends Observable { - - - options: CircleOptions; - - center: kendo.geometry.Point; - radius: number; - - constructor(center: any|kendo.geometry.Point, radius: number); - - - bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; - clone(): kendo.geometry.Circle; - equals(other: kendo.geometry.Circle): boolean; - getCenter(): kendo.geometry.Point; - getRadius(): number; - pointAt(angle: number): kendo.geometry.Point; - setCenter(value: kendo.geometry.Point): kendo.geometry.Point; - setCenter(value: any): kendo.geometry.Point; - setRadius(value: number): kendo.geometry.Circle; - - } - - interface CircleOptions { - name?: string; - } - interface CircleEvent { - sender: Circle; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Matrix extends Observable { - - - options: MatrixOptions; - - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - - - static rotate(angle: number, x: number, y: number): kendo.geometry.Matrix; - static scale(scaleX: number, scaleY: number): kendo.geometry.Matrix; - static translate(x: number, y: number): kendo.geometry.Matrix; - static unit(): kendo.geometry.Matrix; - - clone(): kendo.geometry.Matrix; - equals(other: kendo.geometry.Matrix): boolean; - round(digits: number): kendo.geometry.Matrix; - multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; - toArray(digits: number): any; - toString(digits?: number, separator?: string): string; - - } - - interface MatrixOptions { - name?: string; - } - interface MatrixEvent { - sender: Matrix; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Point extends Observable { - - - options: PointOptions; - - x: number; - y: number; - - constructor(x: number, y: number); - - static create(x: number, y: number): kendo.geometry.Point; - static create(x: any, y: number): kendo.geometry.Point; - static create(x: kendo.geometry.Point, y: number): kendo.geometry.Point; - static min(): kendo.geometry.Point; - static max(): kendo.geometry.Point; - static minPoint(): kendo.geometry.Point; - static maxPoint(): kendo.geometry.Point; - - clone(): kendo.geometry.Point; - distanceTo(point: kendo.geometry.Point): number; - equals(other: kendo.geometry.Point): boolean; - getX(): number; - getY(): number; - move(x: number, y: number): kendo.geometry.Point; - rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Point; - rotate(angle: number, center: any): kendo.geometry.Point; - round(digits: number): kendo.geometry.Point; - scale(scaleX: number, scaleY: number): kendo.geometry.Point; - scaleCopy(scaleX: number, scaleY: number): kendo.geometry.Point; - setX(value: number): kendo.geometry.Point; - setY(value: number): kendo.geometry.Point; - toArray(digits: number): any; - toString(digits: number, separator: string): string; - transform(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; - transformCopy(tansformation: kendo.geometry.Transformation): kendo.geometry.Point; - translate(dx: number, dy: number): kendo.geometry.Point; - translateWith(vector: kendo.geometry.Point): kendo.geometry.Point; - translateWith(vector: any): kendo.geometry.Point; - - } - - interface PointOptions { - name?: string; - } - interface PointEvent { - sender: Point; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Rect extends Observable { - - - options: RectOptions; - - origin: kendo.geometry.Point; - size: kendo.geometry.Size; - - constructor(origin: kendo.geometry.Point|any, size: kendo.geometry.Size|any); - - static fromPoints(pointA: kendo.geometry.Point, pointB: kendo.geometry.Point): kendo.geometry.Rect; - static union(rectA: kendo.geometry.Rect, rectB: kendo.geometry.Rect): kendo.geometry.Rect; - - bbox(matrix: kendo.geometry.Matrix): kendo.geometry.Rect; - bottomLeft(): kendo.geometry.Point; - bottomRight(): kendo.geometry.Point; - center(): kendo.geometry.Point; - clone(): kendo.geometry.Rect; - equals(other: kendo.geometry.Rect): boolean; - getOrigin(): kendo.geometry.Point; - getSize(): kendo.geometry.Size; - height(): number; - setOrigin(value: kendo.geometry.Point): kendo.geometry.Rect; - setOrigin(value: any): kendo.geometry.Rect; - setSize(value: kendo.geometry.Size): kendo.geometry.Rect; - setSize(value: any): kendo.geometry.Rect; - topLeft(): kendo.geometry.Point; - topRight(): kendo.geometry.Point; - width(): number; - - } - - interface RectOptions { - name?: string; - } - interface RectEvent { - sender: Rect; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Size extends Observable { - - - options: SizeOptions; - - width: number; - height: number; - - - static create(width: number, height: number): kendo.geometry.Size; - static create(width: any, height: number): kendo.geometry.Size; - static create(width: kendo.geometry.Size, height: number): kendo.geometry.Size; - - clone(): kendo.geometry.Size; - equals(other: kendo.geometry.Size): boolean; - getWidth(): number; - getHeight(): number; - setWidth(value: number): kendo.geometry.Size; - setHeight(value: number): kendo.geometry.Size; - - } - - interface SizeOptions { - name?: string; - } - interface SizeEvent { - sender: Size; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - - class Transformation extends Observable { - - - options: TransformationOptions; - - - - - clone(): kendo.geometry.Transformation; - equals(other: kendo.geometry.Transformation): boolean; - matrix(): kendo.geometry.Matrix; - multiply(transformation: kendo.geometry.Transformation): kendo.geometry.Transformation; - rotate(angle: number, center: any): kendo.geometry.Transformation; - rotate(angle: number, center: kendo.geometry.Point): kendo.geometry.Transformation; - scale(scaleX: number, scaleY: number): kendo.geometry.Transformation; - translate(x: number, y: number): kendo.geometry.Transformation; - - } - - interface TransformationOptions { - name?: string; - } - interface TransformationEvent { - sender: Transformation; - preventDefault: Function; - isDefaultPrevented(): boolean; - } - - } interface HTMLElement { diff --git a/kendo-ui/kendo-ui-tests.ts b/kendo-ui/kendo-ui-tests.ts index d1cc528edb..0b79f87954 100644 --- a/kendo-ui/kendo-ui-tests.ts +++ b/kendo-ui/kendo-ui-tests.ts @@ -1,6 +1,3 @@ -/// - - var is = { string: (msg: string) => { return true; diff --git a/keytar/index.d.ts b/keytar/index.d.ts index 12dbd63316..5a27c0c984 100644 --- a/keytar/index.d.ts +++ b/keytar/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for keytar 3.0.0 +// Type definitions for keytar 3.0.2 // Project: http://atom.github.io/node-keytar/ -// Definitions by: Milan Burda +// Definitions by: Milan Burda , Brendan Forster // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,7 @@ * * @returns the string password or null on failures. */ -export declare function getPassword(service: string, account: string): string; +export declare function getPassword(service: string, account: string): string | null; /** * Add the password for the service and account to the keychain. @@ -31,9 +31,9 @@ export declare function addPassword(service: string, account: string, password: * @param service The string service name. * @param account The string account name. * - * @returns the string password or null on failures. + * @returns true on success, false on failure */ -export declare function deletePassword(service: string, account: string): string; +export declare function deletePassword(service: string, account: string): boolean; /** * Replace the password for the service and account in the keychain. @@ -56,4 +56,4 @@ export declare function replacePassword(service: string, account: string, passwo * * @returns the string password or null on failures. */ -export declare function findPassword(service: string): string; +export declare function findPassword(service: string): string | null; diff --git a/keytar/keytar-tests.ts b/keytar/keytar-tests.ts index 91a43ebbe9..d523050650 100644 --- a/keytar/keytar-tests.ts +++ b/keytar/keytar-tests.ts @@ -1,8 +1,13 @@ import keytar = require('keytar'); -keytar.addPassword('keytar-tests', 'username', 'password'); -keytar.deletePassword('keytar-tests', 'username'); -keytar.findPassword('keytar-tests'); -keytar.getPassword('keytar-tests', 'username'); -keytar.replacePassword('keytar-tests', 'username', 'password'); +let success: boolean = false; + +success = keytar.addPassword('keytar-tests', 'username', 'password'); +success = keytar.deletePassword('keytar-tests', 'username'); +success = keytar.replacePassword('keytar-tests', 'username', 'password'); + +let password: string = ''; + +password = keytar.findPassword('keytar-tests'); +password = keytar.getPassword('keytar-tests', 'username'); diff --git a/kii-cloud-sdk/index.d.ts b/kii-cloud-sdk/index.d.ts index 26decd07a0..8dec3a94c8 100644 --- a/kii-cloud-sdk/index.d.ts +++ b/kii-cloud-sdk/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Kii Cloud SDK v2.4.6 +// Type definitions for Kii Cloud SDK v2.4.9 // Project: http://en.kii.com/ // Definitions by: Kii Consortium // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -10,6 +10,9 @@ declare namespace KiiCloud { KiiACLBucketActionDropBucket, KiiACLObjectActionRead, KiiACLObjectActionWrite, + KiiACLBucketActionReadObjects, + KiiACLSubscribeToTopic, + KiiACLSendMessageToTopic, } export enum KiiSite { @@ -44,7 +47,7 @@ declare namespace KiiCloud { } | { oauth_token: string, oauth_token_secret: string - } + }; interface KiiSocialAccountInfo { createdAt: number; @@ -195,6 +198,12 @@ declare namespace KiiCloud { portWSS: number; } + interface KiiError { + status: number; + code: string; + message: string; + } + /** * The main SDK class */ @@ -245,7 +254,9 @@ declare namespace KiiCloud { * @example * Kii.setAccessTokenExpiration(3600); */ - static setAccessTokenExpiration(expiresIn: number): void; + static setAccessTokenExpiration( + expiresIn: number + ): void; /** * Returns access token lifetime in seconds. @@ -266,7 +277,9 @@ declare namespace KiiCloud { * @param appID The application ID found in your Kii developer console * @param appKey The application key found in your Kii developer console * @param site Can be one of the constants KiiSite.US, KiiSite.JP, KiiSite.CN or KiiSite.SG depending on your location. - * @param analyticsOption An object used for initializing KiiAnalytics, If not provided or invalid object provided, KiiAnalytics won't be initialized. If provided, it can be empty object or with analyticsOption.deviceId.
    If provided, but deviceId is not provided, SDK generates a new deviceId and use it when upload events. It can be retrieved by {@link KiiAnalytics.getDeviceId()}. It is recommended to retrieve the deviceId and store it to identify the device properly. + * @param analyticsOption An object used for initializing KiiAnalytics, If not provided or invalid object provided, KiiAnalytics won't be initialized. If provided, it can be empty object or + * with analyticsOption.deviceId.
    If provided, but deviceId is not provided, SDK generates a new deviceId and use it when upload events. It can be retrieved by {@link + * KiiAnalytics.getDeviceId()}. It is recommended to retrieve the deviceId and store it to identify the device properly. * * @example * // Disable KiiAnalytics @@ -279,7 +292,12 @@ declare namespace KiiCloud { * // Enable KiiAnalytics without deviceId * Kii.initializeWithSite("my-app-id", "my-app-key", KiiSite.JP, {}); */ - static initializeWithSite(appID: string, appKey: string, site: KiiSite, analyticsOption?: any): void; + static initializeWithSite( + appID: string, + appKey: string, + site: KiiSite, + analyticsOption?: any + ): void; /** * Initialize the Kii SDK @@ -289,7 +307,9 @@ declare namespace KiiCloud { * * @param appID The application ID found in your Kii developer console * @param appKey The application key found in your Kii developer console - * @param analyticsOption An object used for initializing KiiAnalytics, If not provided or invalid object provided, KiiAnalytics won't be initialized. If provided, it can be empty object or with analyticsOption.deviceId.
    If provided, but deviceId is not provided, SDK generates a new deviceId and use it when upload events. It can be retrieved by {@link KiiAnalytics.getDeviceId()}. It is recommended to retrieve the deviceId and store it to identify the device properly. + * @param analyticsOption An object used for initializing KiiAnalytics, If not provided or invalid object provided, KiiAnalytics won't be initialized. If provided, it can be empty object or + * with analyticsOption.deviceId.
    If provided, but deviceId is not provided, SDK generates a new deviceId and use it when upload events. It can be retrieved by {@link + * KiiAnalytics.getDeviceId()}. It is recommended to retrieve the deviceId and store it to identify the device properly. * * @example * // Disable KiiAnalytics @@ -302,7 +322,11 @@ declare namespace KiiCloud { * // Enable KiiAnalytics without deviceId * Kii.initialize("my-app-id", "my-app-key", {}); */ - static initialize(appID: string, appKey: string, analyticsOption?: any): void; + static initialize( + appID: string, + appKey: string, + analyticsOption?: any + ): void; /** * Creates a reference to a bucket for this app @@ -316,7 +340,9 @@ declare namespace KiiCloud { * @example * var bucket = Kii.bucketWithName("myBucket"); */ - static bucketWithName(bucketName: string): KiiBucket; + static bucketWithName( + bucketName: string + ): KiiBucket; /** * Creates a reference to a encrypted bucket for this app @@ -330,7 +356,9 @@ declare namespace KiiCloud { * @example * var bucket = Kii.encryptedBucketWithName("myBucket"); */ - static encryptedBucketWithName(bucketName: string): KiiBucket; + static encryptedBucketWithName( + bucketName: string + ): KiiBucket; /** * Creates a reference to a group with the given name @@ -342,7 +370,9 @@ declare namespace KiiCloud { * @example * var group = new Kii.groupWithName("myGroup"); */ - static groupWithName(groupName: string): KiiGroup; + static groupWithName( + groupName: string + ): KiiGroup; /** * Creates a reference to a group with the given name and a list of default members @@ -355,7 +385,10 @@ declare namespace KiiCloud { * @example * var group = new KiiGroup.groupWithName("myGroup", members); */ - static groupWithNameAndMembers(groupName: string, members: KiiUser[]): KiiGroup; + static groupWithNameAndMembers( + groupName: string, + members: KiiUser[] + ): KiiGroup; /** * Authenticate as app admin. @@ -405,7 +438,11 @@ declare namespace KiiCloud { * } * ); */ - static authenticateAsAppAdmin(clientId: string, clientSecret: string, callbacks?: { success(adminContext: KiiAppAdminContext): any; failure(error: string, statusCode: number): any; }): Promise; + static authenticateAsAppAdmin( + clientId: string, + clientSecret: string, + callbacks?: { success(adminContext: KiiAppAdminContext): any; failure(error: string, statusCode: number): any; } + ): Promise; /** * Instantiate KiiServerCodeEntry with specified entry name. @@ -422,7 +459,9 @@ declare namespace KiiCloud { * @example * var entry = Kii.serverCodeEntry("main"); */ - static serverCodeEntry(entryName: string): KiiServerCodeEntry; + static serverCodeEntry( + entryName: string + ): KiiServerCodeEntry; /** * Instantiate serverCodeEntryWithVersion with specified entry name and version. @@ -440,7 +479,10 @@ declare namespace KiiCloud { * @example * var entry = Kii.serverCodeEntryWithVersion("main", "gulsdf6ful8jvf8uq6fe7vjy6"); */ - static serverCodeEntryWithVersion(entryName: string, version: string): KiiServerCodeEntry; + static serverCodeEntryWithVersion( + entryName: string, + version: string + ): KiiServerCodeEntry; /** * Instantiate topic belongs to application. @@ -449,13 +491,16 @@ declare namespace KiiCloud { * * @return topic instance. */ - static topicWithName(topicName: string): KiiTopic; + static topicWithName( + topicName: string + ): KiiTopic; /** * Gets a list of topics in app scope * * @param callbacks An object with callback methods defined - * @param paginationKey You can specify the pagination key with the nextPaginationKey passed by callbacks.success or fullfill callback of promise. If empty string or no string object is provided, this API regards no paginationKey specified. + * @param paginationKey You can specify the pagination key with the nextPaginationKey passed by callbacks.success or fullfill callback of promise. If empty string or no string object is + * provided, this API regards no paginationKey specified. * * @return return promise object. *
      @@ -513,7 +558,10 @@ declare namespace KiiCloud { * } * ); */ - static listTopics(callbacks?: { success(topicList: KiiTopic[], nextPaginationKey: string): any; failure(anErrorString: string): any; }, paginationKey?: string): Promise<[KiiTopic[], string]>; + static listTopics( + callbacks?: { success(topicList: KiiTopic[], nextPaginationKey: string): any; failure(anErrorString: string): any; }, + paginationKey?: string + ): Promise<[KiiTopic[], string]>; /** * Authenticate as Thing. @@ -562,7 +610,11 @@ declare namespace KiiCloud { * } * ); */ - static authenticateAsThing(vendorThingID: string, password: string, callbacks?: { success(thingAuthContext: KiiThingContext): any; failure(error: Error): any; }): Promise; + static authenticateAsThing( + vendorThingID: string, + password: string, + callbacks?: { success(thingAuthContext: KiiThingContext): any; failure(error: Error): any; } + ): Promise; /** * Create a KiiThingContext reference @@ -611,7 +663,11 @@ declare namespace KiiCloud { * } * ); */ - static authenticateAsThingWithToken(thingID: string, token: string, callbacks?: { success(thingContext: KiiThingContext): any; failure(error: Error): any; }): Promise; + static authenticateAsThingWithToken( + thingID: string, + token: string, + callbacks?: { success(thingContext: KiiThingContext): any; failure(error: Error): any; } + ): Promise; } /** @@ -666,10 +722,13 @@ declare namespace KiiCloud { * // do something with the error response * }); */ - listACLEntries(callbacks?: { success(theACL: KiiACL, theEntries: KiiACLEntry[]): any; failure(theACL: KiiACL, anErrorString: string): any; }): Promise<[KiiACL, KiiACLEntry[]]>; + listACLEntries( + callbacks?: { success(theACL: KiiACL, theEntries: KiiACLEntry[]): any; failure(theACL: KiiACL, anErrorString: string): any; } + ): Promise<[KiiACL, KiiACLEntry[]]>; /** - * Add a KiiACLEntry to the local object, if not already present. This does not explicitly grant any permissions, which should be done through the KiiACLEntry itself. This method simply adds the entry to the local ACL object so it can be saved to the server. + * Add a KiiACLEntry to the local object, if not already present. This does not explicitly grant any permissions, which should be done through the KiiACLEntry itself. This method simply adds + * the entry to the local ACL object so it can be saved to the server. * * @param entry The KiiACLEntry to add * @@ -680,10 +739,13 @@ declare namespace KiiCloud { * var acl = . . .; // a KiiACL object * acl.putACLEntry(aclEntry); */ - putACLEntry(entry: KiiACLEntry): void; + putACLEntry( + entry: KiiACLEntry + ): void; /** - * Remove a KiiACLEntry to the local object. This does not explicitly revoke any permissions, which should be done through the KiiACLEntry itself. This method simply removes the entry from the local ACL object and will not be saved to the server. + * Remove a KiiACLEntry to the local object. This does not explicitly revoke any permissions, which should be done through the KiiACLEntry itself. This method simply removes the entry from the + * local ACL object and will not be saved to the server. * * @param entry The KiiACLEntry to remove * @@ -694,7 +756,9 @@ declare namespace KiiCloud { * var acl = . . .; // a KiiACL object * acl.removeACLEntry(aclEntry); */ - removeACLEntry(entry: KiiACLEntry): void; + removeACLEntry( + entry: KiiACLEntry + ): void; /** * Save the list of ACLEntry objects associated with this ACL object to the server @@ -737,7 +801,9 @@ declare namespace KiiCloud { * // do something with the error response * }); */ - save(callbacks?: { success(theSavedACL: KiiACL): any; failure(theACL: KiiACL, anErrorString: string): any; }): Promise; + save( + callbacks?: { success(theSavedACL: KiiACL): any; failure(theACL: KiiACL, anErrorString: string): any; } + ): Promise; } /** @@ -760,7 +826,9 @@ declare namespace KiiCloud { * * @throws If the value is not one of the permitted values */ - setAction(value: KiiACLAction): void; + setAction( + value: KiiACLAction + ): void; /** * Get the action that is being permitted/restricted in this entry @@ -776,7 +844,9 @@ declare namespace KiiCloud { * * @throws If the value is not one of the permitted values */ - setSubject(subject: KiiACLSubject): void; + setSubject( + subject: KiiACLSubject + ): void; /** * Get the subject that is being permitted/restricted in this entry @@ -792,7 +862,9 @@ declare namespace KiiCloud { * * @throws If the value is not a boolean type */ - setGrant(value: boolean): void; + setGrant( + value: boolean + ): void; /** * Get whether or not the action is being permitted to the subject @@ -817,7 +889,10 @@ declare namespace KiiCloud { * @throws If specified subject is invalid. * @throws If the specified action is invalid. */ - static entryWithSubject(Subject: KiiACLSubject, action: KiiACLAction): KiiACLEntry; + static entryWithSubject( + Subject: KiiACLSubject, + action: KiiACLAction + ): KiiACLEntry; } /** @@ -839,7 +914,8 @@ declare namespace KiiCloud { static getAppKey(): string; /** - * Get the deviceId. If deviceId has not specified while initialization, it returns SDK generated deviceId.It is recommended to retrieve the deviceId and store it to identify the device properly. + * Get the deviceId. If deviceId has not specified while initialization, it returns SDK generated deviceId.It is recommended to retrieve the deviceId and store it to identify the device + * properly. * * @return deviceId. */ @@ -862,7 +938,9 @@ declare namespace KiiCloud { * @example * KiiAnalytics.setLogging(true); */ - static setLogging(True: boolean): void; + static setLogging( + True: boolean + ): void; /** * @@ -874,7 +952,8 @@ declare namespace KiiCloud { * @param appID The application ID found in your Kii developer console * @param appKey The application key found in your Kii developer console * @param site Can be one of the constants KiiAnalyticsSite.US, KiiAnalyticsSite.JP, KiiAnalyticsSite.CN, KiiAnalyticsSite.CN3 or KiiAnalyticsSite.SG depending on your location. - * @param deviceid If deviceId is not provided, SDK generates a new deviceId and use it when upload events.deviceId can be retrieved by {@link KiiAnalytics.getDeviceId()}.It is recommended to retrieve the deviceId and store it to identify the device properly. + * @param deviceid If deviceId is not provided, SDK generates a new deviceId and use it when upload events.deviceId can be retrieved by {@link KiiAnalytics.getDeviceId()}.It is recommended to + * retrieve the deviceId and store it to identify the device properly. * * @example * // initialize without deviceId @@ -882,7 +961,12 @@ declare namespace KiiCloud { * // initialize with deviceId * Kii.initializeWithSite("my-app-id", "my-app-key", KiiAnalyticsSite.JP, "my-device-id"); */ - static initializeWithSite(appID: string, appKey: string, site: KiiAnalyticsSite, deviceid: string): void; + static initializeWithSite( + appID: string, + appKey: string, + site: KiiAnalyticsSite, + deviceid: string + ): void; /** * @@ -893,7 +977,8 @@ declare namespace KiiCloud { * * @param appID The application ID found in your Kii developer console * @param appKey The application key found in your Kii developer console - * @param deviceid If deviceId is not provided, SDK generates a new deviceId and use it when upload events. deviceId can be retrieved by {@link KiiAnalytics.getDeviceId()}.It is recommended to retrieve the deviceId and store it to identify the device properly. + * @param deviceid If deviceId is not provided, SDK generates a new deviceId and use it when upload events. deviceId can be retrieved by {@link KiiAnalytics.getDeviceId()}.It is recommended to + * retrieve the deviceId and store it to identify the device properly. * * @example * // initialize without deviceId @@ -901,7 +986,11 @@ declare namespace KiiCloud { * // initialize with deviceId * Kii.initializeWithSite("my-app-id", "my-app-key", KiiAnalyticsSite.JP, "my-device-id"); */ - static initialize(appID: string, appKey: string, deviceid: string): void; + static initialize( + appID: string, + appKey: string, + deviceid: string + ): void; /** * Utilize the KiiAnalytics logger to track SDK-specific actions @@ -913,7 +1002,9 @@ declare namespace KiiCloud { * @example * KiiAnalytics.logger("My message"); */ - static logger(message: string): void; + static logger( + message: string + ): void; /** * Log a single event to be uploaded to KiiAnalytics @@ -932,7 +1023,9 @@ declare namespace KiiCloud { * *
    */ - static trackEvent(eventName: string): Promise; + static trackEvent( + eventName: string + ): Promise; /** * Log a single event to be uploaded to KiiAnalytics @@ -955,7 +1048,10 @@ declare namespace KiiCloud { * * */ - static trackEventWithExtras(eventName: string, extras: any): Promise; + static trackEventWithExtras( + eventName: string, + extras: any + ): Promise; /** * Log a single event to be uploaded to KiiAnalytics @@ -979,7 +1075,11 @@ declare namespace KiiCloud { * * */ - static trackEventWithExtrasAndCallbacks(eventName: string, extras: any, callbacks?: { success(): any; failure(error: Error): any; }): Promise; + static trackEventWithExtrasAndCallbacks( + eventName: string, + extras: any, + callbacks?: { success(): any; failure(error: Error): any; } + ): Promise; /** * @@ -988,7 +1088,9 @@ declare namespace KiiCloud { * * @param url A string containing the desired endpoint */ - static setBaseURL(url: string): void; + static setBaseURL( + url: string + ): void; /** * @@ -1054,7 +1156,9 @@ declare namespace KiiCloud { * } * }); */ - bucketWithName(bucketName: string): KiiBucket; + bucketWithName( + bucketName: string + ): KiiBucket; /** * Creates a reference to a encrypted bucket operated by app admin. @@ -1075,7 +1179,9 @@ declare namespace KiiCloud { * } * }); */ - encryptedBucketWithName(bucketName: string): KiiBucket; + encryptedBucketWithName( + bucketName: string + ): KiiBucket; /** * Creates a reference to a group operated by app admin. @@ -1099,7 +1205,9 @@ declare namespace KiiCloud { * } * }); */ - groupWithName(group: string): KiiGroup; + groupWithName( + group: string + ): KiiGroup; /** * Creates a reference to a user operated by app admin. @@ -1119,7 +1227,9 @@ declare namespace KiiCloud { * } * }); */ - userWithID(user: string): KiiUser; + userWithID( + user: string + ): KiiUser; /** * Creates a reference to an object operated by app admin using object`s URI. @@ -1130,7 +1240,9 @@ declare namespace KiiCloud { * * @throws If the URI is null, empty or does not have correct format. */ - objectWithURI(object: string): KiiObject; + objectWithURI( + object: string + ): KiiObject; /** * Creates a reference to a group operated by app admin using group's ID. @@ -1157,7 +1269,9 @@ declare namespace KiiCloud { * } * }); */ - groupWithID(group: string): KiiGroup; + groupWithID( + group: string + ): KiiGroup; /** * Register new group own by specified user on Kii Cloud with specified ID. @@ -1216,7 +1330,13 @@ declare namespace KiiCloud { * } * ); */ - registerGroupWithOwnerAndID(groupID: string, groupName: string, user: string, members: KiiUser[], callbacks?: { success(adminContext: KiiAppAdminContext): any; failure(theGroup: KiiGroup, anErrorString: string, addMembersArray: KiiUser[], removeMembersArray: KiiUser[]): any; }): Promise; + registerGroupWithOwnerAndID( + groupID: string, + groupName: string, + user: string, + members: KiiUser[], + callbacks?: { success(adminContext: KiiAppAdminContext): any; failure(theGroup: KiiGroup, anErrorString: string, addMembersArray: KiiUser[], removeMembersArray: KiiUser[]): any; } + ): Promise; /** * Creates a reference to a group operated by app admin using group's URI. @@ -1243,7 +1363,9 @@ declare namespace KiiCloud { * } * }); */ - groupWithURI(group: string): KiiGroup; + groupWithURI( + group: string + ): KiiGroup; /** * Find registered KiiUser with the email.
    @@ -1317,7 +1439,10 @@ declare namespace KiiCloud { * } * ); */ - findUserByEmail(email: string, callbacks?: { success(adminContext: KiiAppAdminContext, theMatchedUser: KiiUser): any; failure(adminContext: KiiAppAdminContext, anErrorString: string): any; }): Promise<[KiiAppAdminContext, KiiUser]>; + findUserByEmail( + email: string, + callbacks?: { success(adminContext: KiiAppAdminContext, theMatchedUser: KiiUser): any; failure(adminContext: KiiAppAdminContext, anErrorString: string): any; } + ): Promise<[KiiAppAdminContext, KiiUser]>; /** * Find registered KiiUser with the phone.
    @@ -1391,7 +1516,10 @@ declare namespace KiiCloud { * } * ); */ - findUserByPhone(phone: string, callbacks?: { success(adminContext: KiiAppAdminContext, theMatchedUser: KiiUser): any; failure(adminContext: KiiAppAdminContext, anErrorString: string): any; }): Promise<[KiiAppAdminContext, KiiUser]>; + findUserByPhone( + phone: string, + callbacks?: { success(adminContext: KiiAppAdminContext, theMatchedUser: KiiUser): any; failure(adminContext: KiiAppAdminContext, anErrorString: string): any; } + ): Promise<[KiiAppAdminContext, KiiUser]>; /** * Find registered KiiUser with the user name.
    @@ -1463,7 +1591,10 @@ declare namespace KiiCloud { * } * ); */ - findUserByUsername(username: string, callbacks?: { success(adminContext: KiiAppAdminContext, theMatchedUser: KiiUser): any; failure(adminContext: KiiAppAdminContext, anErrorString: string): any; }): Promise<[KiiAppAdminContext, KiiUser]>; + findUserByUsername( + username: string, + callbacks?: { success(adminContext: KiiAppAdminContext, theMatchedUser: KiiUser): any; failure(adminContext: KiiAppAdminContext, anErrorString: string): any; } + ): Promise<[KiiAppAdminContext, KiiUser]>; /** * Register thing by app admin. @@ -1533,7 +1664,10 @@ declare namespace KiiCloud { * } * ); */ - registerThing(fields: KiiThingFields, callbacks?: { success(thing: KiiThing): any; failure(error: Error): any; }): Promise; + registerThing( + fields: KiiThingFields, + callbacks?: { success(thing: KiiThing): any; failure(error: Error): any; } + ): Promise; /** * Creates a reference to a thing operated by app admin. @@ -1546,7 +1680,9 @@ declare namespace KiiCloud { * // Assume you already have adminContext instance. * adminContext.thingWithID(thingID); */ - thingWithID(thing: string): KiiThing; + thingWithID( + thing: string + ): KiiThing; /** * Register user/group as owner of specified thing by app admin. @@ -1599,7 +1735,11 @@ declare namespace KiiCloud { * } * ); */ - registerOwnerWithThingID(thingID: string, owner: T, callbacks?: { success(group: T): any; failure(error: Error): any; }): Promise; + registerOwnerWithThingID( + thingID: string, + owner: T, + callbacks?: { success(group: T): any; failure(error: Error): any; } + ): Promise; /** * Register user/group as owner of specified thing by app admin. @@ -1651,7 +1791,11 @@ declare namespace KiiCloud { * } * ); */ - registerOwnerWithVendorThingID(vendorThingID: string, owner: T, callbacks?: { success(group: T): any; failure(error: Error): any; }): Promise; + registerOwnerWithVendorThingID( + vendorThingID: string, + owner: T, + callbacks?: { success(group: T): any; failure(error: Error): any; } + ): Promise; /** * Load thing with vendor thing ID by app admin. @@ -1698,7 +1842,10 @@ declare namespace KiiCloud { * } * ); */ - loadThingWithVendorThingID(vendorThingID: string, callbacks?: { success(thing: KiiThing): any; failure(error: Error): any; }): Promise; + loadThingWithVendorThingID( + vendorThingID: string, + callbacks?: { success(thing: KiiThing): any; failure(error: Error): any; } + ): Promise; /** * Load thing with thing ID by app admin. @@ -1745,7 +1892,10 @@ declare namespace KiiCloud { * } * ); */ - loadThingWithThingID(thingID: string, callbacks?: { success(thing: KiiThing): any; failure(error: Error): any; }): Promise; + loadThingWithThingID( + thingID: string, + callbacks?: { success(thing: KiiThing): any; failure(error: Error): any; } + ): Promise; /** * Creates a reference to a topic operated by app admin @@ -1754,13 +1904,16 @@ declare namespace KiiCloud { * * @return topic instance. */ - topicWithName(topicName: string): KiiTopic; + topicWithName( + topicName: string + ): KiiTopic; /** * Gets a list of topics in app scope * * @param callbacks An object with callback methods defined - * @param paginationKey You can specify the pagination key with the nextPaginationKey passed by callbacks.success. If empty string or no string object is provided, this API regards no paginationKey specified. + * @param paginationKey You can specify the pagination key with the nextPaginationKey passed by callbacks.success. If empty string or no string object is provided, this API regards no + * paginationKey specified. * * @return return promise object. *
    ; + where?: WhereOptions | fn | Array; /** * A list of the attributes that you want to select. To rename an attribute, you can pass an array, with @@ -3671,7 +3671,7 @@ declare namespace sequelize { * @return Model A reference to the model, with the scope(s) applied. Calling scope again on the returned * model will clear the previous scope. */ - scope(options?: string | string[] | ScopeOptions | WhereOptions): this; + scope(options?: string | ScopeOptions | WhereOptions | Array): this; /** * Search for multiple instances. @@ -4876,6 +4876,11 @@ declare namespace sequelize { */ underscoredAll?: boolean; + /** + * Indicates if the model's table has a trigger associated with it. Default false. + */ + hasTrigger?: boolean; + /** * If freezeTableName is true, sequelize will not try to alter the DAO name to get the table name. * Otherwise, the dao name will be pluralized. Default false. @@ -5216,6 +5221,12 @@ declare namespace sequelize { */ transactionType?: string; + /** + * Print query execution time in milliseconds when logging SQL. + * + * Defaults to false + */ + benchmark?: boolean; } /** diff --git a/sequelize/sequelize-tests.ts b/sequelize/sequelize-tests.ts index 20af1246d4..ceff709a6b 100644 --- a/sequelize/sequelize-tests.ts +++ b/sequelize/sequelize-tests.ts @@ -853,11 +853,14 @@ User.schema( 'special' ).create( { age : 3 }, { logging : function( ) {} } ); User.getTableName(); User.addScope('lowAccess', { where : { parent_id : 2 } }); -User.addScope('lowAccess', function() { } ); User.addScope('lowAccess', { where : { parent_id : 2 } }, { override: true }); +User.addScope('lowAccessWithParam', function(id: number) { + return { where : { parent_id : id } } +} ); User.scope( 'lowAccess' ).count(); User.scope( { where : { parent_id : 2 } } ); +User.scope( [ 'lowAccess', { method: ['lowAccessWithParam', 2] }, { where : { parent_id : 2 } } ] ) User.findAll(); User.findAll( { where : { data : { employment : null } } } ); @@ -905,6 +908,7 @@ User.findAll( { attributes: [[s.fn('count', Sequelize.col('*')), 'count']] }); User.findAll( { attributes: [[s.fn('count', Sequelize.col('*')), 'count']], group: ['sex'] }); User.findAll( { attributes: [s.cast(s.fn('count', Sequelize.col('*')), 'INTEGER')] }); User.findAll( { attributes: [[s.cast(s.fn('count', Sequelize.col('*')), 'INTEGER'), 'count']] }); +User.findAll( { where : s.fn('count', [0, 10]) } ); User.findById( 'a string' ); @@ -925,6 +929,7 @@ User.findOne( { where : { name : 'worker' }, include : [User] } ); User.findOne( { where : { name : 'Boris' }, include : [User, { model : User, as : 'Photos' }] } ); User.findOne( { where : { username : 'someone' }, include : [User] } ); User.findOne( { where : { username : 'barfooz' }, raw : true } ); +User.findOne( { where : s.fn('count', []) } ); /* NOTE https://github.com/DefinitelyTyped/DefinitelyTyped/pull/5590 User.findOne( { updatedAt : { ne : null } } ); */ @@ -1534,6 +1539,27 @@ s.define( 'User', { paranoid : true } ); +s.define( 'TriggerTest', { + id : { + type : Sequelize.INTEGER, + field : 'test_id', + autoIncrement : true, + primaryKey : true, + validate : { + min : 1 + } + }, + title : { + allowNull : false, + type : Sequelize.STRING( 255 ), + field : 'test_title' + } +}, { + timestamps : false, + underscored : true, + hasTrigger : true +} ); + // // Transaction // ~~~~~~~~~~~~~ diff --git a/sequelize/v3/index.d.ts b/sequelize/v3/index.d.ts index 9142dc9a6c..f44fcbbd46 100644 --- a/sequelize/v3/index.d.ts +++ b/sequelize/v3/index.d.ts @@ -3648,7 +3648,7 @@ declare namespace sequelize { * @return Model A reference to the model, with the scope(s) applied. Calling scope again on the returned * model will clear the previous scope. */ - scope(options?: string | string[] | ScopeOptions | WhereOptions): this; + scope(options?: string | ScopeOptions | WhereOptions | Array): this; /** * Search for multiple instances. @@ -4843,6 +4843,11 @@ declare namespace sequelize { */ underscoredAll?: boolean; + /** + * Indicates if the model's table has a trigger associated with it. Default false. + */ + hasTrigger?: boolean; + /** * If freezeTableName is true, sequelize will not try to alter the DAO name to get the table name. * Otherwise, the dao name will be pluralized. Default false. @@ -5183,6 +5188,12 @@ declare namespace sequelize { */ transactionType?: string; + /** + * Print query execution time in milliseconds when logging SQL. + * + * Defaults to false + */ + benchmark?: boolean; } /** diff --git a/sequelize/v3/sequelize-tests.ts b/sequelize/v3/sequelize-tests.ts index 04a55062c8..83c4536a71 100644 --- a/sequelize/v3/sequelize-tests.ts +++ b/sequelize/v3/sequelize-tests.ts @@ -840,11 +840,14 @@ User.schema( 'special' ).create( { age : 3 }, { logging : function( ) {} } ); User.getTableName(); User.addScope('lowAccess', { where : { parent_id : 2 } }); -User.addScope('lowAccess', function() { } ); User.addScope('lowAccess', { where : { parent_id : 2 } }, { override: true }); +User.addScope('lowAccessWithParam', function(id: number) { + return { where : { parent_id : id } } +} ); User.scope( 'lowAccess' ).count(); User.scope( { where : { parent_id : 2 } } ); +User.scope( [ 'lowAccess', { method: ['lowAccessWithParam', 2] }, { where : { parent_id : 2 } } ] ) User.findAll(); User.findAll( { where : { data : { employment : null } } } ); @@ -1515,6 +1518,27 @@ s.define( 'User', { paranoid : true } ); +s.define( 'TriggerTest', { + id : { + type : Sequelize.INTEGER, + field : 'test_id', + autoIncrement : true, + primaryKey : true, + validate : { + min : 1 + } + }, + title : { + allowNull : false, + type : Sequelize.STRING( 255 ), + field : 'test_title' + } +}, { + timestamps : false, + underscored : true, + hasTrigger : true +} ); + // // Transaction // ~~~~~~~~~~~~~ diff --git a/service_worker_api/index.d.ts b/service_worker_api/index.d.ts deleted file mode 100644 index 715fc4efbe..0000000000 --- a/service_worker_api/index.d.ts +++ /dev/null @@ -1,757 +0,0 @@ -// Type definitions for service_worker_api 0.0 -// Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API -// Definitions by: Tristan Caron -// Definitions: https://github.com/borisyankov/DefinitelyTyped -// TypeScript Version: 2.1 - -/// - -/** - * An CacheOptions object allowing you to set specific control options for the - * matching done in the match operation. - * - * @property [ignoreSearch] A Boolean that specifies whether the matching - * process should ignore the query string in the url. If set to true, - * the ?value=bar part of http://foo.com/?value=bar would be ignored when - * performing a match. It defaults to false. - * - * @property [ignoreMethod] A Boolean that, when set to true, prevents matching - * operations from validating the Request http method (normally only GET - * and HEAD are allowed.) It defaults to false. - * - * @property [ignoreVary] A Boolean that when set to true tells the matching - * operation not to perform VARY header matching — i.e. if the URL matches you - * will get a match regardless of the Response object having a VARY header or - * not. It defaults to false. - * - * @property [cacheName] A DOMString that represents a specific cache to search - * within. Note that this option is ignored by Cache.match(). - */ -interface CacheOptions { - ignoreSearch?: boolean; - ignoreMethod?: boolean; - ignoreVary?: boolean; - cacheName?: string; -} - -/** - * Represents the storage for Request / Response object pairs that are cached as - * part of the ServiceWorker life cycle. - */ -interface Cache { - /** - * Returns a Promise that resolves to the response associated with the first - * matching request in the Cache object. - * - * @param request The Request you are attempting to find in the Cache. - * @param [options] An object that sets options for the match operation. - */ - match(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to an array of all matching responses in - * the Cache object. - * - * @param request The Request you are attempting to find in the Cache. - * @param [options] An object that sets options for the match operation. - */ - matchAll(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to a new Cache entry whose key - * is the request. - * - * @param request The Request you want to add to the cache. - */ - add(request: Request | string): Promise; - - /** - * Returns a Promise that resolves to a new array of Cache entries whose - * keys are the requests. - * - * @param request An array of Request objects you want to add to the cache. - */ - addAll(requests: Array): Promise; - - /** - * Adds additional key/value pairs to the current Cache object. - * - * @param request The Request you want to add to the cache. - * @param response The response you want to match up to the request. - */ - put(request: Request, response: Response): Promise; - - /** - * Finds the Cache entry whose key is the request, and if found, deletes the - * Cache entry and returns a Promise that resolves to true. If no Cache - * entry is found, it returns false. - * - * @param request The Request you are looking to delete. - * @param [options] An object that sets options for the match operation. - */ - delete(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to an array of Cache keys. - * - * @param request The Request want to return, if a specific key is desired. - * @param [options] An object that sets options for the match operation. - */ - keys(request?: Request, options?: CacheOptions): Promise; -} - -/** - * Represents the storage for Cache objects. It provides a master directory of - * all the named caches that a ServiceWorker can access and maintains a mapping - * of string names to corresponding Cache objects. - */ -interface CacheStorage { - /** - * Checks if a given Request is a key in any of the Cache objects that the - * CacheStorage object tracks and returns a Promise that resolves - * to that match. - * - * @param request The Request you are looking for a match for in the CacheStorage. - * @param [options] An object that sets options for the match operation. - */ - match(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to true if a Cache object matching - * the cacheName exists. - * - * @param cacheName The Request you are looking for a match for in the - * CacheStorage. - */ - has(cacheName: string): Promise; - - /** - * Returns a Promise that resolves to the Cache object matching - * the cacheName. - * - * @param cacheName The name of the cache you want to open. - */ - open(cacheName: string): Promise; - - /** - * Finds the Cache object matching the cacheName, and if found, deletes the - * Cache object and returns a Promise that resolves to true. If no - * Cache object is found, it returns false. - * - * @param cacheName The name of the cache you want to delete. - */ - delete(cacheName: string): Promise; - - /** - * Returns a Promise that will resolve with an array containing strings - * corresponding to all of the named Cache objects tracked by the - * CacheStorage. Use this method to iterate over a list of all the - * Cache objects. - */ - keys(): Promise; -} - -/** - * Represents the scope of a service worker client. A service worker client is - * either a document in a browser context or a SharedWorker, which is controlled - * by an active worker. - */ -interface ServiceWorkerClient { - /** - * Allows a service worker client to send a message to a ServiceWorker. - * - * @param message The message to send to the service worker. - * @param [transfer] A transferable object such as, for example, a reference - * to a port. - */ - postMessage(message: any, transfer?: any): void; - - /** - * Indicates the type of browsing context of the current client. - * This value can be one of auxiliary, top-level, nested, or none. - */ - readonly frameType: string; - - /** - * Returns the id of the Client object. - */ - readonly id: string; - - /** - * The URL of the current service worker client. - */ - readonly url: string; -} - -interface WindowClient extends ServiceWorkerClient { - /** - * Gives user input focus to the current client. - */ - focus(): Promise; - - /** - * A boolean that indicates whether the current client has focus. - */ - readonly focused: boolean; - - /** - * Indicates the visibility of the current client. This value can be one of - * hidden, visible, prerender, or unloaded. - */ - readonly visibilityState: string; -} - -interface ServiceWorkerClientsMatchOptions { - includeUncontrolled?: boolean; - type?: string; -} - -/** - * Represents a container for a list of Client objects; the main way to access - * the active service worker clients at the current origin. - */ -interface ServiceWorkerClients { - /** - * Gets a service worker client matching a given id and returns it in a Promise. - * @param clientId The ID of the client you want to get. - */ - get(clientId: string): Promise; - - /** - * Gets a list of service worker clients and returns them in a Promise. - * Include the options parameter to return all service worker clients whose - * origin is the same as the associated service worker's origin. If options - * are not included, the method returns only the service worker clients - * controlled by the service worker. - * - * @param [options] An options object allowing you to set options for the matching operation. - */ - matchAll(options?: ServiceWorkerClientsMatchOptions): Promise; - - /** - * Opens a service worker Client in a new browser window. - * - * @param url A string representing the URL of the client you want to open - * in the window. - */ - openWindow(url: string): Promise; - - /** - * Allows an active Service Worker to set itself as the active worker for a - * client page when the worker and the page are in the same scope. - */ - claim(): Promise; -} - -/** - * Represents a service worker. Multiple browsing contexts (e.g. pages, workers, - * etc.) can be associated with the same ServiceWorker object. - */ -interface ServiceWorker extends Worker { - /** - * Returns the ServiceWorker serialized script URL defined as part of - * ServiceWorkerRegistration. The URL must be on the same origin as the - * document that registers the ServiceWorker. - */ - readonly scriptURL: string; - - /** - * Returns the state of the service worker. It returns one of the following - * values: installing, installed, activating, activated, or redundant. - */ - readonly state: string; - - /** - * An EventListener property called whenever an event of type statechange - * is fired; it is basically fired anytime the ServiceWorker.state changes. - */ - onstatechange: (statechangeevent: Event) => void; -} - -/** - * The PushMessageData interface of the Push API provides - * methods which let you retrieve the push data sent by a server in various formats. - */ -interface PushMessageData { - /** - * Extracts the data as an ArrayBuffer object. - */ - arrayBuffer(): ArrayBuffer; - - /** - * Extracts the data as a Blob object. - */ - blob(): Blob; - - /** - * Extracts the data as a JSON object. - */ - json(): any; - json(): T; - - /** - * Extracts the data as a plain text string. - */ - text(): string; -} - -/** - * The PushSubscription interface provides a subcription's URL endpoint and - * subscription ID. - */ -interface PushSubscription { - /** - * The endpoint associated with the push subscription. - */ - readonly endpoint: any; - - /** - * The subscription ID associated with the push subscription. - */ - readonly subscriptionId: any; -} - -/** - * Object containing optional subscribe parameters. - */ -interface PushSubscriptionOptions { - /** - * A boolean indicating that the returned push subscription will only be used for - * messages whose effect is made visible to the user. - */ - readonly userVisibleOnly: boolean; - - /** - * A public key your push server will use to send messages to client apps via a push server. - * This value is part of a signing key pair generated by your application server and usable - * with elliptic curve digital signature (ECDSA) over the P-256 curve. - */ - readonly applicationServerKey?: Uint8Array; -} - -/** - * The PushManager interface provides a way to receive notifications from - * third-party servers as well as request URLs for push notifications. - * This interface has replaced functionality offered by the obsolete - * PushRegistrationManager. - */ -interface PushManager { - /** - * Returns a promise that resolves to a PushSubscription with details of a - * new push subscription. - * - * @param [options] An object containing optional configuration parameters. - */ - subscribe(options?: PushSubscriptionOptions): Promise; - - /** - * Returns a promise that resolves to a PushSubscription details of - * the retrieved push subscription. - */ - getSubscription(): Promise; - - /** - * Returns a promise that resolves to the PushPermissionStatus of the - * requesting webapp, which will be one of granted, denied, or default. - */ - hasPermission(): Promise; -} - -/////// Service Worker Events /////// - -/** - * Extends the lifetime of the install and activate events dispatched on the - * ServiceWorkerGlobalScope as part of the service worker lifecycle. This - * ensures that any functional events (like FetchEvent) are not dispatched to - * the ServiceWorker until it upgrades database schemas, deletes outdated cache - * entries, etc. - */ -interface ExtendableEvent extends Event { - /** - * Extends the lifetime of the event. - * It is intended to be called in the install EventHandler for the - * installing worker and on the active EventHandler for the active worker. - * - * @param promise - */ - waitUntil(promise: Promise): void; -} - -/** - * The parameter passed into the ServiceWorkerGlobalScope.onfetch handler, - * FetchEvent represents a fetch action that is dispatched on the - * ServiceWorkerGlobalScope of a ServiceWorker. It contains information about - * the request and resulting response, and provides the FetchEvent.respondWith() - * method, which allows us to provide an arbitrary response back to the - * controlled page. - */ -interface FetchEvent extends Event { - /** - * Returns a Boolean that is true if the event was dispatched with the - * user's intention for the page to reload, and false otherwise. Typically, - * pressing the refresh button in a browser is a reload, while clicking a - * link and pressing the back button is not. - */ - readonly isReload: boolean; - - /** - * Returns the Request that triggered the event handler. - */ - readonly request: Request; - - /** - * Returns the Client that the current service worker is controlling. - */ - readonly client: ServiceWorkerClient; - - /** - * Returns the id of the client that the current service worker is controlling. - */ - readonly clientId: string; - - /** - * Resolves by returning a Response or a network error to Fetch. - * - * @param all Any custom response-generating code. - */ - respondWith(all: any): Response; -} - -/** - * The ExtendableMessageEvent interface of the ServiceWorker API represents - * the event object of a message event fired on - * a service worker (when a channel message is received on - * the ServiceWorkerGlobalScope from another context) - * — extends the lifetime of such events. - */ -interface ExtendableMessageEvent extends ExtendableEvent { - /** - * Returns the event's data. It can be any data type. - */ - readonly data: any; - - /** - * Returns the origin of the ServiceWorkerClient that sent the message - */ - readonly origin: string; - - /** - * Represents, in server-sent events, the last event ID of the event source. - */ - readonly lastEventId: string; - - /** - * Returns a reference to the service worker that sent the message. - */ - readonly source: ServiceWorkerClient; - - /** - * Returns the array containing the MessagePort objects - * representing the ports of the associated message channel. - */ - readonly ports: MessagePort[]; -} - -/** - * The parameter passed into the oninstall handler, the InstallEvent interface - * represents an install action that is dispatched on the - * ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, - * it ensures that functional events such as FetchEvent are not dispatched - * during installation. - */ -interface InstallEvent extends ExtendableEvent { - /** - * Returns the ServiceWorker that is currently actively controlling the page. - */ - readonly activeWorker: ServiceWorker; -} - -/** - * The parameter passed into the onnotificationclick handler, - * the NotificationEvent interface represents - * a notification click event that is dispatched on - * the ServiceWorkerGlobalScope of a ServiceWorker. - */ -interface NotificationEvent extends ExtendableEvent { - /** - * Returns a Notification object representing - * the notification that was clicked to fire the event. - */ - notification: any; // need to be replaced with `Notification` when possible - - /** - * Returns the string ID of the notification button the user clicked. - * This value returns undefined if the user clicked - * the notification somewhere other than an action button, - * or the notification does not have a button. - */ - action: string; -} - -/** - * The PushEvent interface of the Push API represents - * a push message that has been received. - * This event is sent to the global scope of a ServiceWorker. - * It contains the information sent from an application server to a PushSubscription. - */ -interface PushEvent extends ExtendableEvent { - /** - * Returns a reference to a PushMessageData object containing - * data sent to the PushSubscription. - */ - readonly data: PushMessageData; -} - -interface ServiceWorkerContainerEventMap { - "message": MessageEvent; - "error": ErrorEvent; - "controllerchange": Event; -} - -interface ServiceWorkerEventMap { - "activate": ExtendableEvent; - "fetch": FetchEvent; - "install": InstallEvent; - // "message": ExtendableMessageEvent; - "message": MessageEvent; - "notificationclick": NotificationEvent; - "push": PushEvent; - "pushsubscriptionchang": PushEvent; -} - -/** - * Represents a service worker registration. - */ -interface ServiceWorkerRegistration extends EventTarget { - /** - * Returns a unique identifier for a service worker registration. - * This must be on the same origin as the document that registers - * the ServiceWorker. - */ - readonly scope: any; - - /** - * Returns a service worker whose state is installing. This is initially - * set to null. - */ - readonly installing: ServiceWorker; - - /** - * Returns a service worker whose state is installed. This is initially - * set to null. - */ - readonly waiting: ServiceWorker; - - /** - * Returns a service worker whose state is either activating or activated. - * This is initially set to null. An active worker will control a - * ServiceWorkerClient if the client's URL falls within the scope of the - * registration (the scope option set when ServiceWorkerContainer.register - * is first called). - */ - readonly active: ServiceWorker; - - /** - * Returns an interface to for managing push subscriptions, including - * subcribing, getting an anctive subscription, and accessing push - * permission status. - */ - readonly pushManager: PushManager; - - /** - * An EventListener property called whenever an event of type updatefound - * is fired; it is fired any time the ServiceWorkerRegistration.installing - * property acquires a new service worker. - */ - onupdatefound: () => void; - - /** - * Allows you to update a service worker. - */ - update(): void; - - /** - * Unregisters the service worker registration and returns a promise - * (see Promise). The service worker will finish any ongoing operations - * before it is unregistered. - */ - unregister(): Promise; -} - -interface ServiceWorkerRegisterOptions { - scope: string; -} - -/** - * Provides an object representing the service worker as an overall unit in the - * network ecosystem, including facilities to register, unregister and update - * service workers, and access the state of service workers - * and their registrations. - */ -interface ServiceWorkerContainer extends EventTarget { - /** - * Returns a ServiceWorker object if its state is activated (the same object - * returned by ServiceWorkerRegistration.active). This property returns null - * if the request is a force refresh (Shift + refresh) or if there is no - * active worker. - */ - readonly controller: ServiceWorker; - - /** - * Defines whether a service worker is ready to control a page or not. - * It returns a Promise that will never reject, which resolves to a - * ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker. - */ - readonly ready: Promise; - - /** - * An event handler fired whenever a controllerchange event occurs — when - * the document's associated ServiceWorkerRegistration acquires a new - * ServiceWorkerRegistration.active worker. - */ - oncontrollerchange: (controllerchangeevent: Event) => void; - - /** - * An event handler fired whenever an error event occurs in the associated - * service workers. - */ - onerror: (errorevent: ErrorEvent) => void; - - /** - * An event handler fired whenever a message event occurs — when incoming - * messages are received to the ServiceWorkerContainer object (e.g. via a - * MessagePort.postMessage() call.) - */ - onmessage: (messageevent: MessageEvent) => void; - - /** - * Creates or updates a ServiceWorkerRegistration for the given scriptURL. - * - * @param scriptURL The URL of the service worker script. - * @param [options] An options object to provide options upon registration. - * Currently available options are: scope: A USVString representing a URL - * that defines a service worker's registration scope; what range of URLs a - * service worker can control. This is usually a relative URL, and it - * defaults to '/' when not specified. - */ - register(scriptURL: string, options?: ServiceWorkerRegisterOptions): Promise; - - /** - * Gets a ServiceWorkerRegistration object whose scope URL matches the - * provided document URL. If the method can't return a - * ServiceWorkerRegistration, it returns a Promise. - * - * @param [scope] A unique identifier for a service worker registration — the - * scope URL of the registration object you want to return. This is usually - * a relative URL. - */ - getRegistration(scope?: string): Promise; - - /** - * Returns all ServiceWorkerRegistrations associated with a - * ServiceWorkerContainer in an array. If the method can't return - * ServiceWorkerRegistrations, it returns a Promise. - */ - getRegistrations(): Promise; - - addEventListener( - type: K, - listener: (event: ServiceWorkerContainerEventMap[K]) => any, - useCapture?: boolean - ): void; -} - -interface ServiceWorkerGlobalScope extends EventTarget { - /** - * Contains the CacheStorage object associated with the service worker. - */ - readonly caches: CacheStorage; - /** - * Contains the Clients object associated with the service worker. - */ - readonly clients: ServiceWorkerClients; - - /** - * Contains the ServiceWorkerRegistration object that represents the - * service worker's registration. - */ - readonly registration: ServiceWorkerRegistration; - - /** - * An event handler fired whenever an activate event occurs — when a - * ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active - * worker. - */ - onactivate: (activateevent: ExtendableEvent) => void; - - /** - * An event handler fired whenever a fetch event occurs — when a fetch() - * is called. - */ - onfetch: (fetchevent: FetchEvent) => void; - - /** - * An event handler fired whenever an install event occurs — when a - * ServiceWorkerRegistration acquires a new - * ServiceWorkerRegistration.installing worker. - */ - oninstall: (installevent: InstallEvent) => void; - - /** - * An event handler fired whenever a message event occurs — when incoming - * messages are received. Controlled pages can use the - * MessagePort.postMessage() method to send messages to service workers. - * The service worker can optionally send a response back via the - * MessagePort exposed in event.data.port, corresponding to the controlled - * page. - * - * `onmessage` is actually fired with `ExtendableMessageEvent`, but - * since we are merging the interface into `Window`, we should - * make sure it's compatible with `window.onmessage` - */ - // onmessage: (messageevent: ExtendableMessageEvent) => void; - onmessage: (messageevent: MessageEvent) => void; - - /** - * An event handler fired whenever a notificationclick event occurs — when - * a user clicks on a displayed notification. - */ - onnotificationclick: (notificationclickevent: NotificationEvent) => void; - - /** - * An event handler fired whenever a push event occurs — when a server - * push notification is received. - */ - onpush: (onpushevent: PushEvent) => void; - - /** - * An event handler fired whenever a pushsubscriptionchange event occurs — - * when a push subscription has been invalidated, or is about to be - * invalidated (e.g. when a push service sets an expiration time). - */ - onpushsubscriptionchange: (pushsubscriptionchangeevent: PushEvent) => void; - - /** - * Allows the current service worker registration to progress from waiting - * to active state while service worker clients are using it. - */ - skipWaiting(): Promise; - - addEventListener( - type: K, - listener: (event: ServiceWorkerEventMap[K]) => any, - useCapture?: boolean - ): void; -} - -interface Navigator { - /** - * Returns a ServiceWorkerContainer object, which provides access to - * registration, removal, upgrade, and communication with the ServiceWorker - * objects for the associated document. - */ - serviceWorker: ServiceWorkerContainer; -} - -// tslint:disable-next-line no-empty-interface -interface Window extends ServiceWorkerGlobalScope {} diff --git a/service_worker_api/service_worker_api-tests.ts b/service_worker_api/service_worker_api-tests.ts deleted file mode 100644 index 5cfae785cc..0000000000 --- a/service_worker_api/service_worker_api-tests.ts +++ /dev/null @@ -1,193 +0,0 @@ -var OFFLINE_CACHE = "cache_test"; -var OFFLINE_URL = "localhost"; - -self.addEventListener('fetch', (event: FetchEvent) => { - if (event.request.method === 'GET' && - event.request.headers.get('accept').indexOf('text/html') !== -1) { - console.log('Handling fetch event for', event.request.url); - event.respondWith( - self.fetch(event.request).catch(e => { - console.error('Fetch failed; returning offline page instead.', e); - return self.caches.open(OFFLINE_CACHE).then((cache: Cache) => { - return cache.match(OFFLINE_URL); - }); - }) - ); - } -}); - -self.caches.open('v1').then((cache: Cache) => { - cache.matchAll('/images/').then((response: Response[]) => { - response.forEach((element, index, array) => { - cache.delete(element.url); - }); - }); -}); - -self.addEventListener('install', (event: InstallEvent) => { - event.waitUntil( - self.caches.open('v1').then((cache: Cache) => { - return cache.add('/sw-test/index.html'); - }) - ); -}); - -self.addEventListener('install', (event: InstallEvent) => { - event.waitUntil( - self.caches.open('v1').then(cache => { - return cache.addAll([ - '/sw-test/', - '/sw-test/index.html', - '/sw-test/style.css', - '/sw-test/app.js', - '/sw-test/image-list.js', - '/sw-test/star-wars-logo.jpg', - '/sw-test/gallery/', - '/sw-test/gallery/bountyHunters.jpg', - '/sw-test/gallery/myLittleVader.jpg', - '/sw-test/gallery/snowTroopers.jpg' - ]); - }) - ); -}); - -self.addEventListener('fetch', (event: FetchEvent) => { - var cachedResponse = self.caches.match(event.request).then(response => { - if (response) { - return response; - } - }).catch(() => { - return self.fetch(event.request).then(response => { - return self.caches.open('v1').then(cache => { - cache.put(event.request, response.clone()); - return response; - }); - }); - }).catch(() => { - return self.caches.match('/sw-test/gallery/myLittleVader.jpg'); - }); - - event.respondWith(cachedResponse); -}); - -self.caches.open('v1').then(cache => { - cache.match('/images/image.png').then(response => { - cache.delete(response.url); - }); -}); - -self.caches.open('v1').then(cache => { - cache.keys().then(response => { - response.forEach((element, index, array) => { - cache.delete(element); - }); - }); -}); - -self.caches.has('v1').then(() => { - self.caches.delete('v1').then(() => { - console.log('done'); - }); -}); - -self.addEventListener('activate', (event: ExtendableEvent) => { - var cacheWhitelist = ['v2']; - - event.waitUntil( - self.caches.keys().then(keyList => { - for (var item of keyList) { - if (cacheWhitelist.indexOf(item) === -1) { - return self.caches.delete(item); - } - } - }) - ); -}); - -function sendMessage(message: any) { - return new Promise((resolve, reject) => { - var messageChannel = new MessageChannel(); - messageChannel.port1.onmessage = event => { - if (event.data.error) { - reject(event.data.error); - } else { - resolve(event.data); - } - }; - navigator.serviceWorker.controller.postMessage(message, [messageChannel.port2]); - }); -} - -self.addEventListener('message', (evt: ExtendableMessageEvent) => { - evt.ports[0].postMessage(evt.source.id); -}); - -sendMessage('test').then((clientId: string) => { - console.log(clientId); -}); - -self.clients.matchAll({type: "test"}).then(clients => { - for (var cli of clients) { - if (cli.url === 'index.html') { - self.clients.openWindow(cli.url); - // or do something else involving the matching client - } - } -}); - -self.addEventListener('activate', (e: ExtendableEvent) => { - e.waitUntil(self.clients.claim()); -}); - -navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(registration => { - // At this point, registration has taken place. - // The service worker will not handle requests until this page and any - // other instances of this page (in other tabs, etc.) have been - // closed/reloaded. - var serviceWorker: ServiceWorker; - if (registration.installing) { - serviceWorker = registration.installing; - } else if (registration.waiting) { - serviceWorker = registration.waiting; - } else if (registration.active) { - serviceWorker = registration.active; - } - if (serviceWorker) { - console.log(serviceWorker.state); - serviceWorker.addEventListener('statechange', (e: any) => { - console.log(e.target.state); - }); - } -}).catch(error => { - // Something went wrong during registration. The service-worker.js file - // might be unavailable or contain a syntax error. - -}); - -navigator.serviceWorker.getRegistration('/app').then((registration: ServiceWorkerRegistration) => { - console.log(registration); -}); - -navigator.serviceWorker.getRegistrations().then((registrations: ServiceWorkerRegistration[]) => { - console.log(registrations); -}); - -self.registration.unregister(); - -self.addEventListener('install', (event: ExtendableEvent) => { - event.waitUntil(self.skipWaiting()); -}); - -self.addEventListener('notificationclick', (event: NotificationEvent) => { - console.log('On notification click: ', event.notification.tag); - event.notification.close(); - - // This looks to see if the current is already open and - // focuses if it is - event.waitUntil(self.clients.matchAll({ - type: "window" - }).then(clientList => { - if (self.clients.openWindow) - return self.clients.openWindow('/'); - })); -}); diff --git a/service_worker_api/tsconfig.json b/service_worker_api/tsconfig.json deleted file mode 100644 index 0c7c7ed734..0000000000 --- a/service_worker_api/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "service_worker_api-tests.ts" - ] -} \ No newline at end of file diff --git a/session-file-store/index.d.ts b/session-file-store/index.d.ts new file mode 100644 index 0000000000..f8238cf109 --- /dev/null +++ b/session-file-store/index.d.ts @@ -0,0 +1,287 @@ +// Type definitions for express session-file-store 1.0 +// Project: https://github.com/valery-barysok/session-file-store +// Definitions by: Gevik Babakhani +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + + +export = FileStore; + +declare namespace FileStore { + + /** + * FileStore Options + * + * @interface Options + */ + interface Options { + + /** + * The directory where the session files will be stored. Defaults to `./sessions` + * + * @type {string} + * @memberOf Options + */ + path?: string; + + /** + * Session time to live in seconds. Defaults to `3600` + * + * @type {number} + * @memberOf Options + */ + ttl?: number; + + /** + * The number of retries to get session data from a session file. Defaults to `5` + * + * @type {number} + * @memberOf Options + */ + retries?: number; + + /** + * The exponential factor to use for retry. Defaults to `1` + * + * @type {number} + * @memberOf Options + */ + factor?: number; + + /** + * The number of milliseconds before starting the first retry. Defaults to `50` + * + * @type {number} + * @memberOf Options + */ + minTimeout?: number; + + /** + * The maximum number of milliseconds between two retries. Defaults to `100` + * + * @type {number} + * @memberOf Options + */ + maxTimeout?: number; + + /** + * [OUT] Contains intervalObject if reap was scheduled + * + * @type {*} + * @memberOf Options + */ + reapIntervalObject?: any; + + /** + * Interval to clear expired sessions in seconds or -1 if do not need. Defaults to `1 hour` + * + * @type {number} + * @memberOf Options + */ + reapInterval?: number; + + /** + * Undocumented + * + * @type {number} + * @memberOf Options + */ + reapMaxConcurrent?: number; + + /** + * Use distinct worker process for removing stale sessions. Defaults to `false` + * + * @type {boolean} + * @memberOf Options + */ + reapAsync?: boolean; + + /** + * Reap stale sessions synchronously if can not do it asynchronously. Default to `false` + * + * @type {boolean} + * @memberOf Options + */ + reapSyncFallback?: boolean; + + /** + * Log messages. Defaults to `console.log` + * + * @type {Function} + * @memberOf Options + */ + logFn?: (...args: any[]) => void; + + /** + * Returns fallback session object after all failed retries. No defaults + * + * @type {Function} + * @memberOf Options + */ + fallbackSessionFn?: (...args: any[]) => void; + + /** + * Object-to-text text encoding. Can be null. Defaults to `'utf8'` + * + * @type {string} + * @memberOf Options + */ + encoding?: string; + + /** + * Encoding function. Takes object, returns encoded data. Defaults to `JSON.stringify` + * + * @type {Function} + * @memberOf Options + */ + encoder?: (...args: any[]) => void; + + /** + * Decoding function. Takes encoded data, returns object. Defaults to `JSON.parse` + * + * @type {Function} + * @memberOf Options + */ + decoder?: (...args: any[]) => void; + + /** + * If secret string is specified then enables encryption of the session before + * writing the file and also decryption when reading it. + * + * @type {string} + * @memberOf Options + */ + secret?: string; + + /** + * Encryption output encoding. Defaults to `'hex'` + * + * @type {string} + * @memberOf Options + */ + encryptEncoding?: string; + + /** + * File extension of saved files. Defaults to `'.json'` + * + * @type {string} + * @memberOf Options + */ + fileExtension?: string; + + /** + * Undocumented + * + * @type {RegExp} + * @memberOf Options + */ + filePattern?: RegExp; + + /** + * Encryption key retrieval function. Takes secret andsession id, returns key. + * Defaults to `function(secret, sessionId){return secret + sessionId;}` + * + * + * @memberOf Options + */ + keyFunction?: (secret: string, sessionId: string) => string; + } +} + +/** + * Session file store is a provision for storing session data in + * the session file + * + * @class FileStore + */ +declare class FileStore { + + /** + * Creates an instance of FileStore. + * @param {FileStore.Options} options + * + * @memberOf FileStore + */ + constructor(options: FileStore.Options); + + /** + * Attempts to fetch session from a session file by the given `sessionId` + * + * @param {string} sessionId + * @param {(err: any, session: Express.Session) => void} callback + * + * @memberOf FileStore + */ + get(sessionId: string, callback: (err: any, session: Express.Session) => void): void; + + /** + * Attempts to commit the given session associated with the given `sessionId` to a session file + * + * @param {string} sessionId + * @param {Express.Session} session + * @param {(err: any) => void} callback + * + * @memberOf FileStore + */ + set(sessionId: string, session: Express.Session, callback: (err: any) => void): void; + + /** + * Touch the given session object associated with the given `sessionId` + * + * @param {string} sessionId + * @param {Express.Session} session + * @param {(err: any) => void} callback + * + * @memberOf FileStore + */ + touch(sessionId: string, session: Express.Session, callback: (err: any) => void): void; + + /** + * Attempts to unlink a given session by its id + * + * @param {string} sessionId + * @param {(err: any) => void} callback + * + * @memberOf FileStore + */ + destroy(sessionId: string, callback: (err: any) => void): void; + + /** + * Attempts to fetch number of the session files + * + * @param {(err: any, length: number) => void} callback + * + * @memberOf FileStore + */ + length(callback: (err: any, length: number) => void): void; + + /** + * Attempts to clear out all of the existing session files + * + * @param {(err: any) => void} callback + * + * @memberOf FileStore + */ + clear(callback: (err: any) => void): void; + + /** + * + * + * @param {(err: any, files: Array) => void} callback + * + * @memberOf FileStore + */ + list(callback: (err: any, files: string[]) => void): void; + + /** + * Attempts to detect whether a session file is already expired or not + * + * @param {string} sessionId + * @param {(errr: any, isExpired: boolean) => void} callback + * + * @memberOf FileStore + */ + expired(sessionId: string, callback: (errr: any, isExpired: boolean) => void): void; + +} diff --git a/session-file-store/session-file-store-tests.ts b/session-file-store/session-file-store-tests.ts new file mode 100644 index 0000000000..ffe3c79bee --- /dev/null +++ b/session-file-store/session-file-store-tests.ts @@ -0,0 +1,13 @@ +import FileStore = require("session-file-store"); + +const options: FileStore.Options = { + path: "./tmp/sessions/", + logFn: (a: string) => { + } +}; + +const sessionStore = new FileStore(options); + +sessionStore.list((err: any, file: Array) => { + +}); \ No newline at end of file diff --git a/session-file-store/tsconfig.json b/session-file-store/tsconfig.json new file mode 100644 index 0000000000..9fd97e3168 --- /dev/null +++ b/session-file-store/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "session-file-store-tests.ts" + ] +} diff --git a/session-file-store/tslint.json b/session-file-store/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/session-file-store/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/shelljs/shelljs-tests.ts b/shelljs/shelljs-tests.ts index 6c155e5aee..03f439af02 100644 --- a/shelljs/shelljs-tests.ts +++ b/shelljs/shelljs-tests.ts @@ -1,11 +1,5 @@ -// Tests for shelljs.d.ts -// Project: http://shelljs.org -// Definitions by: Niklas Mollenhauer -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Tests taken from documentation samples. -/// - import shell = require("shelljs"); if (!shell.which("git")) diff --git a/showdown/index.d.ts b/showdown/index.d.ts index e73405bfec..6ffaeaa1d1 100644 --- a/showdown/index.d.ts +++ b/showdown/index.d.ts @@ -255,6 +255,14 @@ declare namespace Showdown { * @param extensions */ removeExtension(extensions: ShowdownExtension[] | ShowdownExtension): void; + + /** + * Set a "local" flavor for THIS Converter instance + * + * @param flavor name + */ + setFlavor(name: string): void; + } interface ConverterStatic { @@ -353,4 +361,11 @@ declare namespace Showdown { * Reset extensions. */ function resetExtensions(): void; + + /** + * Setting a "global" flavor affects all instances of showdown + * + * @param name + */ + function setFlavor(name: string): void; } diff --git a/sinon-as-promised/index.d.ts b/sinon-as-promised/index.d.ts index ab75217011..5efe4df979 100644 --- a/sinon-as-promised/index.d.ts +++ b/sinon-as-promised/index.d.ts @@ -6,17 +6,22 @@ import * as s from "sinon"; declare module "sinon" { - interface SinonStub { - - /** - * When called, the stub will return a "thenable" object which will return a promise for the provided value. Any Promises/A+ compliant library will handle this object properly. - */ - resolves(value:any):SinonStub; - - /** - * When called, the stub will return a thenable which ill return a reject promise with the provided err. If err is a string, it will be set as the message on an Error object. - */ - rejects(err:any):SinonStub; - } + interface SinonStub { + /** + * Causes the stub to resolve with the provided value. + * + * @param value Resolve value. + * @remarks Any Promises/A+ compliant library will handle this object properly. + */ + resolves(value: T): SinonStub; + /** + * Causes the stub to reject with the provided error. + * + * @param error Rejection error. + * @returns A thenable which will return a rejected promise with the provided error. + * @remarks If error is a string, it will be set as the message on an Error object. + */ + rejects(error: any): SinonStub; + } } diff --git a/sinon-as-promised/sinon-as-promised-tests.ts b/sinon-as-promised/sinon-as-promised-tests.ts index 10602a3e8d..4663c1df12 100644 --- a/sinon-as-promised/sinon-as-promised-tests.ts +++ b/sinon-as-promised/sinon-as-promised-tests.ts @@ -1,5 +1,3 @@ -/// - function testResolve() { sinon.stub().resolves('test val'); } diff --git a/sinon-mongoose/sinon-mongoose-tests.ts b/sinon-mongoose/sinon-mongoose-tests.ts index b58a4e5e58..c64030240e 100644 --- a/sinon-mongoose/sinon-mongoose-tests.ts +++ b/sinon-mongoose/sinon-mongoose-tests.ts @@ -1,5 +1,3 @@ -/// - function testChain() { sinon.stub().chain('exec'); } diff --git a/sinon/index.d.ts b/sinon/index.d.ts index 7c44ab9d7a..e4ba1ad612 100644 --- a/sinon/index.d.ts +++ b/sinon/index.d.ts @@ -102,6 +102,7 @@ declare namespace Sinon { throws(type?: string): SinonStub; throws(obj: any): SinonStub; callsArg(index: number): SinonStub; + callThrough(): SinonStub; callsArgOn(index: number, context: any): SinonStub; callsArgWith(index: number, ...args: any[]): SinonStub; callsArgOnWith(index: number, context: any, ...args: any[]): SinonStub; diff --git a/sitemap2/index.d.ts b/sitemap2/index.d.ts new file mode 100644 index 0000000000..75108ff603 --- /dev/null +++ b/sitemap2/index.d.ts @@ -0,0 +1,52 @@ +// Type definitions for sitemap2 1.0 +// Project: https://github.com/vlkosinov/sitemap2 +// Definitions by: Yuichi Shundo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var sitemap2: Sitemap; + +export = sitemap2; + +declare interface Sitemap { + new (conf?: SitemapConfig): Sitemap; + + addUrl(urlData: UrlData | UrlData[] | string | string[]): this + addSitemap(sm: Sitemap): this; + toXML(): SitemapXml[]; + + hostName: string; + fileName: string; + limit: number; + urls: string[]; + childrens: Sitemap[]; +} + +declare interface SitemapConfig { + hostName?: string; + fileName?: string; + limit?: number; + cacheTime?: number; + xslUrl?: string; + urls?: string[]; + childrens?: Sitemap[]; +} + +declare interface UrlData { + url: string; + chengefreq?: string; + priority?: number | string; + lastmod?: Date; + lastmodWithTime?: boolean; + lastmodInISO?: boolean; + video?: { + title: string; + description: string; + thumbnail_loc: string; + content_loc: string; + } +} + +declare interface SitemapXml { + fileName: string; + xml: string; +} diff --git a/sitemap2/sitemap2-tests.ts b/sitemap2/sitemap2-tests.ts new file mode 100644 index 0000000000..235cbb93a4 --- /dev/null +++ b/sitemap2/sitemap2-tests.ts @@ -0,0 +1,51 @@ +import Sitemap = require('sitemap2'); + +let sitemap = new Sitemap({ + hostName: ('https://example.com/'), + fileName: 'sitemap.xml', + limit: 50000, + cacheTime: 1000, +}); + +sitemap.addUrl('https://example.com/'); +sitemap.addUrl(['https://example.com/']); +sitemap.addUrl({ + url: 'https://example.com/', + chengefreq: 'chengefreq', + priority: 0.6, + lastmod: new Date(), + lastmodWithTime: true, + lastmodInISO: false, + video: { + title: 'title', + description: 'description', + content_loc: 'content_loc', + thumbnail_loc: 'thumbnail_loc' + }, +}); +sitemap.addUrl([ + { + url: 'https://example.com/', + chengefreq: 'chengefreq', + priority: 0.6, + lastmod: new Date(), + lastmodWithTime: true, + lastmodInISO: false, + video: { + title: 'title', + description: 'description', + content_loc: 'content_loc', + thumbnail_loc: 'thumbnail_loc' + }, + }, + { + url: 'http://example.com/' + } +]); + +let sitemap2 = new Sitemap(); +sitemap.addSitemap(sitemap2); + +const xmlList = sitemap.toXML(); +var str = xmlList[0].fileName; +var str = xmlList[0].xml; diff --git a/sitemap2/tsconfig.json b/sitemap2/tsconfig.json new file mode 100644 index 0000000000..6fd2aba277 --- /dev/null +++ b/sitemap2/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sitemap2-tests.ts" + ] +} \ No newline at end of file diff --git a/sitemap2/tslint.json b/sitemap2/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/sitemap2/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/slick-carousel/slick-carousel-tests.ts b/slick-carousel/slick-carousel-tests.ts index 5cb75a619d..3cf05a2e0c 100644 --- a/slick-carousel/slick-carousel-tests.ts +++ b/slick-carousel/slick-carousel-tests.ts @@ -1,7 +1,3 @@ -/// -/// - - // -------------------------------------------------------- // ------------------- WEBSITE EXAMPLE -------------------- // ---------- http://kenwheeler.github.io/slick/ ---------- diff --git a/slickgrid/test/index.ts b/slickgrid/test/index.ts index e6570c2985..d87bc2240c 100644 --- a/slickgrid/test/index.ts +++ b/slickgrid/test/index.ts @@ -1,6 +1,3 @@ -/// - - interface MyData extends Slick.SlickData { title: string; duration: string; diff --git a/soap/index.d.ts b/soap/index.d.ts index 151e914f63..eda277d575 100644 --- a/soap/index.d.ts +++ b/soap/index.d.ts @@ -49,4 +49,31 @@ export interface Server extends events.EventEmitter { log(type: any, data: any): any; } export function listen(server: any, path: string, service: any, wsdl: string): Server; -declare function createClient(wsdlPath: string, options: any, fn: (err: any, client: Client) => void): void; +declare function createClient(wsdlPath: string, options: Option, fn: (err: any, client: Client) => void): void; + +export interface Option { + attributesKey?: string; + disableCache?: boolean; + endpoint?: string; + envelopeKey?: string; + escapeXML?: boolean; + forceSoap12Headers?: boolean; + httpClient?: HttpClient; + ignoreBaseNameSpaces?: boolean, + ignoredNamespaces?: string[] | {namespaces: string[], override: boolean}; + overrideRootElement?: {namespace: string, xmlnsAttributes?: string[]}; + request?: (options: any, callback?: (error: any, res: any, body: any) => void) => void; + stream?: boolean; + valueKey?: string; + wsdl_headers?: { [key: string]: any }; + wsdl_options?: { [key: string]: any }; + xmlKey?: string; +} + +export class HttpClient { + constructor(options?: Option); + buildRequest(rurl: string, data: any | string, exheaders?: { [key: string]: any }, exoptions?: { [key: string]: any }): any; + handleResponse(req: any, res: any, body: any | string): any | string; + request(rurl: string, data: any | string, callback: (err: any, res: any, body: any | string) => void, exheaders?: { [key: string]: any }, exoptions?: { [key: string]: any }): any; + requestStream(rurl: string, data: any | string, exheaders?: { [key: string]: any }, exoptions?: { [key: string]: any }): any; +} diff --git a/soap/soap-tests.ts b/soap/soap-tests.ts index 9771b26efc..f07346988e 100644 --- a/soap/soap-tests.ts +++ b/soap/soap-tests.ts @@ -1,10 +1,27 @@ import * as soap from 'soap'; import * as events from 'events'; -import * as fs from "fs"; -import * as http from "http"; +import * as fs from 'fs'; +import * as http from 'http'; const url = 'http://example.com/wsdl?wsdl'; -const wsdlOptions = { name: 'value' }; +// wsdlOptions set only default values +const wsdlOptions = { + attributesKey: 'attributes', + disableCache: false, + endpoint: url, + envelopeKey: 'soap', + escapeXML: true, + forceSoap12Headers: false, + httpClient: new soap.HttpClient(), + ignoreBaseNameSpaces: false, + ignoredNamespaces: ['tns', 'targetNamespace', 'typedNamespace'], + request: require('request'), + stream: false, + wsdl_headers: [], + wsdl_options: [], + valueKey: '$value', + xmlKey: '$xml' +}; soap.createClient(url, wsdlOptions, function(err: any, client: soap.Client) { let securityOptions = { hasTimeStamp: false }; @@ -74,7 +91,7 @@ var myService = { var xml = fs.readFileSync('myservice.wsdl', 'utf8'), server = http.createServer(function(request,response) { - response.end("404: Not Found: " + request.url); + response.end('404: Not Found: ' + request.url); }); server.listen(8000); diff --git a/socket.io-redis/socket.io-redis-tests.ts b/socket.io-redis/socket.io-redis-tests.ts index 28b0f9873f..6ced0b31de 100644 --- a/socket.io-redis/socket.io-redis-tests.ts +++ b/socket.io-redis/socket.io-redis-tests.ts @@ -1,5 +1,3 @@ -/// - import socketIO = require('socket.io'); import ioRedis = require('socket.io-redis'); import redis = require('redis'); diff --git a/socket.io.users/socket.io.users-tests.ts b/socket.io.users/socket.io.users-tests.ts index 565f6a7d7b..24557ef6c5 100644 --- a/socket.io.users/socket.io.users-tests.ts +++ b/socket.io.users/socket.io.users-tests.ts @@ -1,7 +1,3 @@ -/// - -/// - var express = require('express'); var app = express(); var httpServer = require('http').createServer(app); diff --git a/source-list-map/source-list-map-tests.ts b/source-list-map/source-list-map-tests.ts index 5fe932efc5..8c367d582c 100644 --- a/source-list-map/source-list-map-tests.ts +++ b/source-list-map/source-list-map-tests.ts @@ -1,4 +1,3 @@ -/// import * as slm from 'source-list-map'; const node = new slm.CodeNode('hello'); diff --git a/sparkpost/index.d.ts b/sparkpost/index.d.ts index c88fab5d92..fc6e408949 100644 --- a/sparkpost/index.d.ts +++ b/sparkpost/index.d.ts @@ -1,9 +1,8 @@ -// Type definitions for sparkpost v1.3 +// Type definitions for sparkpost 2.1 // Project: https://github.com/SparkPost/node-sparkpost -// Definitions by: Joshua DeVinney +// Definitions by: Joshua DeVinney , Bond // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// /// import * as Request from "request"; @@ -16,25 +15,48 @@ declare class SparkPost { * List all your inbound domains. * @param callback The request callback with Domain results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; + /** + * List all your inbound domains. + * @returns Promise The Domain results array + */ + list(): SparkPost.ResultsPromise; /** * Retrieve an inbound domain by specifying its domain name in the URI path. * @param domain Domain name * @param callback The request callback with Domain results */ - find(domain: string, callback: SparkPost.ResultsCallback): void; + get(domain: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @returns Promise The Domain results + */ + get(domain: string): SparkPost.ResultsPromise; /** * Create an inbound domain by providing an inbound domains object as the POST request body. - * @param domain Domain name + * @param createOpts a hash of [inbound domain attributes]{@link https://developers.sparkpost.com/api/inbound-domains#header-inbound-domains-attributes} * @param callback The request callback */ - create(domain: string, callback: SparkPost.Callback): void; + create(createOpts: SparkPost.CreateOpts, callback: SparkPost.Callback): void; + /** + * Create an inbound domain by providing an inbound domains object as the POST request body. + * @param createOpts a hash of [inbound domain attributes]{@link https://developers.sparkpost.com/api/inbound-domains#header-inbound-domains-attributes} + * @returns Promise void + */ + create(createOpts: SparkPost.CreateOpts): Promise; /** * Delete an inbound domain by specifying its domain name in the URI path. * @param domain Domain name * @param callback The request callback */ delete(domain: string, callback: SparkPost.Callback): void; + /** + * Delete an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @returns Promise void + */ + delete(domain: string): Promise; }; /** The Message Events API provides the means to search the raw events generated by SparkPost. */ messageEvents: { @@ -44,29 +66,57 @@ declare class SparkPost { * @param callback The request callback with MessageEvent results array */ search(parameters: SparkPost.MessageEventParameters, callback: SparkPost.ResultsCallback): void; + /** + * Retrieves list of message events according to given params + * @param parameters Query parameters + * @returns Promise The MessageEvent results array + */ + search(parameters: SparkPost.MessageEventParameters): SparkPost.ResultsPromise; }; /** A recipient list is a collection of recipients that can be used in a transmission. */ recipientLists: { /** * List a summary of all recipient lists. The recipients for each list are not included in the results. - * To retrieve recipient details, use the RETRIEVE API for a specified recipient list. + * To retrieve recipient details, use the [Retrieve a Recipient List endpoint]{@link https://developers.sparkpost.com/api/recipient-lists.html#recipient-lists-retrieve-get}, + * and specify the recipient list. + * * @param callback The request callback with RecipientList results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; + /** + * List a summary of all recipient lists. The recipients for each list are not included in the results. + * To retrieve recipient details, use the [Retrieve a Recipient List endpoint]{@link https://developers.sparkpost.com/api/recipient-lists.html#recipient-lists-retrieve-get}, + * and specify the recipient list. + * + * @returns Promise The RecipientList results array + */ + list(): SparkPost.ResultsPromise; /** * Retrieve details about a specified recipient list by specifying its id in the URI path. * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. - * @param options The find options - * @param callback The request callback with RecipientList results + * + * @param {string} id + * @param {{ show_recipients?: boolean }} specifies whether to retrieve the recipients. Defaults to false + * @param {SparkPost.Callback} callback */ - find(options: { id: string, show_recipients?: false }, callback: SparkPost.Callback): void; + get(id: string, options: { show_recipients?: boolean }, callback: SparkPost.Callback): void; /** * Retrieve details about a specified recipient list by specifying its id in the URI path. * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. - * @param options The find options - * @param callback The request callback with RecipientList results (with recipients) + * + * @param {string} id + * @param {SparkPost.Callback} callback */ - find(options: { id: string, show_recipients: true }, callback: SparkPost.Callback): void; + get(id: string, callback: SparkPost.Callback): void; + /** + * Retrieve details about a specified recipient list by specifying its id in the URI path. + * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. + * + * @param {string} id + * @param {{ show_recipients?: boolean }} [options] specifies whether to retrieve the recipients. Defaults to false + * @returns {Promise} + */ + get(id: string, options?: { show_recipients?: boolean }): SparkPost.ResultsPromise; /** * Create a recipient list by providing a recipient list object as the POST request body. * At a minimum, the “recipients” array is required, which must contain a valid “address”. @@ -76,19 +126,47 @@ declare class SparkPost { * @param callback The request callback with metadata results */ create(options: SparkPost.CreateRecipientList, callback: SparkPost.ResultsCallback): void; + /** + * Create a recipient list by providing a recipient list object as the POST request body. + * At a minimum, the “recipients” array is required, which must contain a valid “address”. + * If the recipient list “id” is not provided in the POST request body, one will be generated and returned in the results body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * @param options The create options + * @returns Promise metadata results + */ + create(options: SparkPost.CreateRecipientList): SparkPost.ResultsPromise; /** * Update an existing recipient list by specifying its ID in the URI path and use a recipient list object as the PUT request body. * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * + * @param {string} id Identifier of the recipient list * @param options The update options * @param callback The request callback with metadata results */ - update(options: SparkPost.UpdateRecipientList, callback: SparkPost.ResultsCallback): void; + update(id: string, options: SparkPost.UpdateRecipientList, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing recipient list by specifying its ID in the URI path and use a recipient list object as the PUT request body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * + * @param {string} id Identifier of the recipient list + * @param {SparkPost.UpdateRecipientList} options + * @returns {SparkPost.ResultsPromise} + */ + update(id: string, options: SparkPost.UpdateRecipientList): SparkPost.ResultsPromise; /** * Permanently delete the specified recipient list. + * * @param id The list id * @param callback The request callback */ delete(id: string, callback: SparkPost.Callback): void; + /** + * Permanently delete the specified recipient list. + * + * @param id The list id + * @returns Promise void + */ + delete(id: string): Promise; }; /** Relay Webhooks are a way to instruct SparkPost to accept inbound email on your behalf and forward it to you over HTTP for your own consumption. */ relayWebhooks: { @@ -96,68 +174,142 @@ declare class SparkPost { * List all your relay webhooks. * @param callback The request callback with RelayWebhook results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; + /** + * List all your relay webhooks. + * @returns Promise The RelayWebhook results array + */ + list(): SparkPost.ResultsPromise; /** * Delete a relay webhook by specifying the webhook ID in the URI path. * @param relayWebhookId The webhook id * @param callback The request callback with RelayWebhook results */ - find(relayWebhookId: string, callback: SparkPost.ResultsCallback): void; + get(relayWebhookId: string, callback: SparkPost.ResultsCallback): void; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @returns Promise The RelayWebhook results + */ + get(relayWebhookId: string): SparkPost.ResultsPromise; /** * Create a relay webhook by providing a relay webhooks object as the POST request body. * @param options The create options * @param callback The request callback with webhook id results */ create(options: SparkPost.RelayWebhook, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Create a relay webhook by providing a relay webhooks object as the POST request body. + * @param options The create options + * @returns Promise The webhook id results + */ + create(options: SparkPost.RelayWebhook): SparkPost.ResultsPromise<{ id: string }>; /** * Update a relay webhook by specifying the webhook ID in the URI path. * @param options The update options * @param callback The request callback with webhook id results */ - update(options: SparkPost.UpdateRelayWebhook & { relayWebhookId: string }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + update(id: string, options: SparkPost.UpdateRelayWebhook, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update a relay webhook by specifying the webhook ID in the URI path. + * @param options The update options + * @returns Promise The webhook id results + */ + update(id: string, options: SparkPost.UpdateRelayWebhook): SparkPost.ResultsPromise<{ id: string }>; /** * Delete a relay webhook by specifying the webhook ID in the URI path. * @param relayWebhookId The webhook id * @param callback The request callback */ delete(relayWebhookId: string, callback: SparkPost.Callback): void; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @returns Promise void + */ + delete(relayWebhookId: string): Promise; }; sendingDomains: { /** * List an overview of all sending domains in the system. * @param callback The request callback with SendingDomain results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; + /** + * List an overview of all sending domains in the system. + * + * @returns The SendingDomain results array + */ + list(): SparkPost.ResultsPromise; /** * Retrieve a sending domain by specifying its domain name in the URI path. The response includes details about its DKIM key configuration. * @param domain The domain * @param callback The request callback with SendingDomain results */ - find(domain: string, callback: SparkPost.ResultsCallback): void; + get(domain: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve a sending domain by specifying its domain name in the URI path. The response includes details about its DKIM key configuration. + * + * @param domain The domain + * @returns Promise The SendingDomain results + */ + get(domain: string): SparkPost.ResultsPromise; /** * Create a sending domain by providing a sending domain object as the POST request body. * @param options The create options * @param callback The request callback with basic info results */ create(options: SparkPost.CreateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + /** + * Create a sending domain by providing a sending domain object as the POST request body. + * + * @param options The create options + * @returns Promise The basic info results + */ + create(options: SparkPost.CreateSendingDomain): SparkPost.ResultsPromise<{ message: string, domain: string }>; /** * Update the attributes of an existing sending domain by specifying its domain name in the URI path and use a sending domain object as the PUT request body. - * @param options The update options + * @param domain The domain + * @param updateOpts The update options * @param callback The request callback with basic info results */ - update(options: SparkPost.UpdateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + update(domain: string, updateOpts: SparkPost.UpdateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + /** + * Update the attributes of an existing sending domain by specifying its domain name in the URI path and use a sending domain object as the PUT request body. + * + * @param domain The domain + * @param updateOpts The update options + * @returns Promise The basic info results + */ + update(domain: string, updateOpts: SparkPost.UpdateSendingDomain): SparkPost.ResultsPromise<{ message: string, domain: string }>; /** * Delete an existing sending domain. * @param domain The domain * @param callback The request callback */ delete(domain: string, callback: SparkPost.Callback): void; + /** + * Delete an existing sending domain. + * + * @param domain The domain + * @returns Promise void + */ + delete(domain: string): Promise; /** * Verify a Sending Domain - * @param options The verify options + * @param domain The domain + * @param options a hash of [verify attributes]{@link https://developers.sparkpost.com/api/sending-domains#header-verify-attributes} * @param callback The request callback with verify results */ - verify(options: SparkPost.VerifyOptions, callback: SparkPost.ResultsCallback): void; + verify(domain: string, options: SparkPost.VerifyOptions, callback: SparkPost.ResultsCallback): void; + /** + * Verify a Sending Domain + * + * @param domain The domain + * @param options a hash of [verify attributes]{@link https://developers.sparkpost.com/api/sending-domains#header-verify-attributes} + * @returns Promise The verify results + */ + verify(domain: string, options: SparkPost.VerifyOptions): SparkPost.ResultsPromise; }; subaccounts: { /** @@ -165,164 +317,412 @@ declare class SparkPost { * This endpoint only returns information about the subaccounts themselves, not the data associated with the subaccount. * @param callback The request callback with subaccount information results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; /** - * - * @param subaccountId The webhook id + * Endpoint for retrieving a list of your subaccounts. + * This endpoint only returns information about the subaccounts themselves, not the data associated with the subaccount. + * + * @returns Promise The subaccount information results array + */ + list(): SparkPost.ResultsPromise; + /** + * Get details about a specified subaccount by its id + * + * @param id the id of the subaccount you want to look up * @param callback The request callback with subaccount information results */ - find(subaccountId: string | number, callback: SparkPost.ResultsCallback): void; + get(id: string | number, callback: SparkPost.ResultsCallback): void; + /** + * Get details about a specified subaccount by its id + * + * @param id the id of the subaccount you want to look up + * @returns Promise The subaccount information results + */ + get(id: string | number): SparkPost.ResultsPromise; /** * Provisions a new subaccount and an initial subaccount API key. - * @param options The create options + * @param subaccount The create options * @param callback The request callback with basic subaccount information results */ - create(options: SparkPost.CreateSubaccount, callback: SparkPost.ResultsCallback): void; + create(subaccount: SparkPost.CreateSubaccount, callback: SparkPost.ResultsCallback): void; + /** + * Provisions a new subaccount and an initial subaccount API key. + * + * @param subaccount The create options + * @returns Promise The basic subaccount information results + */ + create(subaccount: SparkPost.CreateSubaccount): SparkPost.ResultsPromise; /** * Update an existing subaccount’s information. - * @param options The create options + * + * @param id the id of the subaccount you want to update + * @param subaccount an object of [updatable subaccount attributes]{@link https://developers.sparkpost.com/api/subaccounts#header-request-body-attributes-1} * @param callback The request callback with webhook id results */ - update(options: SparkPost.UpdateSubaccount, callback: SparkPost.ResultsCallback<{ message: string }>): void; + update(id: string, subaccount: SparkPost.UpdateSubaccount, callback: SparkPost.ResultsCallback<{ message: string }>): void; + /** + * Update an existing subaccount’s information. + * + * @param id the id of the subaccount you want to update + * @param subaccount an object of [updatable subaccount attributes]{@link https://developers.sparkpost.com/api/subaccounts#header-request-body-attributes-1} + * @returns Promise The webhook id results + */ + update(id: string, subaccount: SparkPost.UpdateSubaccount): SparkPost.ResultsPromise<{ message: string }>; }; suppressionList: { /** - * Perform a filtered search for entries in your suppression list. - * @param parameters Object of search parameters - * @param callback The request callback with RelayWebhook results + * List all entries in your suppression list, filtered by an optional set of search parameters. + * + * @param {SparkPost.ResultsCallback} callback The request callback with supression lists. */ - search(parameters: SparkPost.SupressionSearch, callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; /** - * Retrieve the suppression status for a specific recipient by specifying the recipient’s email address in the URI path. - * @param email Email address to check - * @param callback The request callback with webhook id results + * List all entries in your suppression list, filtered by an optional set of search parameters. + * + * @param {SparkPost.SupressionSearchParameters} parameters an object of [search parameters]{@link https://developers.sparkpost.com/api/suppression-list#suppression-list-search-get} + * @param {SparkPost.ResultsCallback} callback The request callback with supression lists. */ - checkStatus(email: string, callback: SparkPost.ResultsCallback): void; + list(parameters: SparkPost.SupressionSearchParameters, callback: SparkPost.ResultsCallback): void; + /** + * List all entries in your suppression list, filtered by an optional set of search parameters. + * + * @param {SparkPost.SupressionSearchParameters} [parameters] an object of [search parameters]{@link https://developers.sparkpost.com/api/suppression-list#suppression-list-search-get} + * @returns {Promise} Promise The supression lists + */ + list(parameters?: SparkPost.SupressionSearchParameters): SparkPost.ResultsPromise; + /** + * Retrieve an entry by recipient email. + * + * @param {string} email address to check + * @returns void + */ + get(email: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve an entry by recipient email. + * + * @param {string} email address to check + * @returns void + */ + get(email: string): SparkPost.ResultsPromise; /** * Delete a recipient from the list by specifying the recipient’s email address in the URI path. - * @param email Email address to check - * @param callback The request callback + * + * @param {string} email Recipient email address + * @param callback */ - removeStatus(email: string, callback: SparkPost.Callback): void; + delete(email: string, callback: SparkPost.Callback): void; /** - * Bulk insert or update entries in the customer-specific exclusion list. - * @param parameters The suppression entry list + * Delete a recipient from the list by specifying the recipient’s email address in the URI path. + * + * @param {string} email Recipient email address + * @returns {Promise} void + */ + delete(email: string): Promise; + /** + * Insert or update one or many entries. + * + * @param listEntries The suppression entry list * @param callback The request callback */ - upsert(parameters: SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[], callback: SparkPost.ResultsCallback<{ message: string }>): void; + upsert(listEntries: SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[], callback: SparkPost.ResultsCallback<{ message: string }>): void; + /** + * Insert or update one or many entries. + * + * @param {(SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[])} listEntries The suppression entry list + * @returns {Promise<{ message: string }>} + */ + upsert(listEntries: SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[]): SparkPost.ResultsPromise<{ message: string }>; }; templates: { /** * List a summary of all templates. * @param callback The request callback with TemplateMeta results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; + /** + * List a summary of all templates. + * + * @returns {SparkPost.ResultsPromise} The TemplateMeta results array + */ + list(): SparkPost.ResultsPromise; /** * Retrieve details about a specified template by its id - * @param options The id and draft status information + * + * @param id the id of the template you want to look up + * @param options specifies a draft or published template * @param callback The request callback with Template results */ - find(options: { id: string, draft?: boolean }, callback: SparkPost.ResultsCallback): void; + get(id: string, options: { draft?: boolean }, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified template by its id + * + * @param {string} id the id of the template you want to look up + * @param {SparkPost.ResultsCallback} callback The request callback with Template results + */ + get(id: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified template by its id + * + * @param {string} id the id of the template you want to look up + * @param {{ draft?: boolean }} [options] specifies a draft or published template + * @returns {SparkPost.ResultsPromise} The Template results + */ + get(id: string, options?: { draft?: boolean }): SparkPost.ResultsPromise; /** * Create a new template - * @param options The create options + * + * @param template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} * @param callback The request callback with template id results */ - create(options: { template: SparkPost.CreateTemplate }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + create(template: SparkPost.CreateTemplate, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Create a new template + * + * @param {SparkPost.CreateTemplate} template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @returns {SparkPost.ResultsPromise<{ id: string }>} The template id results + */ + create(template: SparkPost.CreateTemplate): SparkPost.ResultsPromise<{ id: string }>; /** * Update an existing template - * @param options The create options + * + * @param {string} id the id of the template you want to update + * @param template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param options The create options. If true, directly overwrite the existing published template. If false, create a new draft * @param callback The request callback with template id results */ - update(options: { - id: string, - template: SparkPost.UpdateTemplate, + update(id: string, template: SparkPost.UpdateTemplate, options: { update_published?: boolean; }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update an existing template + * + * @param {string} id the id of the template you want to update + * @param {SparkPost.UpdateTemplate} template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param {SparkPost.ResultsCallback<{ id: string }>} callback The request callback with template id results + */ + update(id: string, template: SparkPost.UpdateTemplate, + callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update an existing template + * + * @param {string} id the id of the template you want to update + * @param {SparkPost.UpdateTemplate} template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param {{ + * update_published?: boolean; + * }} [options] If true, directly overwrite the existing published template. If false, create a new draft + * @returns {SparkPost.ResultsPromise<{ id: string }>} The template id results + */ + update(id: string, template: SparkPost.UpdateTemplate, options?: { + update_published?: boolean; + }): SparkPost.ResultsPromise<{ id: string }>; /** * Delete an existing template * @param id The template id * @param callback The request callback */ delete(id: string, callback: SparkPost.Callback): void; + /** + * Delete an existing template + * + * @param id The template id + * @returns Promise void + */ + delete(id: string): Promise; /** * Preview the most recent version of an existing template by id + * + * @param {string} id the id of the template you want to look up * @param options The preview options * @param callback The request callback with webhook id results */ - preview(options: { id: string, data: any, draft?: boolean }, callback: SparkPost.ResultsCallback): void; + preview(id: string, options: { substitution_data?: any, draft?: boolean }, callback: SparkPost.ResultsCallback): void; + /** + * Preview the most recent version of an existing template by id + * + * @param {string} id the id of the template you want to look up + * @param {SparkPost.ResultsCallback} callback The request callback with webhook id results + */ + preview(id: string, callback: SparkPost.ResultsCallback): void; + /** + * Preview the most recent version of an existing template by id + * + * @param {string} id the id of the template you want to look up + * @param {{ substitution_data: any, draft?: boolean }} [options] + * @returns {SparkPost.ResultsPromise} The webhook id results + */ + preview(id: string, options?: { substitution_data?: any, draft?: boolean }): SparkPost.ResultsPromise; }; transmissions: { /** * List an overview of all transmissions in the account + * * @param callback The request callback with Transmission results array */ - all(callback: SparkPost.ResultsCallback): void; + list(callback: SparkPost.ResultsCallback): void; /** - * List an overview of all transmissions in the account, with added filters - * @param options The search options { campaign_id?, template_id? } - * @param callback The request callback with Transmission results array + * List an overview of all transmissions in the account + * + * @param {{ campaign_id?: string, template_id: string }} options + * @param {SparkPost.ResultsCallback} callback The request callback with Transmission results array */ - all(options: { campaign_id?: string, template_id?: string }, callback: SparkPost.ResultsCallback): void; + list(options: { campaign_id?: string, template_id?: string }, callback: SparkPost.ResultsCallback): void; + /** + * List an overview of all transmissions in the account + * + * @param {{ campaign_id?: string, template_id: string }} [options] + * @returns {SparkPost.ResultsPromise} The Transmission results array + */ + list(options?: { campaign_id?: string, template_id?: string }): SparkPost.ResultsPromise; /** * Retrieve the details about a transmission by its ID - * @param transmissionID The transmission id + * + * @param id The id of the transmission you want to look up * @param callback The request callback with Transmission results */ - find(transmissionID: string, callback: SparkPost.ResultsCallback): void; + get(transmissionID: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve the details about a transmission by its ID + * + * @param {string} id The id of the transmission you want to look up + * @returns {SparkPost.ResultsPromise} The Transmission results + */ + get(id: string): SparkPost.ResultsPromise; /** * Sends a message by creating a new transmission - * @param options The create options + * + * @param transmission an object of [transmission attributes]{@link https://developers.sparkpost.com/api/transmissions#header-transmission-attributes} + * @param options The create options. Specify maximum number of recipient errors returned * @param callback The request callback with metadata and id results */ - send(options: { transmissionBody: SparkPost.CreateTransmission, num_rcpt_errors?: number }, callback: SparkPost.ResultsCallback<{ + send(transmission: SparkPost.CreateTransmission, options: { num_rcpt_errors?: number }, callback: SparkPost.ResultsCallback<{ total_rejected_recipients: number; total_accepted_recipients: number; id: string; }>): void; + /** + * + * + * @param {SparkPost.CreateTransmission} transmission an object of [transmission attributes]{@link https://developers.sparkpost.com/api/transmissions#header-transmission-attributes} + * @param {SparkPost.ResultsCallback<{ + * total_rejected_recipients: number; + * total_accepted_recipients: number; + * id: string; + * }>} callback The request callback with metadata and id results + */ + send(transmission: SparkPost.CreateTransmission, callback: SparkPost.ResultsCallback<{ + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + }>): void; + /** + * Sends a message by creating a new transmission + * + * @param {SparkPost.CreateTransmission} transmission an object of [transmission attributes]{@link https://developers.sparkpost.com/api/transmissions#header-transmission-attributes} + * @param {{ num_rcpt_errors?: number }} [options] specify maximum number of recipient errors returned + * @returns {SparkPost.ResultsPromise<{ + * total_rejected_recipients: number; + * total_accepted_recipients: number; + * id: string; + * }>} The metadata and id results + */ + send(transmission: SparkPost.CreateTransmission, options?: { num_rcpt_errors?: number }): SparkPost.ResultsPromise<{ + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + }>; }; webhooks: { /** * List currently existing webhooks. * @param callback The request callback with RelayWebhook results array */ - all(callback: SparkPost.ResultsCallback>): void; + list(callback: SparkPost.ResultsCallback>): void; /** * List currently existing webhooks. * @param options Object containing optional timezone * @param callback The request callback with RelayWebhook results array */ - all(options: { timezone?: string }, callback: SparkPost.ResultsCallback>): void; + list(options: { timezone?: string }, callback: SparkPost.ResultsCallback>): void; + /** + * List currently existing webhooks.the timezone to use for the last_successful and last_failure properties | Default: UTC + * + * @param {{ timezone?: string }} [options] + * @returns {(SparkPost.ResultsPromise>)} + */ + list(options?: { timezone?: string }): SparkPost.ResultsPromise>; /** * Retrieve details about a specified webhook by its id + * + * @param {string} id The id of the webhook to get * @param options Object containing id and optional timezone * @param callback The request callback with RelayWebhook results */ - describe(options: { id: string, timezone?: string }, callback: SparkPost.ResultsCallback): void; + get(id: string, options: { timezone?: string }, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified webhook by its id + * + * @param {string} id The id of the webhook to get + * @param {(SparkPost.ResultsCallback)} callback The request callback with RelayWebhook results + */ + get(id: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified webhook by its id + * + * @param {string} id The id of the webhook to get + * @param {{ timezone?: string }} [options] the timezone to use for the last_successful and last_failure properties + * @returns {(SparkPost.ResultsPromise)} The RelayWebhook results + */ + get(id: string, options?: { timezone?: string }): SparkPost.ResultsPromise; /** * Create a new webhook - * @param options The create options + * + * @param options a hash of [webhook attributes]{@link https://developers.sparkpost.com/api/webhooks#header-webhooks-object-properties} * @param callback The request callback with webhook id results */ create(options: SparkPost.Webhook, callback: SparkPost.ResultsCallback): void; + /** + * Create a new webhook + * + * @param {SparkPost.Webhook} options a hash of [webhook attributes]{@link https://developers.sparkpost.com/api/webhooks#header-webhooks-object-properties} + * @returns {(SparkPost.ResultsPromise)} The webhook id results + */ + create(options: SparkPost.Webhook): SparkPost.ResultsPromise; /** * Update an existing webhook - * @param options The update options + * @param {string} id the id of the webhook to update + * @param options A hash of [webhook attribues]{@link https://developers.sparkpost.com/api/webhooks#header-webhooks-object-properties} * @param callback The request callback with webhook id results */ - update(options: SparkPost.UpdateWebhook, callback: SparkPost.ResultsCallback): void; + update(id: string, options: SparkPost.UpdateWebhook, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing webhook + * + * @param {string} id + * @param {SparkPost.UpdateWebhook} options + * @returns {(SparkPost.ResultsPromise)} + */ + update(id: string, options: SparkPost.UpdateWebhook): SparkPost.ResultsPromise; /** * Delete an existing webhook * @param id The webhook id * @param callback The request callback */ delete(id: string, callback: SparkPost.Callback): void; + /** + * Delete an existing webhook. + * + * @param {string} id The id of the webhook to delete + * @returns {Promise} + */ + delete(id: string): Promise; /** * Sends an example message event batch from the Webhook API to the target URL - * @param options The webhook id and message + * + * @param {string} id The id of the webhook to validate + * @param options the message (payload) to send to the webhook consumer * @param callback The request callback with validation results */ - validate(options: { id: string, message: any }, callback: SparkPost.ResultsCallback<{ + validate(id: string, options: { message: any }, callback: SparkPost.ResultsCallback<{ msg: string; response: { status: number; @@ -331,21 +731,86 @@ declare class SparkPost { } }>): void; /** - * Sends an example message event batch from the Webhook API to the target URL - * @param options The webhook id and optional limit + * Sends an example message event batch from the Webhook API to the target URL. + * + * @param {string} id The id of the webhook to validate + * @param {{ message: any }} options The message (payload) to send to the webhook consumer + * @returns {SparkPost.ResultsPromise<{ + * msg: string; + * response: { + * status: number; + * headers: any; + * body: string; + * } + * }>} The validation results + */ + validate(id: string, options: { message: any }): SparkPost.ResultsPromise<{ + msg: string; + response: { + status: number; + headers: any; + body: string; + } + }>; + /** + * Gets recent status information about a webhook. + * + * @param {string} id The id of the webhook + * @param options An optional limit that specifies the maximum number of results to return. Defaults to 1000 * @param callback The request callback with status results */ - getBatchStatus(options: { id: string, limit?: number }, callback: SparkPost.ResultsCallback<{ + getBatchStatus(id: string, options: { limit?: number }, callback: SparkPost.ResultsCallback<{ batch_id: string; ts: string; attempts: number; response_code: number; }[]>): void; + /** + * Gets recent status information about a webhook. + * + * @param {string} id The id of the webhook + * @param {SparkPost.ResultsCallback<{ + * batch_id: string; + * ts: string; + * attempts: number; + * response_code: number; + * }[]>} callback The request callback with status results + */ + getBatchStatus(id: string, callback: SparkPost.ResultsCallback<{ + batch_id: string; + ts: string; + attempts: number; + response_code: number; + }[]>): void; + /** + * Gets recent status information about a webhook. + * + * @param {string} id The id of the webhook + * @param {{ limit?: number }} Maximum number of results to return. Defaults to 1000 + * @returns {SparkPost.ResultsPromise<{ + * batch_id: string; + * ts: string; + * attempts: number; + * response_code: number; + * }[]>} The status results + */ + getBatchStatus(id: string, options: { limit?: number }): SparkPost.ResultsPromise<{ + batch_id: string; + ts: string; + attempts: number; + response_code: number; + }[]>; /** * Lists descriptions of the events, event types, and event fields that could be included in a Webhooks post to your target URL. - * @param callback The request callback containing documentation results + * @param callback The request callback containing documentation results */ getDocumentation(callback: SparkPost.ResultsCallback): void; + /** + * Lists descriptions of the events, event types, and event fields that could be included in a Webhooks post to your target URL. + * + * @returns {SparkPost.ResultsPromise} The documentation results + */ + getDocumentation(): SparkPost.ResultsPromise; /** * List an example of the event data that will be posted by a Webhook for the specified events. * @param callback The request callback containing examples @@ -357,6 +822,14 @@ declare class SparkPost { * @param callback The request callback containing examples */ getSamples(options: { events?: string }, callback: SparkPost.Callback): void; + /** + * List an example of the event data that will be posted by a Webhook for the specified events. + * + * @param {{ events?: string }} options [event types]{@link https://support.sparkpost.com/customer/portal/articles/1976204} for which to get a sample payload + * Default: all event types returned + * @returns {Promise>} + */ + getSamples(options?: { events?: string }): Promise>; }; /** @@ -367,10 +840,15 @@ declare class SparkPost { constructor(apiKey?: string, options?: SparkPost.ConstructorOptions); request(options: Request.Options, callback: SparkPost.Callback): void; + request(options: Request.Options): Promise>; get(options: Request.Options, callback: SparkPost.Callback): void; + get(options: Request.Options): Promise>; post(options: Request.Options, callback: SparkPost.Callback): void; + post(options: Request.Options): Promise>; put(options: Request.Options, callback: SparkPost.Callback): void; + put(options: Request.Options): Promise>; delete(options: Request.Options, callback: SparkPost.Callback): void; + delete(options: Request.Options): Promise>; } declare namespace SparkPost { @@ -405,6 +883,7 @@ declare namespace SparkPost { (err: Error | SparkPostError | null, res: Response): void; } export type ResultsCallback = Callback<{ results: T }>; + export type ResultsPromise = Promise<{ results: T }>; export interface Domain { domain: string; @@ -543,10 +1022,8 @@ declare namespace SparkPost { description?: string; /** Recipient list attribute object */ attributes?: any; - /** limit the number of recipient errors returned. */ - num_rcpt_errors?: number; /** Array of recipient objects */ - recipients?: Recipient[]; + recipients: Recipient[]; } export interface BaseRecipient { @@ -564,9 +1041,21 @@ declare namespace SparkPost { address: Address | string; } export interface RecipientWithMultichannelAddresses { - /** Address information for a recipient. At a minimum, address or multichannel_addresses is required. If both address and multichannel_addresses are specified only multichannel_addresses will be used. */ + /** + * Address information for a recipient. At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {(Address | string)} + * @memberOf RecipientWithMultichannelAddresses + */ address?: Address | string; - /** Array of Multichannel Address objects for a recipient. At a minimum, address or multichannel_addresses is required. If both address and multichannel_addresses are specified only multichannel_addresses will be used. */ + /** + * Array of Multichannel Address objects for a recipient. At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {MultichannelAddress[]} + * @memberOf RecipientWithMultichannelAddresses + */ multichannel_addresses: MultichannelAddress[]; } export type Recipient = (RecipientWithAddress | RecipientWithMultichannelAddresses) & BaseRecipient; @@ -610,7 +1099,7 @@ declare namespace SparkPost { /** User-friendly name no example: Inbound Customer Replies */ name?: string; /** URL of the target to which to POST relay batches */ - target?: string; + target: string; /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ auth_token?: string; /** Restrict which inbound messages will be relayed to the target */ @@ -661,8 +1150,6 @@ declare namespace SparkPost { } export interface UpdateSendingDomain { - /** Name of the sending domain. */ - domain: string; /** Associated tracking domain. */ tracking_domain?: string; /** JSON object in which DKIM key configuration is defined. */ @@ -704,9 +1191,49 @@ declare namespace SparkPost { } export interface VerifyOptions { - domain: string; - verifyDKIM?: boolean; - verifySPF?: boolean; + /** + * Request verification of DKIM record + * + * @type {boolean} + * @memberOf VerifyOptions + */ + dkim_verify?: boolean; + /** + * Request verification of SPF record + * + * @type {boolean} + * @deprecated + * @memberOf VerifyOptions + */ + spf_verify?: boolean; + /** + * Request an email with a verification link to be sent to the sending domain’s postmaster@ mailbox. + * + * @type {boolean} + * @memberOf VerifyOptions + */ + postmaster_at_verify?: boolean; + /** + * Request an email with a verification link to be sent to the sending domain’s abuse@ mailbox. + * + * @type {boolean} + * @memberOf VerifyOptions + */ + abuse_at_verify?: boolean; + /** + * A token retrieved from the verification link contained in the postmaster@ verification email. + * + * @type {string} + * @memberOf VerifyOptions + */ + postmaster_at_token?: string; + /** + * A token retrieved from the verification link contained in the abuse@ verification email. + * + * @type {string} + * @memberOf VerifyOptions + */ + abuse_at_token?: string; } export interface VerifyResults extends Status { @@ -720,13 +1247,13 @@ declare namespace SparkPost { /** user-friendly name */ name: string; /** user-friendly identifier for subaccount API key */ - keyLabel: string; + key_label: string; /** list of grants to give the subaccount API key */ - keyGrants: string[]; + key_grants: string[]; /** list of IPs the subaccount may be used from */ - keyValidIps?: string[]; + key_valid_ips?: string[]; /** id of the default IP pool assigned to subaccount"s transmissions */ - ipPool?: string; + ip_pool?: string; } export interface CreateSubaccountResponse { @@ -737,14 +1264,12 @@ declare namespace SparkPost { } export interface UpdateSubaccount { - /** the id of the subaccount you want to update */ - subaccountId: string | number; /** user-friendly name */ name: string; /** status of the subaccount */ status: string; /** id of the default IP pool assigned to subaccount"s transmissions */ - ipPool?: string; + ip_pool?: string; } export interface SubaccountInformation { @@ -760,41 +1285,149 @@ declare namespace SparkPost { } export interface CreateSupressionListEntry { + /** + * Email address to be suppressed + * + * @type {string} + * @memberOf CreateSupressionListEntry + */ recipient: string; - /** Whether the recipient requested to not receive any transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + /** + * Type of suppression record + * + * @type {("transactional" | "non_transactional")} + * @memberOf CreateSupressionListEntry + */ + type?: "transactional" | "non_transactional"; + /** + * Whether the recipient requested to not receive any non-transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf CreateSupressionListEntry + */ transactional?: boolean; - /** Whether the recipient requested to not receive any non-transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + /** + * Whether the recipient requested to not receive any non-transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf CreateSupressionListEntry + */ non_transactional?: boolean; + /** + * Source responsible for inserting the list entry + * no - entries created by the user are marked as Manually Added + * + * @type {("Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance")} + * @memberOf CreateSupressionListEntry + */ + readonly source?: "Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance"; /** Short explanation of the suppression */ description?: string; } export interface SupressionListEntry { + /** + * Email address to be suppressed + * + * @type {string} + * @memberOf SupressionListEntry + */ recipient: string; - /** Whether the recipient requested to not receive any transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + /** + * Whether the recipient requested to not receive any transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf SupressionListEntry + */ transactional?: boolean; - /** Whether the recipient requested to not receive any non-transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + /** + * Whether the recipient requested to not receive any non-transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf SupressionListEntry + */ non_transactional?: boolean; - /** Coming soon */ + /** Type of suppression record: transactional or non_transactional */ type?: "transactional" | "non_transactional"; - /** Source responsible for inserting the list entry. Valid values include: Spam Complaint, List Unsubscribe, Bounce Rule, Unsubscribe Link, Manually Added, Compliance. */ - source?: string; + /** + * Source responsible for inserting the list entry + * + * no - entries created by the user are marked as Manually Added + * + * @type {("Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance")} + * @memberOf SupressionListEntry + */ + source?: "Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance"; /** Short explanation of the suppression */ description?: string; created: string; updated: string; } - export interface SupressionSearch { + export interface SupressionSearchParameters { /** Datetime the entries were last updated, in the format of YYYY-MM-DDTHH:mm:ssZ */ to?: string; /** Datetime the entries were last updated, in the format YYYY-MM-DDTHH:mm:ssZ */ from?: string; + /** + * Domain of entries to include in the search. ( Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + domain?: string; + /** + * The results cursor location to return, to start paging with cursor, use the value of ‘initial’. + * When cursor is provided the page parameter is ignored. (Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + cursor?: string; + /** + * Maximum number of results to return per page. Must be between 1 and 10,000. + * ( Note: SparkPost only) + * @default 1000 + * @type {string} + * @memberOf SupressionSearch + */ + per_page?: string | number; + /** + * The results page number to return. Used with per_page for paging through results. + * The page parameter works up to 10,000 results. + * You must use the cursor parameter and start with cursor=initial to page result sets larger than 10,000 + * ( Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + page?: string | number; /** Types of entries to include in the search, i.e. entries with “transactional” and/or “non_transactional” keys set to true */ types?: string; /** Sources of the entries to include in the search, i.e. entries that were added by this source */ sources?: string; - /** Maximum number of results to return. Must be between 1 and 100000. Default value is 100000. */ + /** + * Description of the entries to include in the search, i.e descriptions that include the text submitted. + * ( Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + description?: string; + /** + * Maximum number of results to return per page. Must be between 1 and 10,000. + * @type {number} + * @deprecated use per_page instead + * @memberOf SupressionSearch + */ limit?: number; } @@ -805,7 +1438,13 @@ declare namespace SparkPost { text: string; /** Email subject line. */ subject: string; - /** Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. */ + /** + * Address "from" : "deals@company.com" or JSON object composed of the "name" and "email" fields. + * "from" : { "name" : "My Company", "email" : "deals@company.com" } used to compose the email’s "From" header. + * + * @type {(Address | string)} + * @memberOf TemplateContent + */ from: Address | string; /** Email address used to compose the email’s “Reply-To” header. */ reply_to?: string; @@ -820,7 +1459,13 @@ declare namespace SparkPost { text?: string; /** Email subject line. */ subject: string; - /** Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. */ + /** + * Address "from" : "deals@company.com" or JSON object composed of the "name" and "email" fields. + * "from" : { "name" : "My Company", "email" : "deals@company.com" } used to compose the email’s "From" header. + * + * @type {(Address | string)} + * @memberOf TemplateContent + */ from: Address | string; /** Email address used to compose the email’s “Reply-To” header. */ reply_to?: string; @@ -840,7 +1485,15 @@ declare namespace SparkPost { } export interface Template { - /** Short, unique, alphanumeric ID used to reference the template At a minimum, id or name is required upon creation. It is auto generated if not provided. After a template has been created, this property cannot be changed. Maximum length - 64 bytes */ + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. + * It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf Template + */ id: string; /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ content: TemplateContent | { email_rfc822: string }; @@ -859,7 +1512,15 @@ declare namespace SparkPost { } export interface CreateTemplate { - /** Short, unique, alphanumeric ID used to reference the template At a minimum, id or name is required upon creation. It is auto generated if not provided. After a template has been created, this property cannot be changed. Maximum length - 64 bytes */ + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. + * It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf CreateTemplate + */ id?: string; /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ content: CreateTemplateContent | { email_rfc822: string }; @@ -907,6 +1568,20 @@ declare namespace SparkPost { export interface CreateTransmission { /** JSON object in which transmission options are defined */ options?: TransmissionOptions; + /** + * Recipients to receive a carbon copy of the transmission + * + * @type {Recipient[]} + * @memberOf CreateTransmission + */ + cc?: Recipient[]; + /** + * Recipients to discreetly receive a carbon copy of the transmission + * + * @type {Recipient[]} + * @memberOf CreateTransmission + */ + bcc?: Recipient[]; /** Inline recipient objects or object containing stored recipient list ID */ recipients?: Recipient[] | { list_id: string }; /** Name of the campaign */ @@ -1011,11 +1686,25 @@ declare namespace SparkPost { } export interface Attachment { - /** The MIME type of the attachment; e.g., “text/plain”, “image/jpeg”, “audio/mp3”, “video/mp4”, “application/msword”, “application/pdf”, etc., including the “charset” parameter (text/html; charset=“UTF-8”) if needed. The value will apply “as-is” to the “Content-Type” header of the generated MIME part for the attachment. */ + /** + * The MIME type of the attachment; e.g., “text/plain”, “image/jpeg”, “audio/mp3”, “video/mp4”, “application/msword”, “application/pdf”, etc., + * including the “charset” parameter (text/html; charset=“UTF-8”) if needed. + * The value will apply “as-is” to the “Content-Type” header of the generated MIME part for the attachment. + * + * @type {string} + * @memberOf Attachment + */ type: string; /** The filename of the attachment (for example, “document.pdf”). This is inserted into the filename parameter of the Content-Disposition header. */ name: string; - /** The content of the attachment as a Base64 encoded string. The string should not contain \r\n line breaks. The SparkPost systems will add line breaks as necessary to ensure the Base64 encoded lines contain no more than 76 characters each. */ + /** + * The content of the attachment as a Base64 encoded string. + * The string should not contain \r\n line breaks. + * The SparkPost systems will add line breaks as necessary to ensure the Base64 encoded lines contain no more than 76 characters each. + * + * @type {string} + * @memberOf Attachment + */ data: string; } @@ -1026,6 +1715,14 @@ declare namespace SparkPost { target: string; /** Array of event types this webhook will receive */ events: string[]; + /** + * Reserved for future use + * + * @default {true} + * @type {boolean} + * @memberOf Webhook + */ + active?: boolean; /** Type of authentication to be used during POST requests to target */ auth_type?: string; /** Object containing details needed to request authorization credentials, as necessary */ @@ -1037,13 +1734,13 @@ declare namespace SparkPost { } export interface UpdateWebhook { - id: string; /** User-friendly name for webhook */ name?: string; /** URL of the target to which to POST event batches */ target?: string; /** Array of event types this webhook will receive */ events?: string[]; + active?: boolean; /** Type of authentication to be used during POST requests to target */ auth_type?: string; /** Object containing details needed to request authorization credentials, as necessary */ @@ -1061,6 +1758,16 @@ declare namespace SparkPost { method: string[]; }[]; } + + export interface CreateOpts { + /** + * Domain (or subdomain) name for which SparkPost will receive inbound emails + * + * @type {string} + * @memberOf CreateOpts + */ + domain: string; + } } export = SparkPost; diff --git a/sparkpost/sparkpost-tests.ts b/sparkpost/sparkpost-tests.ts index 9f7f47b44d..d3fef264f0 100644 --- a/sparkpost/sparkpost-tests.ts +++ b/sparkpost/sparkpost-tests.ts @@ -3,6 +3,7 @@ import * as SparkPost from "sparkpost"; let key = "YOURAPIKEY"; let client = new SparkPost(key); +// Callback client.get({ uri: "metrics/domains" }, function(err, data) { @@ -14,7 +15,19 @@ client.get({ console.log(data.body); }); -client.inboundDomains.create("example1.com", function(err, res) { +// Promise +client.get({ + uri: 'metrics/domains' +}) + .then(data => { + console.log(data); + }) + .catch(err => { + console.log(err); + }); + +// Callback +client.inboundDomains.create({ domain: 'example1.com' }, function(err, res) { if (err) { console.log(err); } else { @@ -23,6 +36,18 @@ client.inboundDomains.create("example1.com", function(err, res) { } }); +// Promise +client.inboundDomains.create({ domain: 'example1.com' }) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.inboundDomains.delete("example1.com", function(err, res) { if (err) { console.log(err); @@ -32,7 +57,19 @@ client.inboundDomains.delete("example1.com", function(err, res) { } }); -client.inboundDomains.find("example1.com", function(err, res) { +// Promise +client.inboundDomains.delete('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.inboundDomains.get("example1.com", function(err, res) { if (err) { console.log(err); } else { @@ -41,7 +78,19 @@ client.inboundDomains.find("example1.com", function(err, res) { } }); -client.inboundDomains.all(function(err, res) { +// Promise +client.inboundDomains.get('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.inboundDomains.list(function(err, res) { if (err) { console.log(err); } else { @@ -50,6 +99,18 @@ client.inboundDomains.all(function(err, res) { } }); +// Promise +client.inboundDomains.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.messageEvents.search({}, function(err, res) { if (err) { console.log(err); @@ -59,6 +120,7 @@ client.messageEvents.search({}, function(err, res) { } }); +// Callback client.messageEvents.search({ events: "click", campaign_ids: "monday_mailshot" @@ -71,6 +133,7 @@ client.messageEvents.search({ } }); +// Callback client.messageEvents.search({ from: "2016-01-01T00:00", to: "2016-01-02T23:59", @@ -87,6 +150,50 @@ client.messageEvents.search({ } }); +// Promise +client.messageEvents.search({ + events: 'click', + campaign_ids: 'monday_mailshot' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.messageEvents.search({}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.messageEvents.search({ + from: '2016-01-01T00:00', + to: '2016-01-02T23:59', + page: 1, + per_page: 5, + events: ['bounce', 'out_of_band'], + bounce_classes: [10] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.recipientLists.create({ id: "UNIQUE_TEST_ID", name: "Test Recipient List", @@ -114,6 +221,36 @@ client.recipientLists.create({ } }); +// Promise +client.recipientLists.create({ + id: "UNIQUE_TEST_ID", + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.recipientLists.delete("UNIQUE_TEST_ID", function(err, res) { if (err) { console.log(err); @@ -123,7 +260,19 @@ client.recipientLists.delete("UNIQUE_TEST_ID", function(err, res) { } }); -client.recipientLists.all(function(err, res) { +// Promise +client.recipientLists.delete('UNIQUE_TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.list(function(err, res) { if (err) { console.log(err); } else { @@ -132,9 +281,19 @@ client.recipientLists.all(function(err, res) { } }); -client.recipientLists.find({ - id: "UNIQUE_TEST_ID" -}, function(err, res) { +// Promise +client.recipientLists.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.get('UNIQUE_TEST_ID', function(err, res) { if (err) { console.log(err); } else { @@ -143,8 +302,8 @@ client.recipientLists.find({ } }); -client.recipientLists.find({ - id: "UNIQUE_TEST_ID", +// Callback +client.recipientLists.get('UNIQUE_TEST_ID', { show_recipients: true }, function(err, res) { if (err) { @@ -155,8 +314,32 @@ client.recipientLists.find({ } }); -client.recipientLists.update({ - id: "EXISTING_TEST_ID", +// Promise +client.recipientLists.get('UNIQUE_TEST_ID', { + show_recipients: true +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.recipientLists.get('UNIQUE_TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.update('EXISTING_TEST_ID', { name: "Test Recipient List", recipients: [ { @@ -182,6 +365,34 @@ client.recipientLists.update({ } }); +// Promise +client.recipientLists.update('EXISTING_TEST_ID', { + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log(err); + }); + +// Callback client.relayWebhooks.create({ name: "Test Relay Webhook", target: "http://client.test.com/test-webhook", @@ -197,6 +408,24 @@ client.relayWebhooks.create({ } }); +// Promise +client.relayWebhooks.create({ + name: 'Test Relay Webhook', + target: 'http://client.test.com/test-webhook', + match: { + domain: 'inbound.example.com' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.relayWebhooks.delete("123456789", function(err, res) { if (err) { console.log(err); @@ -206,7 +435,19 @@ client.relayWebhooks.delete("123456789", function(err, res) { } }); -client.relayWebhooks.find("123456789", function(err, res) { +// Promise +client.relayWebhooks.delete('123456789') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.relayWebhooks.get('123456789', function(err, res) { if (err) { console.log(err); } else { @@ -215,7 +456,18 @@ client.relayWebhooks.find("123456789", function(err, res) { } }); -client.relayWebhooks.all(function(err, res) { +// Promise +client.relayWebhooks.get('123456789') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +client.relayWebhooks.list(function(err, res) { if (err) { console.log(err); } else { @@ -224,8 +476,19 @@ client.relayWebhooks.all(function(err, res) { } }); -client.relayWebhooks.update({ - relayWebhookId: "123456789", +// Promise +client.relayWebhooks.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.relayWebhooks.update('123456789', { target: "http://client.test.com/test-webhook" }, function(err, res) { if (err) { @@ -236,11 +499,25 @@ client.relayWebhooks.update({ } }); +// Promise +client.relayWebhooks.update('123456789', { + target: 'http://client.test.com/test-webhook' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.sendingDomains.create({ domain: "example1.com", dkim: { - "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQABAoGBAITb3BCRPBi5lGhHdn+1RgC7cjUQEbSb4eFHm+ULRwQ0UIPWHwiVWtptZ09usHq989fKp1g/PfcNzm8c78uTS6gCxfECweFCRK6EdO6cCCr1cfWvmBdSjzYhODUdQeyWZi2ozqd0FhGWoV4VHseh4iLj36DzleTLtOZj3FhAo1WJAkEA68T+KkGeDyWwvttYtuSiQCCTrXYAWTQnkIUxduCp7Ap6tVeIDn3TaXTj74UbEgaNgLhjG4bX//fdeDW6PaK9YwJBAM6xJmwHLPMgwNVjiz3u/6fhY3kaZTWcxtMkXCjh1QE82KzDwqyrCg7EFjTtFysSHCAZxXZMcivGl4TZLHnydJUCQQCx16+M+mAatuiCnvxlQUMuMiSTNK6Amzm45u9v53nlZeY3weYMYFdHdfe1pebMiwrT7MI9clKebz6svYJVmdtXAkApDAc8VuR3WB7TgdRKNWdyGJGfoD1PO1ZE4iinOcoKV+IT1UCY99Kkgg6C7j62n/8T5OpRBvd5eBPpHxP1F9BNAkEA5Nf2VO9lcTetksHdIeKK+F7sio6UZn0Rv7iUo3ALrN1D1cGfWIh2dj3ko1iSreyNVSwGW0ePP27qDmU+u6/Y1g==", - "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQAB", + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", selector: "brisbane", headers: "from:to:subject:date" } @@ -253,7 +530,26 @@ client.sendingDomains.create({ } }); +// Promise +client.sendingDomains.create({ + domain: 'example1.com', + dkim: { + 'private': 'MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/==', + 'public': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==', + selector: 'brisbane', + headers: 'from:to:subject:date' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); +// Callback client.sendingDomains.delete("example1.com", function(err, data) { if (err) { console.log(err); @@ -263,7 +559,19 @@ client.sendingDomains.delete("example1.com", function(err, data) { } }); -client.sendingDomains.all(function(err, res) { +// Promise +client.sendingDomains.delete('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.list(function(err, res) { if (err) { console.log(err); } else { @@ -272,7 +580,19 @@ client.sendingDomains.all(function(err, res) { } }); -client.sendingDomains.find("example1.com", function(err, res) { +// Promise +client.sendingDomains.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.get('example1.com', function(err, res) { if (err) { console.log(err); } else { @@ -281,11 +601,22 @@ client.sendingDomains.find("example1.com", function(err, res) { } }); -client.sendingDomains.update({ - domain: "example1.com", +// Promise +client.sendingDomains.get('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.update('example1.com', { dkim: { - "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQABAoGBAITb3BCRPBi5lGhHdn+1RgC7cjUQEbSb4eFHm+ULRwQ0UIPWHwiVWtptZ09usHq989fKp1g/PfcNzm8c78uTS6gCxfECweFCRK6EdO6cCCr1cfWvmBdSjzYhODUdQeyWZi2ozqd0FhGWoV4VHseh4iLj36DzleTLtOZj3FhAo1WJAkEA68T+KkGeDyWwvttYtuSiQCCTrXYAWTQnkIUxduCp7Ap6tVeIDn3TaXTj74UbEgaNgLhjG4bX//fdeDW6PaK9YwJBAM6xJmwHLPMgwNVjiz3u/6fhY3kaZTWcxtMkXCjh1QE82KzDwqyrCg7EFjTtFysSHCAZxXZMcivGl4TZLHnydJUCQQCx16+M+mAatuiCnvxlQUMuMiSTNK6Amzm45u9v53nlZeY3weYMYFdHdfe1pebMiwrT7MI9clKebz6svYJVmdtXAkApDAc8VuR3WB7TgdRKNWdyGJGfoD1PO1ZE4iinOcoKV+IT1UCY99Kkgg6C7j62n/8T5OpRBvd5eBPpHxP1F9BNAkEA5Nf2VO9lcTetksHdIeKK+F7sio6UZn0Rv7iUo3ALrN1D1cGfWIh2dj3ko1iSreyNVSwGW0ePP27qDmU+u6/Y1g==", - "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQAB", + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/Y1g==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", selector: "hello_selector", headers: "from:to:subject:date" } @@ -298,8 +629,29 @@ client.sendingDomains.update({ } }); -client.sendingDomains.verify({ - domain: "example1.com" +client.sendingDomains.update('example1.com', { + dkim: { + 'private': 'MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/Y1g==', + 'public': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==', + selector: 'hello_selector', + headers: 'from:to:subject:date' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.verify('example1.com', { + dkim_verify: true, + spf_verify: true, + abuse_at_verify: true, + postmaster_at_verify: true }, function(err, res) { if (err) { console.log(err); @@ -309,9 +661,9 @@ client.sendingDomains.verify({ } }); -client.sendingDomains.verify({ - domain: "example1.com", - verifySPF: false +// Callback +client.sendingDomains.verify('example1.com', { + dkim_verify: false }, function(err, res) { if (err) { console.log(err); @@ -321,22 +673,27 @@ client.sendingDomains.verify({ } }); -client.sendingDomains.verify({ - domain: "example1.com", - verifyDKIM: false -}, function(err, res) { - if (err) { +// Promise +client.sendingDomains.verify('example1.com', { + dkim_verify: true, + spf_verify: true, + abuse_at_verify: true, + postmaster_at_verify: true +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); console.log(err); - } else { - console.log(res.body); - console.log("Congrats you can use our SDK!"); - } }); +// Callback client.subaccounts.create({ name: "Test Subaccount", - keyLabel: "Test Subaccount key", - keyGrants: [ + key_label: 'Test Subaccount key', + key_grants: [ "smtp/inject", "transmissions/modify" ] @@ -349,7 +706,26 @@ client.subaccounts.create({ } }); -client.subaccounts.all(function(err, res) { +// Promise +client.subaccounts.create({ + name: 'Test Subaccount', + key_label: 'Test Subaccount key', + key_grants: [ + 'smtp/inject', + 'transmissions/modify' + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.list(function(err, res) { if (err) { console.log(err); } else { @@ -358,7 +734,19 @@ client.subaccounts.all(function(err, res) { } }); -client.subaccounts.find(123, function(err, res) { +// Promise +client.subaccounts.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.get(123, function(err, res) { if (err) { console.log(err); } else { @@ -367,8 +755,19 @@ client.subaccounts.find(123, function(err, res) { } }); -client.subaccounts.update({ - subaccountId: 123, +// Promise +client.subaccounts.get('123') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.update('123', { name: "Test Subaccount", status: "suspended" }, function(err, res) { @@ -380,67 +779,199 @@ client.subaccounts.update({ } }); -client.suppressionList.checkStatus("test@test.com", function(err, res) { +// Promise +client.subaccounts.update('123', { + name: 'Test Subaccount', + status: 'suspended' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.suppressionList.delete('test@test.com', function(err, data) { if (err) { + console.log('Whoops! Something went wrong'); console.log(err); } else { - console.log(res.body); - console.log("Congrats you can use our client library!"); + console.log('Congrats you can use our client library!'); + console.log(data); } }); -client.suppressionList.removeStatus("test@test.com", function(err, res) { +// Promise +client.suppressionList.delete('test@test.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.suppressionList.get('test@test.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.suppressionList.get('test@test.com', function(err, data) { if (err) { + console.log('Whoops! Something went wrong'); console.log(err); } else { - console.log(res.body); - console.log("Congrats you can use our client library!"); + console.log('Congrats you can use our client library!'); + console.log(data); } }); -client.suppressionList.search({ - from: "2015-05-07T00:00:00+0000", - to: "2015-05-07T23:59:59+0000", - limit: 5 -}, function(err, res) { +// Promise +client.suppressionList.list({ + from: '2015-05-07T00:00:00+0000', + to: '2015-05-07T23:59:59+0000', + limit: 5 +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.suppressionList.list({ + from: '2015-05-07T00:00:00+0000', + to: '2015-05-07T23:59:59+0000', + limit: 5 +}, function(err, data) { if (err) { + console.log('Whoops! Something went wrong'); console.log(err); } else { - console.log(res.body); - console.log("Congrats you can use our client library!"); + console.log('Congrats you can use our client library!'); + console.log(data); } }); -client.suppressionList.upsert([ - { - recipient: "test1@test.com", +// Callback +client.suppressionList.list(function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Promise +client.suppressionList.upsert({ + recipient: 'test1@test.com', transactional: false, non_transactional: true, - description: "Test description 1" - }, - { - recipient: "test2@test.com", - transactional: true, + description: 'Test description 1' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.suppressionList.upsert({ + recipient: 'test1@test.com', + transactional: false, non_transactional: true, - description: "Test description 2" - }, - { - recipient: "test3@test.com", - transactional: true, - non_transactional: false, - description: "Test description 3" - } -], function(err, res) { + description: 'Test description 1' +}, function(err, data) { if (err) { + console.log('Whoops! Something went wrong'); console.log(err); } else { - console.log(res.body); - console.log("Congrats you can use our client library!"); + console.log('Congrats you can use our client library!'); + console.log(data); } }); +// Promise +client.suppressionList.upsert([ + { + recipient: 'test1@test.com', + transactional: false, + non_transactional: true, + description: 'Test description 1' + }, + { + recipient: 'test2@test.com', + transactional: true, + non_transactional: true, + description: 'Test description 2' + }, + { + recipient: 'test3@test.com', + transactional: true, + non_transactional: false, + description: 'Test description 3' + } +]) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.suppressionList.upsert([ + { + recipient: 'test1@test.com', + transactional: false, + non_transactional: true, + description: 'Test description 1' + }, + { + recipient: 'test2@test.com', + transactional: true, + non_transactional: true, + description: 'Test description 2' + }, + { + recipient: 'test3@test.com', + transactional: true, + non_transactional: false, + description: 'Test description 3' + } +], function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Callback client.templates.create({ - template: { id: "TEST_ID", name: "Test Template", content: { @@ -448,7 +979,6 @@ client.templates.create({ subject: "Test email template!", html: "This is a test email template!" } - } }, function(err, res) { if (err) { console.log(err); @@ -458,6 +988,26 @@ client.templates.create({ } }); +// Promise +client.templates.create({ + id: 'TEST_ID', + name: 'Test Template', + content: { + from: 'test@test.com', + subject: 'Test email template!', + html: 'This is a test email template!' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.templates.delete("TEST_ID", function(err, res) { if (err) { console.log(err); @@ -467,8 +1017,19 @@ client.templates.delete("TEST_ID", function(err, res) { } }); +// Promise +client.templates.delete('TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); -client.templates.all(function(err, res) { +// Callback +client.templates.list(function(err, res) { if (err) { console.log(err); } else { @@ -477,8 +1038,19 @@ client.templates.all(function(err, res) { } }); -client.templates.find({ - id: "TEST_ID", +// Promise +client.templates.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.get('TEST_ID', { draft: true }, function(err, res) { if (err) { @@ -489,8 +1061,30 @@ client.templates.find({ } }); -client.templates.find({ - id: "TEST_ID" +// Callback +client.templates.get('TEST_ID', function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.get('TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.preview('TEST_ID', { + substitution_data: {} }, function(err, res) { if (err) { console.log(err); @@ -500,29 +1094,33 @@ client.templates.find({ } }); -client.templates.preview({ - id: "TEST_ID", - data: {} -}, function(err, res) { - if (err) { +// Promise +client.templates.preview('TEST_ID', { + substitution_data: { + name: 'Natalie', + age: 35, + member: true + }, + draft: true +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); console.log(err); - } else { - console.log(res.body); - console.log("Congrats you can use our SDK!"); - } }); -client.templates.update({ - id: "TEST_ID", - template: { +// Callback +client.templates.update('TEST_ID', { content: { from: "test@test.com", subject: "Updated Published Test email template!", html: "This is a published test email template! Updated!" - } - }, - update_published: true -}, function(err, res) { + }, +}, { update_published: true }, +function(err, res) { if (err) { console.log(err); } else { @@ -531,15 +1129,13 @@ client.templates.update({ } }); -client.templates.update({ - id: "TEST_ID", - template: { +// Callback +client.templates.update('TEST_ID', { content: { from: "test@test.com", subject: "Updated Test email template!", html: "This is a test email template! Updated!" } - } }, function(err, res) { if (err) { console.log(err); @@ -549,7 +1145,25 @@ client.templates.update({ } }); -client.transmissions.all(function(err, res) { +// Promise +client.templates.update('TEST_ID', { + content: { + from: 'test@test.com', + subject: 'Updated Test email template!', + html: 'This is a test email template! Updated!' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.transmissions.list(function(err, res) { if (err) { console.log(err); } else { @@ -558,16 +1172,17 @@ client.transmissions.all(function(err, res) { } }); -client.transmissions.find("YOUR-TRANSMISSION-KEY", function(err, res) { - if (err) { +// Promise +client.transmissions.list() + .then(data => { + console.log(data); + console.log('Congrats you can use our client library!'); + }) + .catch(err => { console.log(err); - } else { - console.log(res.body); - console.log("Congrats you can use our SDK!"); - } -}); + }); -client.transmissions.all({ +client.transmissions.list({ campaign_id: "my_campaign" }, function(err, res) { if (err) { @@ -578,7 +1193,7 @@ client.transmissions.all({ } }); -client.transmissions.all({ +client.transmissions.list({ template_id: "my_template" }, function(err, res) { if (err) { @@ -589,8 +1204,29 @@ client.transmissions.all({ } }); +// Callback +client.transmissions.get("YOUR-TRANSMISSION-KEY", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.transmissions.get('YOUR-TRANSMISSION-KEY') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback client.transmissions.send({ - transmissionBody: { recipients: [{ address: { email: "john.doe@example.com" } }], content: { from: "From Envelope ", @@ -602,7 +1238,6 @@ client.transmissions.send({ open_tracking: true, click_tracking: true } - } }, function(err, res) { if (err) { console.log(err); @@ -612,13 +1247,12 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - transmissionBody: { recipients: [{address: {email: "john.doe@example.com"}}], content: { email_rfc822: "Content-Type: text/plain\nFrom: From Envelope \nSubject: Example Email\n\nHello World" } - } }, function(err, res) { if (err) { console.log(err); @@ -628,8 +1262,8 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - transmissionBody: { options: { open_tracking: true, click_tracking: true @@ -674,9 +1308,8 @@ client.transmissions.send({ "X-Customer-Campaign-ID": "christmas_campaign" }, text: "Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n Hurry, this offer is only to {{customer_type}}\n {{sender}}", - html: "

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    Hurry, this offer is only to {{customer_type}}\n

    {{sender}}

    " - } - } + html: "

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    " + } }, function(err, res) { if (err) { console.log(err); @@ -686,8 +1319,8 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - transmissionBody: { recipients: [ { address: { @@ -717,7 +1350,6 @@ client.transmissions.send({ text: "An example email using bcc with SparkPost to the {{recipient_type}} recipient.", html: "

    An example email using bcc with SparkPost to the {{recipient_type}} recipient.

    " } - } }, function(err, res) { if (err) { console.log(err); @@ -727,8 +1359,8 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - transmissionBody: { recipients: [ { address: { @@ -762,7 +1394,6 @@ client.transmissions.send({ text: "An example email using cc with SparkPost to the {{recipient_type}} recipient.", html: "

    An example email using cc with SparkPost to the {{recipient_type}} recipient.

    " } - } }, function(err, res) { if (err) { console.log(err); @@ -772,8 +1403,8 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - transmissionBody: { recipients: { list_id: "example-list" }, @@ -783,7 +1414,6 @@ client.transmissions.send({ html: "

    Hello World

    ", text: "Hello World!" } - } }, function(err, res) { if (err) { console.log(err); @@ -793,8 +1423,8 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - transmissionBody: { recipients: { list_id: "example-list" }, @@ -803,7 +1433,6 @@ client.transmissions.send({ subject: "Example Email for Stored List and Template", template_id: "my-template" } - } }, function(err, res) { if (err) { console.log(err); @@ -813,15 +1442,15 @@ client.transmissions.send({ } }); +// Callback client.transmissions.send({ - num_rcpt_errors: 3, - transmissionBody: { campaign_id: "ricks-campaign", content: { template_id: "ricks-template" }, recipients: [{ address: { email: "rick.sanchez@rickandmorty100years.com", name: "Rick Sanchez" } }] - } +}, { + num_rcpt_errors: 3 }, function(err, res) { if (err) { console.log(err); @@ -831,6 +1460,111 @@ client.transmissions.send({ } }); + +// Promise +client.transmissions.send({ + options: { + open_tracking: true, + click_tracking: true + }, + campaign_id: 'christmas_campaign', + metadata: { + user_type: 'students' + }, + substitution_data: { + sender: 'Big Store Team' + }, + cc: [], + bcc: [], + recipients: [ + { + address: { + email: 'wilma@flintstone.com', + name: 'Wilma Flintstone' + }, + tags: [ + 'greeting', + 'prehistoric', + 'fred', + 'flintstone' + ], + metadata: { + place: 'Bedrock' + }, + substitution_data: { + customer_type: 'Platinum' + } + } + ], + content: { + from: { + name: 'Fred Flintstone', + email: 'fred@flintstone.com' + }, + subject: 'Big Christmas savings!', + reply_to: 'Christmas Sales ', + headers: { + 'X-Customer-Campaign-ID': 'christmas_campaign' + }, + text: 'Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n Hurry, this offer is only to {{customer_type}}\n {{sender}}', + html: '

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    ' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.transmissions.send({ + recipients: [ + { + address: { + email: 'original.recipient@example.com', + name: 'Original Recipient' + }, + substitution_data: { + recipient_type: 'Original' + } + }, + { + address: { + email: 'cc.recipient@example.com', + name: 'Carbon Copy Recipient', + header_to: '"Original Recipient" ' + }, + substitution_data: { + recipient_type: 'CC' + } + } + ], + content: { + from: { + name: 'Node CC Test', + email: 'from@example.com' + }, + headers: { + 'CC': '"Carbon Copy Recipient" ' + }, + subject: 'Example email using cc', + text: 'An example email using cc with SparkPost to the {{recipient_type}} recipient.', + html: '

    An example email using cc with SparkPost to the {{recipient_type}} recipient.

    ' + } +}) + .then(data => { + console.log('Congrats! You sent an email with cc using SparkPost!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.webhooks.create({ name: "Test webhook", target: "http://client.test.com/test-webhook", @@ -850,6 +1584,28 @@ client.webhooks.create({ } }); +// Promise +client.webhooks.create({ + name: 'Test Webhook', + target: 'http://client.test.com/test-webhook', + auth_token: 'AUTH_TOKEN', + events: [ + 'delivery', + 'injection', + 'open', + 'click' + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.webhooks.delete("TEST_WEBHOOK_UUID", function(err, res) { if (err) { console.log(err); @@ -859,20 +1615,45 @@ client.webhooks.delete("TEST_WEBHOOK_UUID", function(err, res) { } }); -client.webhooks.describe({ - id: "TEST_WEBHOOK_UUID", - timezone: "America/New_York" -}, function(err, res) { +// Promise +client.webhooks.delete('TEST_WEBHOOK_UUID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.webhooks.get('TEST_WEBHOOK_UUID', { + timezone: 'America/New_York' +}, function(err, data) { if (err) { + console.log('Whoops! Something went wrong'); console.log(err); } else { - console.log(res.body); - console.log("Congrats you can use our SDK!"); + console.log('Congrats you can use our client library!'); + console.log(data); } }); -client.webhooks.getBatchStatus({ - id: "TEST_WEBHOOK_UUID", +// Promise +client.webhooks.get('TEST_WEBHOOK_UUID', { + timezone: 'America/New_York' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.webhooks.getBatchStatus('TEST_WEBHOOK_UUID', { limit: 1000 }, function(err, res) { if (err) { @@ -883,7 +1664,20 @@ client.webhooks.getBatchStatus({ } }); +// Promise +client.webhooks.getBatchStatus('TEST_WEBHOOK_UUID', { + limit: 1000 +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); +// Callback client.webhooks.getDocumentation(function(err, res) { if (err) { console.log(err); @@ -893,6 +1687,18 @@ client.webhooks.getDocumentation(function(err, res) { } }); +// Promise +client.webhooks.getDocumentation() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback client.webhooks.getSamples({ events: "bounce" }, function(err, res) { @@ -904,7 +1710,21 @@ client.webhooks.getSamples({ } }); -client.webhooks.all(function(err, res) { +// Promise +client.webhooks.getSamples({ + events: 'bounce' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.list(function(err, res) { if (err) { console.log(err); } else { @@ -913,8 +1733,19 @@ client.webhooks.all(function(err, res) { } }); -client.webhooks.update({ - id: "TEST_WEBHOOK_UUID", +// Promise +client.webhooks.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.update('TEST_WEBHOOK_UUID', { name: "Renamed Test webhook", events: [ "policy_rejection", @@ -929,8 +1760,25 @@ client.webhooks.update({ } }); -client.webhooks.validate({ - id: "TEST_WEBHOOK_UUID", +// Promise +client.webhooks.update('TEST_WEBHOOK_UUID', { + name: 'Renamed Test Webhook', + events: [ + 'policy_rejection', + 'delay' + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.validate('TEST_WEBHOOK_UUID', { message: { msys: {} } @@ -942,3 +1790,18 @@ client.webhooks.validate({ console.log("Congrats you can use our SDK!"); } }); + +// Promise +client.webhooks.validate('TEST_WEBHOOK_UUID', { + message: { + msys: {} + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); diff --git a/sparkpost/tsconfig.json b/sparkpost/tsconfig.json index 0ef33f26af..e40a56608b 100644 --- a/sparkpost/tsconfig.json +++ b/sparkpost/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,4 +19,4 @@ "index.d.ts", "sparkpost-tests.ts" ] -} \ No newline at end of file +} diff --git a/sparkpost/tslint.json b/sparkpost/tslint.json new file mode 100644 index 0000000000..e77aa7b0ee --- /dev/null +++ b/sparkpost/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "../tslint.json", + "rules": { + "only-arrow-functions-2": [ + false + ] + } +} diff --git a/sparkpost/v1/index.d.ts b/sparkpost/v1/index.d.ts new file mode 100644 index 0000000000..b12f3712ab --- /dev/null +++ b/sparkpost/v1/index.d.ts @@ -0,0 +1,1119 @@ +// Type definitions for sparkpost v1.3 +// Project: https://github.com/SparkPost/node-sparkpost +// Definitions by: Joshua DeVinney +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as Request from "request"; +import * as Http from "http"; + +declare class SparkPost { + /** Specifying an inbound domain enables you to customize the address to which inbound messages are sent. */ + inboundDomains: { + /** + * List all your inbound domains. + * @param callback The request callback with Domain results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * Retrieve an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @param callback The request callback with Domain results + */ + find(domain: string, callback: SparkPost.ResultsCallback): void; + /** + * Create an inbound domain by providing an inbound domains object as the POST request body. + * @param domain Domain name + * @param callback The request callback + */ + create(domain: string, callback: SparkPost.Callback): void; + /** + * Delete an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @param callback The request callback + */ + delete(domain: string, callback: SparkPost.Callback): void; + }; + /** The Message Events API provides the means to search the raw events generated by SparkPost. */ + messageEvents: { + /** + * Retrieves list of message events according to given params + * @param parameters Query parameters + * @param callback The request callback with MessageEvent results array + */ + search(parameters: SparkPost.MessageEventParameters, callback: SparkPost.ResultsCallback): void; + }; + /** A recipient list is a collection of recipients that can be used in a transmission. */ + recipientLists: { + /** + * List a summary of all recipient lists. The recipients for each list are not included in the results. + * To retrieve recipient details, use the RETRIEVE API for a specified recipient list. + * @param callback The request callback with RecipientList results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified recipient list by specifying its id in the URI path. + * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. + * @param options The find options + * @param callback The request callback with RecipientList results + */ + find(options: { id: string, show_recipients?: false }, callback: SparkPost.Callback): void; + /** + * Retrieve details about a specified recipient list by specifying its id in the URI path. + * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. + * @param options The find options + * @param callback The request callback with RecipientList results (with recipients) + */ + find(options: { id: string, show_recipients: true }, callback: SparkPost.Callback): void; + /** + * Create a recipient list by providing a recipient list object as the POST request body. + * At a minimum, the “recipients” array is required, which must contain a valid “address”. + * If the recipient list “id” is not provided in the POST request body, one will be generated and returned in the results body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * @param options The create options + * @param callback The request callback with metadata results + */ + create(options: SparkPost.CreateRecipientList, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing recipient list by specifying its ID in the URI path and use a recipient list object as the PUT request body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * @param options The update options + * @param callback The request callback with metadata results + */ + update(options: SparkPost.UpdateRecipientList, callback: SparkPost.ResultsCallback): void; + /** + * Permanently delete the specified recipient list. + * @param id The list id + * @param callback The request callback + */ + delete(id: string, callback: SparkPost.Callback): void; + }; + /** Relay Webhooks are a way to instruct SparkPost to accept inbound email on your behalf and forward it to you over HTTP for your own consumption. */ + relayWebhooks: { + /** + * List all your relay webhooks. + * @param callback The request callback with RelayWebhook results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @param callback The request callback with RelayWebhook results + */ + find(relayWebhookId: string, callback: SparkPost.ResultsCallback): void; + /** + * Create a relay webhook by providing a relay webhooks object as the POST request body. + * @param options The create options + * @param callback The request callback with webhook id results + */ + create(options: SparkPost.RelayWebhook, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update a relay webhook by specifying the webhook ID in the URI path. + * @param options The update options + * @param callback The request callback with webhook id results + */ + update(options: SparkPost.UpdateRelayWebhook & { relayWebhookId: string }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @param callback The request callback + */ + delete(relayWebhookId: string, callback: SparkPost.Callback): void; + }; + sendingDomains: { + /** + * List an overview of all sending domains in the system. + * @param callback The request callback with SendingDomain results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * Retrieve a sending domain by specifying its domain name in the URI path. The response includes details about its DKIM key configuration. + * @param domain The domain + * @param callback The request callback with SendingDomain results + */ + find(domain: string, callback: SparkPost.ResultsCallback): void; + /** + * Create a sending domain by providing a sending domain object as the POST request body. + * @param options The create options + * @param callback The request callback with basic info results + */ + create(options: SparkPost.CreateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + /** + * Update the attributes of an existing sending domain by specifying its domain name in the URI path and use a sending domain object as the PUT request body. + * @param options The update options + * @param callback The request callback with basic info results + */ + update(options: SparkPost.UpdateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + /** + * Delete an existing sending domain. + * @param domain The domain + * @param callback The request callback + */ + delete(domain: string, callback: SparkPost.Callback): void; + /** + * Verify a Sending Domain + * @param options The verify options + * @param callback The request callback with verify results + */ + verify(options: SparkPost.VerifyOptions, callback: SparkPost.ResultsCallback): void; + }; + subaccounts: { + /** + * Endpoint for retrieving a list of your subaccounts. + * This endpoint only returns information about the subaccounts themselves, not the data associated with the subaccount. + * @param callback The request callback with subaccount information results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * + * @param subaccountId The webhook id + * @param callback The request callback with subaccount information results + */ + find(subaccountId: string | number, callback: SparkPost.ResultsCallback): void; + /** + * Provisions a new subaccount and an initial subaccount API key. + * @param options The create options + * @param callback The request callback with basic subaccount information results + */ + create(options: SparkPost.CreateSubaccount, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing subaccount’s information. + * @param options The create options + * @param callback The request callback with webhook id results + */ + update(options: SparkPost.UpdateSubaccount, callback: SparkPost.ResultsCallback<{ message: string }>): void; + }; + suppressionList: { + /** + * Perform a filtered search for entries in your suppression list. + * @param parameters Object of search parameters + * @param callback The request callback with RelayWebhook results + */ + search(parameters: SparkPost.SupressionSearch, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve the suppression status for a specific recipient by specifying the recipient’s email address in the URI path. + * @param email Email address to check + * @param callback The request callback with webhook id results + */ + checkStatus(email: string, callback: SparkPost.ResultsCallback): void; + /** + * Delete a recipient from the list by specifying the recipient’s email address in the URI path. + * @param email Email address to check + * @param callback The request callback + */ + removeStatus(email: string, callback: SparkPost.Callback): void; + /** + * Bulk insert or update entries in the customer-specific exclusion list. + * @param parameters The suppression entry list + * @param callback The request callback + */ + upsert(parameters: SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[], callback: SparkPost.ResultsCallback<{ message: string }>): void; + }; + templates: { + /** + * List a summary of all templates. + * @param callback The request callback with TemplateMeta results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified template by its id + * @param options The id and draft status information + * @param callback The request callback with Template results + */ + find(options: { id: string, draft?: boolean }, callback: SparkPost.ResultsCallback): void; + /** + * Create a new template + * @param options The create options + * @param callback The request callback with template id results + */ + create(options: { template: SparkPost.CreateTemplate }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update an existing template + * @param options The create options + * @param callback The request callback with template id results + */ + update(options: { + id: string, + template: SparkPost.UpdateTemplate, + update_published?: boolean; + }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Delete an existing template + * @param id The template id + * @param callback The request callback + */ + delete(id: string, callback: SparkPost.Callback): void; + /** + * Preview the most recent version of an existing template by id + * @param options The preview options + * @param callback The request callback with webhook id results + */ + preview(options: { id: string, data: any, draft?: boolean }, callback: SparkPost.ResultsCallback): void; + }; + transmissions: { + /** + * List an overview of all transmissions in the account + * @param callback The request callback with Transmission results array + */ + all(callback: SparkPost.ResultsCallback): void; + /** + * List an overview of all transmissions in the account, with added filters + * @param options The search options { campaign_id?, template_id? } + * @param callback The request callback with Transmission results array + */ + all(options: { campaign_id?: string, template_id?: string }, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve the details about a transmission by its ID + * @param transmissionID The transmission id + * @param callback The request callback with Transmission results + */ + find(transmissionID: string, callback: SparkPost.ResultsCallback): void; + /** + * Sends a message by creating a new transmission + * @param options The create options + * @param callback The request callback with metadata and id results + */ + send(options: { transmissionBody: SparkPost.CreateTransmission, num_rcpt_errors?: number }, callback: SparkPost.ResultsCallback<{ + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + }>): void; + }; + webhooks: { + /** + * List currently existing webhooks. + * @param callback The request callback with RelayWebhook results array + */ + all(callback: SparkPost.ResultsCallback>): void; + /** + * List currently existing webhooks. + * @param options Object containing optional timezone + * @param callback The request callback with RelayWebhook results array + */ + all(options: { timezone?: string }, callback: SparkPost.ResultsCallback>): void; + /** + * Retrieve details about a specified webhook by its id + * @param options Object containing id and optional timezone + * @param callback The request callback with RelayWebhook results + */ + describe(options: { id: string, timezone?: string }, callback: SparkPost.ResultsCallback): void; + /** + * Create a new webhook + * @param options The create options + * @param callback The request callback with webhook id results + */ + create(options: SparkPost.Webhook, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing webhook + * @param options The update options + * @param callback The request callback with webhook id results + */ + update(options: SparkPost.UpdateWebhook, callback: SparkPost.ResultsCallback): void; + /** + * Delete an existing webhook + * @param id The webhook id + * @param callback The request callback + */ + delete(id: string, callback: SparkPost.Callback): void; + /** + * Sends an example message event batch from the Webhook API to the target URL + * @param options The webhook id and message + * @param callback The request callback with validation results + */ + validate(options: { id: string, message: any }, callback: SparkPost.ResultsCallback<{ + msg: string; + response: { + status: number; + headers: any; + body: string; + } + }>): void; + /** + * Sends an example message event batch from the Webhook API to the target URL + * @param options The webhook id and optional limit + * @param callback The request callback with status results + */ + getBatchStatus(options: { id: string, limit?: number }, callback: SparkPost.ResultsCallback<{ + batch_id: string; + ts: string; + attempts: number; + response_code: number; + }[]>): void; + /** + * Lists descriptions of the events, event types, and event fields that could be included in a Webhooks post to your target URL. + * @param callback The request callback containing documentation results + */ + getDocumentation(callback: SparkPost.ResultsCallback): void; + /** + * List an example of the event data that will be posted by a Webhook for the specified events. + * @param callback The request callback containing examples + */ + getSamples(callback: SparkPost.Callback): void; + /** + * List an example of the event data that will be posted by a Webhook for the specified events. + * @param options The optional event name + * @param callback The request callback containing examples + */ + getSamples(options: { events?: string }, callback: SparkPost.Callback): void; + }; + + /** + * The official Node.js binding for your favorite SparkPost APIs! + * @param apiKey A passed in apiKey will take precedence over an environment variable + * @param options Additional options + */ + constructor(apiKey?: string, options?: SparkPost.ConstructorOptions); + + request(options: Request.Options, callback: SparkPost.Callback): void; + get(options: Request.Options, callback: SparkPost.Callback): void; + post(options: Request.Options, callback: SparkPost.Callback): void; + put(options: Request.Options, callback: SparkPost.Callback): void; + delete(options: Request.Options, callback: SparkPost.Callback): void; +} + +declare namespace SparkPost { + + export interface ErrorWithDescription { + message: string; + code: string; + description: string; + } + export interface ErrorWithParam { + message: string; + param: string; + value: string | null; + } + export interface SparkPostError extends Error { + name: "SparkPostError"; + errors: ErrorWithDescription[] | ErrorWithParam[]; + statusCode: number; + } + + export interface ConstructorOptions { + origin?: string; + endpoint?: string; + apiVersion?: string; + headers?: any; + } + + export interface Response extends Http.IncomingMessage { + body: T; + } + export interface Callback { + (err: Error | SparkPostError | null, res: Response): void; + } + export type ResultsCallback = Callback<{ results: T }>; + + export interface Domain { + domain: string; + } + + export interface MessageEvent { + /** Type of event this record describes */ + type: string; + /** Classification code for a given message (see [Bounce Classification Codes](https://support.sparkpost.com/customer/portal/articles/1929896)) */ + bounce_class: string; + /** Campaign of which this message was a part */ + campaign_id: string; + /** SparkPost-customer identifier through which this message was sent */ + customer_id: string; + /** Protocol by which SparkPost delivered this message */ + delv_method: string; + /** Token of the device / application targeted by this PUSH notification message. Applies only when delv_method is gcm or apn. */ + device_token: string; + /** Error code by which the remote server described a failed delivery attempt */ + error_code: string; + /** IP address of the host to which SparkPost delivered this message; in engagement events, the IP address of the host where the HTTP request originated */ + ip_address: string; + /** SparkPost-cluster-wide unique identifier for this message */ + message_id: string; + /** Sender address used on this message"s SMTP envelope */ + msg_from: string; + /** Message"s size in bytes */ + msg_size: string; + /** Number of failed attempts before this message was successfully delivered; when the first attempt succeeds, zero */ + num_retries: string; + /** Metadata describing the message recipient */ + rcpt_meta: any; + /** Tags applied to the message which generated this event */ + rcpt_tags: string[]; + /** Recipient address used on this message"s SMTP envelope */ + rcpt_to: string; + /** Indicates that a recipient address appeared in the Cc or Bcc header or the archive JSON array */ + rcpt_type: string; + /** Unmodified, exact response returned by the remote server due to a failed delivery attempt */ + raw_reason: string; + /** Canonicalized text of the response returned by the remote server due to a failed delivery attempt */ + reason: string; + /** Domain receiving this message */ + routing_domain: string; + /** Subject line from the email header */ + subject: string; + /** Slug of the template used to construct this message */ + template_id: string; + /** Version of the template used to construct this message */ + template_version: string; + /** Event date and time formatted as: YYYY-MM-DDTHH:MM:SS.SSS±hh:mm */ + timestamp: string; + /** Transmission which originated this message */ + transmission_id: string; + } + + export interface MessageEventParameters { + /** delimited list of bounce classification codes to search. (See Bounce Classification Codes.) */ + bounce_classes?: Array | string | number; + /** delimited list of campaign ID’s to search (i.e. the campaign id used during creation of a transmission). */ + campaign_ids?: string[] | string; + /** Specifies the delimiter for query parameter lists */ + delimiter?: string; + /** delimited list of event types to search. Defaults to all event types. */ + events?: string[] | string; + /** delimited list of friendly from emails to search. */ + friendly_froms?: string[] | string; + /** Datetime in format of YYYY-MM-DDTHH:MM. */ + from?: string; + /** delimited list of message ID’s to search. */ + message_ids?: string[] | string; + /** The results page number to return. Used with per_page for paging through results. */ + page?: number; + /** Number of results to return per page. Must be between 1 and 10,000 (inclusive). */ + per_page?: number; + /** Bounce/failure/rejection reason that will be matched using a wildcard (e.g., %reason%). */ + reason?: string[] | string; + /** delimited list of recipients to search. */ + recipients?: string[] | string; + /** delimited list of subaccount ID’s to search. */ + subaccounts?: number[] | number; + /** delimited list of template ID’s to search. */ + template_ids?: string[] | string; + /** Standard timezone identification string. */ + timezone?: string; + /** Datetime in format of YYYY-MM-DDTHH:MM. */ + to?: string; + /** delimited list of transmission ID’s to search (i.e. id generated during creation of a transmission). */ + transmission_ids?: string[] | string; + } + + export interface RecipientListMetadata { + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + name: string; + } + + export interface RecipientList { + /** Short, unique, recipient list identifier */ + id: string; + /** Short, pretty/readable recipient list display name, not required to be unique */ + name: string; + /** Detailed description of the recipient list */ + description: string; + /** Recipient list attribute object */ + attributes: any; + /** Number of accepted recipients */ + total_accepted_recipients: number; + } + export interface RecipientListWithRecipients extends RecipientList { + /** Array of recipient objects */ + recipients: Recipient[]; + } + + export interface CreateRecipientList { + /** Short, unique, recipient list identifier */ + id?: string; + /** Short, pretty/readable recipient list display name, not required to be unique */ + name?: string; + /** Detailed description of the recipient list */ + description?: string; + /** Recipient list attribute object */ + attributes?: any; + /** limit the number of recipient errors returned. */ + num_rcpt_errors?: number; + /** Array of recipient objects */ + recipients: Recipient[]; + } + export interface UpdateRecipientList { + /** Short, unique, recipient list identifier */ + id?: string; + /** Short, pretty/readable recipient list display name, not required to be unique */ + name?: string; + /** Detailed description of the recipient list */ + description?: string; + /** Recipient list attribute object */ + attributes?: any; + /** limit the number of recipient errors returned. */ + num_rcpt_errors?: number; + /** Array of recipient objects */ + recipients?: Recipient[]; + } + + export interface BaseRecipient { + /** SparkPost Enterprise API only. Email to use for envelope FROM. */ + return_path?: string; + /** Array of text labels associated with a recipient. */ + tags?: string[]; + /** Key/value pairs associated with a recipient. */ + metadata?: any; + /** Key/value pairs associated with a recipient that are provided to the substitution engine. */ + substitution_data?: any; + } + export interface RecipientWithAddress { + /** Address information for a recipient At a minimum, address or multichannel_addresses is required. */ + address: Address | string; + } + export interface RecipientWithMultichannelAddresses { + /** + * Address information for a recipient. + * At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {(Address | string)} + * @memberOf RecipientWithMultichannelAddresses + */ + address?: Address | string; + /** + * Array of Multichannel Address objects for a recipient. + * At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {MultichannelAddress[]} + * @memberOf RecipientWithMultichannelAddresses + */ + multichannel_addresses: MultichannelAddress[]; + } + export type Recipient = (RecipientWithAddress | RecipientWithMultichannelAddresses) & BaseRecipient; + + export interface Address { + /** Valid email address */ + email: string; + /** User-friendly name for the email address */ + name?: string; + /** Email address to display in the “To” header instead of address.email (for CC and BCC) */ + header_to?: string; + } + + export interface MultichannelAddress { + /** The communication channel used to reach recipient. Valid values are “email”, “gcm”, “apns”. */ + channel: string; + /** Valid email address. Required if channel is “email”. */ + email: string; + /** User-friendly name for the email address. Used when channel is “email” */ + name: string; + /** Email address to display in the “To” header instead of address.email (for BCC). Used when channel is “email” */ + header_to: string; + /** SparkPost Enterprise API only. Required if channel is “gcm” or “apns” */ + token: string; + /** SparkPost Enterprise API only. Required if channel is “gcm” or “apns” */ + app_id: string; + } + + export interface RelayWebhook { + /** User-friendly name no example: Inbound Customer Replies */ + name?: string; + /** URL of the target to which to POST relay batches */ + target: string; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + /** Restrict which inbound messages will be relayed to the target */ + match: Match; + } + + export interface UpdateRelayWebhook { + /** User-friendly name no example: Inbound Customer Replies */ + name?: string; + /** URL of the target to which to POST relay batches */ + target?: string; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + /** Restrict which inbound messages will be relayed to the target */ + match?: Match; + } + + export interface Match { + /** Inbound messaging protocol associated with this webhook. Defaults to “SMTP” */ + protocol?: string; + /** Inbound domain associated with this webhook. Required when protocol is “SMTP”. */ + domain?: string; + /** ESME address binding associated with this webhook yes, when protocol is “SMPP”. SparkPost Enterprise API only. */ + esme_address?: string; + } + + export interface SendingDomain { + /** Name of the sending domain. */ + domain: string; + /** Associated tracking domain. */ + tracking_domain: string; + /** JSON object containing status details, including whether this domain’s ownership has been verified. */ + status: Status; + /** JSON object in which DKIM key configuration is defined. */ + dkim?: DKIM; + /** Whether to generate a DKIM keypair on creation. */ + generate_dkim?: boolean; + /** Size, in bits, of the DKIM private key to be generated. This option only applies if generate_dkim is ‘true’. */ + dkim_key_length?: number; + /** Setting to true allows this domain to be used by subaccounts. Defaults to false, only available to domains belonging to a master account. */ + shared_with_subaccounts: boolean; + } + + export interface CreateSendingDomain { + /** Name of the sending domain. */ + domain: string; + /** Associated tracking domain. */ + tracking_domain?: string; + /** JSON object containing status details, including whether this domain’s ownership has been verified. */ + status?: Status; + /** JSON object in which DKIM key configuration is defined. */ + dkim?: DKIM; + /** Whether to generate a DKIM keypair on creation. */ + generate_dkim?: boolean; + /** Size, in bits, of the DKIM private key to be generated. This option only applies if generate_dkim is ‘true’. */ + dkim_key_length?: number; + /** Setting to true allows this domain to be used by subaccounts. Defaults to false, only available to domains belonging to a master account. */ + shared_with_subaccounts?: boolean; + } + + export interface UpdateSendingDomain { + /** Name of the sending domain. */ + domain: string; + /** Associated tracking domain. */ + tracking_domain?: string; + /** JSON object in which DKIM key configuration is defined. */ + dkim?: DKIM; + /** Whether to generate a DKIM keypair on creation. */ + generate_dkim?: boolean; + /** Size, in bits, of the DKIM private key to be generated. This option only applies if generate_dkim is ‘true’. */ + dkim_key_length?: number; + /** Setting to true allows this domain to be used by subaccounts. Defaults to false, only available to domains belonging to a master account. */ + shared_with_subaccounts?: boolean; + } + + export interface DKIM { + /** Signing Domain Identifier (SDID). SparkPost Enterprise API only. */ + signing_domain?: string; + /** DKIM private key. */ + private?: string; + /** DKIM public key. */ + public: string; + /** DomainKey selector. */ + selector: string; + /** Header fields to be included in the DKIM signature. This field is currently ignored. */ + headers?: string; + } + + export interface Status { + /** Whether domain ownership has been verified */ + ownership_verified: boolean; + /** Verification status of SPF configuration */ + spf_status: "valid" | "invalid" | "unverified" | "pending"; + /** Compliance status */ + compliance_status: "valid" | "pending" | "blocked"; + /** Verification status of DKIM configuration */ + dkim_status: "valid" | "invalid" | "unverified" | "pending"; + /** Verification status of abuse@ mailbox */ + abuse_at_status: "valid" | "invalid" | "unverified" | "pending"; + /** Verification status of postmaster@ mailbox */ + postmaster_at_status: "valid" | "invalid" | "unverified" | "pending"; + } + + export interface VerifyOptions { + domain: string; + verifyDKIM?: boolean; + verifySPF?: boolean; + } + + export interface VerifyResults extends Status { + dns?: { + dkim_record: string; + spf_record: string; + }; + } + + export interface CreateSubaccount { + /** user-friendly name */ + name: string; + /** user-friendly identifier for subaccount API key */ + keyLabel: string; + /** list of grants to give the subaccount API key */ + keyGrants: string[]; + /** list of IPs the subaccount may be used from */ + keyValidIps?: string[]; + /** id of the default IP pool assigned to subaccount"s transmissions */ + ipPool?: string; + } + + export interface CreateSubaccountResponse { + subaccount_id: number; + key: string; + label: string; + short_key: string; + } + + export interface UpdateSubaccount { + /** the id of the subaccount you want to update */ + subaccountId: string | number; + /** user-friendly name */ + name: string; + /** status of the subaccount */ + status: string; + /** id of the default IP pool assigned to subaccount"s transmissions */ + ipPool?: string; + } + + export interface SubaccountInformation { + /** ID of subaccount */ + id: number; + /** User friendly identifier for a specific subaccount */ + name: string; + /** Status of the account */ + status: "active" | "suspended" | "terminated"; + /** The ID of the default IP Pool assigned to this subaccount’s transmissions */ + ip_pool?: string; + compliance_status: string; + } + + export interface CreateSupressionListEntry { + recipient: string; + /** Whether the recipient requested to not receive any transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + transactional?: boolean; + /** Whether the recipient requested to not receive any non-transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + non_transactional?: boolean; + /** Short explanation of the suppression */ + description?: string; + } + + export interface SupressionListEntry { + recipient: string; + /** Whether the recipient requested to not receive any transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + transactional?: boolean; + /** Whether the recipient requested to not receive any non-transactional messages. At a minimum, transactional or non_transactional is required upon creation of the entry. */ + non_transactional?: boolean; + /** Coming soon */ + type?: "transactional" | "non_transactional"; + /** Source responsible for inserting the list entry. Valid values include: Spam Complaint, List Unsubscribe, Bounce Rule, Unsubscribe Link, Manually Added, Compliance. */ + source?: string; + /** Short explanation of the suppression */ + description?: string; + created: string; + updated: string; + } + + export interface SupressionSearch { + /** Datetime the entries were last updated, in the format of YYYY-MM-DDTHH:mm:ssZ */ + to?: string; + /** Datetime the entries were last updated, in the format YYYY-MM-DDTHH:mm:ssZ */ + from?: string; + /** Types of entries to include in the search, i.e. entries with “transactional” and/or “non_transactional” keys set to true */ + types?: string; + /** Sources of the entries to include in the search, i.e. entries that were added by this source */ + sources?: string; + /** Maximum number of results to return. Must be between 1 and 100000. Default value is 100000. */ + limit?: number; + } + + export interface TemplateContent { + /** HTML content for the email’s text/html MIME part */ + html: string; + /** Text content for the email’s text/plain MIME part */ + text: string; + /** Email subject line. */ + subject: string; + /** + * Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields + * “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. + * + * @type {(Address | string)} + * @memberOf CreateTemplateContent + */ + from: Address | string; + /** Email address used to compose the email’s “Reply-To” header. */ + reply_to?: string; + /** JSON dictionary containing headers other than “Subject”, “From”, “To”, and “Reply-To”. */ + headers?: any; + } + + export interface CreateTemplateContent { + /** HTML content for the email’s text/html MIME part */ + html?: string; + /** Text content for the email’s text/plain MIME part */ + text?: string; + /** Email subject line. */ + subject: string; + /** + * Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields + * “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. + * + * @type {(Address | string)} + * @memberOf CreateTemplateContent + */ + from: Address | string; + /** Email address used to compose the email’s “Reply-To” header. */ + reply_to?: string; + /** JSON dictionary containing headers other than “Subject”, “From”, “To”, and “Reply-To”. */ + headers?: any; + } + + export interface TemplateMeta { + /** Unique template ID */ + id: string; + /** Template name */ + name: string; + /** Published state of the template (true = published, false = draft) */ + published: boolean; + /** Template description */ + description: string; + } + + export interface Template { + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf CreateTemplate + */ + id: string; + /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ + content: TemplateContent | { email_rfc822: string }; + /** Whether the template is published or is a draft version no - defaults to false A template cannot be changed from published to draft. */ + published: boolean; + /** Editable display name At a minimum, id or name is required upon creation. The name does not have to be unique. Maximum length - 1024 bytes */ + name: string; + /** Detailed description of the template no Maximum length - 1024 bytes */ + description: string; + /** JSON object in which template options are defined no For a full description, see the Options Attributes. */ + options: TemplateOptions; + /** The “last_update_time” is the time the template was last updated, for both draft and published versions */ + last_update_time: string; + /** The “last_use” time represents the last time any version of this template was used (draft or published). */ + last_use?: string; + } + + export interface CreateTemplate { + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf CreateTemplate + */ + id?: string; + /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ + content: CreateTemplateContent | { email_rfc822: string }; + /** Whether the template is published or is a draft version no - defaults to false A template cannot be changed from published to draft. */ + published?: boolean; + /** Editable display name At a minimum, id or name is required upon creation. The name does not have to be unique. Maximum length - 1024 bytes */ + name?: string; + /** Detailed description of the template no Maximum length - 1024 bytes */ + description?: string; + /** JSON object in which template options are defined no For a full description, see the Options Attributes. */ + options?: CreateTemplateOptions; + } + + export interface UpdateTemplate { + /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ + content?: CreateTemplateContent | { email_rfc822: string }; + /** Whether the template is published or is a draft version no - defaults to false A template cannot be changed from published to draft. */ + published?: boolean; + /** Editable display name At a minimum, id or name is required upon creation. The name does not have to be unique. Maximum length - 1024 bytes */ + name?: string; + /** Detailed description of the template no Maximum length - 1024 bytes */ + description?: string; + /** JSON object in which template options are defined no For a full description, see the Options Attributes. */ + options?: CreateTemplateOptions; + } + + export interface TemplateOptions { + /** Enable or disable open tracking */ + open_tracking: boolean; + /** Enable or disable click tracking */ + click_tracking: boolean; + /** Distinguish between transactional and non-transactional messages for unsubscribe and suppression purposes */ + transactional: boolean; + } + + export interface CreateTemplateOptions { + /** Enable or disable open tracking */ + open_tracking?: boolean; + /** Enable or disable click tracking */ + click_tracking?: boolean; + /** Distinguish between transactional and non-transactional messages for unsubscribe and suppression purposes */ + transactional?: boolean; + } + + export interface CreateTransmission { + /** JSON object in which transmission options are defined */ + options?: TransmissionOptions; + /** Inline recipient objects or object containing stored recipient list ID */ + recipients?: Recipient[] | { list_id: string }; + /** Name of the campaign */ + campaign_id?: string; + /** Description of the transmission */ + description?: string; + /** Transmission level metadata containing key/value pairs */ + metadata?: any; + /** Key/value pairs that are provided to the substitution engine */ + substitution_data?: any; + /** SparkPost Enterprise API only: email to use for envelope FROM */ + return_path?: string; + /** Content that will be used to construct a message */ + content: InlineContent | { template_id: string, use_draft_template?: boolean } | { email_rfc822: string }; + } + + export interface TransmissionSummary { + /** ID of the transmission */ + id: string; + /** State of the transmission */ + state: "submitted" | "Generating" | "Success" | "Canceled"; + /** Description of the transmission */ + description: string; + /** Name of the campaign */ + campaign_id: string; + /** Content that will be used to construct a message */ + content: { template_id: string }; + } + + export interface Transmission { + /** ID of the transmission */ + id: string; + /** State of the transmission */ + state: "submitted" | "Generating" | "Success" | "Canceled"; + /** JSON object in which transmission options are defined */ + options: TransmissionOptions; + /** Name of the campaign */ + campaign_id: string; + /** Description of the transmission */ + description: string; + /** Transmission level metadata containing key/value pairs */ + metadata: any; + /** Key/value pairs that are provided to the substitution engine */ + substitution_data: any; + /** Content that will be used to construct a message */ + content: InlineContent | { template_id: string, use_draft_template?: boolean } | { email_rfc822: string }; + /** Computed total number of messages generated */ + num_generated: number; + /** Computed total number of failed messages */ + num_failed_generation: number; + /** Number of recipients that failed input validation */ + num_invalid_recipients: number; + rcpt_list_chunk_size: number; + rcpt_list_total_chunks: number; + } + + export interface TransmissionOptions { + /** Delay generation of messages until this datetime. */ + start_time?: string; + /** Whether open tracking is enabled for this transmission */ + open_tracking?: boolean; + /** Whether click tracking is enabled for this transmission */ + click_tracking?: boolean; + /** Whether message is transactional or non-transactional for unsubscribe and suppression purposes */ + transactional?: boolean; + /** Whether or not to use the sandbox sending domain */ + sandbox?: boolean; + /** SparkPost Enterprise API only: Whether or not to ignore customer suppression rules, for this transmission only. Only applicable if your configuration supports this parameter. */ + skip_suppression?: boolean; + /** The ID of a dedicated IP pool associated with your account ( Note: SparkPost only ). */ + ip_pool?: string; + /** Whether or not to perform CSS inlining in HTML content */ + inline_css?: boolean; + } + + export interface InlineContent { + /** HTML content for the email’s text/html MIME part At a minimum, html, text, or push is required. */ + html?: string; + /** Text content for the email’s text/plain MIME part At a minimum, html, text, or push is required. */ + text?: string; + /** Content of push notifications At a minimum, html, text, or push is required. SparkPost Enterprise API only. */ + push?: PushData; + /** Email subject line required for email transmissions Expected in the UTF-8 charset without RFC2047 encoding. Substitution syntax is supported. */ + subject?: string; + /** "deals@company.com" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header */ + from?: string | { email: string, name: string }; + /** Email address used to compose the email’s “Reply-To” header */ + reply_to?: string; + /** JSON dictionary containing headers other than “Subject”, “From”, “To”, and “Reply-To” */ + headers?: any; + /** JSON array of attachments. */ + attachments?: Attachment[]; + /** JSON array of inline images. */ + inline_images?: Attachment[]; + } + + export interface PushData { + /** payload for APNs messages */ + apns?: any; + /** payload for GCM messages */ + gcm?: any; + } + + export interface Attachment { + /** + * The MIME type of the attachment; e.g., “text/plain”, “image/jpeg”, “audio/mp3”, “video/mp4”, “application/msword”, “application/pdf”, etc., + * including the “charset” parameter (text/html; charset=“UTF-8”) if needed. + * The value will apply “as-is” to the “Content-Type” header of the generated MIME part for the attachment. + * + * @type {string} + * @memberOf Attachment + */ + type: string; + /** The filename of the attachment (for example, “document.pdf”). This is inserted into the filename parameter of the Content-Disposition header. */ + name: string; + /** + * The content of the attachment as a Base64 encoded string. + * The string should not contain \r\n line breaks. + * The SparkPost systems will add line breaks as necessary to ensure the Base64 encoded lines contain no more than 76 characters each. + * + * @type {string} + * @memberOf Attachment + */ + data: string; + } + + export interface Webhook { + /** User-friendly name for webhook */ + name: string; + /** URL of the target to which to POST event batches */ + target: string; + /** Array of event types this webhook will receive */ + events: string[]; + /** Type of authentication to be used during POST requests to target */ + auth_type?: string; + /** Object containing details needed to request authorization credentials, as necessary */ + auth_request_details?: any; + /** Object containing credentials needed to make authorized POST requests to target */ + auth_credentials?: any; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + } + + export interface UpdateWebhook { + id: string; + /** User-friendly name for webhook */ + name?: string; + /** URL of the target to which to POST event batches */ + target?: string; + /** Array of event types this webhook will receive */ + events?: string[]; + /** Type of authentication to be used during POST requests to target */ + auth_type?: string; + /** Object containing details needed to request authorization credentials, as necessary */ + auth_request_details?: any; + /** Object containing credentials needed to make authorized POST requests to target */ + auth_credentials?: any; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + } + + export interface WebhookLinks { + links: { + href: string; + rel: string; + method: string[]; + }[]; + } +} + +export = SparkPost; diff --git a/sparkpost/v1/sparkpost-tests.ts b/sparkpost/v1/sparkpost-tests.ts new file mode 100644 index 0000000000..0b8a41ab0a --- /dev/null +++ b/sparkpost/v1/sparkpost-tests.ts @@ -0,0 +1,944 @@ +import * as SparkPost from "sparkpost"; + +let key = "YOURAPIKEY"; +let client = new SparkPost(key); + +client.get({ + uri: "metrics/domains" +}, function(err, data) { + if (err) { + console.log(err); + return; + } + + console.log(data.body); +}); + +client.inboundDomains.create("example1.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.inboundDomains.delete("example1.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.inboundDomains.find("example1.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.inboundDomains.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.messageEvents.search({}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.messageEvents.search({ + events: "click", + campaign_ids: "monday_mailshot" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.messageEvents.search({ + from: "2016-01-01T00:00", + to: "2016-01-02T23:59", + page: 1, + per_page: 5, + events: ["bounce", "out_of_band"], + bounce_classes: [10] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.recipientLists.create({ + id: "UNIQUE_TEST_ID", + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.recipientLists.delete("UNIQUE_TEST_ID", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.recipientLists.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.recipientLists.find({ + id: "UNIQUE_TEST_ID" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.recipientLists.find({ + id: "UNIQUE_TEST_ID", + show_recipients: true +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.recipientLists.update({ + id: "EXISTING_TEST_ID", + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.relayWebhooks.create({ + name: "Test Relay Webhook", + target: "http://client.test.com/test-webhook", + match: { + domain: "inbound.example.com" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.relayWebhooks.delete("123456789", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.relayWebhooks.find("123456789", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.relayWebhooks.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.relayWebhooks.update({ + relayWebhookId: "123456789", + target: "http://client.test.com/test-webhook" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.sendingDomains.create({ + domain: "example1.com", + dkim: { + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC//Y1g==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", + selector: "brisbane", + headers: "from:to:subject:date" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + + +client.sendingDomains.delete("example1.com", function(err, data) { + if (err) { + console.log(err); + } else { + console.log(data); + console.log("Congrats you can use our client library!"); + } +}); + +client.sendingDomains.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.sendingDomains.find("example1.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.sendingDomains.update({ + domain: "example1.com", + dkim: { + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx//Y1g==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", + selector: "hello_selector", + headers: "from:to:subject:date" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.sendingDomains.verify({ + domain: "example1.com" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.sendingDomains.verify({ + domain: "example1.com", + verifySPF: false +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.sendingDomains.verify({ + domain: "example1.com", + verifyDKIM: false +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.subaccounts.create({ + name: "Test Subaccount", + keyLabel: "Test Subaccount key", + keyGrants: [ + "smtp/inject", + "transmissions/modify" + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res); + console.log("Congrats you can use our client library!"); + } +}); + +client.subaccounts.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.subaccounts.find(123, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.subaccounts.update({ + subaccountId: 123, + name: "Test Subaccount", + status: "suspended" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.suppressionList.checkStatus("test@test.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.suppressionList.removeStatus("test@test.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.suppressionList.search({ + from: "2015-05-07T00:00:00+0000", + to: "2015-05-07T23:59:59+0000", + limit: 5 +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.suppressionList.upsert([ + { + recipient: "test1@test.com", + transactional: false, + non_transactional: true, + description: "Test description 1" + }, + { + recipient: "test2@test.com", + transactional: true, + non_transactional: true, + description: "Test description 2" + }, + { + recipient: "test3@test.com", + transactional: true, + non_transactional: false, + description: "Test description 3" + } +], function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +client.templates.create({ + template: { + id: "TEST_ID", + name: "Test Template", + content: { + from: "test@test.com", + subject: "Test email template!", + html: "This is a test email template!" + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.templates.delete("TEST_ID", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + + +client.templates.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.templates.find({ + id: "TEST_ID", + draft: true +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.templates.find({ + id: "TEST_ID" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.templates.preview({ + id: "TEST_ID", + data: {} +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.templates.update({ + id: "TEST_ID", + template: { + content: { + from: "test@test.com", + subject: "Updated Published Test email template!", + html: "This is a published test email template! Updated!" + } + }, + update_published: true +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.templates.update({ + id: "TEST_ID", + template: { + content: { + from: "test@test.com", + subject: "Updated Test email template!", + html: "This is a test email template! Updated!" + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.find("YOUR-TRANSMISSION-KEY", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.all({ + campaign_id: "my_campaign" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.all({ + template_id: "my_template" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + recipients: [{ address: { email: "john.doe@example.com" } }], + content: { + from: "From Envelope ", + subject: "Example Email for MIME Parts", + html: "

    Hello World!

    ", + text: "Hello World!" + }, + options: { + open_tracking: true, + click_tracking: true + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + recipients: [{address: {email: "john.doe@example.com"}}], + content: { + email_rfc822: "Content-Type: text/plain\nFrom: From Envelope \nSubject: Example Email\n\nHello World" + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + options: { + open_tracking: true, + click_tracking: true + }, + campaign_id: "christmas_campaign", + return_path: "bounces-christmas-campaign@flintstone.com", + metadata: { + user_type: "students" + }, + substitution_data: { + sender: "Big Store Team" + }, + recipients: [ + { + return_path: "123@bounces.flintstone.com", + address: { + email: "wilma@flintstone.com", + name: "Wilma Flintstone" + }, + tags: [ + "greeting", + "prehistoric", + "fred", + "flintstone" + ], + metadata: { + place: "Bedrock" + }, + substitution_data: { + customer_type: "Platinum" + } + } + ], + content: { + from: { + name: "Fred Flintstone", + email: "fred@flintstone.com" + }, + subject: "Big Christmas savings!", + reply_to: "Christmas Sales ", + headers: { + "X-Customer-Campaign-ID": "christmas_campaign" + }, + text: "Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n Hurry, this offer is only to {{customer_type}}\n {{sender}}", + html: "

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    " + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + recipients: [ + { + address: { + email: "original.recipient@example.com", + name: "Original Recipient" + }, + substitution_data: { + recipient_type: "Original" + } + }, + { + address: { + email: "bcc.recipient@example.com", + header_to: "\"Original Recipient\" " + }, + substitution_data: { + recipient_type: "BCC" + } + } + ], + content: { + from: { + name: "Node BCC Test", + email: "from@example.com" + }, + subject: "Example email using bcc", + text: "An example email using bcc with SparkPost to the {{recipient_type}} recipient.", + html: "

    An example email using bcc with SparkPost to the {{recipient_type}} recipient.

    " + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats! You sent an email with bcc using SparkPost!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + recipients: [ + { + address: { + email: "original.recipient@example.com", + name: "Original Recipient" + }, + substitution_data: { + recipient_type: "Original" + } + }, + { + address: { + email: "cc.recipient@example.com", + name: "Carbon Copy Recipient", + header_to: "\"Original Recipient\" " + }, + substitution_data: { + recipient_type: "CC" + } + } + ], + content: { + from: { + name: "Node CC Test", + email: "from@example.com" + }, + headers: { + "CC": "\"Carbon Copy Recipient\" " + }, + subject: "Example email using cc", + text: "An example email using cc with SparkPost to the {{recipient_type}} recipient.", + html: "

    An example email using cc with SparkPost to the {{recipient_type}} recipient.

    " + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats! You sent an email with cc using SparkPost!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + recipients: { + list_id: "example-list" + }, + content: { + from: "From Envelope ", + subject: "Example Email for Stored List and Inline Content", + html: "

    Hello World

    ", + text: "Hello World!" + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.send({ + transmissionBody: { + recipients: { + list_id: "example-list" + }, + content: { + from: "From Envelope ", + subject: "Example Email for Stored List and Template", + template_id: "my-template" + } + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.send({ + num_rcpt_errors: 3, + transmissionBody: { + campaign_id: "ricks-campaign", + content: { + template_id: "ricks-template" + }, + recipients: [{ address: { email: "rick.sanchez@rickandmorty100years.com", name: "Rick Sanchez" } }] + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("What up my glib globs! SparkPost!"); + } +}); + +client.webhooks.create({ + name: "Test webhook", + target: "http://client.test.com/test-webhook", + auth_token: "AUTH_TOKEN", + events: [ + "delivery", + "injection", + "open", + "click" + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.delete("TEST_WEBHOOK_UUID", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.describe({ + id: "TEST_WEBHOOK_UUID", + timezone: "America/New_York" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.getBatchStatus({ + id: "TEST_WEBHOOK_UUID", + limit: 1000 +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + + +client.webhooks.getDocumentation(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.getSamples({ + events: "bounce" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.all(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.update({ + id: "TEST_WEBHOOK_UUID", + name: "Renamed Test webhook", + events: [ + "policy_rejection", + "delay" + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.webhooks.validate({ + id: "TEST_WEBHOOK_UUID", + message: { + msys: {} + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); diff --git a/sparkpost/v1/tsconfig.json b/sparkpost/v1/tsconfig.json new file mode 100644 index 0000000000..54f30b3435 --- /dev/null +++ b/sparkpost/v1/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "sparkpost": ["sparkpost/v1"], + "sparkpost/*": ["sparkpost/v1/*"] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sparkpost-tests.ts" + ] +} diff --git a/spatialite/tsconfig.json b/spatialite/tsconfig.json index ddcef0c7ac..a432ff2004 100644 --- a/spatialite/tsconfig.json +++ b/spatialite/tsconfig.json @@ -19,4 +19,4 @@ "index.d.ts", "spatialite-tests.ts" ] -} \ No newline at end of file +} diff --git a/speakeasy/index.d.ts b/speakeasy/index.d.ts index 15ec90c09a..4e281f996f 100644 --- a/speakeasy/index.d.ts +++ b/speakeasy/index.d.ts @@ -49,6 +49,7 @@ interface TotpOptions { counter?: number; epoch?: number; secret?: string; + digits?: number; digest?: () => string; algorithm?: string; } diff --git a/speakingurl/index.d.ts b/speakingurl/index.d.ts index 289c1eb033..83e38fd7b8 100644 --- a/speakingurl/index.d.ts +++ b/speakingurl/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for speakingurl 10.0 +// Type definitions for speakingurl 13.0 // Project: http://pid.github.io/speakingurl/ // Definitions by: Zlatko Andonovski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,7 +7,7 @@ interface Dictionary { [x: string]: T; } -interface Options { +interface SpeakingURLOptions { separator?: string; lang?: string|boolean; symbols?: boolean; @@ -20,10 +20,10 @@ interface Options { custom?: string[]|Dictionary; } -declare function getSlug(input: string, options?: Options|string): string; +declare function getSlug(input: string, options?: SpeakingURLOptions|string): string; declare namespace getSlug { - export function createSlug(options: Options): (input: string) => string; + export function createSlug(options: SpeakingURLOptions): (input: string) => string; } -export = getSlug; \ No newline at end of file +export = getSlug; diff --git a/spectrum/spectrum-tests.ts b/spectrum/spectrum-tests.ts index e9bf388bbe..e52bd36ce9 100644 --- a/spectrum/spectrum-tests.ts +++ b/spectrum/spectrum-tests.ts @@ -1,6 +1,3 @@ -/// - - $("#picker").spectrum(); $("#picker").spectrum({ diff --git a/split/split-tests.ts b/split/split-tests.ts index 204a044b68..98308fbc10 100644 --- a/split/split-tests.ts +++ b/split/split-tests.ts @@ -1,6 +1,3 @@ - -/// - import stream = require("stream"); import split = require("split"); diff --git a/sql.js/sql.js-tests.ts b/sql.js/sql.js-tests.ts index 0829f7692a..52f44c7438 100644 --- a/sql.js/sql.js-tests.ts +++ b/sql.js/sql.js-tests.ts @@ -1,6 +1,3 @@ -/// - - import fs = require("fs"); import * as SQL from "sql.js"; diff --git a/ss-utils/ss-utils-tests.ts b/ss-utils/ss-utils-tests.ts index 71934fed54..9bbd30da9a 100644 --- a/ss-utils/ss-utils-tests.ts +++ b/ss-utils/ss-utils-tests.ts @@ -1,6 +1,3 @@ -/// - - declare var EventSource : ssutils.IEventSourceStatic; function test_ssutils() { @@ -13,7 +10,7 @@ function test_ssutils() { onHeartbeat: function(msg:ssutils.SSEHeartbeat, e:MessageEvent){}, onJoin: function(msg:ssutils.SSEJoin) {}, onLeave: function(msg:ssutils.SSELeave) {}, - onUpdate: function(msg:ssutils.SSEUpdate) {} + onUpdate: function(msg:ssutils.SSEUpdate) {} }, receivers: { tv: { @@ -26,7 +23,7 @@ function test_ssutils() { announce: function (msg:string) {} }) .on('customEvent', function (e, msg, msgEvent) { }); - + $.ss.handlers["changeChannel"]("home"); } @@ -39,7 +36,7 @@ function test_jQuery_functions(){ overrideMessages: true, messages: {"NotFound": "Not Found"}, errorFilter: function(errorMsg, errorCode, type){} - }); + }); $("form").applyValues({ "Key": "Value" }); @@ -58,8 +55,8 @@ function test_ssutils_Static(){ dateFmt = $.ss.dfmt(new Date(2001,1,1)); dateFmt = $.ss.dfmthm(new Date(2001,1,1)); dateFmt = $.ss.tfmt12(new Date(2001,1,1)); - var parts:string[] = $.ss.splitOnFirst("A;B;C",";"); - parts = $.ss.splitOnLast("A;B;C", ";"); + var parts:string[] = $.ss.splitOnFirst("A;B;C",";"); + parts = $.ss.splitOnLast("A;B;C", ";"); var selectedText = $.ss.getSelection(); var qs:{ [index: string]: string } = $.ss.queryString("http://google.com?a=b&c=d"); var relativePath = $.ss.createUrl("/path/to/{File}", {File:"file.js"}); @@ -69,7 +66,7 @@ function test_ssutils_Static(){ $.ss.normalize({"AA":1,"bB":2,"C":{"A":11,"B":22},"D":[1,2],"E":[{"A":111,"B":222}]}, true); $.ss.parseResponseStatus('{"message":"test"}'); $.ss.postJSON("/path/to/url", {json:"data"}, function(r:any) {}); - + $.ss.listenOn = "click onmousedown"; $.ss.eventReceivers = { "document": document }; $.ss.handlers["changeChannel"]("home"); diff --git a/stamplay-js-sdk/index.d.ts b/stamplay-js-sdk/index.d.ts index 53f57ad86c..81f20d8c95 100644 --- a/stamplay-js-sdk/index.d.ts +++ b/stamplay-js-sdk/index.d.ts @@ -1,35 +1,27 @@ -// Type definitions for stamplay-js-sdk 1.2.9 +// Type definitions for stamplay-js-sdk 1.2 // Project: https://github.com/Stamplay/stamplay-js-sdk // Definitions by: Riderman de Sousa Barbosa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare namespace Stamplay { + export function init(appId: string): void; + export function User(): StamplayObject; + export function Cobject(object: string): StamplayObject; - export interface IStamplayModel { - signup({}) : PromisesAPlus.Thenable - new() : IStamplayModel - get(property : string) : any - set(property : string, value: any) : void - unset(property : string) : void - fetch(id : any) : PromisesAPlus.Thenable - destroy() : PromisesAPlus.Thenable - save({}?) : PromisesAPlus.Thenable - upVote() : PromisesAPlus.Thenable + export interface Model { + signup({}): Promise; + new(): Model; // This is suspicious, but tests show model instances being constructable... + get(property: string): any; + set(property: string, value: any): void; + unset(property: string) : void; + fetch(id: any) : Promise; + destroy(): Promise; + save({}?): Promise; + upVote(): Promise; } - export interface IStamplayObject { - Model : IStamplayModel - Collection : any - - } - - export interface StamplayStatic { - init(appId : string) : void; - User() : IStamplayObject - Cobject(object : string) : IStamplayObject + export interface StamplayObject { + Model: Model; + Collection : any; } } - -declare var Stamplay: Stamplay.StamplayStatic; diff --git a/stamplay-js-sdk/stamplay-js-sdk-tests.ts b/stamplay-js-sdk/stamplay-js-sdk-tests.ts index d9a4247e03..9dddc1b242 100644 --- a/stamplay-js-sdk/stamplay-js-sdk-tests.ts +++ b/stamplay-js-sdk/stamplay-js-sdk-tests.ts @@ -11,26 +11,24 @@ var registrationData = { password: 'mySecret' }; -user.signup(registrationData).then(function(){ - user.set('phoneNumber', '020 123 4567' ); - return user.save(); - }).then(function(){ - var number = user.get('phoneNumber'); - console.log(number); // number value is 020 123 4567 - }); +user.signup(registrationData).then(() => { + user.set('phoneNumber', '020 123 4567' ); + return user.save(); +}).then(() => { + var number = user.get('phoneNumber'); + console.log(number); // number value is 020 123 4567 +}); // Action var colFoo = Stamplay.Cobject('foo'); var fooMod = new colFoo.Model(); -fooMod.fetch(5).then( - function(){ - return fooMod.upVote() - } -).then( - function(){ +fooMod.fetch(5) + .then(() => fooMod.upVote()) + .then( + () => { //success callback - }, function( err : any ){ + }, (err: any) => { //error callback } ) diff --git a/stamplay-js-sdk/tslint.json b/stamplay-js-sdk/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/stamplay-js-sdk/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/static-eval/static-eval-tests.ts b/static-eval/static-eval-tests.ts index d4307c50f4..bfe30f723f 100644 --- a/static-eval/static-eval-tests.ts +++ b/static-eval/static-eval-tests.ts @@ -1,5 +1,3 @@ -/// - import evaluate = require('static-eval'); import esprima = require('esprima'); import * as ESTree from 'estree'; diff --git a/status-bar/tsconfig.json b/status-bar/tsconfig.json index 874ffb81d1..9fe41d5d67 100644 --- a/status-bar/tsconfig.json +++ b/status-bar/tsconfig.json @@ -12,6 +12,9 @@ "typeRoots": [ "../" ], + "paths": { + "q": [ "q/v0" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/steed/tslint.json b/steed/tslint.json index f05741c59b..0f47deabb4 100644 --- a/steed/tslint.json +++ b/steed/tslint.json @@ -3,4 +3,4 @@ "rules": { "forbidden-types": false } -} +} \ No newline at end of file diff --git a/stream-buffers/index.d.ts b/stream-buffers/index.d.ts new file mode 100644 index 0000000000..d3871b1efa --- /dev/null +++ b/stream-buffers/index.d.ts @@ -0,0 +1,40 @@ +// Type definitions for stream-buffers 3.0 +// Project: https://github.com/samcday/node-stream-buffer#readme +// Definitions by: Jason Dent +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +import * as stream from 'stream'; + +export interface WritableStreamBufferOptions extends stream.WritableOptions { + initialSize?: number; + incrementAmount?: number; +} + +export declare class WritableStreamBuffer extends stream.Writable { + constructor(options?: WritableStreamBufferOptions); + size(): number; + maxSize(): number; + getContents(length?: number): any; + getContentsAsString(encoding?: string, length?: number): string; +} + +export interface ReadableStreamBufferOptions extends stream.ReadableOptions { + frequency?: number; + chunkSize?: number; + initialSize?: number; + incrementAmount?: number; +} + +export declare class ReadableStreamBuffer extends stream.Readable { + constructor(options?: ReadableStreamBufferOptions); + put(data: string | Buffer, encoding?: string): void; + stop(): void; + size(): number; + maxSize(): number; +} + +export declare const DEFAULT_INITIAL_SIZE: number; +export declare const DEFAULT_INCREMENT_AMOUNT: number; +export declare const DEFAULT_FREQUENCY: number; +export declare const DEFAULT_CHUNK_SIZE: number; diff --git a/stream-buffers/stream-buffers-tests.ts b/stream-buffers/stream-buffers-tests.ts new file mode 100644 index 0000000000..7bccc43f15 --- /dev/null +++ b/stream-buffers/stream-buffers-tests.ts @@ -0,0 +1,48 @@ +import * as streamBuffers from 'stream-buffers'; + +// The following are examples from README.md +// https://github.com/samcday/node-stream-buffer + +var myWritableStreamBuffer = new streamBuffers.WritableStreamBuffer({ + initialSize: (100 * 1024), // start at 100 kilobytes. + incrementAmount: (10 * 1024) // grow by 10 kilobytes each time buffer overflows. +}); + +var a = streamBuffers.DEFAULT_INITIAL_SIZE; // (8 * 1024) +var b = streamBuffers.DEFAULT_INCREMENT_AMOUNT; // (8 * 1024) +var c = streamBuffers.DEFAULT_CHUNK_SIZE; // (1024) +var d = streamBuffers.DEFAULT_FREQUENCY; // (1) + +const buffer = new Buffer('ASDF'); +myWritableStreamBuffer.write('ASDF'); +myWritableStreamBuffer.write(buffer); +myWritableStreamBuffer.size(); +myWritableStreamBuffer.maxSize(); + +// Gets all held data as a Buffer. +myWritableStreamBuffer.getContents(); + +// Gets all held data as a utf8 string. +myWritableStreamBuffer.getContentsAsString('utf8'); + +// Gets first 5 bytes as a Buffer. +myWritableStreamBuffer.getContents(5); + +// Gets first 5 bytes as a utf8 string. +myWritableStreamBuffer.getContentsAsString('utf8', 5); + +var myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({ + frequency: 10, // in milliseconds. + chunkSize: 2048 // in bytes. +}); + +myReadableStreamBuffer.put('A String', 'utf8'); +myReadableStreamBuffer.put(buffer); + +myReadableStreamBuffer.on('data', (data) => { + // streams1.x style data + // assert.isTrue(data instanceof Buffer); +}); + +myReadableStreamBuffer.put('the last data this stream will ever see'); +myReadableStreamBuffer.stop(); diff --git a/stream-buffers/tsconfig.json b/stream-buffers/tsconfig.json new file mode 100644 index 0000000000..827ea2a3fe --- /dev/null +++ b/stream-buffers/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "stream-buffers-tests.ts" + ] +} diff --git a/stream-buffers/tslint.json b/stream-buffers/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/stream-buffers/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/stream-to-array/stream-to-array-tests.ts b/stream-to-array/stream-to-array-tests.ts index c011f3e542..6b3ccc84fb 100644 --- a/stream-to-array/stream-to-array-tests.ts +++ b/stream-to-array/stream-to-array-tests.ts @@ -1,6 +1,3 @@ - -/// - import toArray = require('stream-to-array'); var rs: NodeJS.ReadableStream; diff --git a/stringify-object/index.d.ts b/stringify-object/index.d.ts new file mode 100644 index 0000000000..bfccb83300 --- /dev/null +++ b/stringify-object/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for stringify-object 3.1 +// Project: https://github.com/yeoman/stringify-object +// Definitions by: Chris Khoo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace stringifyObject { } + +declare function stringifyObject(o: any, options?: { + indent?: string, + singleQuotes?: boolean, + filter?: (o: any, prop: string) => boolean, + inlineCharacterLimit?: number +}): string; + +export = stringifyObject; diff --git a/stringify-object/stringify-object-tests.ts b/stringify-object/stringify-object-tests.ts new file mode 100644 index 0000000000..a00be6f1c0 --- /dev/null +++ b/stringify-object/stringify-object-tests.ts @@ -0,0 +1,26 @@ +import * as stringifyObject from 'stringify-object'; + +stringifyObject({ a: 1, b: 2, c: 3 }); + +stringifyObject('abc', { + indent: ' ' +}); + +stringifyObject('123', { + indent: ' ' +}); + +stringifyObject(123, { + indent: ' ', + singleQuotes: false +}); + +stringifyObject([1, 2, 3], { + indent: ' ', + singleQuotes: false, + inlineCharacterLimit: 12 +}); + +stringifyObject([1, 2, 3], { + filter: (o, prop) => prop !== '_hidden_' +}); diff --git a/stringify-object/tsconfig.json b/stringify-object/tsconfig.json new file mode 100644 index 0000000000..00574d2429 --- /dev/null +++ b/stringify-object/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "stringify-object-tests.ts" + ] +} diff --git a/stringify-object/tslint.json b/stringify-object/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/stringify-object/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/strong-cluster-control/tsconfig.json b/strong-cluster-control/tsconfig.json index 6d625c44b6..9294ca211a 100644 --- a/strong-cluster-control/tsconfig.json +++ b/strong-cluster-control/tsconfig.json @@ -19,4 +19,4 @@ "index.d.ts", "strong-cluster-control-tests.ts" ] -} \ No newline at end of file +} diff --git a/stylelint/index.d.ts b/stylelint/index.d.ts new file mode 100644 index 0000000000..2ec479d2e1 --- /dev/null +++ b/stylelint/index.d.ts @@ -0,0 +1,44 @@ +// Type definitions for stylelint 7.9 +// Project: https://github.com/stylelint/stylelint +// Definitions by: Alan Agius +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface LinterOptions { + code?: string; + codeFilename?: string; + config?: JSON; + configBasedir?: string; + configFile?: string; + configOverrides?: JSON; + files?: string | string[]; + formatter?: "json" | "string" | "verbose"; + ignoreDisables?: boolean; + reportNeedlessDisables?: boolean; + ignorePath?: boolean; + syntax?: "scss" | "less" | "sugarss"; + customSyntax?: string; +} + +export interface LinterResult { + errored: boolean; + output: string; + postcssResults: any[]; + results: LintResult[]; +} + +export interface LintResult { + source: string; + errored: boolean | undefined; + ignored: boolean | undefined; + warnings: string[]; + deprecations: string[]; + invalidOptionWarnings: any[]; +} + +export namespace formatters { + function json(results: LintResult[]): string; + function string(results: LintResult[]): string; + function verbose(results: LintResult[]): string; +} + +export function lint(options?: LinterOptions): Promise; diff --git a/stylelint/stylelint-tests.ts b/stylelint/stylelint-tests.ts new file mode 100644 index 0000000000..0eeb0bdec8 --- /dev/null +++ b/stylelint/stylelint-tests.ts @@ -0,0 +1,18 @@ +import { LinterOptions, lint, LintResult, LinterResult } from "stylelint"; + +const options: LinterOptions = { + code: "div { color: red }", + files: ["**/**.scss"], + formatter: "json", + ignoreDisables: true, + reportNeedlessDisables: true, + ignorePath: true, + syntax: "scss" +}; + +lint(options).then((x: LinterResult) => { + const err: boolean = x.errored; + const output: string = x.output; + const postcssResults: any[] = x.postcssResults; + const results: LintResult[] = x.results; +}); diff --git a/stylelint/tsconfig.json b/stylelint/tsconfig.json new file mode 100644 index 0000000000..d57b85c2b3 --- /dev/null +++ b/stylelint/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "stylelint-tests.ts" + ] +} diff --git a/stylus/stylus-tests.ts b/stylus/stylus-tests.ts index 7c5a8b1e45..248b6a9a04 100644 --- a/stylus/stylus-tests.ts +++ b/stylus/stylus-tests.ts @@ -1,13 +1,9 @@ -/** - * Test suite created by Maxime LUCE - * +/** + * Test suite created by Maxime LUCE + * * Created by using code samples from https://github.com/LearnBoost/stylus/blob/master/docs/js.md. */ -/// - - - import stylus = require("stylus"); var str = "This is a stylus test"; diff --git a/superagent/superagent-tests.ts b/superagent/superagent-tests.ts index 3252b01c96..3b8539ffe5 100644 --- a/superagent/superagent-tests.ts +++ b/superagent/superagent-tests.ts @@ -1,6 +1,3 @@ - -/// - // via: http://visionmedia.github.io/superagent/ import * as request from 'superagent'; diff --git a/supertest-as-promised/index.d.ts b/supertest-as-promised/index.d.ts index 385f25867b..1f58455f16 100644 --- a/supertest-as-promised/index.d.ts +++ b/supertest-as-promised/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/WhoopInc/supertest-as-promised // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import * as supertest from "supertest"; import * as superagent from "superagent"; diff --git a/supertest-as-promised/supertest-as-promised-tests.ts b/supertest-as-promised/supertest-as-promised-tests.ts index c20f9a92b6..23e47ee319 100644 --- a/supertest-as-promised/supertest-as-promised-tests.ts +++ b/supertest-as-promised/supertest-as-promised-tests.ts @@ -1,9 +1,9 @@ - -/// - import * as request from 'supertest-as-promised'; import * as express from 'express'; +declare function describe(desc: string, f: () => void): void; +declare function it(desc: string, f: () => void): void; + var app = express(); // chain your requests like you were promised: @@ -29,12 +29,8 @@ request(app) // ... }); -describe("GET /kittens", () => { - it("should work", () => { - return request(app).get("/kittens").expect(200); - }); -}); +request(app).get("/kittens").expect(200); // Agents var agent = request.agent(app); diff --git a/swagger-schema-official/index.d.ts b/swagger-schema-official/index.d.ts index 172fca0d4e..f0f2e60183 100644 --- a/swagger-schema-official/index.d.ts +++ b/swagger-schema-official/index.d.ts @@ -96,13 +96,13 @@ export interface Operation { description?: string; externalDocs?: ExternalDocs; operationId?: string; - produces?: [string]; - consumes?: [string]; - parameters?: [Parameter]; - schemes?: [string]; + produces?: string[]; + consumes?: string[]; + parameters?: Parameter[]; + schemes?: string[]; deprecated?: boolean; - security?: [Secuirty]; - tags?: [string]; + security?: Security[]; + tags?: string[]; } // ----------------------------- Response ------------------------------------ @@ -132,14 +132,14 @@ interface BaseSchema { uniqueItems?: boolean; maxProperties?: number; minProperties?: number; - enum?: [string|boolean|number|{}]; + enum?: (string|boolean|number|{})[]; type?: string; - items?: Schema|[Schema]; + items?: Schema|Schema[]; } export interface Schema extends BaseSchema { $ref?: string; - allOf?: [Schema]; + allOf?: Schema[]; additionalProperties?: boolean; properties?: {[propertyName: string]: Schema}; discriminator?: string; @@ -147,7 +147,7 @@ export interface Schema extends BaseSchema { xml?: XML; externalDocs?: ExternalDocs; example?: {[exampleName: string]: {}}; - required?: [string]; + required?: string[]; } export interface XML { @@ -184,25 +184,25 @@ export interface OAuth2ImplicitSecurity extends BaseOAuthSecuirty { export interface OAuth2PasswordSecurity extends BaseOAuthSecuirty { tokenUrl: string; - scopes?: [OAuthScope]; + scopes?: OAuthScope[]; } export interface OAuth2ApplicationSecurity extends BaseOAuthSecuirty { tokenUrl: string; - scopes?: [OAuthScope]; + scopes?: OAuthScope[]; } export interface OAuth2AccessCodeSecurity extends BaseOAuthSecuirty { tokenUrl: string; authorizationUrl: string; - scopes?: [OAuthScope]; + scopes?: OAuthScope[]; } export interface OAuthScope { [scopeName: string]: string; } -type Secuirty = +type Security = BasicAuthenticationSecurity | OAuth2AccessCodeSecurity | OAuth2ApplicationSecurity | @@ -217,14 +217,14 @@ export interface Spec { externalDocs?: ExternalDocs; host?: string; basePath?: string; - schemes?: [string]; - consumes?: [string]; - produces?: [string]; + schemes?: string[]; + consumes?: string[]; + produces?: string[]; paths: {[pathName: string]: Path}; definitions?: {[definitionsName: string]: Schema }; parameters?: {[parameterName: string]: BodyParameter|QueryParameter}; responses?: {[responseName: string]: Response }; - security?: [Secuirty]; - securityDefinitions?: { [securityDefinitionName: string]: Secuirty}; - tags?: [Tag]; + security?: Security[]; + securityDefinitions?: { [securityDefinitionName: string]: Security}; + tags?: Tag[]; } diff --git a/systemjs/index.d.ts b/systemjs/index.d.ts index 876e4fdb4d..cf37862975 100644 --- a/systemjs/index.d.ts +++ b/systemjs/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for SystemJS 0.20.5 +// Type definitions for SystemJS 0.20 // Project: https://github.com/systemjs/systemjs // Definitions by: Ludovic HENIN , Nathan Walker , Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,9 +6,13 @@ declare namespace SystemJSLoader { - type ModulesList = { [bundleName: string]: Array }; + interface ModulesList { + [bundleName: string]: string[]; + } - type PackageList = { [packageName: string]: T }; + interface PackageList { + [packageName: string]: T; + } /** * The following module formats are supported: @@ -27,7 +31,7 @@ declare namespace SystemJSLoader { * Represents a module name for System.import that must resolve to either Traceur, Babel or TypeScript. * When set to traceur, babel or typescript, loading will be automatically configured as far as possible. */ - type Transpiler = "plugin-traceur" | "plugin-babel" | "plugin-typescript" | "traceur" | "babel" | "typescript" | boolean; + type Transpiler = "plugin-traceur" | "plugin-babel" | "plugin-typescript" | "traceur" | "babel" | "typescript" | false; type ConfigMap = PackageList>; @@ -49,7 +53,7 @@ declare namespace SystemJSLoader { * Dependencies to load before this module. Goes through regular paths and map normalization. * Only supported for the cjs, amd and global formats. */ - deps?: Array; + deps?: string[]; /** * A map of global names to module names that should be defined only for the execution of this module. @@ -225,13 +229,29 @@ declare namespace SystemJSLoader { * Sets the TypeScript transpiler options. */ //TODO: Import Typescript.CompilerOptions - typescriptOptions?: any; + typescriptOptions?: { + /** + * A boolean flag which instructs the plugin to load configuration from "tsconfig.json". + * To override the location of the file set this option to the path of the configuration file, + * which will be resolved using normal SystemJS resolution. + * Note: This setting is specific to plugin-typescript. + */ + tsconfig?: boolean | string, + /** + * A flag which controls whether the files are type-checked or simply transpiled. + * Set this option to "strict" to have the builds fail when compiler errors are encountered. + * Note: The strict option only affects builds and bundles via the SystemJS or JSPM Builder. + * Note: This setting is specific to plugin-typescript. + */ + typeCheck?: boolean | "strict", + [key: string]: any + }; } interface SystemJSSystemFields { env: string; loaderErrorStack: boolean; - packageConfigPaths: Array; + packageConfigPaths: string[]; pluginFirst: boolean; version: string; warnings: boolean; @@ -241,12 +261,12 @@ declare namespace SystemJSLoader { /** * For backwards-compatibility with AMD environments, set window.define = System.amdDefine. */ - amdDefine: Function; + amdDefine: (...args: any[]) => void; /** * For backwards-compatibility with AMD environments, set window.require = System.amdRequire. */ - amdRequire: Function; + amdRequire: (deps: string[], callback: (...modules: any[]) => void) => void; /** * SystemJS configuration helper function. @@ -257,7 +277,7 @@ declare namespace SystemJSLoader { /** * This represents the System base class, which can be extended or reinstantiated to create a custom System instance. */ - constructor: new() => System; + constructor: new () => System; /** * Deletes a module from the registry by normalized name. @@ -273,7 +293,7 @@ declare namespace SystemJSLoader { /** * Returns a clone of the internal SystemJS configuration in use. */ - getConfig(): Config + getConfig(): Config; /** * Returns whether a given module exists in the registry by normalized module name. @@ -303,15 +323,15 @@ declare namespace SystemJSLoader { /** * Declaration function for defining modules of the System.register polyfill module format. */ - register(name: string, deps: Array, declare: Function): void; - register(deps: Array, declare: Function): void; + register(name: string, deps: string[], declare: (...modules: any[]) => any): void; + register(deps: string[], declare: (...modules: any[]) => any): void; /** * Companion module format to System.register for non-ES6 modules. * Provides a