From 3680719dd5845f8580b1b429d13e8812f5f52e93 Mon Sep 17 00:00:00 2001 From: Thomas Hendriksen Date: Tue, 6 Dec 2016 21:56:46 +0100 Subject: [PATCH 01/38] Added height property to IDialogOptions --- ng-dialog/ng-dialog.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ng-dialog/ng-dialog.d.ts b/ng-dialog/ng-dialog.d.ts index 7b70874408..71757165de 100644 --- a/ng-dialog/ng-dialog.d.ts +++ b/ng-dialog/ng-dialog.d.ts @@ -227,6 +227,11 @@ declare namespace angular.dialog { * Specifies the width of the dialog content element. Default value is null (unspecified) */ width?: string|number; + + /** + * Specifies the height of the dialog content element. Default value is null (unspecified) + */ + height?: string|number; } /** From eb935a2994efb32f733a8533c6a6312da2dc569c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20B=C3=A9rtolo?= Date: Wed, 7 Dec 2016 23:24:33 +0000 Subject: [PATCH 02/38] versionKey type --- mongoose/mongoose.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index 025d543163..7dd37fdc32 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -717,7 +717,7 @@ declare module "mongoose" { /** defaults to true */ validateBeforeSave?: boolean; /** defaults to "__v" */ - versionKey?: string; + versionKey?: string|boolean; /** * skipVersioning allows excluding paths from * versioning (the internal revision will not be From 9256d28b56a414ffd80f24c496089d2cd64f88ec Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Wed, 7 Dec 2016 16:58:26 -0800 Subject: [PATCH 03/38] kendo-ui: mark toString() params as optional (#13164) These function parameters are optional according to the upstream docs, e.g. http://docs.telerik.com/kendo-ui/api/javascript/geometry/matrix#methods-toString --- kendo-ui/kendo-ui.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kendo-ui/kendo-ui.d.ts b/kendo-ui/kendo-ui.d.ts index bf8a2ec926..edfe747202 100644 --- a/kendo-ui/kendo-ui.d.ts +++ b/kendo-ui/kendo-ui.d.ts @@ -8505,7 +8505,7 @@ declare namespace kendo.geometry { round(digits: number): kendo.geometry.Matrix; multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; toArray(digits: number): any; - toString(digits: number, separator: string): string; + toString(digits?: number, separator?: string): string; } @@ -8551,7 +8551,7 @@ declare namespace kendo.geometry { setX(value: number): kendo.geometry.Point; setY(value: number): kendo.geometry.Point; toArray(digits: number): any; - toString(digits: number, separator: string): string; + 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; @@ -19212,7 +19212,7 @@ declare namespace kendo.dataviz.geometry { round(digits: number): kendo.geometry.Matrix; multiplyCopy(matrix: kendo.geometry.Matrix): kendo.geometry.Matrix; toArray(digits: number): any; - toString(digits: number, separator: string): string; + toString(digits?: number, separator?: string): string; } From 6ac7434b8b2a8429d4a2f94ef55478b62fc74f5d Mon Sep 17 00:00:00 2001 From: EamonHetherton Date: Thu, 8 Dec 2016 16:07:27 +1000 Subject: [PATCH 04/38] Ensure that zoneAbbr and zoneName are expected type (string). --- moment-timezone/moment-timezone-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment-timezone/moment-timezone-tests.ts b/moment-timezone/moment-timezone-tests.ts index 410c45fe2e..5ce57818c1 100644 --- a/moment-timezone/moment-timezone-tests.ts +++ b/moment-timezone/moment-timezone-tests.ts @@ -80,7 +80,7 @@ moment.tz.setDefault('America/Los_Angeles'); moment.tz.guess(); -moment.tz('America/Los_Angeles').zoneAbbr(); +var zoneAbbr: string = moment.tz('America/Los_Angeles').zoneAbbr(); -moment.tz('America/Los_Angeles').zoneName(); +var zoneName: string = moment.tz('America/Los_Angeles').zoneName(); From b1b9addfb04b62133d5cfde4edc16595988e780a Mon Sep 17 00:00:00 2001 From: EamonHetherton Date: Thu, 8 Dec 2016 16:08:22 +1000 Subject: [PATCH 05/38] Update moment-timezone.d.ts --- moment-timezone/moment-timezone.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index c1d7e2d23f..870f0d6309 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -9,8 +9,8 @@ declare namespace moment { interface Moment { tz(): string; tz(timezone: string): Moment; - zoneAbbr() :Moment; - zoneName() :Moment; + zoneAbbr(): string; + zoneName(): string; } interface MomentStatic { From 8621c476047cd21552da5f5570767dd7750235a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Kov=C3=A1cs?= Date: Thu, 8 Dec 2016 14:04:38 +0100 Subject: [PATCH 06/38] Fix syntax error in interact.d.ts A parameter name was missing making TypeScript compiler fail. --- interactjs/interact.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactjs/interact.d.ts b/interactjs/interact.d.ts index 2a547450d5..c9d15a2a5f 100644 --- a/interactjs/interact.d.ts +++ b/interactjs/interact.d.ts @@ -200,7 +200,7 @@ declare namespace Interact { (element: HTMLElement): Interactable; (element: SVGElement): Interactable; (element: string): Interactable; - (element: string, {context: Element}): Interactable; + (element: string, options: {context: Element}): Interactable; // returns boolean or {[key: string]: any} autoScroll(): any; autoScroll(options: boolean): InteractStatic; From 18765bde850489fc73906cbaf81969b309e9c67f Mon Sep 17 00:00:00 2001 From: Farokhcpu Date: Wed, 17 Aug 2016 10:31:49 +0200 Subject: [PATCH 07/38] adding type for move to fs-extra --- fs-extra/fs-extra-tests.ts | 26 ++++++++++++++++++++++++++ fs-extra/fs-extra.d.ts | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/fs-extra/fs-extra-tests.ts b/fs-extra/fs-extra-tests.ts index a31df8cfd7..d03faf4c3c 100644 --- a/fs-extra/fs-extra-tests.ts +++ b/fs-extra/fs-extra-tests.ts @@ -52,20 +52,46 @@ fs.copySync(src, dest, filter: /.*/ } ); + fs.createFile(file, errorCallback); fs.createFileSync(file); fs.mkdirs(dir, errorCallback); fs.mkdirs(dir, {}, errorCallback); + fs.mkdirsSync(dir); fs.mkdirsSync(dir, {}); + fs.mkdirp(dir, errorCallback); fs.mkdirp(dir, {}, errorCallback); + fs.mkdirpSync(dir); fs.mkdirpSync(dir, {}); +fs.move(src, dest, errorCallback); +fs.move(src, dest, (src: string) => { + return false; +}, errorCallback); +fs.move(src, dest, + { + clobber: true, + preserveTimestamps: true, + filter: (src: string) => {return false} + }, + errorCallback +); +fs.move(src, dest, + { + clobber: true, + preserveTimestamps: true, + filter: /.*/ + }, + errorCallback +); + fs.outputFile(file, data, errorCallback); fs.outputFileSync(file, data); + fs.outputJson(file, data, errorCallback); fs.outputJSON(file, data, errorCallback); diff --git a/fs-extra/fs-extra.d.ts b/fs-extra/fs-extra.d.ts index d052752ba9..976595a84f 100644 --- a/fs-extra/fs-extra.d.ts +++ b/fs-extra/fs-extra.d.ts @@ -31,6 +31,10 @@ declare module "fs-extra" { export function mkdirsSync(dir: string, options?: MkdirOptions): void; export function mkdirpSync(dir: string, options?: MkdirOptions): void; + export function move(src: string, dest: string, callback?: (err: Error) => void): void; + export function move(src: string, dest: string, filter: CopyFilter, callback?: (err: Error) => void): void; + export function move(src: string, dest: string, options: CopyOptions, callback?: (err: Error) => void): void; + export function outputFile(file: string, data: any, callback?: (err: Error) => void): void; export function outputFileSync(file: string, data: any): void; From 8770eab1aac67f4513d2a7f5e0f2b93a7625c4e4 Mon Sep 17 00:00:00 2001 From: Farokhcpu Date: Thu, 8 Dec 2016 17:14:05 +0100 Subject: [PATCH 08/38] fixing signature of sinon/alwaysReturned based on the http://sinonjs.org/docs/#sinonspy --- sinon/sinon.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sinon/sinon.d.ts b/sinon/sinon.d.ts index 69647534de..ba7256ab79 100644 --- a/sinon/sinon.d.ts +++ b/sinon/sinon.d.ts @@ -76,7 +76,7 @@ declare namespace Sinon { alwaysThrew(): boolean; alwaysThrew(type: string): boolean; alwaysThrew(obj: any): boolean; - alwaysReturned(): boolean; + alwaysReturned(obj: any): boolean; invokeCallback(...args: any[]): void; getCall(n: number): SinonSpyCall; reset(): void; From 45efcf3e4d1fba82bcf66ff694c76509bee47c12 Mon Sep 17 00:00:00 2001 From: Farokhcpu Date: Thu, 8 Dec 2016 17:28:34 +0100 Subject: [PATCH 09/38] increasing version number --- sinon/sinon.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sinon/sinon.d.ts b/sinon/sinon.d.ts index ba7256ab79..53590481e7 100644 --- a/sinon/sinon.d.ts +++ b/sinon/sinon.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Sinon 1.16.0 +// Type definitions for Sinon 1.16.1 // Project: http://sinonjs.org/ // Definitions by: William Sears // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 3ee09113bc22bf31f6c5d05510e73724caf1a389 Mon Sep 17 00:00:00 2001 From: Farokhcpu Date: Thu, 8 Dec 2016 17:29:56 +0100 Subject: [PATCH 10/38] returning back the version number to the origin number --- sinon/sinon.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sinon/sinon.d.ts b/sinon/sinon.d.ts index 53590481e7..ba7256ab79 100644 --- a/sinon/sinon.d.ts +++ b/sinon/sinon.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Sinon 1.16.1 +// Type definitions for Sinon 1.16.0 // Project: http://sinonjs.org/ // Definitions by: William Sears // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From d2a5bf5b5a3cff20f76ead860b12be4dec6d9f62 Mon Sep 17 00:00:00 2001 From: Farokhcpu Date: Thu, 8 Dec 2016 17:46:08 +0100 Subject: [PATCH 11/38] reversing changes in fs-extra --- fs-extra/fs-extra-tests.ts | 26 -------------------------- fs-extra/fs-extra.d.ts | 4 ---- 2 files changed, 30 deletions(-) diff --git a/fs-extra/fs-extra-tests.ts b/fs-extra/fs-extra-tests.ts index d03faf4c3c..a31df8cfd7 100644 --- a/fs-extra/fs-extra-tests.ts +++ b/fs-extra/fs-extra-tests.ts @@ -52,46 +52,20 @@ fs.copySync(src, dest, filter: /.*/ } ); - fs.createFile(file, errorCallback); fs.createFileSync(file); fs.mkdirs(dir, errorCallback); fs.mkdirs(dir, {}, errorCallback); - fs.mkdirsSync(dir); fs.mkdirsSync(dir, {}); - fs.mkdirp(dir, errorCallback); fs.mkdirp(dir, {}, errorCallback); - fs.mkdirpSync(dir); fs.mkdirpSync(dir, {}); -fs.move(src, dest, errorCallback); -fs.move(src, dest, (src: string) => { - return false; -}, errorCallback); -fs.move(src, dest, - { - clobber: true, - preserveTimestamps: true, - filter: (src: string) => {return false} - }, - errorCallback -); -fs.move(src, dest, - { - clobber: true, - preserveTimestamps: true, - filter: /.*/ - }, - errorCallback -); - fs.outputFile(file, data, errorCallback); fs.outputFileSync(file, data); - fs.outputJson(file, data, errorCallback); fs.outputJSON(file, data, errorCallback); diff --git a/fs-extra/fs-extra.d.ts b/fs-extra/fs-extra.d.ts index 976595a84f..d052752ba9 100644 --- a/fs-extra/fs-extra.d.ts +++ b/fs-extra/fs-extra.d.ts @@ -31,10 +31,6 @@ declare module "fs-extra" { export function mkdirsSync(dir: string, options?: MkdirOptions): void; export function mkdirpSync(dir: string, options?: MkdirOptions): void; - export function move(src: string, dest: string, callback?: (err: Error) => void): void; - export function move(src: string, dest: string, filter: CopyFilter, callback?: (err: Error) => void): void; - export function move(src: string, dest: string, options: CopyOptions, callback?: (err: Error) => void): void; - export function outputFile(file: string, data: any, callback?: (err: Error) => void): void; export function outputFileSync(file: string, data: any): void; From 30242acb3487b2ac2ed6a57625814a1fe2045104 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 8 Dec 2016 09:45:36 -0800 Subject: [PATCH 12/38] Request that PRs have meaningful titles --- PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 95d0041063..78acfdb5c9 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,7 @@ Please fill in this template. - [ ] Prefer to make your PR against the `types-2.0` branch. +- [ ] Use a meaningful title for the pull request. Include the name of the package modified. - [ ] Test the change in your own code. - [ ] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped#make-a-pull-request). - [ ] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped#common-mistakes). From 1eef4bb6671d17570361a55c3132c8ad31de1142 Mon Sep 17 00:00:00 2001 From: Guust Nieuwenhuis Date: Thu, 8 Dec 2016 21:03:04 +0100 Subject: [PATCH 13/38] Improvement to existing nouislider type definition. (#12033) * updated nouislider version and added a lot of tests out of the documentation * corrected intentation * corrected untyped variables, issue raised by Travis * incorporated feedback on pull request --- nouislider/nouislider-8.0.2.d.ts | 180 +++++++++++ nouislider/nouislider-tests-8.0.2.ts | 88 +++++ nouislider/nouislider-tests.ts | 466 +++++++++++++++++++++++++-- nouislider/nouislider.d.ts | 55 ++-- 4 files changed, 747 insertions(+), 42 deletions(-) create mode 100644 nouislider/nouislider-8.0.2.d.ts create mode 100644 nouislider/nouislider-tests-8.0.2.ts diff --git a/nouislider/nouislider-8.0.2.d.ts b/nouislider/nouislider-8.0.2.d.ts new file mode 100644 index 0000000000..b3bd58c727 --- /dev/null +++ b/nouislider/nouislider-8.0.2.d.ts @@ -0,0 +1,180 @@ +// Type definitions for nouislider v8.0.2 +// Project: https://github.com/leongersen/noUiSlider +// Definitions by: Patrick Davies +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +declare namespace noUiSlider { + /** + * To create a slider, call noUiSlider.create() with an element and your options. + */ + function create(target: HTMLElement, options: Options): void; + + interface Options { + /** + * The start option sets the number of handles and their start positions, relative to range. + */ + start: number | number[] | number[][]; + /** + * The connect setting can be used to control the bar between the handles, + * or the edges of the slider. Use "lower" to connect to the lower side, + * or "upper" to connect to the upper side. Setting true sets the bar between the handles. + */ + range: Object; + /** + * noUiSlider offers several ways to handle user interaction. + * The range can be set to drag, and handles can move to taps. + * All these effects are optional, and can be enable by adding their keyword to the behaviour option. + * This option accepts a "-" separated list of "drag", "tap", "fixed", "snap" or "none". + */ + connect?: string | boolean; + /** + * When using two handles, the minimum distance between the handles can be set using the margin option. + * The margin value is relative to the value set in 'range'. + * This option is only available on standard linear sliders. + */ + margin?: number; + /** + * The limit option is the oposite of the margin option, + * limiting the maximum distance between two handles. + * As with the margin option, the limit option can only be used on linear sliders. + */ + limit?: number; + /** + * By default, the slider slides fluently. + * In order to make the handles jump between intervals, you can use this option. + * The step option is relative to the values provided to range. + */ + step?: number; + /** + * The orientation setting can be used to set the slider to "vertical" or "horizontal". + * Set dimensions! Vertical sliders don't assume a default height, so you'll need to set one. + * You can use any unit you want, including % or px. + */ + orientation?: string; + /** + * By default the sliders are top-to-bottom and left-to-right, + * but you can change this using the direction option, + * which decides where the upper side of the slider is. + */ + direction?: string; + /** + * Set the animate option to false to prevent the slider from animating to a new value with when calling .val(). + */ + animate?: boolean; + /** + * All values on the slider are part of a range. The range has a minimum and maximum value. + */ + behaviour?: string; + /** + * To format the slider output, noUiSlider offers a format option. + * Simply specify to and from functions to encode and decode the values. + * See manual formatting to the right for usage information. + * By default, noUiSlider will format output with 2 decimals. + */ + format?: Object | ((...args:any[]) => any); + + /** + * Allows you to generate points along the slider. + */ + pips?: PipsOptions; + } + + interface PipsOptions { + /** + * The 'range' mode uses the slider range to determine where the pips should be. A pip is generated for every percentage specified. + * + * The 'steps', like 'range', uses the slider range. In steps mode, a pip is generated for every step. + * The 'filter' option can be used to filter the generated pips from the 'steps' options' + * The filter function must return 0 (no value), 1 (large value) or 2 (small value). + * + * In 'positions' mode, pips are generated at percentage-based positions on the slider. + * Optionally, the stepped option can be set to true to match the pips to the slider steps. + * + * The 'count' mode can be used to generate a fixed number of pips. As with positions mode, the stepped option can be used. + * + * The 'values' mode is similar to positions, but it accepts values instead of percentages. The stepped option can be used for this mode. + * + */ + mode: string; // "range" | "steps" | "positions" | "count" | "values" + /** + * Range Mode: percentage for range mode + * Step Mode: step number for steps + * Positions Mode: percentage-based positions on the slider + * Count Mode: positions between pips + */ + density?: number; + /** + * Step Mode: The filter option can be used to filter the generated pips. + * The filter function must return 0 (no value), 1 (large value) or 2 (small value). + */ + filter?: (...args: any[]) => PipFilterResult; + /** + * format for step mode + * see noUiSlider format + */ + format?: Object; + /** + * + * values for positions and values mode + * number pips for count mode + */ + values?: number | number[]; + /** + * stepped option for positions, values and count mode + */ + stepped?: boolean; + } + + const enum PipFilterResult { + NoValue, + LargeValue, + SmallValue, + } + + interface Callback { + /** + * Array for both one-handle and two-handle sliders. It contains the current slider values, + * with formatting applied. + */ + (values: any[], handle: number, unencoded: number): void + } + + + interface noUiSlider { + /** + * Bind event to the slider. + */ + on(eventName: string, callback: Callback): void; + /** + * Unbind event to the slider. + */ + off(eventName: string): void; + /** + * Destroy's the slider. + */ + destroy(): void; + + /** + * To get the current slider value. For one-handle sliders, calling .get() will return the value. + * For two-handle sliders, an array[value, value] will be returned. + */ + get(): number | number[]; + /** + * noUiSlider will keep your values within the slider range, which saves you a bunch of validation. + * If you have configured the slider to use one handle, you can change the current value by passing + * a number to the .set() method. If you have two handles, pass an array. One-handled sliders + * will also accept arrays. Within an array, you can set one position to null + * if you want to leave a handle unchanged. + */ + set(value: number | number[]): void; + } + + interface Instance extends HTMLElement { + noUiSlider: noUiSlider + } +} + +declare module "nouislider" { + export = noUiSlider; +} diff --git a/nouislider/nouislider-tests-8.0.2.ts b/nouislider/nouislider-tests-8.0.2.ts new file mode 100644 index 0000000000..2739e609ce --- /dev/null +++ b/nouislider/nouislider-tests-8.0.2.ts @@ -0,0 +1,88 @@ +/// + +var testHtmlElement = document.getElementById('test'); + +/** + * Basic + */ +noUiSlider.create(testHtmlElement, { + start: 80, + range: { + 'min': 0, + 'max': 10000 + } +}); + +/** + * All options + */ +noUiSlider.create(testHtmlElement, { + start: [ 20, 80 ], + step: 10, + margin: 20, + connect: true, + direction: 'rtl', + orientation: 'vertical', + + // Configure tapping, or make the selected range dragable. + behaviour: 'tap-drag', + + // Full number format support. + format: wNumb({ + mark: ',', + decimals: 1 + }), + + // Support for non-linear ranges by adding intervals. + range: { + 'min': 0, + 'max': 100 + } +}); + +/** + * Pips + */ +noUiSlider.create(testHtmlElement, { + start: 0, + range: { + min: 0, + max: 10 + }, + pips: { + mode: 'steps', + density: 3, + filter: function () { return 1 }, + format: wNumb({ + decimals: 2, + prefix: '$' + }), + } +}); + +/** + * Functions + * Need to cast the HTMLElement as noUiSlider.Instance. + */ +// Get value +(testHtmlElement).noUiSlider.get(); + +// Set one value +(testHtmlElement).noUiSlider.set(10); +(testHtmlElement).noUiSlider.set([150]); + +// Set the upper handle, +// don't change the lower one. +(testHtmlElement).noUiSlider.set([null, 14]); + +// Set both slider handles +(testHtmlElement).noUiSlider.set([13.2, 15.7]); + +// Events +var callback: noUiSlider.Callback = (values, handle, unencoded) => {}; +(testHtmlElement).noUiSlider.on('event', callback); + +(testHtmlElement).noUiSlider.off('event'); + +(testHtmlElement).noUiSlider.destroy(); + diff --git a/nouislider/nouislider-tests.ts b/nouislider/nouislider-tests.ts index 2739e609ce..4f7e71306d 100644 --- a/nouislider/nouislider-tests.ts +++ b/nouislider/nouislider-tests.ts @@ -6,42 +6,326 @@ var testHtmlElement = document.getElementById('test'); * Basic */ noUiSlider.create(testHtmlElement, { - start: 80, - range: { - 'min': 0, - 'max': 10000 - } + start: 80, + range: { + 'min': 0, + 'max': 10000 + } }); /** * All options */ noUiSlider.create(testHtmlElement, { - start: [ 20, 80 ], - step: 10, - margin: 20, - connect: true, - direction: 'rtl', - orientation: 'vertical', + start: [ 20, 80 ], + step: 10, + margin: 20, + connect: true, + direction: 'rtl', + orientation: 'vertical', - // Configure tapping, or make the selected range dragable. - behaviour: 'tap-drag', + // Configure tapping, or make the selected range dragable. + behaviour: 'tap-drag', - // Full number format support. - format: wNumb({ - mark: ',', - decimals: 1 - }), + // Full number format support. + format: wNumb({ + mark: ',', + decimals: 1 + }), - // Support for non-linear ranges by adding intervals. - range: { - 'min': 0, - 'max': 100 - } + // Support for non-linear ranges by adding intervals. + range: { + 'min': 0, + 'max': 100 + } }); /** - * Pips + * Start + */ +noUiSlider.create(testHtmlElement, { + start: [20, 80], + range: { + 'min': [ 0 ], + 'max': [ 100 ] + } +}); + +/** + * Handles + */ +noUiSlider.create(testHtmlElement, { + start: [ 4000, 8000 ], + range: { + 'min': [ 2000 ], + 'max': [ 10000 ] + } +}); + +/** + * More than two handles + */ +noUiSlider.create(testHtmlElement, { + start: [ 4000, 8000, 12000, 16000 ], + connect: [false, true, true, false, true], + range: { + 'min': [ 2000 ], + 'max': [ 20000 ] + } +}); + +/** + * Range + */ +noUiSlider.create(testHtmlElement, { + start: [ 4000 ], + range: { + 'min': [ 2000 ], + 'max': [ 10000 ] + } +}); + +/** + * Stepping and snapping to values + */ +noUiSlider.create(testHtmlElement, { + start: [ 4000 ], + step: 1000, + range: { + 'min': [ 2000 ], + 'max': [ 10000 ] + } +}); + +/** + * Non-linear sliders + */ +noUiSlider.create(testHtmlElement, { + start: [ 4000 ], + range: { + 'min': [ 2000 ], + '30%': [ 4000 ], + '70%': [ 8000 ], + 'max': [ 10000 ] + } +}); + +/** + * Stepping in non-linear sliders + */ +noUiSlider.create(testHtmlElement, { + start: [ 500, 4000 ], + range: { + 'min': [ 0 ], + '10%': [ 500, 500 ], + '50%': [ 4000, 1000 ], + 'max': [ 10000 ] + } +}); + +/** + * Snapping between steps + */ +noUiSlider.create(testHtmlElement, { + start: [ 0, 500 ], + snap: true, + connect: true, + range: { + 'min': 0, + '10%': 50, + '20%': 100, + '30%': 150, + '40%': 500, + '50%': 800, + 'max': 1000 + } +}); + +/** + * Connect + */ +noUiSlider.create(testHtmlElement, { + start: 40, + connect: [true, false], + range: { + 'min': 0, + 'max': 100 + } +}); +noUiSlider.create(testHtmlElement, { + start: [20, 40, 60], + connect: [true, false, true, true], + range: { + 'min': 0, + 'max': 80 + } +}); + +/** + * Margin + */ +noUiSlider.create(testHtmlElement, { + start: [ 20, 80 ], + margin: 30, + range: { + 'min': 0, + 'max': 100 + } +}); + +/** + * Limit + */ +noUiSlider.create(testHtmlElement, { + start: [ 10, 120 ], + limit: 40, + behaviour: 'drag', + connect: true, + range: { + 'min': 0, + 'max': 100 + } +}); + +/** + * Steps + */ +noUiSlider.create(testHtmlElement, { + start: [ 20, 80 ], + step: 10, + range: { + 'min': 0, + 'max': 100 + } +}); + +/** + * Orientation + */ +noUiSlider.create(testHtmlElement, { + start: 40, + orientation: 'vertical', + range: { + 'min': 0, + 'max': 100 + } +}); + +/** + * Direction + */ +noUiSlider.create(testHtmlElement, { + start: 20, + direction: 'rtl', + range: { + 'min': 0, + 'max': 100 + } +}); + +/** + * Tooltips + */ +noUiSlider.create(testHtmlElement, { + start: [20, 80, 120], + range: { + 'min': 0, + 'max': 200 + }, + tooltips: [ false, wNumb({ decimals: 1 }), true ] +}); + +/** + * Animate + */ +noUiSlider.create(testHtmlElement, { + animate: true, + animationDuration: 300, + start: 20, + range: { + min: 0, + max: 100 + } +}); +noUiSlider.create(testHtmlElement, { + animate: false, + start: 20, + range: { + min: 0, + max: 100 + } + }); + +/** + * Behaviour + */ +noUiSlider.create(testHtmlElement, { + start: [ 20, 40 ], + step: 10, + behaviour: 'drag', + connect: true, + range: { + 'min': 20, + 'max': 80 + } + }); +noUiSlider.create(testHtmlElement, { + start: 40, + behaviour: 'tap', + connect: [false, true], + range: { + 'min': 20, + 'max': 80 + } +}); +noUiSlider.create(testHtmlElement, { + start: [ 40, 60 ], + behaviour: 'drag', + connect: true, + range: { + 'min': 20, + 'max': 80 + } +}); +noUiSlider.create(testHtmlElement, { + start: [ 40, 60 ], + behaviour: 'drag-fixed', + connect: true, + range: { + 'min': 20, + 'max': 80 + } +}); +noUiSlider.create(testHtmlElement, { + start: 40, + behaviour: 'snap', + connect: [true, false], + range: { + 'min': 20, + 'max': 80 + } +}); +noUiSlider.create(testHtmlElement, { + start: 20, + behaviour: 'hover-snap', + direction: 'rtl', + range: { + 'min': 0, + 'max': 10 + } +}); +noUiSlider.create(testHtmlElement, { + start: [ 40, 60 ], + behaviour: 'drag-tap', + connect: true, + range: { + 'min': 20, + 'max': 80 + } +}); + +/** + * Pips: range */ noUiSlider.create(testHtmlElement, { start: 0, @@ -59,6 +343,137 @@ noUiSlider.create(testHtmlElement, { }), } }); +var range_all_sliders = { + 'min': [ 0 ], + '10%': [ 500, 500 ], + '50%': [ 4000, 1000 ], + 'max': [ 10000 ] +}; +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'range', + density: 3 + } +}) +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + direction: 'rtl', + pips: { + mode: 'range', + density: 3 + } +}); +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + orientation: 'vertical', + pips: { + mode: 'range', + density: 3 + } +}); +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + orientation: 'vertical', + direction: 'rtl', + pips: { + mode: 'range', + density: 3 + } +}); + +/** + * Pipes: Steps + */ +function filter500( value: any, type: any ){ + return value % 1000 ? 2 : 1; +} +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'steps', + density: 3, + filter: filter500, + format: wNumb({ + decimals: 2, + prefix: '$' + }) + } +}); + +/** + * Pipes: Positions + */ +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'positions', + values: [0,25,50,75,100], + density: 4 + } +}); +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'positions', + values: [0,25,50,75,100], + density: 4, + stepped: true + } +}); + +/** + * Pipes: Count + */ +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'count', + values: 6, + density: 4 + } +}); +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'count', + values: 6, + density: 4, + stepped: true + } +}); + +/** + * Pipes: Values + */ +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'values', + values: [50, 552, 2251, 3200, 5000, 7080, 9000], + density: 4 + } +}); +noUiSlider.create(testHtmlElement, { + range: range_all_sliders, + start: 0, + pips: { + mode: 'values', + values: [50, 552, 4651, 4952, 5000, 7080, 9000], + density: 4, + stepped: true + } +}); /** * Functions @@ -78,6 +493,9 @@ noUiSlider.create(testHtmlElement, { // Set both slider handles (testHtmlElement).noUiSlider.set([13.2, 15.7]); +// Set both slider handles +(testHtmlElement).noUiSlider.reset(); + // Events var callback: noUiSlider.Callback = (values, handle, unencoded) => {}; (testHtmlElement).noUiSlider.on('event', callback); diff --git a/nouislider/nouislider.d.ts b/nouislider/nouislider.d.ts index b3bd58c727..3ef467c666 100644 --- a/nouislider/nouislider.d.ts +++ b/nouislider/nouislider.d.ts @@ -1,6 +1,6 @@ -// Type definitions for nouislider v8.0.2 +// Type definitions for nouislider v9.0.0 // Project: https://github.com/leongersen/noUiSlider -// Definitions by: Patrick Davies +// Definitions by: Patrick Davies , Guust Nieuwenhuis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -16,23 +16,23 @@ declare namespace noUiSlider { */ start: number | number[] | number[][]; /** - * The connect setting can be used to control the bar between the handles, - * or the edges of the slider. Use "lower" to connect to the lower side, - * or "upper" to connect to the upper side. Setting true sets the bar between the handles. - */ + * The connect setting can be used to control the bar between the handles, + * or the edges of the slider. Use "lower" to connect to the lower side, + * or "upper" to connect to the upper side. Setting true sets the bar between the handles. + */ range: Object; /** - * noUiSlider offers several ways to handle user interaction. - * The range can be set to drag, and handles can move to taps. - * All these effects are optional, and can be enable by adding their keyword to the behaviour option. - * This option accepts a "-" separated list of "drag", "tap", "fixed", "snap" or "none". + * The connect setting can be used to control the (green) bar between the handles, or the edges of the slider. + * Pass an array with a boolean for every connecting element, including the edges of the slider. + * The length of this array must match the handle count + 1. + * Setting true sets the bars between the handles, but not between the handles and the sliders edges. */ - connect?: string | boolean; + connect?: boolean | boolean[]; /** - * When using two handles, the minimum distance between the handles can be set using the margin option. - * The margin value is relative to the value set in 'range'. - * This option is only available on standard linear sliders. - */ + * When using two handles, the minimum distance between the handles can be set using the margin option. + * The margin value is relative to the value set in 'range'. + * This option is only available on standard linear sliders. + */ margin?: number; /** * The limit option is the oposite of the margin option, @@ -51,17 +51,32 @@ declare namespace noUiSlider { * Set dimensions! Vertical sliders don't assume a default height, so you'll need to set one. * You can use any unit you want, including % or px. */ - orientation?: string; + orientation?: string; // "vertical" | "horizontal" /** * By default the sliders are top-to-bottom and left-to-right, * but you can change this using the direction option, * which decides where the upper side of the slider is. */ - direction?: string; + direction?: string; // "ltr" | "rtl" + /** + * noUiSlider can provide a basic tooltip without using its events system. + * Set the tooltips option to true to enable. + * This option can also accept formatting options to format the tooltips content. + * In that case, pass an array with a formatter for each handle, true to use the default or false to display no tooltip. + */ + tooltips?: boolean | Object | ((...args:any[]) => any); /** * Set the animate option to false to prevent the slider from animating to a new value with when calling .val(). */ animate?: boolean; + /** + * The animationDuration option can be used to set the animation speed assumed by the slider library. In addition to this, you must manually set the CSS (-webkit-)transition property for the .noUi-state-tap .noUi-origin selector. + */ + animationDuration?: number; + /** + * When a non-linear slider has been configured, the snap option can be set to true to force the slider to jump between the specified values. + */ + snap?: boolean; /** * All values on the slider are part of a range. The range has a minimum and maximum value. */ @@ -113,7 +128,7 @@ declare namespace noUiSlider { * format for step mode * see noUiSlider format */ - format?: Object; + format?: Object | ((...args:any[]) => any); /** * * values for positions and values mode @@ -168,6 +183,10 @@ declare namespace noUiSlider { * if you want to leave a handle unchanged. */ set(value: number | number[]): void; + /* + * To return to the initial slider values, you can use the .reset() method. This will only reset the slider values. + */ + reset(): void; } interface Instance extends HTMLElement { From edf6a02befc02cde70511c0798b69b854fb51f37 Mon Sep 17 00:00:00 2001 From: j-dc Date: Thu, 8 Dec 2016 21:03:46 +0100 Subject: [PATCH 14/38] #13037 (#13039) * #13037 * pointToLayer first argument type fixed GeoJSON.Point to GeoJSON.Feature --- leaflet/leaflet.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index b67134a8b6..944eec7540 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -805,7 +805,7 @@ declare namespace L { * } * ``` */ - pointToLayer?: (geoJsonPoint: GeoJSON.Point, latlng: LatLng) => Layer; // should import GeoJSON typings + pointToLayer?: (geoJsonPoint: GeoJSON.Feature, latlng: LatLng) => Layer; // should import GeoJSON typings /** * A Function defining the Path options for styling GeoJSON lines and polygons, From 09a4a1fd33a82937653c656a5736bca402017c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Crist=C3=B3v=C3=A3o?= Date: Thu, 8 Dec 2016 20:04:38 +0000 Subject: [PATCH 15/38] Missing cc in sendgrid packate (#13063) The sendgrid package was missing the `cc` field, and the `bcc` field had a too generic type (`any` instead of `string[]`, as used on the `setCcs` and `setBccs` below. --- sendgrid/sendgrid.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sendgrid/sendgrid.d.ts b/sendgrid/sendgrid.d.ts index b61db7162e..07bc99a933 100644 --- a/sendgrid/sendgrid.d.ts +++ b/sendgrid/sendgrid.d.ts @@ -49,7 +49,8 @@ declare namespace Sendgrid { subject?: string; text?: string; html?: string; - bcc?: any; + cc?: string[]; + bcc?: string[]; replyto?: string; date?: Date; headers?: { [key: string]: string }; @@ -65,7 +66,8 @@ declare namespace Sendgrid { subject: string; text: string; html: string; - bcc: any; + cc: string[]; + bcc: string[]; replyto: string; date: Date; headers: { [key: string]: string }; From 37247316a72462507a809f062f1659a2ee648b94 Mon Sep 17 00:00:00 2001 From: Samuel Campos Date: Thu, 8 Dec 2016 20:05:32 +0000 Subject: [PATCH 16/38] Fixes #12414 (#13076) * Fixes #12414 * Make applicationServerKey optional --- service_worker_api/service_worker_api.d.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/service_worker_api/service_worker_api.d.ts b/service_worker_api/service_worker_api.d.ts index 6084efc4a0..62d864ca18 100644 --- a/service_worker_api/service_worker_api.d.ts +++ b/service_worker_api/service_worker_api.d.ts @@ -579,6 +579,26 @@ interface PushSubscription { 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. @@ -590,7 +610,7 @@ interface PushManager { * Returns a promise that resolves to a PushSubscription with details of a * new push subscription. */ - subscribe(): Promise; + subscribe(options?: PushSubscriptionOptions): Promise; /** * Returns a promise that resolves to a PushSubscription details of From fe6427be572f4b4f89841c96a85d880f584cc685 Mon Sep 17 00:00:00 2001 From: Ryan Southgate Date: Thu, 8 Dec 2016 20:21:47 +0000 Subject: [PATCH 17/38] added ariaLabelledBy and ariaDescribedBy to IModalSettings (#13004) --- .../angular-ui-bootstrap-tests.ts | 2 ++ angular-ui-bootstrap/angular-ui-bootstrap.d.ts | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index d92c90bc60..0056c70b52 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -154,6 +154,8 @@ testApp.controller('TestCtrl', ( * test the $modal service */ var modalInstance = $modal.open({ + ariaLabelledBy: "label", + ariaDescribedBy: "description", animation: false, backdrop: 'static', backdropClass: 'modal-backdrop-test', diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index d6c389146b..bffd665725 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular UI Bootstrap 0.13.3 // Project: https://github.com/angular-ui/bootstrap -// Definitions by: Brian Surowiec +// Definitions by: Brian Surowiec , Ryan Southgate // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -411,6 +411,22 @@ declare namespace angular.ui.bootstrap { * - `resolve` - An object of the modal resolve values. See [UI Router resolves] for details. */ component?: string; + + /** + * Sets the `aria-describedby` property on the modal. + * The string should be an id (without the leading '#') pointing to the element that describes your modal. + * @type {string} + * @memberOf IModalSettings + */ + ariaDescribedBy?: string; + + /** + * Sets the `aria-labelledby` property on the modal. + * The string should be an id (without the leading '#') pointing to the element that labels your modal. + * @type {string} + * @memberOf IModalSettings + */ + ariaLabelledBy?: string; } interface IModalStackService { From 2279e694403464394401c2a4282d8a209abf976d Mon Sep 17 00:00:00 2001 From: Christophe Eymard Date: Thu, 8 Dec 2016 21:24:01 +0100 Subject: [PATCH 18/38] Ceymard leaflet (#13007) * replaced all overrides of LatLng by a single use of LatLngExpression when appropriate * Changed Point, PointTuple overrides to use PointExpression instead * Changet use of LatLngBounds and Bounds in general to use the Expression variant instead of having several overrides --- leaflet/leaflet.d.ts | 272 +++++++++++-------------------------------- 1 file changed, 71 insertions(+), 201 deletions(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 944eec7540..0c6f66127f 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -43,25 +43,15 @@ declare namespace L { } export interface CRS { - latLngToPoint(latlng: LatLng, zoom: number): Point; - latLngToPoint(latlng: LatLngLiteral, zoom: number): Point; - latLngToPoint(latlng: LatLngTuple, zoom: number): Point; - pointToLatLng(point: Point): LatLng; - pointToLatLng(point: PointTuple): LatLng; - project(latlng: LatLng): Point; - project(latlng: LatLngLiteral): Point; - project(latlng: LatLngTuple): Point; - unproject(point: Point): LatLng; - unproject(point: PointTuple): LatLng; + latLngToPoint(latlng: LatLngExpression, zoom: number): Point; + pointToLatLng(point: PointExpression): LatLng; + project(latlng: LatLngExpression): Point; + unproject(point: PointExpression): LatLng; scale(zoom: number): number; zoom(scale: number): number; getProjectedBounds(zoom: number): Bounds; - distance(latlng1: LatLng, latlng2: LatLng): number; - distance(latlng1: LatLngLiteral, latlng2: LatLngLiteral): number; - distance(latlng1: LatLngTuple, latlng2: LatLngTuple): number; - wrapLatLng(latlng: LatLng): LatLng; - wrapLatLng(latlng: LatLngLiteral): LatLng; - wrapLatLng(latlng: LatLngTuple): LatLng; + distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number; + wrapLatLng(latlng: LatLngExpression): LatLng; code: string; wrapLng: [number, number]; @@ -78,11 +68,8 @@ declare namespace L { } export interface Projection { - project(latlng: LatLng): Point; - project(latlng: LatLngLiteral): Point; - project(latlng: LatLngTuple): Point; - unproject(point: Point): LatLng; - unproject(point: PointTuple): LatLng; + project(latlng: LatLngExpression): Point; + unproject(point: PointExpression): LatLng; bounds: LatLngBounds; } @@ -94,13 +81,9 @@ declare namespace L { } export interface LatLng { - equals(otherLatLng: LatLng, maxMargin?: number): boolean; - equals(otherLatLng: LatLngLiteral, maxMargin?: number): boolean; - equals(otherLatLng: LatLngTuple, maxMargin?: number): boolean; + equals(otherLatLng: LatLngExpression, maxMargin?: number): boolean; toString(): string; - distanceTo(otherLatLng: LatLng): number; - distanceTo(otherLatLng: LatLngLiteral): number; - distanceTo(otherLatLng: LatLngTuple): number; + distanceTo(otherLatLng: LatLngExpression): number; wrap(): LatLng; toBounds(sizeInMeters: number): LatLngBounds; @@ -129,11 +112,8 @@ declare namespace L { export function latLng(coords: {lat: number, lng: number, alt: number}): LatLng; export interface LatLngBounds { - extend(latlng: LatLng): this; - extend(latlng: LatLngLiteral): this; - extend(latlng: LatLngTuple): this; - extend(otherBounds: LatLngBounds): this; - extend(otherBounds: LatLngBoundsLiteral): this; + extend(latlng: LatLngExpression): this; + extend(otherBounds: LatLngBoundsExpression): this; pad(bufferRatio: number): LatLngBounds; // does this modify the current instance or does it return a new one? getCenter(): LatLng; getSouthWest(): LatLng; @@ -144,18 +124,12 @@ declare namespace L { getSouth(): number; getEast(): number; getNorth(): number; - contains(otherBounds: LatLngBounds): boolean; - contains(otherBounds: LatLngBoundsLiteral): boolean; - contains(latlng: LatLng): boolean; - contains(latlng: LatLngLiteral): boolean; - contains(latlng: LatLngTuple): boolean; - intersects(otherBounds: LatLngBounds): boolean; - intersects(otherBounds: LatLngLiteral): boolean; - overlaps(otherBounds: Bounds): boolean; // investigate if this is really bounds and not latlngbounds - overlaps(otherBounds: BoundsLiteral): boolean; + contains(otherBounds: LatLngBoundsExpression): boolean; + contains(latlng: LatLngExpression): boolean; + intersects(otherBounds: LatLngBoundsExpression): boolean; + overlaps(otherBounds: BoundsExpression): boolean; // investigate if this is really bounds and not latlngbounds toBBoxString(): string; - equals(otherBounds: LatLngBounds): boolean; - equals(otherBounds: LatLngBoundsLiteral): boolean; + equals(otherBounds: LatLngBoundsExpression): boolean; isValid(): boolean; } @@ -163,11 +137,7 @@ declare namespace L { type LatLngBoundsExpression = LatLngBounds | LatLngBoundsLiteral; - export function latLngBounds(southWest: LatLng, northEast: LatLng): LatLngBounds; - - export function latLngBounds(southWest: LatLngLiteral, northEast: LatLngLiteral): LatLngBounds; - - export function latLngBounds(southWest: LatLngTuple, northEast: LatLngTuple): LatLngBounds; + export function latLngBounds(southWest: LatLngExpression, northEast: LatLngExpression): LatLngBounds; export function latLngBounds(latlngs: LatLngBoundsLiteral): LatLngBounds; @@ -175,25 +145,18 @@ declare namespace L { export interface Point { clone(): Point; - add(otherPoint: Point): Point; // investigate if this mutates or returns a new instance - add(otherPoint: PointTuple): Point; - subtract(otherPoint: Point): Point; - subtract(otherPoint: PointTuple): Point; + add(otherPoint: PointExpression): Point; // investigate if this mutates or returns a new instance + subtract(otherPoint: PointExpression): Point; divideBy(num: number): Point; multiplyBy(num: number): Point; - scaleBy(scale: Point): Point; - scaleBy(scale: PointTuple): Point; - unscaleBy(scale: Point): Point; - unscaleBy(scale: PointTuple): Point; + scaleBy(scale: PointExpression): Point; + unscaleBy(scale: PointExpression): Point; round(): Point; floor(): Point; ceil(): Point; - distanceTo(otherPoint: Point): Point; - distanceTo(otherPoint: PointTuple): Point; - equals(otherPoint: Point): boolean; - equals(otherPoint: PointTuple): boolean; - contains(otherPoint: Point): boolean; - contains(otherPoint: PointTuple): boolean; + distanceTo(otherPoint: PointExpression): Point; + equals(otherPoint: PointExpression): boolean; + contains(otherPoint: PointExpression): boolean; toString(): string; } @@ -208,20 +171,15 @@ declare namespace L { export type BoundsLiteral = Array; export interface Bounds { - extend(point: Point): this; - extend(point: PointTuple): this; + extend(point: PointExpression): this; getCenter(round?: boolean): Point; getBottomLeft(): Point; getTopRight(): Point; getSize(): Point; - contains(otherBounds: Bounds): boolean; - contains(otherBounds: BoundsLiteral): boolean; - contains(point: Point): boolean; - contains(point: PointTuple): boolean; - intersects(otherBounds: Bounds): boolean; - intersects(otherBounds: BoundsLiteral): boolean; - overlaps(otherBounds: Bounds): boolean; - overlaps(otherBounds: BoundsLiteral): boolean; + contains(otherBounds: BoundsExpression): boolean; + contains(point: PointExpression): boolean; + intersects(otherBounds: BoundsExpression): boolean; + overlaps(otherBounds: BoundsExpression): boolean; min: Point; max: Point; @@ -229,9 +187,7 @@ declare namespace L { type BoundsExpression = Bounds | BoundsLiteral; - export function bounds(topLeft: Point, bottomRight: Point): Bounds; - - export function bounds(topLeft: PointTuple, bottomRight: PointTuple): Bounds; + export function bounds(topLeft: PointExpression, bottomRight: PointExpression): Bounds; export function bounds(points: Array): Bounds; @@ -404,9 +360,7 @@ declare namespace L { bindPopup(content: Popup): this; unbindPopup(): this; openPopup(): this; - openPopup(latlng: LatLng): this; - openPopup(latlng: LatLngLiteral): this; - openPopup(latlng: LatLngTuple): this; + openPopup(latlng: LatLngExpression): this; closePopup(): this; togglePopup(): this; isPopupOpen(): boolean; @@ -422,9 +376,7 @@ declare namespace L { bindTooltip(content: Tooltip, options?: TooltipOptions): this; unbindTooltip(): this; openTooltip(): this; - openTooltip(latlng: LatLng): this; - openTooltip(latlng: LatLngLiteral): this; - openTooltip(latlng: LatLngTuple): this; + openTooltip(latlng: LatLngExpression): this; closeTooltip(): this; toggleTooltip(): this; isTooltipOpen(): boolean; @@ -564,60 +516,34 @@ declare namespace L { interface InternalPolyline extends Path { getLatLngs(): Array; - setLatLngs(latlngs: Array): this; - setLatLngs(latlngs: Array): this; - setLatLngs(latlngs: Array): this; + setLatLngs(latlngs: Array): this; isEmpty(): boolean; getCenter(): LatLng; getBounds(): LatLngBounds; - addLatLng(latlng: LatLng): this; - addLatLng(latlng: LatLngLiteral): this; - addLatLng(latlng: LatLngTuple): this; - addLatLng(latlng: Array): this; // these three overloads aren't explicitly noted in the docs - addLatLng(latlng: Array): this; - addLatLng(latlng: Array): this; + addLatLng(latlng: LatLngExpression): this; + addLatLng(latlng: Array): this; // these three overloads aren't explicitly noted in the docs } export interface Polyline extends InternalPolyline { toGeoJSON(): GeoJSON.LineString | GeoJSON.MultiLineString; } - export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; - - export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; - - export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; - - export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; - - export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; - - export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; + export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; + export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; export interface Polygon extends InternalPolyline { toGeoJSON(): GeoJSON.Polygon | GeoJSON.MultiPolygon; } - export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; + export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; - export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; - - export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; - - export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; - - export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; - - export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; + export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; export interface Rectangle extends Polygon { - setBounds(latLngBounds: LatLngBounds): this; - setBounds(latLngBounds: LatLngBoundsLiteral): this; + setBounds(latLngBounds: LatLngBoundsExpression): this; } - export function rectangle(latLngBounds: LatLngBounds, options?: PolylineOptions): Rectangle; - - export function rectangle(latLngBounds: LatLngBoundsLiteral, options?: PolylineOptions): Rectangle; + export function rectangle(latLngBounds: LatLngBoundsExpression, options?: PolylineOptions): Rectangle; export interface CircleMarkerOptions extends PathOptions { radius?: number; @@ -625,19 +551,13 @@ declare namespace L { export interface CircleMarker extends Path { toGeoJSON(): GeoJSON.Point; - setLatLng(latLng: LatLng): this; - setLatLng(latLng: LatLngLiteral): this; - setLatLng(latLng: LatLngTuple): this; + setLatLng(latLng: LatLngExpression): this; getLatLng(): LatLng; setRadius(radius: number): this; getRadius(): number; } - export function circleMarker(latlng: LatLng, options?: CircleMarkerOptions): CircleMarker; - - export function circleMarker(latlng: LatLngLiteral, options?: CircleMarkerOptions): CircleMarker; - - export function circleMarker(latlng: LatLngLiteral, options?: CircleMarkerOptions): CircleMarker; + export function circleMarker(latlng: LatLngExpression, options?: CircleMarkerOptions): CircleMarker; export interface CircleOptions extends PathOptions { radius?: number; @@ -649,17 +569,8 @@ declare namespace L { getBounds(): LatLngBounds; } - export function circle(latlng: LatLng, options?: CircleOptions): Circle; - - export function circle(latlng: LatLngLiteral, options?: CircleOptions): Circle; - - export function circle(latlng: LatLngTuple, options?: CircleOptions): Circle; - - export function circle(latlng: LatLng, radius: number, options?: CircleOptions): Circle; - - export function circle(latlng: LatLngLiteral, radius: number, options?: CircleOptions): Circle; - - export function circle(latlng: LatLngTuple, radius: number, options?: CircleOptions): Circle; + export function circle(latlng: LatLngExpression, options?: CircleOptions): Circle; + export function circle(latlng: LatLngExpression, radius: number, options?: CircleOptions): Circle; export interface RendererOptions extends LayerOptions { padding?: number; @@ -1274,55 +1185,34 @@ declare namespace L { hasLayer(layer: Layer): boolean; eachLayer(fn: (layer: Layer) => void, context?: Object): this; openPopup(popup: Popup): this; - openPopup(content: string, latlng: LatLng, options?: PopupOptions): this; - openPopup(content: string, latlng: LatLngLiteral, options?: PopupOptions): this; - openPopup(content: string, latlng: LatLngTuple, options?: PopupOptions): this; - openPopup(content: HTMLElement, latlng: LatLng, options?: PopupOptions): this; - openPopup(content: HTMLElement, latlng: LatLngLiteral, options?: PopupOptions): this; - openPopup(content: HTMLElement, latlng: LatLngTuple, options?: PopupOptions): this; + openPopup(content: string, latlng: LatLngExpression, options?: PopupOptions): this; + openPopup(content: HTMLElement, latlng: LatLngExpression, options?: PopupOptions): this; closePopup(popup?: Popup): this; openTooltip(tooltip: Tooltip): this; - openTooltip(content: string, latlng: LatLng, options?: TooltipOptions): this; - openTooltip(content: string, latlng: LatLngLiteral, options?: TooltipOptions): this; - openTooltip(content: string, latlng: LatLngTuple, options?: TooltipOptions): this; - openTooltip(content: HTMLElement, latlng: LatLng, options?: TooltipOptions): this; - openTooltip(content: HTMLElement, latlng: LatLngLiteral, options?: TooltipOptions): this; - openTooltip(content: HTMLElement, latlng: LatLngTuple, options?: TooltipOptions): this; + openTooltip(content: string, latlng: LatLngExpression, options?: TooltipOptions): this; + openTooltip(content: HTMLElement, latlng: LatLngExpression, options?: TooltipOptions): this; closeTooltip(tooltip?: Tooltip): this; // Methods for modifying map state - setView(center: LatLng, zoom: number, options?: ZoomPanOptions): this; - setView(center: LatLngLiteral, zoom: number, options?: ZoomPanOptions): this; - setView(center: LatLngTuple, zoom: number, options?: ZoomPanOptions): this; + setView(center: LatLngExpression, zoom: number, options?: ZoomPanOptions): this; setZoom(zoom: number, options: ZoomPanOptions): this; zoomIn(delta?: number, options?: ZoomOptions): this; zoomOut(delta?: number, options?: ZoomOptions): this; - setZoomAround(latlng: LatLng, zoom: number, options: ZoomOptions): this; - setZoomAround(latlng: LatLngLiteral, zoom: number, options: ZoomOptions): this; - setZoomAround(latlng: LatLngTuple, zoom: number, options: ZoomOptions): this; // will the latlng version using tuple take precedence or will the point tuple version? + setZoomAround(latlng: LatLngExpression, zoom: number, options: ZoomOptions): this; setZoomAround(offset: Point, zoom: number, options: ZoomOptions): this; - fitBounds(bounds: LatLngBounds, options: FitBoundsOptions): this; - fitBounds(bounds: LatLngBoundsLiteral, options: FitBoundsOptions): this; + fitBounds(bounds: LatLngBoundsExpression, options: FitBoundsOptions): this; fitWorld(options?: FitBoundsOptions): this; - panTo(latlng: LatLng, options?: PanOptions): this; - panTo(latlng: LatLngLiteral, options?: PanOptions): this; - panTo(latlng: LatLngTuple, options?: PanOptions): this; - panBy(offset: Point): this; - panBy(offset: PointTuple): this; - setMaxBounds(bounds: LatLngBounds): this; - setMaxBounds(bounds: LatLngBoundsLiteral): this; + panTo(latlng: LatLngExpression, options?: PanOptions): this; + panBy(offset: PointExpression): this; + setMaxBounds(bounds: LatLngBoundsExpression): this; setMinZoom(zoom: number): this; setMaxZoom(zoom: number): this; - panInsideBounds(bounds: LatLngBounds, options?: PanOptions): this; - panInsideBounds(bounds: LatLngBoundsLiteral, options?: PanOptions): this; + panInsideBounds(bounds: LatLngBoundsExpression, options?: PanOptions): this; invalidateSize(options: ZoomPanOptions): this; invalidateSize(animate: boolean): this; stop(): this; - flyTo(latlng: LatLng, zoom?: number, options?: ZoomPanOptions): this; - flyTo(latlng: LatLngLiteral, zoom?: number, options?: ZoomPanOptions): this; - flyTo(latlng: LatLngTuple, zoom?: number, options?: ZoomPanOptions): this; - flyToBounds(bounds: LatLngBounds, options?: FitBoundsOptions): this; - flyToBounds(bounds: LatLngBoundsLiteral, options?: FitBoundsOptions): this; + flyTo(latlng: LatLngExpression, zoom?: number, options?: ZoomPanOptions): this; + flyToBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this; // Other methods addHandler(name: string, HandlerClass: () => Handler): this; // HandlerClass is actually a constructor function, is this the right way? @@ -1340,8 +1230,7 @@ declare namespace L { getBounds(): LatLngBounds; getMinZoom(): number; getMaxZoom(): number; - getBoundsZoom(bounds: LatLngBounds, inside?: boolean): number; - getBoundsZoom(bounds: LatLngBoundsLiteral, inside?: boolean): number; + getBoundsZoom(bounds: LatLngBoundsExpression, inside?: boolean): number; getSize(): Point; getPixelBounds(): Bounds; getPixelOrigin(): Point; @@ -1350,29 +1239,16 @@ declare namespace L { // Conversion methods getZoomScale(toZoom: number, fromZoom: number): number; getScaleZoom(scale: number, fromZoom: number): number; - project(latlng: LatLng, zoom: number): Point; - project(latlng: LatLngLiteral, zoom: number): Point; - project(latlng: LatLngTuple, zoom: number): Point; - unproject(point: Point, zoom: number): LatLng; - unproject(point: PointTuple, zoom: number): LatLng; - layerPointToLatLng(point: Point): LatLng; - layerPointToLatLng(point: PointTuple): LatLng; - latLngToLayerPoint(latlng: LatLng): Point; - latLngToLayerPoint(latlng: LatLngLiteral): Point; - latLngToLayerPoint(latlng: LatLngTuple): Point; - wrapLatLng(latlng: LatLng): LatLng; - wrapLatLng(latlng: LatLngLiteral): LatLng; - wrapLatLng(latlng: LatLngTuple): LatLng; - distance(latlng1: LatLng, latlng2: LatLng): number; - distance(latlng1: LatLngLiteral, latlng2: LatLngLiteral): number; - distance(latlng1: LatLngTuple, latlng2: LatLngTuple): number; - containerPointToLayerPoint(point: Point): Point; - containerPointToLayerPoint(point: PointTuple): Point; - layerPointToContainerPoint(point: Point): Point; + project(latlng: LatLngExpression, zoom: number): Point; + unproject(point: PointExpression, zoom: number): LatLng; + layerPointToLatLng(point: PointExpression): LatLng; + latLngToLayerPoint(latlng: LatLngExpression): Point; + wrapLatLng(latlng: LatLngExpression): LatLng; + distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number; + containerPointToLayerPoint(point: PointExpression): Point; + layerPointToContainerPoint(point: PointExpression): Point; layerPointToContainerPoint(point: PointTuple): Point; - latLngToContainerPoint(latlng: LatLng): Point; - latLngToContainerPoint(latlng: LatLngLiteral): Point; - latLngToContainerPoint(latlng: LatLngTuple): Point; + latLngToContainerPoint(latlng: LatLngExpression): Point; mouseEventToContainerPoint(ev: MouseEvent): Point; mouseEventToLayerPoint(ev: MouseEvent): Point; mouseEventToLatLng(ev: MouseEvent): LatLng; @@ -1450,9 +1326,7 @@ declare namespace L { export interface Marker extends Layer { getLatLng(): LatLng; - setLatLng(latlng: LatLng): this; - setLatLng(latlng: LatLngLiteral): this; - setLatLng(latlng: LatLngTuple): this; + setLatLng(latlng: LatLngExpression): this; setZIndexOffset(offset: number): this; setIcon(icon: Icon): this; setOpacity(opacity: number): this; @@ -1461,11 +1335,7 @@ declare namespace L { dragging: Handler; } - export function marker(latlng: LatLng, options?: MarkerOptions): Marker; - - export function marker(latlng: LatLngLiteral, options?: MarkerOptions): Marker; - - export function marker(latlng: LatLngTuple, options?: MarkerOptions): Marker; + export function marker(latlng: LatLngExpression, options?: MarkerOptions): Marker; export namespace Browser { export const ie: boolean; From 563ebfe839967004c27e0ec31621db0fc3825c3f Mon Sep 17 00:00:00 2001 From: Finn Poppinga Date: Thu, 8 Dec 2016 21:27:52 +0100 Subject: [PATCH 19/38] add ElasticSeach 5.x API function for deleteByQuery (#13014) * add ElasticSeach 5.x API function for deleteByQuery * use searchParams for deleteByQuery, as theses resemble the documentation. * add DeleteByQueryParams parameter type. * add deleteByQuery to tests. --- elasticsearch/elasticsearch-tests.ts | 9 +++++- elasticsearch/elasticsearch.d.ts | 44 ++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/elasticsearch/elasticsearch-tests.ts b/elasticsearch/elasticsearch-tests.ts index 6d308dc6ed..6a065e63df 100644 --- a/elasticsearch/elasticsearch-tests.ts +++ b/elasticsearch/elasticsearch-tests.ts @@ -85,4 +85,11 @@ client.cluster.state({ client.cluster.stats({ ignore: 1 }, (err, response) => { -}); \ No newline at end of file +}); + +client.deleteByQuery({ + index : 'index', + type : 'type' +}, (err, response) => { + +}); diff --git a/elasticsearch/elasticsearch.d.ts b/elasticsearch/elasticsearch.d.ts index 26a9a1e880..9f8b4c3175 100644 --- a/elasticsearch/elasticsearch.d.ts +++ b/elasticsearch/elasticsearch.d.ts @@ -15,6 +15,8 @@ declare module Elasticsearch { create(params: CreateDocumentParams, callback: (err: any, response: any, status: any) => void): void; delete(params: DeleteDocumentParams): PromiseLike; delete(params: DeleteDocumentParams, callback: (error: any, response: any) => void): void; + deleteByQuery(params : DeleteByQueryParams, callback : (error: any, response: any) => void): void; + deleteByQuery(params : DeleteByQueryParams): PromiseLike; exists(params: ExistsParams): PromiseLike; exists(params: ExistsParams, callback: (error: any, response: any, status?: any) => void): void; get(params: GetParams, callback: (error: any, response: GetResponse) => void): void; @@ -224,7 +226,7 @@ declare module Elasticsearch { type: string; id: string; body: T; - consistensy?: string; + consistency?: string; parent?: string; replication?: string; routing?: string; @@ -260,6 +262,44 @@ declare module Elasticsearch { timeout?: Date | number; } + export interface DeleteByQueryParams extends GenericParams { + index?: string; + type?: string | string[] | number; + body?: any; + q?: string; + analyzer?: string; + analyzeWildcard?: boolean; + defaultOperator?: 'AND' | 'OR'; + df?: string; + from?: number; + ignoreUnavailable?: boolean; + allowNoIndices?: boolean; + conflicts?: 'abort' | 'proceed'; + expandWildcards?: 'open' | 'closed' | 'none' | 'all'; + lenient?: boolean; + lowercaseExpandedTerms?: boolean; + preference?: string; + routing?: string | string[] | boolean; + scroll?: string; + searchType?: 'query_then_fetch' | 'dfs_query_then_fetch'; + searchTimeout?: string; + size?: number; + sort?: string | string[] | boolean; + _source?: string | string[] | boolean; + _sourceExclude?: string | string[] | boolean; + _sourceInclude?: string | string[] | boolean; + terminateAfter?: number; + stats?: string | string[] | boolean; + version?: boolean; + requestCache?: boolean; + refresh?: boolean; + timeout?: string; + waitForActiveShards?: string; + scrollSize?: number; + waitForCompletion?: boolean; + requestsPerSecond?: number; + } + export interface SearchResponse { took: number, timed_out: boolean, @@ -286,7 +326,7 @@ declare module Elasticsearch { }[] }, aggregations?: any - } + } export interface MSearchParams extends GenericParams { index?: string | string[] | Boolean; From 998028ff0f8bab6a2fe945206a56189f020e6c49 Mon Sep 17 00:00:00 2001 From: Pranay Prakash Date: Thu, 8 Dec 2016 14:45:58 -0600 Subject: [PATCH 20/38] Make `less` render options optional (#13078) --- less/less.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/less/less.d.ts b/less/less.d.ts index f8389d3d9b..354a342bf9 100644 --- a/less/less.d.ts +++ b/less/less.d.ts @@ -1,6 +1,6 @@ // Type definitions for LESS // Project: http://lesscss.org/ -// Definitions by: Tom Hasner +// Definitions by: Tom Hasner , Pranay Prakash // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Less { @@ -40,11 +40,11 @@ declare namespace Less { } interface SourceMapOption { - sourceMapURL: string; - sourceMapBasepath: string; - sourceMapRootpath: string; - outputSourceFiles: boolean; - sourceMapFileInline: boolean; + sourceMapURL?: string; + sourceMapBasepath?: string; + sourceMapRootpath?: string; + outputSourceFiles?: boolean; + sourceMapFileInline?: boolean; } interface StaticOptions { @@ -55,7 +55,7 @@ declare namespace Less { interface Options { sourceMap?: SourceMapOption; filename?: string; - plugins: Plugin[]; + plugins?: Plugin[]; rootFileInfo?: RootFileInfo; } From c26f34e6d5b531bebcb3d66feb1ba6b128552a52 Mon Sep 17 00:00:00 2001 From: Thomas Hendriksen Date: Thu, 8 Dec 2016 21:46:01 +0100 Subject: [PATCH 21/38] Added semver --- ng-dialog/ng-dialog.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng-dialog/ng-dialog.d.ts b/ng-dialog/ng-dialog.d.ts index 71757165de..2663d0f4fa 100644 --- a/ng-dialog/ng-dialog.d.ts +++ b/ng-dialog/ng-dialog.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ngDialog +// Type definitions for ngDialog v0.6.4 // Project: https://github.com/likeastore/ngDialog // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From ceb00618ba4e017c586869787ca786c9d15d1636 Mon Sep 17 00:00:00 2001 From: MariusAlch Date: Thu, 8 Dec 2016 22:47:43 +0200 Subject: [PATCH 22/38] Updated gravity definition. (#13088) --- matter-js/matter-js.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/matter-js/matter-js.d.ts b/matter-js/matter-js.d.ts index f21ad2ef7b..8ba5673284 100644 --- a/matter-js/matter-js.d.ts +++ b/matter-js/matter-js.d.ts @@ -2924,10 +2924,14 @@ declare namespace Matter { } interface IWorldDefinition extends ICompositeDefinition { - gravity?: Vector; + gravity?: Gravity; bounds?: Bounds; } + interface Gravity extends Vector { + scale: number; + } + /** * The `Matter.World` module contains methods for creating and manipulating the world composite. * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. @@ -2994,7 +2998,7 @@ declare namespace Matter { */ static create(options: IWorldDefinition): World; - gravity: Vector; + gravity: Gravity; bounds: Bounds; } From 4e2f977a05b2d13a317ad4b8d344898cb0b16a6c Mon Sep 17 00:00:00 2001 From: Julien CROUZET Date: Thu, 8 Dec 2016 21:51:08 +0100 Subject: [PATCH 23/38] Full Redis client options (#13108) --- redis/redis.d.ts | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/redis/redis.d.ts b/redis/redis.d.ts index f5cba7c11f..2edccbb102 100644 --- a/redis/redis.d.ts +++ b/redis/redis.d.ts @@ -46,22 +46,33 @@ declare module "redis" { } export interface ClientOpts { - parser?: string; - return_buffers?: boolean; - detect_buffers?: boolean; - socket_nodelay?: boolean; - socket_keepalive?: boolean; - no_ready_check?: boolean; - enable_offline_queue?: boolean; - retry_max_delay?: number; - connect_timeout?: number; - max_attempts?: number; auth_pass?: string; - password?: string; - family?: string; command_queue_high_water?: number; command_queue_low_water?: number; + connect_timeout?: number; + db?: string; + detect_buffers?: boolean; + disable_resubscribing?: boolean; + enable_offline_queue?: boolean; + family?: string; + host?: string; + max_attempts?: number; + no_ready_check?: boolean; + parser?: string; + password?: string; + path?: string; + port?: number; + prefix?: string; + rename_commands?: any; + retry_max_delay?: number; retry_strategy?: RetryStrategy; + retry_unfulfilled_commands?: boolean; + return_buffers?: boolean; + socket_keepalive?: boolean; + socket_nodelay?: boolean; + string_numbers?: boolean; + tls?: any; + url?: string; } export interface RedisClient extends NodeJS.EventEmitter { From 3b9218b067fdbfaf0e2a6c31cc1fab1d8bca1914 Mon Sep 17 00:00:00 2001 From: Santiago Date: Thu, 8 Dec 2016 15:51:43 -0500 Subject: [PATCH 24/38] Added missing return type to on() methods. (#13082) From 91e8f4126cb10812f6aee0067fa2884326bec83c Mon Sep 17 00:00:00 2001 From: cailenmusselman Date: Thu, 8 Dec 2016 14:53:14 -0600 Subject: [PATCH 25/38] Update react-native.0.29.d.ts (#13118) drawerPosition is of type `number` Android DrawerConsts.DrawerPosition.Left is equivalent to DrawerLayoutAndroid.positions.Left Android DrawerConsts.DrawerPosition.Right is equivalent to DrawerLayoutAndroid.positions.Right --- react-native/react-native.0.29.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native/react-native.0.29.d.ts b/react-native/react-native.0.29.d.ts index 61960d141a..7ae6f47c72 100644 --- a/react-native/react-native.0.29.d.ts +++ b/react-native/react-native.0.29.d.ts @@ -1871,7 +1871,7 @@ declare namespace __React { * Specifies the side of the screen from which the drawer will slide in. * enum(DrawerConsts.DrawerPosition.Left, DrawerConsts.DrawerPosition.Right) */ - drawerPosition?: any; + drawerPosition?: number; /** * Specifies the width of the drawer, more precisely the width of the From 26aec5f23467356366d46f38418ef060ef312fed Mon Sep 17 00:00:00 2001 From: Guy Date: Thu, 8 Dec 2016 12:54:55 -0800 Subject: [PATCH 26/38] Upgrade to match braintree-web 3.6.1 (#13098) * Update to match braintree-web version 3.3.0 * Upgrade to match Braintree-web v3.5.0 * upgrade to match braintree-web 3.6.1 add US bank class --- braintree-web/braintree-web.d.ts | 213 +++++++++++++++++++++++++++++-- 1 file changed, 202 insertions(+), 11 deletions(-) diff --git a/braintree-web/braintree-web.d.ts b/braintree-web/braintree-web.d.ts index e58cf7455b..b3ae9cd3c3 100644 --- a/braintree-web/braintree-web.d.ts +++ b/braintree-web/braintree-web.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Braintree-web v3.5.0 +// Type definitions for Braintree-web v3.6.1 // Project: https://github.com/braintree/braintree-web // Definitions by: Guy Shahine // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -97,7 +97,7 @@ declare namespace BraintreeWeb { // billingContact // Billing contact information for the user. // countryCode -//Required.The merchant’s two- letter ISO 3166 country code. +//Required.The merchants two- letter ISO 3166 country code. // currencyCode // Required.The three- letter ISO 4217 currency code for the payment. // lineItems @@ -427,10 +427,10 @@ declare namespace BraintreeWeb { * Used by other modules to formulate all network requests to the Braintree gateway. It is also capable of being used directly from your own form to tokenize credit card information. However, be sure to satisfy PCI compliance if you use direct card tokenization. * @public * @param {object} options Request options: - * @param {string} options.method HTTP method. i.e. "get" or "post" - * @param {string} options.endpoint Enpoint path. i.e. "payment_methods" + * @param {string} options.method HTTP method, e.g. "get" or "post" + * @param {string} options.endpoint Endpoint path. e.g. "payment_methods" * @param {object} options.data Data to send with the request - * @param {string} [options.timeout=60000] Timeout limit + * @param {number} [options.timeout=60000] Set a timeout (in milliseconds) for the request. * @param {callback} callback The second argument, data, is the returned server data. * @example * Direct Credit Card Tokenization @@ -447,7 +447,11 @@ declare namespace BraintreeWeb { * expirationDate: form['cc-date'].value, * billingAddress: { * postalCode: form['cc-postal'].value + * }, + * options: { + * validate: false * } + * } * } * }; * @@ -459,6 +463,7 @@ declare namespace BraintreeWeb { * method: 'post', * data: data * }, function (requestErr, response) { + * // More detailed example of handling API errors: https://codepen.io/braintree/pen/MbwjdM * if (requestErr) { throw new Error(requestErr); } * * console.log('Got nonce:', response.creditCards[0].nonce); @@ -477,6 +482,7 @@ declare namespace BraintreeWeb { /** * @static * @function create + * @description Creates a DataCollector instance. Requires advanced fraud protection to be enabled in the Braintree gateway. Contact our [support team](mailto:support@braintreepayments.com) to configure your Kount ID. * @param {object} options Creation options: * @param {Client} options.client A {@link Client} instance. * @param {boolean} [options.kount] If true, Kount fraud data collection is enabled. @@ -498,7 +504,7 @@ declare namespace BraintreeWeb { * @global * @name DataCollector * @description Do not use this constructor directly. Use {@link module:braintree-web/data-collector.create|braintree-web.data-collector.create} instead. - * @classdesc This class is used for advanced fraud integration with PayPal and Kount. Instances of this class have {@link DataCollector#deviceData|deviceData} which is used to correlate user sessions with server transactions. + * @classdesc This class is used for advanced fraud integration with PayPal and Kount. Instances of this class have {@link DataCollector#deviceData|deviceData} which is used to correlate user sessions with server transactions. Before using DataCollector, make sure you have enabled advanced fraud protection in the Braintree gateway. To use your own Kount ID, contact our support team ([support@braintreepayments.com](mailto:support@braintreepayments.com) or [877.434.2894](tel:877.434.2894)). */ export class DataCollector { /** @@ -740,7 +746,33 @@ declare namespace BraintreeWeb { * * These are the CSS properties that Hosted Fields supports. Any other CSS should be specified on your page and outside of any Braintree configuration. Trying to set unsupported properties will fail and put a warning in the console. * - * `color` `font-family` `font-size-adjust` `font-size` `font-stretch` `font-style` `font-variant-alternates` `font-variant-caps` `font-variant-east-asian` `font-variant-ligatures` `font-variant-numeric` `font-variant` `font-weight` `font` `line-height` `opacity` `outline` `text-shadow` `transition` `-moz-osx-font-smoothing` `-moz-tap-highlight-color` `-moz-transition` `-webkit-font-smoothing` `-webkit-tap-highlight-color` `-webkit-transition` + * Supported CSS properties are: + * `color` + * `font-family` + * `font-size-adjust` + * `font-size` + * `font-stretch` + * `font-style` + * `font-variant-alternates` + * `font-variant-caps` + * `font-variant-east-asian` + * `font-variant-ligatures` + * `font-variant-numeric` + * `font-variant` + * `font-weight` + * `font` + * `letter-spacing` + * `line-height` + * `opacity` + * `outline` + * `text-shadow` + * `transition` + * `-moz-osx-font-smoothing` + * `-moz-tap-highlight-color` + * `-moz-transition` + * `-webkit-font-smoothing` + * `-webkit-tap-highlight-color` + * `-webkit-transition` * @typedef {object} styleOptions */ styleOptions: any; @@ -976,7 +1008,9 @@ declare namespace BraintreeWeb { * @property {string} details.shippingAddress.postalCode Postal code. * @property {string} details.shippingAddress.countryCode 2 character country code (e.g. US). * @property {?object} details.billingAddress User's billing address details. - * You will also need to enable the PayPal Billing Address Request feature in your PayPal account. + * Not available to all merchants; [contact PayPal](https://developers.braintreepayments.com/support/guides/paypal/setup-guide#contacting-paypal-support) for details on eligibility and enabling this feature. + * To enable this feature, [contact PayPal](https://developers.braintreepayments.com/support/guides/paypal/setup-guide#contacting-paypal-support). + * Alternatively, see `shippingAddress` above as an available client opt * To enable this feature, [contact PayPal](https://developers.braintreepayments.com/support/guides/paypal/setup-guide#contacting-paypal-support). * @property {string} details.billingAddress.line1 Street number and name. * @property {string} details.billingAddress.line2 Extended address. @@ -1029,7 +1063,7 @@ declare namespace BraintreeWeb { * @param {Client} options.client A {@link Client} instance. * @param {callback} callback The second argument, `data`, is the {@link PayPal} instance. * @example - * braintree.paypal.create( + * braintree.paypal.create({ * client: clientInstance * }, function (createErr, paypalInstance) { * if (createErr) { @@ -1039,7 +1073,7 @@ declare namespace BraintreeWeb { * console.error('Error!', createErr); * } * } - * } + * }); * @returns {void} */ create: (options: { client: Client }, callback: callback) => void; @@ -1083,7 +1117,33 @@ declare namespace BraintreeWeb { * @param {string|number} [options.amount] The amount of the transaction. Required when using the Checkout flow. * @param {string} [options.currency] The currency code of the amount, such as 'USD'. Required when using the Checkout flow. * @param {string} [options.displayName] The merchant name displayed inside of the PayPal lightbox; defaults to the company name on your Braintree account - * @param {string} [options.locale=en_US] Use this option to change the language, links, and terminology used in the PayPal flow to suit the country and language of your customer. + * @param {string} [options.locale=en_US] Use this option to change the language, links, and terminology used in the PayPal flow. This locale will be used unless the buyer has set a preferred locale for their account. If an unsupported locale is supplied, a fallback locale (determined by buyer preference or browser data) will be used and no error will be thrown. + * + * Supported locales are: + * `da_DK`, + * `de_DE`, + * `en_AU`, + * `en_GB`, + * `en_US`, + * `es_ES`, + * `fr_CA`, + * `fr_FR`, + * `id_ID`, + * `it_IT`, + * `ja_JP`, + * `ko_KR`, + * `nl_NL`, + * `no_NO`, + * `pl_PL`, + * `pt_BR`, + * `pt_PT`, + * `ru_RU`, + * `sv_SE`, + * `th_TH`, + * `zh_CN`, + * `zh_HK`, + * and `zh_TW`. + * * @param {boolean} [options.enableShippingAddress=false] Returns a shipping address object in {@link PayPal#tokenize}. * @param {object} [options.shippingAddressOverride] Allows you to pass a shipping address you have already collected into the PayPal payment flow. * @param {string} options.shippingAddressOverride.line1 Street address. @@ -1603,6 +1663,134 @@ declare namespace BraintreeWeb { public teardown(callback?: callback): void; } + + /** + * @module braintree-web/us-bank-account + * @description This module is for accepting payments of US bank accounts. + */ + export interface USBankAccount { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {callback} callback The second argument, `data`, is the {@link USBankAccount} instance. + * @returns {void} + */ + create: (options: { client: Client }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `{@pkg version}`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {object} options See {@link module:braintree-web/us-bank-account.create|us-bank-account.create}. + * @classdesc This class represents a US Bank Account component. Instances of this class can tokenize raw bank details or present a bank login. You cannot use this constructor directly. Use {@link module:braintree-web/us-bank-account.create|braintree.us-bank-account.create} instead. + */ + export class USBankAccount { + /** + * @class + * @param {object} options See {@link module:braintree-web/us-bank-account.create|us-bank-account.create}. + * @classdesc This class represents a US Bank Account component. Instances of this class can tokenize raw bank details or present a bank login. You cannot use this constructor directly. Use {@link module:braintree-web/us-bank-account.create|braintree.us-bank-account.create} instead. + */ + constructor(options: any) + + + /** + * Tokenizes bank information to return a payment method nonce. You can tokenize bank details by providing information like account and routing numbers. You can also tokenize with a bank login UI that prompts the customer to log into their bank account. + * @public + * @param {object} options All tokenization options for the US Bank Account component. + * @param {string} options.mandateText A string for proof of customer authorization. For example, `'I authorize Braintree to debit my bank account on behalf of My Online Store.'`. + * @param {object} [options.bankDetails] Bank detail information (such as account and routing numbers). `bankDetails` or `bankLogin` option must be provided. + * @param {string} options.bankDetails.routingNumber The customer's bank routing number, such as `'307075259'`. + * @param {string} options.bankDetails.accountNumber The customer's bank account number, such as `'999999999'`. + * @param {string} options.bankDetails.accountType The customer's bank account type. Must be `'checking'` or `'savings'`. + * @param {string} options.bankDetails.accountHolderName The customer's bank account holder name, such as `'Rosetta Fox'`. + * @param {object} options.bankDetails.billingAddress The customer's billing address. + * @param {string} options.bankDetails.billingAddress.streetAddress The street address for the customer's billing address, such as `'123 Fake St'`. + * @param {string} [options.bankDetails.billingAddress.extendedAddress] The extended street address for the customer's billing address, such as `'Apartment B'`. + * @param {string} options.bankDetails.billingAddress.locality The locality for the customer's billing address. This is typically a city, such as `'San Francisco'`. + * @param {string} options.bankDetails.billingAddress.region The region for the customer's billing address. This is typically a state, such as `'CA'`. + * @param {string} options.bankDetails.billingAddress.postalCode The postal code for the customer's billing address. This is typically a ZIP code, such as `'94119'`. + * @param {object} [options.bankLogin] Bank login information. `bankLogin` or `bankDetails` option must be provided. + * @param {string} options.bankLogin.displayName Display name for the bank login UI, such as `'My Store'`. + * @param {callback} callback The second argument, data, is a {@link USBankAccount~tokenizePayload|tokenizePayload}. + * @returns {void} + * @example + * Tokenizing raw bank details + * submitButton.addEventListener('click', function (event) { + * var routingNumberInput = document.querySelector('input#routing-number'); + * var accountNumberInput = document.querySelector('input#account-number'); + * var accountHolderNameInput = document.querySelector('input#account-holder-name'); + * var accountTypeInput = document.querySelector('input[name="account-type"]:checked'); + * var billingAddressStreetInput = document.querySelector('input#street-address'); + * var billingAddressExtendedInput = document.querySelector('input#extended-address'); + * var billingAddressLocalityInput = document.querySelector('input#locality'); + * var billingAddressRegionSelect = document.querySelector('select#region'); + * var billingAddressPostalInput = document.querySelector('input#postal-code'); + * + * event.preventDefault(); + * + * usBankAccountInstance.tokenize({ + * bankDetails: { + * routingNumber: routingNumberInput.value, + * accountNumber: accountNumberInput.value, + * accountHolderName: accountHolderNameInput.value, + * accountType: accountTypeInput.value, + * billingAddress: { + * streetAddress: billingAddressStreetInput.value, + * extendedAddress: billingAddressExtendedInput.value, + * locality: billingAddressLocalityInput.value, + * region: billingAddressRegionSelect.value, + * postalCode: billingAddressPostalInput.value + * } + * }, + * mandateText: 'I authorize Braintree to debit my bank account on behalf of My Online Store.' + * }, function (tokenizeErr, tokenizedPayload) { + * if (tokenizeErr) { + * console.error('There was an error tokenizing the bank details.'); + * return; + * } + * + * // Send tokenizePayload.nonce to your server here! + * }); + * }); + * @example + * Tokenizing with bank login UI + * bankLoginButton.addEventListener('click', function (event) { + * event.preventDefault(); + * + * usBankAccountInstance.tokenize({ + * bankLogin: { + * displayName: 'My Online Store' + * }, + * mandateText: 'I authorize Braintree to debit my bank account on behalf of My Online Store.' + * }, function (tokenizeErr, tokenizedPayload) { + * if (tokenizeErr) { + * console.error('There was an error tokenizing the bank details.'); + * return; + * } + * + * // Send tokenizePayload.nonce to your server here! + * }); + * }); + */ + public tokenize(options: { mandateText: string, bankDetails: any, bankLogin: any }, callback: callback): void; + + /** + * Cleanly tear down anything set up by {@link module:braintree-web/us-bank-account.create|create}. + * @public + * @param {callback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. + * @returns {void} + */ + public teardown(callback?: callback): void; + + } + } declare namespace BraintreeError { @@ -1733,6 +1921,9 @@ interface BraintreeStatic { /** @type {module:braintree-web/apple-pay} */ applePay: BraintreeWeb.ApplePay; + /** @type {module:braintree-web/us-bank-account} */ + usBankAccount: BraintreeWeb.USBankAccount; + /** * @description The current version of the SDK, i.e. `3.0.2`. * @type {string} From 4e5fbf297e2494b43ec9dba411bf9507b8341d1d Mon Sep 17 00:00:00 2001 From: Matt Gibbs Date: Thu, 8 Dec 2016 15:55:15 -0500 Subject: [PATCH 27/38] Fix missing parameters from svg append (#13119) * Add parameter declarations to append() * Made insertFirst parameter optional --- chartist/chartist.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chartist/chartist.d.ts b/chartist/chartist.d.ts index 0e92364812..40169a1963 100644 --- a/chartist/chartist.d.ts +++ b/chartist/chartist.d.ts @@ -423,7 +423,7 @@ declare namespace Chartist { /** * This method will append an element to the current element as a child. */ - append(): IChartistSvg; + append(element: IChartistSvg, insertFirst?: boolean): IChartistSvg; /** * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further. From cfa4509cce7d867d6a3c245585022e12847cf36c Mon Sep 17 00:00:00 2001 From: Nguyen Duc Binh Date: Fri, 9 Dec 2016 03:55:44 +0700 Subject: [PATCH 28/38] =?UTF-8?q?Correct=20missing=20=E2=80=98auto?= =?UTF-8?q?=E2=80=99=20option=20of=20GridList=E2=80=99s=20cellHeight=20(#1?= =?UTF-8?q?3094)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- material-ui/material-ui.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/material-ui/material-ui.d.ts b/material-ui/material-ui.d.ts index 475b719bea..0d83046938 100644 --- a/material-ui/material-ui.d.ts +++ b/material-ui/material-ui.d.ts @@ -966,7 +966,7 @@ declare namespace __MaterialUI { namespace GridList { interface GridListProps { - cellHeight?: number; + cellHeight?: number|'auto'; cols?: number; padding?: number; style?: React.CSSProperties; From 5f2450ba8001ed38c83eae3c0db93f0a3309180d Mon Sep 17 00:00:00 2001 From: Christopher Cortes Date: Thu, 8 Dec 2016 21:56:36 +0100 Subject: [PATCH 29/38] Add new Angular 1.5.9 methods to $compileProvider (#13096) * Add new Angular 1.5.9 methods to $compileProvider Add new methods available in Angular 1.5.9: onChangesTtl(), commentDirectivesEnabled() and cssClassDirectivesEnabled() * Add JSDoc to Angular 1.59 new methods of $compileProvider JSDoc for onChangesTtl(), commentDirectivesEnabled() and cssClassDirectivesEnabled() methods. * Expand $compileProvider JSDoc Urls added to JSDoc of Angular 1.5.9 new methods . --- angularjs/angular.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index b16438bdcb..87870bbbd6 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1205,6 +1205,33 @@ declare namespace angular { debugInfoEnabled(): boolean; debugInfoEnabled(enabled: boolean): ICompileProvider; + + /** + * Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable. + * Increasing the TTL could have performance implications, so you should not change it without proper justification. + * Default: 10. + * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#onChangesTtl + */ + onChangesTtl(): number; + onChangesTtl(limit: number): ICompileProvider; + + /** + * It indicates to the compiler whether or not directives on comments should be compiled. + * It results in a compilation performance gain since the compiler doesn't have to check comments when looking for directives. + * Defaults to true. + * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#commentDirectivesEnabled + */ + commentDirectivesEnabled(): boolean; + commentDirectivesEnabled(enabled: boolean): ICompileProvider; + + /** + * It indicates to the compiler whether or not directives on element classes should be compiled. + * It results in a compilation performance gain since the compiler doesn't have to check element classes when looking for directives. + * Defaults to true. + * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#cssClassDirectivesEnabled + */ + cssClassDirectivesEnabled(): boolean; + cssClassDirectivesEnabled(enabled: boolean): ICompileProvider; } interface ICloneAttachFunction { From d78bd6ca2fc0afcf028d20ecdb5dcee29baa78a9 Mon Sep 17 00:00:00 2001 From: alex-korobko Date: Thu, 8 Dec 2016 15:56:54 -0500 Subject: [PATCH 30/38] Changed type of injectedScript property to string (#13120) The injectedScript property should take string value with script code, not the bool flag as in current version --- chrome/chrome.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index dbf6a12446..df1ac8e710 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1617,7 +1617,7 @@ declare namespace chrome.devtools.inspectedWindow { /** Optional. When true, the loader will ignore the cache for all inspected page resources loaded before the load event is fired. The effect is similar to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools window. */ ignoreCache?: boolean; /** Optional. If specified, the script will be injected into every frame of the inspected page immediately upon load, before any of the frame's scripts. The script will not be injected after subsequent reloads—for example, if the user presses Ctrl+R. */ - injectedScript?: boolean; + injectedScript?: string; /** * Optional. * If specified, this script evaluates into a function that accepts three string arguments: the source to preprocess, the URL of the source, and a function name if the source is an DOM event handler. The preprocessorerScript function should return a string to be compiled by Chrome in place of the input source. In the case that the source is a DOM event handler, the returned source must compile to a single JS function. From 1e2e0b9354ad143021bf1395585bdbf0e09dd301 Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Thu, 8 Dec 2016 15:57:26 -0500 Subject: [PATCH 31/38] Use unions for openlayers string enums (#13134) --- openlayers/openlayers.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index a48e26071b..e52407f450 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -827,7 +827,7 @@ declare module ol { * `'nautical'`, `'metric'`, `'us'`. * @enum {string} */ - type Units = string; + type Units = "degrees" | "imperial" | "nautical" | "metric" | "us"; } /** @@ -2535,7 +2535,7 @@ declare module ol { * IGC altitude/z. One of 'barometric', 'gps', 'none'. * @enum {string} */ - type IGCZ = string; + type IGCZ = "barometric" | "gps" | "none"; /** * @classdesc @@ -3608,7 +3608,7 @@ declare module ol { * `'GeometryCollection'`, `'Circle'`. * @enum {string} */ - type GeometryType = string; + type GeometryType = "Point" | "LineString" | "LinearRing" | "Polygon" | "MultiPoint" | "MultiLineString" | "MultiPolygon" | "GeometryCollection" | "Circle"; /** * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z') @@ -3616,7 +3616,7 @@ declare module ol { * `'XYZ'`, `'XYM'`, `'XYZM'`. * @enum {string} */ - type GeometryLayout = string; + type GeometryLayout = "XY" | "XYZ" | "XYM" | "XYZM"; /** * @classdesc @@ -6417,7 +6417,7 @@ declare module ol { * even during animations, but slower performance than the other options. * @api */ - type VectorTileRenderType = string; + type VectorTileRenderType = "image" | "hybrid" | "vector"; /** * @classdesc @@ -7386,7 +7386,7 @@ declare module ol { * `'top-center'`, `'top-right'` * @enum {string} */ - type OverlayPositioning = string; + type OverlayPositioning = "bottom-left" | "bottom-center" | "bottom-right" | "center-left" | "center-center" | "center-right" | "top-left" | "top-center" | "top-right"; /** * @classdesc @@ -7608,7 +7608,7 @@ declare module ol { * `'us-ft'`. * @enum {string} */ - type Units = string; + type Units = "degress" | "ft" | "m" | "pixels" | "tile-pixels" | "us-ft"; /** * Meters per unit lookup table. @@ -8170,13 +8170,13 @@ declare module ol { * Available renderers: `'canvas'`, `'dom'` or `'webgl'`. * @enum {string} */ - type RendererType = string; + type RendererType = "canvas" | "dom" | "webgl"; /** * Raster operation type. Supported values are `'pixel'` and `'image'`. * @enum {string} */ - type RasterOperationType = string; + type RasterOperationType = "pixel" | "image"; /** * @namespace ol.source @@ -8825,7 +8825,7 @@ declare module ol { * State of the source, one of 'undefined', 'loading', 'ready' or 'error'. * @enum {string} */ - type State = string; + type State = "undefined" | "loading" | "ready" | "error"; /** * @classdesc @@ -9606,7 +9606,7 @@ declare module ol { * specification that OpenLayers can make use of. * @enum {string} */ - type ServerType = string; + type ServerType = "carmentaserver" | "geoserver" | "mapserver" | "qgis"; } @@ -9614,7 +9614,7 @@ declare module ol { * Request encoding. One of 'KVP', 'REST'. * @enum {string} */ - type WMTSRequestEncoding = string; + type WMTSRequestEncoding = "KVP" | "REST"; /** * @classdesc @@ -10071,13 +10071,13 @@ declare module ol { * Icon anchor units. One of 'fraction', 'pixels'. * @enum {string} */ - type IconAnchorUnits = string; + type IconAnchorUnits = "fraction" | "pixels"; /** * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'. * @enum {string} */ - type IconOrigin = string; + type IconOrigin = "bottom-left" | "bottom-right" | "top-left" | "top-right"; /** * @classdesc From a8a8a493f00471f6c02da96fec25f1ef4e162fb9 Mon Sep 17 00:00:00 2001 From: Kiarash Date: Thu, 8 Dec 2016 21:58:18 +0100 Subject: [PATCH 32/38] Update google.maps.MapPane interface (#13122) --- googlemaps/google.maps-tests.ts | 13 +++++++++++++ googlemaps/google.maps.d.ts | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/googlemaps/google.maps-tests.ts b/googlemaps/google.maps-tests.ts index 9b10c40ad3..28d37e811c 100644 --- a/googlemaps/google.maps-tests.ts +++ b/googlemaps/google.maps-tests.ts @@ -140,3 +140,16 @@ var mapTypeStyle: google.maps.MapTypeStyle ={ elementType: 'labels', stylers: [], }; + +/***** OverlayView *****/ +var div = document.createElement('div'); +var overlay = new google.maps.OverlayView(); +var panes = overlay.getPanes(); +panes.floatPane.appendChild(div); +panes.floatShadow.appendChild(div); +panes.mapPane.appendChild(div); +panes.markerLayer.appendChild(div); +panes.overlayImage.appendChild(div); +panes.overlayLayer.appendChild(div); +panes.overlayMouseTarget.appendChild(div); +panes.overlayShadow.appendChild(div); \ No newline at end of file diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index c4168645a6..dff5c1cd90 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -1,6 +1,6 @@ // Type definitions for Google Maps JavaScript API 3.25 // Project: https://developers.google.com/maps/ -// Definitions by: Folia A/S , Chris Wrench +// Definitions by: Folia A/S , Chris Wrench , Kiarash Ghiaseddin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* @@ -871,10 +871,13 @@ declare namespace google.maps { export interface MapPanes { floatPane: Element; + floatShadow: Element; mapPane: Element; markerLayer: Element; + overlayImage: Element; overlayLayer: Element; overlayMouseTarget: Element; + overlayShadow: Element; } export class MapCanvasProjection extends MVCObject { From 372eed3885ccdf35cb62e76755ee7e729ed78cfa Mon Sep 17 00:00:00 2001 From: Alex Staroselsky Date: Thu, 8 Dec 2016 13:58:36 -0700 Subject: [PATCH 33/38] Removing myself (AlStar01) as definition author from angular-material.d.ts (#13125) --- angular-material/angular-material.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index f100fd4d4b..506a696e5b 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular Material 1.1.0-rc5+ (angular.material module) // Project: https://github.com/angular/material -// Definitions by: Alex Staroselsky , Blake Bigelow , Peter Hajdu +// Definitions by: Blake Bigelow , Peter Hajdu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From b294befbaf6e7eefb7ca282fd5ab5eb130212a62 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 8 Dec 2016 13:02:21 -0800 Subject: [PATCH 34/38] Clarify that notNeededPackages.json is just for packages formerly on DefinitelyTyped (#13156) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7187e9e8f6..d974c86493 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,8 @@ Make a PR doing the following: * Any other packages in DefinitelyTyped that referenced the deleted package should be updated to reference the bundled types. To do this, add a `package.json` with `"dependencies": { "foo": "x.y.z" }`. +If a package was never on DefinitelyTyped, it does not need to be added to `notNeededPackages.json`. + #### Lint From 5da11b9a1fa97fb472af1d94ef69ceb340303878 Mon Sep 17 00:00:00 2001 From: wmrowan Date: Thu, 8 Dec 2016 13:04:55 -0800 Subject: [PATCH 35/38] Update Parsimmon typings (#13146) --- parsimmon/parsimmon-tests.ts | 16 +++++++-- parsimmon/parsimmon.d.ts | 67 ++++++++++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 6 deletions(-) diff --git a/parsimmon/parsimmon-tests.ts b/parsimmon/parsimmon-tests.ts index 0cd201cd44..8f87227740 100644 --- a/parsimmon/parsimmon-tests.ts +++ b/parsimmon/parsimmon-tests.ts @@ -46,6 +46,7 @@ var barPar: Parser; var anyArrPar: Parser; +var strArrPar: Parser; var fooArrPar: Parser; var barArrPar: Parser; @@ -68,7 +69,16 @@ index = fooResult.index; // -- -- -- -- -- -- -- -- -- -- -- -- -- +fooResult = P.makeSuccess(0, foo); +fooResult = P.makeFailure(0, ''); + +fooPar = P((input: string, i: number) => P.makeSuccess(0, foo)); +fooPar = P.Parser((input: string, i: number) => P.makeSuccess(0, foo)); + +// -- -- -- -- -- -- -- -- -- -- -- -- -- + fooResult = fooPar.parse(str); +foo = fooPar.tryParse(str); fooPar = fooPar.or(fooPar); anyPar = fooPar.or(barPar); @@ -171,9 +181,9 @@ numPar = P.seqMap(P.digit, P.digits, (a: string, b: string) => 42); strPar = P.seqMap(P.digit, P.digits, P.letter, (a: string, b: string, c: string) => 'foo'); strPar = P.seqMap(P.digit, P.digits, P.letter, P.letters.map(Number), (a: string, b: string, c: string, d: number) => 'foo'); -strPar = P.sepBy(P.string('foo'), P.string('bar')); -strPar = P.sepBy1(P.string('foo'), P.string('bar')); +strArrPar = P.sepBy(P.string('foo'), P.string('bar')); +strArrPar = P.sepBy1(P.string('foo'), P.string('bar')); strPar = P.test((a: string) => false); -strPar = P.takeWhile((a: string) => true); \ No newline at end of file +strPar = P.takeWhile((a: string) => true); diff --git a/parsimmon/parsimmon.d.ts b/parsimmon/parsimmon.d.ts index fa356a799c..22bfa1283b 100644 --- a/parsimmon/parsimmon.d.ts +++ b/parsimmon/parsimmon.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Parsimmon 0.9.2 +// Type definitions for Parsimmon 1.0.0 // Project: https://github.com/jneen/parsimmon // Definitions by: Bart van der Schoor , Mizunashi Mana , Boris Cherny , Benny van Reeven // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,6 +6,42 @@ // TODO convert to generics declare module 'parsimmon' { + + /** + * **NOTE:** You probably will never need to use this function. Most parsing + * can be accomplished using `Parsimmon.regexp` and combination with + * `Parsimmon.seq` and `Parsimmon.alt`. + * + * You can add a primitive parser (similar to the included ones) by using + * `Parsimmon(fn)`. This is an example of how to create a parser that matches + * any character except the one provided: + * + * ```javascript + * function notChar(char) { + * return Parsimmon(function(input, i) { + * if (input.charAt(i) !== char) { + * return Parsimmon.makeSuccess(i + 1, input.charAt(i)); + * } + * return Parsimmon.makeFailure(i, 'anything different than "' + char + '"'); + * }); + * } + * ``` + * + * This parser can then be used and composed the same way all the existing + * ones are used and composed, for example: + * + * ```javascript + * var parser = + * Parsimmon.seq( + * Parsimmon.string('a'), + * notChar('b').times(5) + * ); + * parser.parse('accccc'); + * //=> {status: true, value: ['a', ['c', 'c', 'c', 'c', 'c']]} + * ``` + */ + function Parsimmon(fn: (input: string, i: number) => Parsimmon.Result): Parsimmon.Parser; + namespace Parsimmon { export type StreamType = string; @@ -37,6 +73,12 @@ declare module 'parsimmon' { * parse the string */ parse(input: string): Result; + /** + * Like parser.parse(input) but either returns the parsed value or throws + * an error on failure. The error object contains additional properties + * about the error. + */ + tryParse(input: string): T; /** * returns a new parser which tries parser, and if it fails uses otherParser. */ @@ -101,6 +143,25 @@ declare module 'parsimmon' { desc(description: string): Parser; } + /** + * Alias of `Parsimmon(fn)` for backwards compatibility. + */ + export function Parser(fn: (input: string, i: number) => Parsimmon.Result): Parser; + + /** + * To be used inside of Parsimmon(fn). Generates an object describing how + * far the successful parse went (index), and what value it created doing + * so. See documentation for Parsimmon(fn). + */ + export function makeSuccess(index: number, value: T): Result; + + /** + * To be used inside of Parsimmon(fn). Generates an object describing how + * far the unsuccessful parse went (index), and what kind of syntax it + * expected to see (expectation). See documentation for Parsimmon(fn). + */ + export function makeFailure(furthest: number, expectation: string): Result; + /** * Returns true if obj is a Parsimmon parser, otherwise false. */ @@ -193,12 +254,12 @@ declare module 'parsimmon' { /** * Accepts two parsers, and expects zero or more matches for content, separated by separator, yielding an array. */ - export function sepBy(content: Parser, separator: Parser): Parser + export function sepBy(content: Parser, separator: Parser): Parser /** * This is the same as Parsimmon.sepBy, but matches the content parser at least once. */ - export function sepBy1(content: Parser, separator: Parser): Parser + export function sepBy1(content: Parser, separator: Parser): Parser /** * accepts a function that returns a parser, which is evaluated the first time the parser is used. From 40a819097c82655a7479063d60d1e372db84aa6e Mon Sep 17 00:00:00 2001 From: EamonHetherton Date: Fri, 9 Dec 2016 07:13:26 +1000 Subject: [PATCH 36/38] Update AmCharts.d.ts (#13170) --- amcharts/AmCharts.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amcharts/AmCharts.d.ts b/amcharts/AmCharts.d.ts index ae5baad50e..26057c4396 100644 --- a/amcharts/AmCharts.d.ts +++ b/amcharts/AmCharts.d.ts @@ -2314,6 +2314,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val numberFormatter: Object; /** Name of the open field (used by floating columns, candlesticks and ohlc) in your dataProvider. */ openField: string; + /**Precision of values. Will use chart's precision if not set any.*/ + precision: number; /** Specifies where data points should be placed - on the beginning of the period (day, hour, etc) or in the middle (only when parseDates property of categoryAxis is set to true). This setting affects Serial chart only. Possible values are "start" and "middle". middle */ pointPosition: string; /** If graph's type is column and labelText is set, graph hides labels which do not fit into the column's space. If you don't want these labels to be hidden, set this to true. */ @@ -2587,5 +2589,8 @@ Your function should return string.*/ enabled: boolean; libs: Object; menu: Object; + config: any; + capture(config: any, callback: () => void); + toJPG(config: any, callback: (config:any) => void); } } From e45879a3b4a6d7e265f21103ae044cefb3cee37c Mon Sep 17 00:00:00 2001 From: Paul Oppenheim Date: Thu, 8 Dec 2016 13:14:35 -0800 Subject: [PATCH 37/38] knex: add MySqlConnectionConfig, tests (#13161) * knex: add MySqlConnectionConfig, tests * knex: add types for MySqlConnectionConfig queryFormat params --- knex/knex-tests.ts | 13 +++++++++++++ knex/knex.d.ts | 28 +++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/knex/knex-tests.ts b/knex/knex-tests.ts index b103562b83..780e41b340 100644 --- a/knex/knex-tests.ts +++ b/knex/knex-tests.ts @@ -36,6 +36,19 @@ var knex = Knex({ } }); +// Mysql configuration +var knex = Knex({ + debug: true, + client: 'mysql', + connection: { + host : '127.0.0.1', + user : 'your_database_user', + password : 'your_database_password', + db : 'myapp_test', + trace: false + } +}); + // Pooling var knex = Knex({ client: 'mysql', diff --git a/knex/knex.d.ts b/knex/knex.d.ts index c1cf4f6cba..822d82a197 100644 --- a/knex/knex.d.ts +++ b/knex/knex.d.ts @@ -455,7 +455,7 @@ declare module "knex" { client?: string; dialect?: string; connection?: string|ConnectionConfig|MariaSqlConnectionConfig| - Sqlite3ConnectionConfig|SocketConnectionConfig; + MySqlConnectionConfig|Sqlite3ConnectionConfig|SocketConnectionConfig; pool?: PoolConfig; migrations?: MigratorConfig; acquireConnectionTimeout?: number; @@ -503,6 +503,32 @@ declare module "knex" { rejectUnauthorized?: boolean; } + // Config object for mysql: https://github.com/mysqljs/mysql#connection-options + interface MySqlConnectionConfig { + host?: string; + port?: number; + localAddress?: string; + socketPath?: string; + user?: string; + password?: string; + database?: string; + charset?: string; + timezone?: string; + connectTimeout?: number; + stringifyObjects?: boolean; + insecureAuth?: boolean; + typeCast?: boolean; + queryFormat?: (query: string, values: any) => string; + supportBigNumbers?: boolean; + bigNumberStrings?: boolean; + dateStrings?: boolean; + debug?: boolean; + trace?: boolean; + multipleStatements?: boolean; + flags?: string; + ssl?: string | MariaSslConfiguration; + } + /** Used with SQLite3 adapter */ interface Sqlite3ConnectionConfig { filename: string; From 6b3bc735ad028ca115c06721fb1c71ffc0e7a546 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 12 Dec 2016 09:24:06 -0800 Subject: [PATCH 38/38] Add note in readme about tsjs-lib-generator (#13210) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d974c86493..0b1474cd75 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,10 @@ If you're targeting master, we may change it to the new style when merging from Here are the [currently requested definitions](https://github.com/DefinitelyTyped/DefinitelyTyped/labels/Definition%3ARequest). +#### What about type definitions for the DOM? + +If types are part of a web standard, they should be contributed to [TSJS-lib-generator](https://github.com/Microsoft/TSJS-lib-generator) so that they can become part of the default `lib.dom.d.ts`. + ## License